|
|
!(function(){var sP=Object.defineProperty,aP=Object.defineProperties;var lP=Object.getOwnPropertyDescriptors;var J0=Object.getOwnPropertySymbols;var Sx=Object.prototype.hasOwnProperty,xx=Object.prototype.propertyIsEnumerable;var yx=(Sn,Ve,Pt)=>Ve in Sn?sP(Sn,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Pt}):Sn[Ve]=Pt,ud=(Sn,Ve)=>{for(var Pt in Ve||(Ve={}))Sx.call(Ve,Pt)&&yx(Sn,Pt,Ve[Pt]);if(J0)for(var Pt of J0(Ve))xx.call(Ve,Pt)&&yx(Sn,Pt,Ve[Pt]);return Sn},Xy=(Sn,Ve)=>aP(Sn,lP(Ve));var Px=(Sn,Ve)=>{var Pt={};for(var vt in Sn)Sx.call(Sn,vt)&&Ve.indexOf(vt)<0&&(Pt[vt]=Sn[vt]);if(Sn!=null&&J0)for(var vt of J0(Sn))Ve.indexOf(vt)<0&&xx.call(Sn,vt)&&(Pt[vt]=Sn[vt]);return Pt};(self.webpackChunk=self.webpackChunk||[]).push([[8447],{40001:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},26227:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},49198:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},41464:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},73331:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},15277:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},52671:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},8657:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},56082:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},33853:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},15075:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},43531:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},61485:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},38819:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},47472:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(te,Fe){return It.createElement($t.Z,(0,vt.Z)({},te,{ref:Fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt},37036:function(){"use strict"},95625:function(){"use strict"},88010:function(Sn,Ve){"use strict";Ve.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},76895:function(Sn,Ve){"use strict";Ve.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},74413:function(){"use strict";function Sn(Ot,et,nt,ht){nt===void 0&&(nt=0),ht===void 0&&(ht=1/0),this._name=Ot,this._defaultValue=et,this._minimum=nt,this._maximum=ht}Object.defineProperty(Sn.prototype,"name",{get:function(){return this._name},set:function(Ot){if(typeof Ot!="string"||Ot==="")throw new Error("Shape name must be a valid string.");this._name=Ot}}),Object.defineProperty(Sn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ot){if(typeof Ot!="number"||isNaN(Ot))throw new Error("The default value must be a real number, not: "+Ot);this._defaultValue=Ot}}),Object.defineProperty(Sn.prototype,"minimum",{get:function(){return this._minimum},set:function(Ot){if(typeof Ot!="number"||isNaN(Ot))throw new Error("Minimum must be a real number, not: "+Ot);this._minimum=Ot}}),Object.defineProperty(Sn.prototype,"maximum",{get:function(){return this._maximum},set:function(Ot){if(typeof Ot!="number"||isNaN(Ot))throw new Error("Maximum must be a real number, not: "+Ot);this._maximum=Ot}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ot,et){var nt=go.Shape._FigureParameters[Ot];return nt?nt[et]:null},go.Shape.setFigureParameter=function(Ot,et,nt){if(!(nt instanceof Sn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+nt);if(nt.defaultValue<nt.minimum||nt.defaultValue>nt.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+nt.defaultValue);var ht=go.Shape._FigureParameters[Ot];ht||(ht=[],go.Shape._FigureParameters[Ot]=ht),ht[et]=nt};var Ve=[];function Pt(Ot,et){var nt=Ve.pop();return nt===void 0?new go.Point(Ot,et):(nt.x=Ot,nt.y=et,nt)}function vt(){var Ot=Ve.pop();return Ot===void 0?new go.Point:Ot}function It(Ot){Ve.push(Ot)}function oe(Ot,et,nt,ht,at,ft,mt,wt,Et){Et||(Et=new go.Point);var Nt=Ot-nt,Dt=at-mt,At=NaN,Kt=NaN;if(Nt===0)if(Dt===0)Ot===nt&&(At=Ot,Kt=et);else{var Wt=(ft-wt)/Dt,xe=ft-Wt*at;At=Ot,Kt=Wt*At+xe}else if(Dt===0){var Vt=(et-ht)/Nt,Ie=et-Vt*Ot;At=at,Kt=Vt*At+Ie}else{var Vt=(et-ht)/Nt,Wt=(ft-wt)/Dt,Ie=et-Vt*Ot,xe=ft-Wt*at;At=(xe-Ie)/(Vt-Wt),Kt=Vt*At+Ie}return Et.x=At,Et.y=Kt,Et}function de(Ot,et,nt,ht,at,ft,mt,wt,Et,Nt,Dt,At,Kt,Wt){var xe=1-Et,Vt=Et,Ie=Ot*xe+nt*Vt,Se=et*xe+ht*Vt,Ye=nt*xe+at*Vt,Le=ht*xe+ft*Vt,Pe=at*xe+mt*Vt,We=ft*xe+wt*Vt,Ue=Ie*xe+Ye*Vt,ue=Se*xe+Le*Vt,Ht=Ye*xe+Pe*Vt,ke=Le*xe+We*Vt,pn=Ue*xe+Ht*Vt,ln=ue*xe+ke*Vt;Nt.x=Ie,Nt.y=Se,Dt.x=Ue,Dt.y=ue,At.x=pn,At.y=ln,Kt.x=Ht,Kt.y=ke,Wt.x=Pe,Wt.y=We}var $t=new go.Spot(.156,.156),Ut=new go.Spot(.844,.844),Jt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Sn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=5),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var at=ht*Jt,ft=new go.Geometry().add(new go.PathFigure(ht,0,!0).add(new go.PathSegment(go.PathSegment.Line,et-ht,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,ht,et-at,0,et,at)).add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)).add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,nt-at,et-at,nt)).add(new go.PathSegment(go.PathSegment.Line,ht,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,at,nt,0,nt-at)).add(new go.PathSegment(go.PathSegment.Line,0,ht)).add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,at,at,0).close()));return at>1&&(ft.spot1=new go.Spot(0,0,at,at),ft.spot2=new go.Spot(1,1,-at,-at)),ft}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ot,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=nt/2,ht.endX=et,ht.endY=nt/2,ht}),go.Shape.defineFigureGenerator("LineV",function(Ot,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=et/2,ht.startY=0,ht.endX=et/2,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt/2,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("XLine",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LineRight",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(.25*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)))}),go.Shape.defineFigureGenerator("LineDown",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,.25*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(.75*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)))}),go.Shape.defineFigureGenerator("LineUp",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,.75*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ot,et,nt){var ht=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ht*et,(1-ht)*nt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Move,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt/2)).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ot,et,nt){var ht=et/2,at=new go.Geometry().add(new go.PathFigure(et,et/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ht,ht,ht,ht).close()));return at.spot1=$t,at.spot2=Ut,at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Line1",function(Ot,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=0,ht.endX=et,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("Line2",function(Ot,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=et,ht.startY=0,ht.endX=0,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("Curve1",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Jt*et,0,et,(1-Jt)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,Jt*nt,(1-Jt)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,Jt*nt,Jt*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-Jt)*et,0,0,(1-Jt)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Sn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)?ht=.1:ht<-1?ht=-1:ht>1&&(ht=1);var at=Math.abs(ht)*et;if(ht===0){var ft=new go.Geometry(go.Geometry.Rectangle);return ft.startX=0,ft.startY=0,ft.endX=et,ft.endY=nt,ft}else{var ft=new go.Geometry;return ht>0?ft.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-at,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):ft.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-at,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,at,nt).close())),at<et/2&&ft.setSpots(at/et,0,(et-at)/et,1),ft}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Sn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)?ht=10:ht<-et?ht=-et:ht>et&&(ht=et);var at=Math.abs(ht);if(ht===0){var ft=new go.Geometry(go.Geometry.Rectangle);return ft.startX=0,ft.startY=0,ft.endX=et,ft.endY=nt,ft}else{var ft=new go.Geometry;return ht>0?ft.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-at,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):ft.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-at,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,at,nt).close())),at<et/2&&ft.setSpots(at/et,0,(et-at)/et,1),ft}}),go.Shape.setFigureParameter("Trapezoid1",0,new Sn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)?ht=.2:ht<.5?ht=-.5:ht>.5&&(ht=.5);var at=Math.abs(ht)*et;if(ht===0){var ft=new go.Geometry(go.Geometry.Rectangle);return ft.startX=0,ft.startY=0,ft.endX=et,ft.endY=nt,ft}else{var ft=new go.Geometry;return ht>0?ft.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,et-at,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):ft.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-at,nt)).add(new go.PathSegment(go.PathSegment.Line,at,nt).close())),at<et/2&&ft.setSpots(at/et,0,(et-at)/et,1),ft}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Sn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)?ht=20:ht<-et?ht=-et/2:ht>et&&(ht=et/2);var at=Math.abs(ht);if(ht===0){var ft=new go.Geometry(go.Geometry.Rectangle);return ft.startX=0,ft.startY=0,ft.endX=et,ft.endY=nt,ft}else{var ft=new go.Geometry;return ht>0?ft.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,et-at,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):ft.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-at,nt)).add(new go.PathSegment(go.PathSegment.Line,at,nt).close())),at<et/2&&ft.setSpots(at/et,0,(et-at)/et,1),ft}}),go.Shape.setFigureParameter("ManualOperation",0,new Sn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)?ht=10:ht<-et?ht=-et/2:ht>et&&(ht=et/2);var at=Math.abs(ht);if(ht===0){var ft=new go.Geometry(go.Geometry.Rectangle);return ft.startX=0,ft.startY=0,ft.endX=et,ft.endY=nt,ft}else{var ft=new go.Geometry;return ht>0?ft.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-at,nt)).add(new go.PathSegment(go.PathSegment.Line,at,nt).close())):ft.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,et-at,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())),at<et/2&&ft.setSpots(at/et,0,(et-at)/et,1),ft}});var De=[];function we(){var Ot=De.pop();return Ot===void 0?[]:Ot}function te(Ot){Ot.length=0,De.push(Ot)}function Fe(Ot){for(var et=we(),nt=.5,ht=.5,at=Math.PI*1.5,ft=0,mt=0;mt<Ot;mt++)ft=2*Math.PI/Ot*mt+at,et[mt]=new go.Point(ht+nt*Math.cos(ft),ht+nt*Math.sin(ft));return et.push(et[0]),et}function re(Ot){var et=me(Ot),nt=we();nt[0]=et[0];for(var ht=1,at=1;ht<et.length;ht+=2,at+=3)nt[at]=et[ht],nt[at+1]=et[ht],nt[at+2]=et[ht+1];return te(et),nt}function me(Ot){for(var et=Fe(Ot),nt=we(),ht=Math.floor(et.length/2),at=et.length-1,ft=Ot%2===0?2:1,mt=0;mt<at;mt++){var wt=et[mt],Et=et[mt+1],Nt=et[(ht+mt-1)%at],Dt=et[(ht+mt+ft)%at];nt[mt*2]=wt,nt[mt*2+1]=oe(wt.x,wt.y,Nt.x,Nt.y,Et.x,Et.y,Dt.x,Dt.y,new go.Point)}return nt[nt.length]=nt[0],te(et),nt}go.Shape.defineFigureGenerator("Pentagon",function(Ot,et,nt){var ht=Fe(5),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<5;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.2,.22),at.spot2=new go.Spot(.8,.9),at}),go.Shape.defineFigureGenerator("Hexagon",function(Ot,et,nt){var ht=Fe(6),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<6;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.07,.25),at.spot2=new go.Spot(.93,.75),at}),go.Shape.defineFigureGenerator("Heptagon",function(Ot,et,nt){var ht=Fe(7),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<7;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.2,.15),at.spot2=new go.Spot(.8,.85),at}),go.Shape.defineFigureGenerator("Octagon",function(Ot,et,nt){var ht=Fe(8),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<8;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.15,.15),at.spot2=new go.Spot(.85,.85),at}),go.Shape.defineFigureGenerator("Nonagon",function(Ot,et,nt){var ht=Fe(9),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<9;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.17,.13),at.spot2=new go.Spot(.82,.82),at}),go.Shape.defineFigureGenerator("Decagon",function(Ot,et,nt){var ht=Fe(10),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<10;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("Dodecagon",function(Ot,et,nt){var ht=Fe(12),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<12;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ot,et,nt){var ht=me(5),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<10;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.266,.333),at.spot2=new go.Spot(.733,.733),at}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ot,et,nt){var ht=me(6),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<12;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.17,.25),at.spot2=new go.Spot(.83,.75),at}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ot,et,nt){var ht=me(7),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<14;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ot,et,nt){var ht=me(8),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<16;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ot,et,nt){var ht=me(9),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<18;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ot,et,nt){var ht=me(10),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<20;mt++)ft.add(new go.PathSegment(go.PathSegment.Line,ht[mt].x*et,ht[mt].y*nt));return ft.add(new go.PathSegment(go.PathSegment.Line,ht[0].x*et,ht[0].y*nt).close()),te(ht),at.spot1=new go.Spot(.281,.261),at.spot2=new go.Spot(.723,.748),at}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ot,et,nt){var ht=re(5),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<ht.length;mt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[mt+2].x*et,ht[mt+2].y*nt,ht[mt].x*et,ht[mt].y*nt,ht[mt+1].x*et,ht[mt+1].y*nt));return ft.segments.last().close(),te(ht),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ot,et,nt){var ht=re(6),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<ht.length;mt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[mt+2].x*et,ht[mt+2].y*nt,ht[mt].x*et,ht[mt].y*nt,ht[mt+1].x*et,ht[mt+1].y*nt));return ft.segments.last().close(),te(ht),at.spot1=new go.Spot(.17,.222),at.spot2=new go.Spot(.833,.777),at}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ot,et,nt){var ht=re(7),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<ht.length;mt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[mt+2].x*et,ht[mt+2].y*nt,ht[mt].x*et,ht[mt].y*nt,ht[mt+1].x*et,ht[mt+1].y*nt));return ft.segments.last().close(),te(ht),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ot,et,nt){var ht=re(8),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<ht.length;mt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[mt+2].x*et,ht[mt+2].y*nt,ht[mt].x*et,ht[mt].y*nt,ht[mt+1].x*et,ht[mt+1].y*nt));return ft.segments.last().close(),te(ht),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ot,et,nt){var ht=re(9),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<ht.length;mt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[mt+2].x*et,ht[mt+2].y*nt,ht[mt].x*et,ht[mt].y*nt,ht[mt+1].x*et,ht[mt+1].y*nt));return ft.segments.last().close(),te(ht),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ot,et,nt){var ht=re(10),at=new go.Geometry,ft=new go.PathFigure(ht[0].x*et,ht[0].y*nt,!0);at.add(ft);for(var mt=1;mt<ht.length;mt+=3)ft.add(new go.PathSegment(go.PathSegment.Bezier,ht[mt+2].x*et,ht[mt+2].y*nt,ht[mt].x*et,ht[mt].y*nt,ht[mt+1].x*et,ht[mt+1].y*nt));return ft.segments.last().close(),te(ht),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.setFigureParameter("FramedRectangle",0,new Sn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Sn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN,at=Ot?Ot.parameter2:NaN;isNaN(ht)&&(ht=8),isNaN(at)&&(at=8);var ft=new go.Geometry,mt=new go.PathFigure(0,0,!0);return ft.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,0)),mt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht<et/2&&at<nt/2&&(mt.add(new go.PathSegment(go.PathSegment.Move,ht,at)),mt.add(new go.PathSegment(go.PathSegment.Line,ht,nt-at)),mt.add(new go.PathSegment(go.PathSegment.Line,et-ht,nt-at)),mt.add(new go.PathSegment(go.PathSegment.Line,et-ht,at).close())),ft.setSpots(0,0,1,1,ht,at,-ht,-at),ft}),go.Shape.setFigureParameter("Ring",0,new Sn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=8);var at=et/2,ft=new go.Geometry,mt=new go.PathFigure(et,et/2,!0);ft.add(mt),mt.add(new go.PathSegment(go.PathSegment.Arc,0,360,at,at,at,at).close());var wt=Math.max(at-ht,0);return wt>0&&(mt.add(new go.PathSegment(go.PathSegment.Move,et/2+wt,et/2)),mt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,at,at,wt,wt).close())),ft.spot1=$t,ft.spot2=Ut,ft.defaultStretch=go.GraphObject.Uniform,ft}),go.Shape.defineFigureGenerator("Cloud",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(.08034461*et,.1944299*nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*et,.05349299*nt,-.09239631*et,.07836421*nt,.1406031*et,-.0542823*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*et,.074219*nt,.2450511*et,-.00697547*nt,.3776197*et,-.01112067*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*et,.07004196*nt,.4539471*et,0,.6066018*et,-.02526587*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*et,.08370865*nt,.6914277*et,-.01904177*nt,.8921095*et,-.01220843*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*et,.3194596*nt,1.036446*et,.04105738*nt,1.020377*et,.3022052*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*et,.562044*nt,1.04448*et,.360238*nt,.992256*et,.5219009*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*et,.8217117*nt,1.032337*et,.5771781*nt,1.018411*et,.8120651*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*et,.9156953*nt,1.028411*et,.9571472*nt,.8556702*et,1.052487*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*et,.9310455*nt,.7431877*et,1.009325*nt,.5624123*et,1.021761*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*et,.9344623*nt,.4820677*et,1.031761*nt,.3030112*et,1.002796*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.870098*nt,.2329994*et,1.01518*nt,.03213784*et,1.01518*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*et,.6545475*nt,-.02812061*et,.9032597*nt,-.01205169*et,.6835638*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*et,.4265613*nt,-.01812061*et,.6089503*nt,-.00606892*et,.4555777*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.1944299*nt,-.01606892*et,.3892545*nt,-.01205169*et,.1944299*nt))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ot,et,nt){var ht=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ht*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,et,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,ht*nt).close())).setSpots(ht/2,ht/2,1-ht/2,1-ht/2)}),go.Shape.setFigureParameter("Pie",0,new Sn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Sn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN,at=Ot?Ot.parameter2:NaN;isNaN(ht)&&(ht=0),isNaN(at)&&(at=315);var ft=ht%360;ft<0&&(ft+=360);var mt=at%360,wt=Math.min(et,nt)/2;return new go.Geometry().add(new go.PathFigure(wt,wt).add(new go.PathSegment(go.PathSegment.Arc,ft,mt,wt,wt,wt,wt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ot,et,nt){var ht=Jt/Math.SQRT2*.5,at=Math.SQRT2/2,ft=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,at*et,ft*nt,et,(1-ht)*nt,(at+ht)*et,(ft+ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30);var at=Math.min(ht,et)/2,ft=et/2,mt=nt/2;return new go.Geometry().add(new go.PathFigure(ft-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,ft+at,0)).add(new go.PathSegment(go.PathSegment.Line,ft+at,mt-at)).add(new go.PathSegment(go.PathSegment.Line,et,mt-at)).add(new go.PathSegment(go.PathSegment.Line,et,mt+at)).add(new go.PathSegment(go.PathSegment.Line,ft+at,mt+at)).add(new go.PathSegment(go.PathSegment.Line,ft+at,nt)).add(new go.PathSegment(go.PathSegment.Line,ft-at,nt)).add(new go.PathSegment(go.PathSegment.Line,ft-at,mt+at)).add(new go.PathSegment(go.PathSegment.Line,0,mt+at)).add(new go.PathSegment(go.PathSegment.Line,0,mt-at)).add(new go.PathSegment(go.PathSegment.Line,ft-at,mt-at).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Sn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var at=Math.min(ht,et)/2,ft=et/2,mt=nt/2;return new go.Geometry().add(new go.PathFigure(ft-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,ft+at,0)).add(new go.PathSegment(go.PathSegment.Line,ft+at,mt-at)).add(new go.PathSegment(go.PathSegment.Line,et,mt-at)).add(new go.PathSegment(go.PathSegment.Line,et,mt+at)).add(new go.PathSegment(go.PathSegment.Line,ft+at,mt+at)).add(new go.PathSegment(go.PathSegment.Line,ft+at,nt)).add(new go.PathSegment(go.PathSegment.Line,ft-at,nt)).add(new go.PathSegment(go.PathSegment.Line,ft-at,mt+at)).add(new go.PathSegment(go.PathSegment.Line,0,mt+at)).add(new go.PathSegment(go.PathSegment.Line,0,mt-at)).add(new go.PathSegment(go.PathSegment.Line,ft-at,mt-at).close()))}),go.Shape.setFigureParameter("ThickX",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;if((isNaN(ht)||ht<0)&&(ht=30),et===0||nt===0){var at=new go.Geometry(go.Geometry.Rectangle);return at.startX=0,at.startY=0,at.endX=et,at.endY=nt,at}else{var ft=et/2,mt=nt/2,wt=Math.atan2(nt,et),Et=ht-Math.min(Math.cos(wt)*ht/2,ft),Nt=ht-Math.min(Math.sin(wt)*ht/2,mt),at=new go.Geometry,Dt=new go.PathFigure(Et,0,!0);return at.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,ft,.2*nt)),Dt.add(new go.PathSegment(go.PathSegment.Line,et-Et,0)),Dt.add(new go.PathSegment(go.PathSegment.Line,et,Nt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.8*et,mt)),Dt.add(new go.PathSegment(go.PathSegment.Line,et,nt-Nt)),Dt.add(new go.PathSegment(go.PathSegment.Line,et-Et,nt)),Dt.add(new go.PathSegment(go.PathSegment.Line,ft,.8*nt)),Dt.add(new go.PathSegment(go.PathSegment.Line,Et,nt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,nt-Nt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*et,mt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,Nt).close()),at}}),go.Shape.setFigureParameter("ThinX",0,new Sn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var at=new go.Geometry,ft=new go.PathFigure(.1*et,0,!0);return at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt).close()),at}),go.Shape.setFigureParameter("SquareIBeam",0,new Sn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=.2);var at=new go.Geometry,ft=new go.PathFigure(0,0,!0);return at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*et,ht*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*et,(1-ht)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,(1-ht)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*et,(1-ht)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*et,ht*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,ht*nt).close()),at}),go.Shape.setFigureParameter("RoundedIBeam",0,new Sn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=.5);var at=new go.Geometry,ft=new go.PathFigure(0,0,!0);return at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Math.abs(1-ht)*et,.25*nt,Math.abs(1-ht)*et,.75*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*et,.75*nt,ht*et,.25*nt).close()),at}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,Jt*et,0,et,(.5-Jt/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+Jt/2)*nt,Jt*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,0,et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*et,.75*nt,.5*et,.25*nt).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,.1*et,.8*nt,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,0,0,.45*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.55*et,0,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.5*nt,.9*et,.8*nt).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*et,.01*nt)).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.6*et,.2*nt,et,.25*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.7*nt,et,.8*nt,.6*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,.5*et,.75*nt,.55*et,.95*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.7*nt,.45*et,.95*nt,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.4*et,.8*nt,0,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.49*et,.01*nt,0,.25*nt,.4*et,.2*nt).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.4*et,.6*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.15*et,nt,.5*et,.75*nt,.45*et,.95*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.6*nt,.55*et,.95*nt,.5*et,.75*nt));var ft=.2,mt=.3,wt=0,Et=ft*Jt;return at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*et,(.5+ft+wt)*nt,(.5-ft+mt)*et,(.5+Et+wt)*nt,(.5-Et+mt)*et,(.5+ft+wt)*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ft+mt)*et,(.5+wt)*nt,(.5+Et+mt)*et,(.5+ft+wt)*nt,(.5+ft+mt)*et,(.5+Et+wt)*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*et,(.5-ft+wt)*nt,(1-.5+ft+mt)*et,(.5-Et+wt)*nt,(.5+Et+mt)*et,(.5-ft+wt)*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-Et+mt)*et,(.5-ft+wt)*nt,(.5-ft+mt+.05)*et,(.5-Et+wt-.02)*nt)),ft=.2,mt=0,wt=-.3,Et=ft*Jt,at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ft+mt)*et,(.5+wt)*nt,(.5+Et+mt)*et,(.5+ft+wt)*nt,(.5+ft+mt)*et,(.5+Et+wt)*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*et,(.5-ft+wt)*nt,(1-.5+ft+mt)*et,(.5-Et+wt)*nt,(.5+Et+mt)*et,(.5-ft+wt)*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ft+mt)*et,(.5+wt)*nt,(.5-Et+mt)*et,(.5-ft+wt)*nt,(.5-ft+mt)*et,(.5-Et+wt)*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Et+mt)*et,(.5+ft+wt)*nt,(.5-ft+mt)*et,(.5+Et+wt)*nt,(.5-Et+mt)*et,(.5+ft+wt)*nt)),ft=.2,mt=-.3,wt=0,Et=ft*Jt,at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*et,(.5-ft+wt)*nt,(1-.5+ft+mt-.05)*et,(.5-Et+wt-.02)*nt,(.5+Et+mt)*et,(.5-ft+wt)*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ft+mt)*et,(.5+wt)*nt,(.5-Et+mt)*et,(.5-ft+wt)*nt,(.5-ft+mt)*et,(.5-Et+wt)*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*et,(.5+ft+wt)*nt,(.5-ft+mt)*et,(.5+Et+wt)*nt,(.5-Et+mt)*et,(.5+ft+wt)*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+Et+mt)*et,(.5+ft+wt)*nt,(.5+ft+mt)*et,(.5+Et+wt)*nt).close()),ht.setSpots(.06,.33,.93,.68),ht}),go.Shape.defineFigureGenerator("YinYang",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*.5,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*.5,et*.5,et*.5,et*.5)),at.add(new go.PathSegment(go.PathSegment.Arc,90,-180,et*.5,et*.75,et*.25,et*.25)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,et*.5,et*.25,et*.25,et*.25));var ft=.1,mt=.5,wt=.25;return at.add(new go.PathSegment(go.PathSegment.Move,(mt+ft)*et,wt*nt)),at.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*mt,nt*wt,ft*et,ft*et).close()),at=new go.PathFigure(et*.5,0,!1),ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*.5,et*.5,et*.5,et*.5)),wt=.75,at=new go.PathFigure((mt+ft)*et,wt*nt,!0),ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*mt,nt*wt,ft*et,ft*et).close()),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Peace",function(Ot,et,nt){var ht=.8535533905932737,at=.5*et,ft=.5*nt;return new go.Geometry().add(new go.PathFigure(at,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,at,ft,at,ft)).add(new go.PathSegment(go.PathSegment.Line,at,nt)).add(new go.PathSegment(go.PathSegment.Move,at,ft)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Move,at,ft)).add(new go.PathSegment(go.PathSegment.Line,ht*et,ht*nt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.5,ft=.5,mt=.5,wt=.5,Et=new go.PathFigure(mt*et,(wt-ft)*nt);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt-ft)*et,wt*nt,(mt-at)*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+ft)*nt,(mt-ft)*et,(wt+at)*nt,(mt-at)*et,(wt+ft)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,wt*nt,(mt+at)*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-ft)*nt,(mt+ft)*et,(wt-at)*nt,(mt+at)*et,(wt-ft)*nt)),ft=.4,at=Jt*.4;var Nt=vt(),Dt=vt(),At=vt(),Kt=vt();de(mt,wt-ft,mt+at,wt-ft,mt+ft,wt-at,mt+ft,wt,.42,Nt,Dt,At,Kt,Kt);var Wt=vt(),xe=vt(),Vt=vt();de(mt,wt-ft,mt+at,wt-ft,mt+ft,wt-at,mt+ft,wt,.58,Kt,Kt,Vt,Wt,xe);var Ie=vt(),Se=vt(),Ye=vt();de(mt,wt+ft,mt-at,wt+ft,mt-ft,wt+at,mt-ft,wt,.42,Ie,Se,Ye,Kt,Kt);var Le=vt(),Pe=vt(),We=vt();return de(mt,wt+ft,mt-at,wt+ft,mt-ft,wt+at,mt-ft,wt,.58,Kt,Kt,We,Le,Pe),Et.add(new go.PathSegment(go.PathSegment.Move,We.x*et,We.y*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt-ft)*et,wt*nt,Le.x*et,Le.y*nt,Pe.x*et,Pe.y*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt,(mt-at)*et,(wt-ft)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,At.x*et,At.y*nt,Nt.x*et,Nt.y*nt,Dt.x*et,Dt.y*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,We.x*et,We.y*nt).close()),Et.add(new go.PathSegment(go.PathSegment.Move,Ye.x*et,Ye.y*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,Vt.x*et,Vt.y*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,wt*nt,Wt.x*et,Wt.y*nt,xe.x*et,xe.y*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,Ye.x*et,Ye.y*nt,Ie.x*et,Ie.y*nt,Se.x*et,Se.y*nt).close()),It(Nt),It(Dt),It(At),It(Kt),It(Wt),It(xe),It(Vt),It(Ie),It(Se),It(Ye),It(Le),It(Pe),It(We),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Fragile",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*et,0)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.29*et,.33*nt)).add(new go.PathSegment(go.PathSegment.Line,.35*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.5*nt,et,.25*nt,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.5*nt,0,.25*nt).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30),ht>et&&(ht=et);var at=(et-ht)/2,ft=at+ht;return new go.Geometry().add(new go.PathFigure(ft,.5*nt).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,at,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,.55*nt).add(new go.PathSegment(go.PathSegment.Line,.6*et,0)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.55*nt).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.4,ft=.4,mt=.5,wt=.5,Et=vt(),Nt=vt(),Dt=vt(),At=vt(),Kt=new go.PathFigure((mt-ft)*et,wt*nt,!1);ht.add(Kt),Kt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt,(mt-at)*et,(wt-ft)*nt)),de(mt,wt-ft,mt+at,wt-ft,mt+ft,wt-at,mt+ft,wt,.44,Dt,At,Nt,Et,Et),Kt.add(new go.PathSegment(go.PathSegment.Bezier,Nt.x*et,Nt.y*nt,Dt.x*et,Dt.y*nt,At.x*et,At.y*nt));var Wt=Pt(Nt.x,Nt.y);de(mt,wt-ft,mt+at,wt-ft,mt+ft,wt-at,mt+ft,wt,.56,Et,Et,Nt,Dt,At);var xe=Pt(Nt.x,Nt.y);Kt.add(new go.PathSegment(go.PathSegment.Line,(Wt.x*.1+.95*.9)*et,Wt.y*.1*nt)),Kt.add(new go.PathSegment(go.PathSegment.Line,.85*et,Wt.y*.1*nt)),Kt.add(new go.PathSegment(go.PathSegment.Line,.85*et,0)),Kt.add(new go.PathSegment(go.PathSegment.Line,et,0)),Kt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),Kt.add(new go.PathSegment(go.PathSegment.Line,(xe.x*.1+.9)*et,.15*nt)),Kt.add(new go.PathSegment(go.PathSegment.Line,(xe.x*.1+.9)*et,(xe.y*.1+.05*.9)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Line,xe.x*et,xe.y*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,wt*nt,Dt.x*et,Dt.y*nt,At.x*et,At.y*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-ft)*et,wt*nt,(mt-at)*et,(wt+ft)*nt,(mt-ft)*et,(wt+at)*nt)),ft=.35,at=Jt*.35;var Vt=new go.PathFigure(mt*et,(wt-ft)*nt,!1);ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-ft)*et,wt*nt,(mt-at)*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+ft)*nt,(mt-ft)*et,(wt+at)*nt,(mt-at)*et,(wt+ft)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,wt*nt,(mt+at)*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-ft)*nt,(mt+ft)*et,(wt-at)*nt,(mt+at)*et,(wt-ft)*nt));var Ie=new go.PathFigure((mt-ft)*et,wt*nt,!1);return ht.add(Ie),It(Et),It(Nt),It(Dt),It(At),It(Wt),It(xe),ht.spot1=new go.Spot(.202,.257),ht.spot2=new go.Spot(.792,.739),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("GenderFemale",function(Ot,et,nt){var ht=new go.Geometry,at=.375,ft=0,mt=-.125,wt=at*Jt,Et=new go.PathFigure((.525+ft)*et,(.5+at+mt)*nt,!1);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+ft)*et,(.5+mt)*nt,(.5+wt+ft)*et,(.5+at+mt)*nt,(.5+at+ft)*et,(.5+wt+mt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ft)*et,(.5-at+mt)*nt,(1-.5+at+ft)*et,(.5-wt+mt)*nt,(.5+wt+ft)*et,(.5-at+mt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ft)*et,(.5+mt)*nt,(.5-wt+ft)*et,(.5-at+mt)*nt,(.5-at+ft)*et,(.5-wt+mt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(.475+ft)*et,(.5+at+mt)*nt,(.5-at+ft)*et,(.5+wt+mt)*nt,(.5-wt+ft)*et,(.5+at+mt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),at=.325,ft=0,mt=-.125,wt=at*Jt;var Et=new go.PathFigure((1-.5+at+ft)*et,(.5+mt)*nt,!1);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ft)*et,(.5+at+mt)*nt,(.5+at+ft)*et,(.5+wt+mt)*nt,(.5+wt+ft)*et,(.5+at+mt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ft)*et,(.5+mt)*nt,(.5-wt+ft)*et,(.5+at+mt)*nt,(.5-at+ft)*et,(.5+wt+mt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ft)*et,(.5-at+mt)*nt,(.5-at+ft)*et,(.5-wt+mt)*nt,(.5-wt+ft)*et,(.5-at+mt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+ft)*et,(.5+mt)*nt,(.5+wt+ft)*et,(.5-at+mt)*nt,(1-.5+at+ft)*et,(.5-wt+mt)*nt));var Et=new go.PathFigure((.525+ft)*et,(.5+at+mt)*nt,!1);return ht.add(Et),ht.spot1=new go.Spot(.232,.136),ht.spot2=new go.Spot(.682,.611),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicImplies",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,ht*et,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,nt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ot,et,nt){var ht=new go.Geometry().add(new go.PathFigure(.5*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*et,.5*nt,.5*et,.5*nt)));return ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicTruth",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ot,et,nt){var ht=.5;return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,0,ht*nt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ht*et,ht*nt,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ot,et,nt){var ht=.5;return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ht*et,ht*nt,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Sn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Sn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=.3);var at=Ot?Ot.parameter2:NaN;isNaN(at)&&(at=.3);var ft=(1-ht)*et,mt=(.5-at/2)*nt,wt=(.5+at/2)*nt,Et=new go.Geometry,Nt=new go.PathFigure(0,mt,!0);Et.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,ft,mt)),Nt.add(new go.PathSegment(go.PathSegment.Line,ft,0)),Nt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,ft,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,ft,wt)),Nt.add(new go.PathSegment(go.PathSegment.Line,0,wt).close()),Et.spot1=new go.Spot(0,mt/nt);var Dt=oe(0,wt/nt,1,wt/nt,ft/et,1,1,.5,vt());return Et.spot2=new go.Spot(Dt.x,Dt.y),It(Dt),Et}),go.Shape.setFigureParameter("Arrow2",0,new Sn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Sn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=30),ht>et&&(ht=et);var at=Ot?Ot.parameter2:NaN;isNaN(at)&&(at=30),at=Math.min(at,nt/2);var ft=et-ht,mt=(nt-at)/2,wt=mt+at,Et=new go.Geometry,Nt=new go.PathFigure(0,mt,!0);Et.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,ft,mt)),Nt.add(new go.PathSegment(go.PathSegment.Line,ft,0)),Nt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,ft,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,ft,wt)),Nt.add(new go.PathSegment(go.PathSegment.Line,0,wt).close()),Et.spot1=new go.Spot(0,mt/nt);var Dt=oe(0,wt/nt,1,wt/nt,ft/et,1,1,.5,vt());return Et.spot2=new go.Spot(Dt.x,Dt.y),It(Dt),Et}),go.Shape.defineFigureGenerator("Chevron",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*et,.214*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,1*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.3*et,1*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.3*et,.786*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,1*nt).close()),ht}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Sn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=.3);var at=(.5-ht/2)*nt,ft=(.5+ht/2)*nt,mt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);mt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,at)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,at)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close());var Et=oe(0,.5,.3,0,0,at/nt,.1,at/nt,vt());return mt.spot1=new go.Spot(Et.x,Et.y),Et=oe(.7,1,1,.5,0,ft/nt,1,ft/nt,Et),mt.spot2=new go.Spot(Et.x,Et.y),It(Et),mt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Sn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Sn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=40);var at=Ot?Ot.parameter2:NaN;isNaN(at)&&(at=100);var ft=(nt-ht)/2,mt=ft+ht,wt=(nt-at)/2,Et=wt+at;(ht>nt||at>nt)&&(at>ht?(ht=ht*nt/at,ft=(nt-ht)/2,mt=ft+ht,wt=0,Et=nt):(ft=0,mt=nt,wt=0,Et=nt));var Nt=new go.Geometry,Dt=new go.PathFigure(et,.5*nt,!0);Nt.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*et,mt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*et,mt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Et)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*et,wt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.3*et,ft)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ft)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*et,wt).close());var At=oe(0,.5,.3,wt/nt,0,ft/nt,1,ft/nt,vt());return Nt.spot1=new go.Spot(At.x,At.y),At=oe(.7,Et/nt,1,.5,0,mt/nt,1,mt/nt,At),Nt.spot2=new go.Spot(At.x,At.y),It(At),Nt}),go.Shape.setFigureParameter("IBeamArrow",0,new Sn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=.3);var at=(.5-ht/2)*nt,ft=(.5+ht/2)*nt,mt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);mt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,at)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,at)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),mt.spot1=new go.Spot(0,at/nt);var Et=oe(.7,1,1,.5,0,ft/nt,1,ft/nt,vt());return mt.spot2=new go.Spot(Et.x,Et.y),It(Et),mt}),go.Shape.setFigureParameter("IBeamArrow2",0,new Sn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Sn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=40);var at=Ot?Ot.parameter2:NaN;isNaN(at)&&(at=100);var ft=(nt-ht)/2,mt=ft+ht,wt=(nt-at)/2,Et=wt+at;(ht>nt||at>nt)&&(at>ht?(ht=ht*nt/at,ft=(nt-ht)/2,mt=ft+ht,wt=0,Et=nt):(ft=0,mt=nt,wt=0,Et=nt));var Nt=new go.Geometry,Dt=new go.PathFigure(et,.5*nt,!0);Nt.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Et)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*et,mt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*et,mt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Et)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,Et)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,wt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*et,wt)),Dt.add(new go.PathSegment(go.PathSegment.Line,.2*et,ft)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ft)),Dt.add(new go.PathSegment(go.PathSegment.Line,.7*et,wt).close()),Nt.spot1=new go.Spot(0,ft/nt);var At=oe(.7,Et/nt,1,.5,0,mt/nt,1,mt/nt,vt());return Nt.spot2=new go.Spot(At.x,At.y),It(At),Nt}),go.Shape.setFigureParameter("Pointer",0,new Sn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=.1);var at=new go.Geometry,ft=new go.PathFigure(et,.5*nt,!0);at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,ht*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),at.spot1=new go.Spot(ht,.35);var mt=oe(.2,.65,1,.65,0,1,1,.5,vt());return at.spot2=new go.Spot(mt.x,mt.y),It(mt),at}),go.Shape.setFigureParameter("RoundedPointer",0,new Sn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=.3);var at=new go.Geometry,ft=new go.PathFigure(et,.5*nt,!0);at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*et,.75*nt,ht*et,.25*nt).close()),at.spot1=new go.Spot(ht,.35);var mt=oe(0,.65,1,.65,0,1,1,.5,vt());return at.spot2=new go.Spot(mt.x,mt.y),It(mt),at}),go.Shape.setFigureParameter("SplitEndArrow",0,new Sn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=.4);var at=(.5-ht/2)*nt,ft=(.5+ht/2)*nt,mt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);mt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,0,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,at)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,at)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),mt.spot1=new go.Spot(.2,.3);var Et=oe(.7,1,1,.5,0,ft/nt,1,ft/nt,vt());return mt.spot2=new go.Spot(Et.x,Et.y),It(Et),mt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Sn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=50);var at=(nt-ht)/2,ft=at+ht;ht>nt&&(at=0,ft=nt);var mt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);mt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,0,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,at)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,at)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),mt.spot1=new go.Spot(.2,at/nt);var Et=oe(.7,1,1,.5,0,ft/nt,1,ft/nt,vt());return mt.spot2=new go.Spot(Et.x,Et.y),It(Et),mt}),go.Shape.setFigureParameter("SquareArrow",0,new Sn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=.7);var at=new go.Geometry,ft=new go.PathFigure(et,.5*nt,!0);return at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,ht*et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,0)),ft.add(new go.PathSegment(go.PathSegment.Line,ht*et,0).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(ht,1),at}),go.Shape.defineFigureGenerator("Cone1",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.5,ft=Jt*.1,mt=new go.PathFigure(0,.9*nt,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),mt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+ft)*nt,(.5+at)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-at)*et,nt,0,(.9+ft)*nt).close()),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.97),ht}),go.Shape.defineFigureGenerator("Cone2",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.9*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,nt,.85/.9*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt).close());var ft=new go.PathFigure(0,.9*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,.8*nt,.85/.9*et,.8*nt)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.82),ht}),go.Shape.defineFigureGenerator("Cube1",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.5*et,nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var ft=new go.PathFigure(.5*et,nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.5*et,.3*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.5,.85),ht}),go.Shape.defineFigureGenerator("Cube2",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.3*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.3*et,0).close());var ft=new go.PathFigure(0,.3*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.7*et,.3*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Move,.7*et,.3*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.7,1),ht}),go.Shape.defineFigureGenerator("Cylinder1",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var at=new go.Geometry,ft=Jt*.5,mt=new go.PathFigure(0,ht,!0);at.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Jt*ht,(.5-ft)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,ht,(.5+ft)*et,0,1*et,Jt*ht)),mt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,1*nt,1*et,nt-Jt*ht,(.5+ft)*et,1*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-ft)*et,1*nt,0,nt-Jt*ht)),mt.add(new go.PathSegment(go.PathSegment.Line,0,ht));var wt=new go.PathFigure(et,ht,!1);return at.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,2*ht,1*et,2*ht-Jt*ht,(.5+ft)*et,2*ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht,(.5-ft)*et,2*ht,0,2*ht-Jt*ht)),at.spot1=new go.Spot(0,0,0,2*ht),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder2",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var at=new go.Geometry,ft=Jt*.5,mt=new go.PathFigure(0,nt-ht,!0);at.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Jt*ht,(.5-ft)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,(.5+ft)*et,0,et,Jt*ht)),mt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,nt-Jt*ht,(.5+ft)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-ft)*et,nt,0,nt-Jt*ht));var wt=new go.PathFigure(0,nt-ht,!1);return at.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt-2*ht,0,nt-ht-Jt*ht,(.5-ft)*et,nt-2*ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt-ht,(.5+ft)*et,nt-2*ht,et,nt-ht-Jt*ht)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,0,-2*ht),at}),go.Shape.defineFigureGenerator("Cylinder3",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var at=new go.Geometry,ft=Jt*.5,mt=new go.PathFigure(ht,0,!0);at.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Jt*ht,0,et,(.5-ft)*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+ft)*nt,et-Jt*ht,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Jt*ht,nt,0,(.5+ft)*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-ft)*nt,Jt*ht,0));var wt=new go.PathFigure(ht,0,!1);return at.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,2*ht,.5*nt,ht+Jt*ht,0,2*ht,(.5-ft)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ht,nt,2*ht,(.5+ft)*nt,ht+Jt*ht,nt)),at.spot1=new go.Spot(0,0,2*ht,0),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder4",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var at=new go.Geometry,ft=Jt*.5,mt=new go.PathFigure(et-ht,0,!0);at.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Jt*ht,0,et,(.5-ft)*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+ft)*nt,et-Jt*ht,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Jt*ht,nt,0,(.5+ft)*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-ft)*nt,Jt*ht,0)),mt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0));var wt=new go.PathFigure(et-ht,0,!1);return at.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-2*ht,.5*nt,et-ht-Jt*ht,0,et-2*ht,(.5-ft)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et-2*ht,(.5+ft)*nt,et-ht-Jt*ht,nt)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,-2*ht,0),at}),go.Shape.defineFigureGenerator("Prism1",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.25*et,.25*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var ft=new go.PathFigure(.25*et,.25*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.408,.172),ht.spot2=new go.Spot(.833,.662),ht}),go.Shape.defineFigureGenerator("Prism2",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.25*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var ft=new go.PathFigure(0,nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("Pyramid1",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.5*et,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt).close());var ft=new go.PathFigure(.5*et,0,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Pyramid2",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.5*et,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var ft=new go.PathFigure(.5*et,0,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Actor",function(Ot,et,nt){var ht=new go.Geometry,at=.2,ft=.1,mt=Jt*at,wt=Jt*ft,Et=.5,Nt=.1,Dt=new go.PathFigure(Et*et,(Nt+ft)*nt,!0);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-at)*et,Nt*nt,(Et-mt)*et,(Nt+ft)*nt,(Et-at)*et,(Nt+wt)*nt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt-ft)*nt,(Et-at)*et,(Nt-wt)*nt,(Et-mt)*et,(Nt-ft)*nt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Et+at)*et,Nt*nt,(Et+mt)*et,(Nt-ft)*nt,(Et+at)*et,(Nt-wt)*nt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt+ft)*nt,(Et+at)*et,(Nt+wt)*nt,(Et+mt)*et,(Nt+ft)*nt));var At=.05,Kt=Jt*At;Et=.05,Nt=.25;var Wt=new go.PathFigure(.5*et,.2*nt,!0);return ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),Et=.95,Nt=.25,Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Et+At)*et,Nt*nt,(Et+Kt)*et,(Nt-At)*nt,(Et+At)*et,(Nt-Kt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),At=.025,Kt=Jt*At,Et=.825,Nt=.35,Wt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt-At)*nt,(Et+At)*et,(Nt-Kt)*nt,(Et+Kt)*et,(Nt-At)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-At)*et,Nt*nt,(Et-Kt)*et,(Nt-At)*nt,(Et-At)*et,(Nt-Kt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),At=.05,Kt=Jt*At,Et=.5,Nt=.7,Wt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt-At)*nt,(Et+At)*et,(Nt-Kt)*nt,(Et+Kt)*et,(Nt-At)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-At)*et,Nt*nt,(Et-Kt)*et,(Nt-At)*nt,(Et-At)*et,(Nt-Kt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),At=.025,Kt=Jt*At,Et=.175,Nt=.35,Wt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt-At)*nt,(Et+At)*et,(Nt-Kt)*nt,(Et+Kt)*et,(Nt-At)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-At)*et,Nt*nt,(Et-Kt)*et,(Nt-At)*nt,(Et-At)*et,(Nt-Kt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),At=.05,Kt=Jt*At,Et=.05,Nt=.25,Wt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt-At)*nt,(Et-At)*et,(Nt-Kt)*nt,(Et-Kt)*et,(Nt-At)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),ht.spot1=new go.Spot(.2,.2),ht.spot2=new go.Spot(.8,.65),ht}),go.Shape.setFigureParameter("Card",0,new Sn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;isNaN(ht)&&(ht=.2);var at=new go.Geometry,ft=new go.PathFigure(et,0,!0);return at.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,ht*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,ht*et,0).close()),at.spot1=new go.Spot(0,ht),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("Collate",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.5*et,.5*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt));var ft=new go.PathFigure(.5*et,.5*nt,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,.25),ht}),go.Shape.defineFigureGenerator("CreateRequest",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;isNaN(at)&&(at=.1);var ft=new go.PathFigure(0,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var mt=new go.PathFigure(0,at*nt,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,at*nt)),mt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,et,(1-at)*nt)),ht}),go.Shape.defineFigureGenerator("Database",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.5,ft=Jt*.1,mt=new go.PathFigure(et,.1*nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+ft)*nt,(.5+at)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-at)*et,nt,0,(.9+ft)*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-ft)*nt,(.5-at)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+at)*et,0,et,(.1-ft)*nt));var wt=new go.PathFigure(et,.1*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+ft)*nt,(.5+at)*et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-at)*et,.2*nt,0,(.1+ft)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+ft)*nt,(.5+at)*et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-at)*et,.3*nt,0,(.2+ft)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.4*nt,et,(.3+ft)*nt,(.5+at)*et,.4*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,(.5-at)*et,.4*nt,0,(.3+ft)*nt)),ht.spot1=new go.Spot(0,.4),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("DataStorage",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.9*nt,.25*et,.1*nt).close()),ht.spot1=new go.Spot(.226,0),ht.spot2=new go.Spot(.81,1),ht}),go.Shape.defineFigureGenerator("DiskStorage",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.5,ft=Jt*.1,mt=new go.PathFigure(et,.1*nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+ft)*nt,(.5+at)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-at)*et,nt,0,(.9+ft)*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-ft)*nt,(.5-at)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+at)*et,0,et,(.1-ft)*nt));var wt=new go.PathFigure(et,.1*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+ft)*nt,(.5+at)*et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-at)*et,.2*nt,0,(.1+ft)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+ft)*nt,(.5+at)*et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-at)*et,.3*nt,0,(.2+ft)*nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("Display",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.25*et,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close()),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("DividedEvent",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;isNaN(at)?at=.2:at<.15&&(at=.15);var ft=Jt*.2,mt=new go.PathFigure(0,.2*nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,0,(.2-ft)*nt,(.2-ft)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,.2*nt,(.8+ft)*et,0,et,(.2-ft)*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,nt,et,(.8+ft)*nt,(.8+ft)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*nt,(.2-ft)*et,nt,0,(.8+ft)*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt));var wt=new go.PathFigure(0,at*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,at*nt)),ht}),go.Shape.defineFigureGenerator("DividedProcess",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;(isNaN(at)||at<.1)&&(at=.1);var ft=new go.PathFigure(0,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var mt=new go.PathFigure(0,at*nt,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,at*nt)),ht}),go.Shape.defineFigureGenerator("Document",function(Ot,et,nt){var ht=new go.Geometry;nt=nt/.8;var at=new go.PathFigure(0,.7*nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;(isNaN(at)||at<.2)&&(at=.2);var ft=new go.PathFigure(0,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var mt=new go.PathFigure(at*et,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,0,at*nt)),mt.add(new go.PathSegment(go.PathSegment.Move,et,at*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,at*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,et,(1-at)*nt)),ht}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.5*et,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var ft=new go.PathFigure(.1*et,.4*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.9*et,.6*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.6*et,.1*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,.1*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.4*et,.9*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,.9*nt)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("File",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var ft=new go.PathFigure(.75*et,0,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Interrupt",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et,.5*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt));var ft=new go.PathFigure(et,.5*nt,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt));var mt=new go.PathFigure(et,.5*nt,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("InternalStorage",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN,ft=Ot?Ot.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ft)&&(ft=.1);var mt=new go.PathFigure(0,0,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,0)),mt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var wt=new go.PathFigure(at*et,0,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,at*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Move,0,ft*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,et,ft*nt)),ht}),go.Shape.defineFigureGenerator("Junction",function(Ot,et,nt){var ht=new go.Geometry,at=1/Math.SQRT2,ft=(1-1/Math.SQRT2)/2,mt=Jt*.5,wt=.5,Et=new go.PathFigure(et,wt*nt,!0);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,nt,et,(wt+mt)*nt,(wt+mt)*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,wt*nt,(wt-mt)*et,nt,0,(wt+mt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,0,0,(wt-mt)*nt,(wt-mt)*et,0)),Et.add(new go.PathSegment(go.PathSegment.Bezier,et,wt*nt,(wt+mt)*et,0,et,(wt-mt)*nt));var Nt=new go.PathFigure((ft+at)*et,(ft+at)*nt,!1);return ht.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,ft*et,ft*nt)),Nt.add(new go.PathSegment(go.PathSegment.Move,ft*et,(ft+at)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,(ft+at)*et,ft*nt)),ht}),go.Shape.defineFigureGenerator("LinedDocument",function(Ot,et,nt){var ht=new go.Geometry;nt=nt/.8;var at=new go.PathFigure(0,.7*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close());var ft=new go.PathFigure(.1*et,0,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.1*et,.75*nt)),ht.spot1=new go.Spot(.1,0),ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("LoopLimit",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MagneticTape",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.5,ft=.5,mt=new go.PathFigure(.5*et,nt,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,ft*nt,(ft-at)*et,nt,0,(ft+at)*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ft*et,0,0,(ft-at)*nt,(ft-at)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,ft*nt,(ft+at)*et,0,et,(ft-at)*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(ft+.1)*et,.9*nt,et,(ft+at)*nt,(ft+at)*et,.9*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.15,.15),ht.spot2=new go.Spot(.85,.8),ht}),go.Shape.defineFigureGenerator("ManualInput",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;isNaN(at)&&(at=.7);var ft=new go.PathFigure(0,0,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,at*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;isNaN(at)&&(at=.25);var ft=new go.PathFigure(0,0,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,at*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,(1-at)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("MultiDocument",function(Ot,et,nt){var ht=new go.Geometry;nt=nt/.8;var at=new go.PathFigure(et,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.44*nt,.96*et,.47*nt,.93*et,.45*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.54*nt,.86*et,.57*nt,.83*et,.55*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.4*et,.4*nt,.4*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,.1*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.2*et,0).close());var ft=new go.PathFigure(.1*et,.2*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.54*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*et,.44*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.8,.77),ht}),go.Shape.defineFigureGenerator("MultiProcess",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.1*et,.1*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close());var ft=new go.PathFigure(.2*et,.1*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.1*et,.2*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),ht.spot1=new go.Spot(0,.2),ht.spot2=new go.Spot(.8,1),ht}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;isNaN(at)&&(at=.1);var ft=1-at,mt=new go.PathFigure(0,0,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,0)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close());var wt=new go.PathFigure(.5*at*et,at*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*at)*et,at*nt)),ht}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("Or",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.5,ft=.5,mt=new go.PathFigure(et,ft*nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,ft*et,nt,et,(ft+at)*nt,(ft+at)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,ft*nt,(ft-at)*et,nt,0,(ft+at)*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ft*et,0,0,(ft-at)*nt,(ft-at)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,ft*nt,(ft+at)*et,0,et,(ft-at)*nt));var wt=new go.PathFigure(et,.5*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ht}),go.Shape.defineFigureGenerator("PaperTape",function(Ot,et,nt){var ht=new go.Geometry;nt=nt/.8;var at=new go.PathFigure(0,.7*nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.3*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.5*et,.6*nt,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ht.spot1=new go.Spot(0,.49),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN,ft=Ot?Ot.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ft)&&(ft=.3);var mt=new go.PathFigure(0,0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,0)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-ft)*et,.5*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN,ft=Ot?Ot.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ft)&&(ft=.3);var mt=new go.PathFigure(0,0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,(1-ft)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-ft)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Procedure",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;isNaN(at)&&(at=.1);var ft=new go.PathFigure(0,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var mt=new go.PathFigure((1-at)*et,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Move,at*et,0)),mt.add(new go.PathSegment(go.PathSegment.Line,at*et,nt)),ht}),go.Shape.defineFigureGenerator("Process",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;isNaN(at)&&(at=.1);var ft=new go.PathFigure(0,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var mt=new go.PathFigure(at*et,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,at*et,nt)),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Sort",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.5*et,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var ft=new go.PathFigure(0,.5*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.5),ht}),go.Shape.defineFigureGenerator("Start",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;isNaN(at)&&(at=.25);var ft=new go.PathFigure(at*et,0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt));var mt=new go.PathFigure(at*et,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,at*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*et,nt)),ht.spot1=new go.Spot(at,0),ht.spot2=new go.Spot(1-at,1),ht}),go.Shape.defineFigureGenerator("Terminator",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.25*et,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt)),ht.spot1=new go.Spot(.23,0),ht.spot2=new go.Spot(.77,1),ht}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ot,et,nt){var ht=new go.Geometry,at=Ot?Ot.parameter1:NaN;isNaN(at)&&(at=.1);var ft=new go.PathFigure(0,0,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.75*et,(1-at)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*nt).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("AndGate",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.5,ft=new go.PathFigure(0,0,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ft.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(.5+at)*et,0,et,(.5-at)*nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.5+at)*nt,(.5+at)*et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.55,1),ht}),go.Shape.defineFigureGenerator("Buffer",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Clock",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.5,ft=.5,mt=new go.PathFigure(et,ft*nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,ft*et,nt,et,(ft+at)*nt,(ft+at)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,ft*nt,(ft-at)*et,nt,0,(ft+at)*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ft*et,0,0,(ft-at)*nt,(ft-at)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,ft*nt,(ft+at)*et,0,et,(ft-at)*nt));var wt=new go.PathFigure(et,ft*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,ft*nt));var Et=new go.PathFigure(.8*et,.75*nt,!1);return ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),ht}),go.Shape.defineFigureGenerator("Ground",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.5*et,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.3*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.7*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.4*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),ht}),go.Shape.defineFigureGenerator("Inverter",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.1,ft=.1,mt=.9,wt=.5,Et=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,0)),Et.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var Nt=new go.PathFigure((mt+ft)*et,wt*nt,!0);return ht.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-ft)*et,wt*nt,(mt-at)*et,(wt+ft)*nt,(mt-ft)*et,(wt+at)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt,(mt-at)*et,(wt-ft)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,wt*nt,(mt+at)*et,(wt-ft)*nt,(mt+ft)*et,(wt-at)*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.4,.75),ht}),go.Shape.defineFigureGenerator("NandGate",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.5,ft=Jt*.4,mt=Jt*.1,wt=.1,Et=.9,Nt=.5,Dt=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+ft)*nt,(.4+at)*et,nt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Dt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Dt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(.4+at)*et,0,.8*et,(.5-ft)*nt));var At=new go.PathFigure((Et+wt)*et,Nt*nt,!0);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt+wt)*nt,(Et+wt)*et,(Nt+mt)*nt,(Et+mt)*et,(Nt+wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Et-wt)*et,Nt*nt,(Et-mt)*et,(Nt+wt)*nt,(Et-wt)*et,(Nt+mt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt-wt)*nt,(Et-wt)*et,(Nt-mt)*nt,(Et-mt)*et,(Nt-wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Et+wt)*et,Nt*nt,(Et+mt)*et,(Nt-wt)*nt,(Et+wt)*et,(Nt-mt)*nt)),ht.spot1=new go.Spot(0,.05),ht.spot2=new go.Spot(.55,.95),ht}),go.Shape.defineFigureGenerator("NorGate",function(Ot,et,nt){var ht=new go.Geometry,at=.5,ft=Jt*at,mt=0,wt=.5,Et=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(mt+ft)*et,(wt-at)*nt,.7*et,(wt-ft)*nt)),at=.1,ft=Jt*.1,mt=.9,wt=.5;var Nt=new go.PathFigure((mt-at)*et,wt*nt,!0);return ht.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-at)*nt,(mt-at)*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+at)*et,wt*nt,(mt+ft)*et,(wt-at)*nt,(mt+at)*et,(wt-ft)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-at)*et,wt*nt,(mt-ft)*et,(wt+at)*nt,(mt-at)*et,(wt+ft)*nt)),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.6,.75),ht}),go.Shape.defineFigureGenerator("OrGate",function(Ot,et,nt){var ht=new go.Geometry,at=.5,ft=Jt*at,mt=0,wt=.5,Et=new go.PathFigure(0,0,!0);return ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(mt+ft+ft)*et,(wt-at)*nt,.8*et,(wt-ft)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(wt+ft)*nt,(mt+ft+ft)*et,(wt+at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt).close()),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("XnorGate",function(Ot,et,nt){var ht=new go.Geometry,at=.5,ft=Jt*at,mt=.2,wt=.5,Et=new go.PathFigure(.1*et,0,!1);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var Nt=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(mt+ft)*et,(wt-at)*nt,.7*et,(wt-ft)*nt)),at=.1,ft=Jt*.1,mt=.9,wt=.5;var Dt=new go.PathFigure((mt-at)*et,wt*nt,!0);return ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-at)*nt,(mt-at)*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+at)*et,wt*nt,(mt+ft)*et,(wt-at)*nt,(mt+at)*et,(wt-ft)*nt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-at)*et,wt*nt,(mt-ft)*et,(wt+at)*nt,(mt-at)*et,(wt+ft)*nt)),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.65,.75),ht}),go.Shape.defineFigureGenerator("XorGate",function(Ot,et,nt){var ht=new go.Geometry,at=.5,ft=Jt*at,mt=.2,wt=.5,Et=new go.PathFigure(.1*et,0,!1);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var Nt=new go.PathFigure(.2*et,0,!0);return ht.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(mt+ft)*et,(wt-at)*nt,.9*et,(wt-ft)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt).close()),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.8,.75),ht}),go.Shape.defineFigureGenerator("Capacitor",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Move,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("Resistor",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.5*nt,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Inductor",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.1,ft=.1,mt=.1,wt=.5,Et=new go.PathFigure((mt-at*.5)*et,nt,!1);return ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,0,(mt-at)*et,nt,(mt-ft)*et,0)),mt=.3,Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,nt,(mt+ft)*et,0,(mt+at)*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,0,(mt-at)*et,nt,(mt-ft)*et,0)),mt=.5,Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,nt,(mt+ft)*et,0,(mt+at)*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,0,(mt-at)*et,nt,(mt-ft)*et,0)),mt=.7,Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,nt,(mt+ft)*et,0,(mt+at)*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,0,(mt-at)*et,nt,(mt-ft)*et,0)),mt=.9,Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+at*.5)*et,nt,(mt+ft)*et,0,(mt+at)*et,nt)),ht}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.5,ft=.5,mt=.5,wt=.5,Et=new go.PathFigure((mt-ft)*et,wt*nt,!1);return ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt,(mt-at)*et,(wt-ft)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,wt*nt,(mt+at)*et,(wt-ft)*nt,(mt+ft)*et,(wt-at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt-ft)*et,wt*nt,(mt-at)*et,(wt+ft)*nt,(mt-ft)*et,(wt+at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,(mt-ft+.1)*et,wt*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft-.1)*et,wt*nt,mt*et,(wt-ft)*nt,mt*et,(wt+ft)*nt)),ht}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.75*nt,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),at.add(new go.PathSegment(go.PathSegment.Move,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("Diode",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Wifi",function(Ot,et,nt){var ht=new go.Geometry,at=et,ft=nt;et=et*.38,nt=nt*.6;var mt=Jt*.8,wt=.8,Et=0,Nt=.5,Dt=(at-et)/2,At=(ft-nt)/2,Kt=new go.PathFigure(Et*et+Dt,(Nt+wt)*nt+At,!0);ht.add(Kt),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-wt)*et+Dt,Nt*nt+At,(Et-mt)*et+Dt,(Nt+wt)*nt+At,(Et-wt)*et+Dt,(Nt+mt)*nt+At)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et+Dt,(Nt-wt)*nt+At,(Et-wt)*et+Dt,(Nt-mt)*nt+At,(Et-mt)*et+Dt,(Nt-wt)*nt+At)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-wt+mt*.5)*et+Dt,Nt*nt+At,Et*et+Dt,(Nt-wt)*nt+At,(Et-wt+mt*.5)*et+Dt,(Nt-mt)*nt+At)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et+Dt,(Nt+wt)*nt+At,(Et-wt+mt*.5)*et+Dt,(Nt+mt)*nt+At,Et*et+Dt,(Nt+wt)*nt+At).close()),mt=Jt*.4,wt=.4,Et=.2,Nt=.5;var Wt=new go.PathFigure(Et*et+Dt,(Nt+wt)*nt+At,!0);ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-wt)*et+Dt,Nt*nt+At,(Et-mt)*et+Dt,(Nt+wt)*nt+At,(Et-wt)*et+Dt,(Nt+mt)*nt+At)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et+Dt,(Nt-wt)*nt+At,(Et-wt)*et+Dt,(Nt-mt)*nt+At,(Et-mt)*et+Dt,(Nt-wt)*nt+At)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-wt+mt*.5)*et+Dt,Nt*nt+At,Et*et+Dt,(Nt-wt)*nt+At,(Et-wt+mt*.5)*et+Dt,(Nt-mt)*nt+At)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et+Dt,(Nt+wt)*nt+At,(Et-wt+mt*.5)*et+Dt,(Nt+mt)*nt+At,Et*et+Dt,(Nt+wt)*nt+At).close()),mt=Jt*.2,wt=.2,Et=.5,Nt=.5;var xe=new go.PathFigure((Et-wt)*et+Dt,Nt*nt+At,!0);ht.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,Et*et+Dt,(Nt-wt)*nt+At,(Et-wt)*et+Dt,(Nt-mt)*nt+At,(Et-mt)*et+Dt,(Nt-wt)*nt+At)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Et+wt)*et+Dt,Nt*nt+At,(Et+mt)*et+Dt,(Nt-wt)*nt+At,(Et+wt)*et+Dt,(Nt-mt)*nt+At)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Et*et+Dt,(Nt+wt)*nt+At,(Et+wt)*et+Dt,(Nt+mt)*nt+At,(Et+mt)*et+Dt,(Nt+wt)*nt+At)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Et-wt)*et+Dt,Nt*nt+At,(Et-mt)*et+Dt,(Nt+wt)*nt+At,(Et-wt)*et+Dt,(Nt+mt)*nt+At)),mt=Jt*.4,wt=.4,Et=.8,Nt=.5;var Vt=new go.PathFigure(Et*et+Dt,(Nt-wt)*nt+At,!0);ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Et+wt)*et+Dt,Nt*nt+At,(Et+mt)*et+Dt,(Nt-wt)*nt+At,(Et+wt)*et+Dt,(Nt-mt)*nt+At)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et+Dt,(Nt+wt)*nt+At,(Et+wt)*et+Dt,(Nt+mt)*nt+At,(Et+mt)*et+Dt,(Nt+wt)*nt+At)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Et+wt-mt*.5)*et+Dt,Nt*nt+At,Et*et+Dt,(Nt+wt)*nt+At,(Et+wt-mt*.5)*et+Dt,(Nt+mt)*nt+At)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et+Dt,(Nt-wt)*nt+At,(Et+wt-mt*.5)*et+Dt,(Nt-mt)*nt+At,Et*et+Dt,(Nt-wt)*nt+At).close()),mt=Jt*.8,wt=.8,Et=1,Nt=.5;var Ie=new go.PathFigure(Et*et+Dt,(Nt-wt)*nt+At,!0);return ht.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Et+wt)*et+Dt,Nt*nt+At,(Et+mt)*et+Dt,(Nt-wt)*nt+At,(Et+wt)*et+Dt,(Nt-mt)*nt+At)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Et*et+Dt,(Nt+wt)*nt+At,(Et+wt)*et+Dt,(Nt+mt)*nt+At,(Et+mt)*et+Dt,(Nt+wt)*nt+At)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Et+wt-mt*.5)*et+Dt,Nt*nt+At,Et*et+Dt,(Nt+wt)*nt+At,(Et+wt-mt*.5)*et+Dt,(Nt+mt)*nt+At)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Et*et+Dt,(Nt-wt)*nt+At,(Et+wt-mt*.5)*et+Dt,(Nt-mt)*nt+At,Et*et+Dt,(Nt-wt)*nt+At).close()),ht}),go.Shape.defineFigureGenerator("Email",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ft=new go.PathFigure(0,0,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,0)),ft.add(new go.PathSegment(go.PathSegment.Move,0,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.45*et,.54*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.55*et,.54*nt)),ht}),go.Shape.defineFigureGenerator("Ethernet",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.35*et,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.65*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.35*et,0).close());var ft=new go.PathFigure(.1*et,nt,!0,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,.6*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var mt=new go.PathFigure(.6*et,nt,!0,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.6*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt).close());var wt=new go.PathFigure(0,.5*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.75*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.6*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.6*nt)),ht}),go.Shape.defineFigureGenerator("Power",function(Ot,et,nt){var ht=new go.Geometry,at=Jt*.4,ft=.4,mt=.5,wt=.5,Et=vt(),Nt=vt(),Dt=vt(),At=vt();de(mt,wt-ft,mt+at,wt-ft,mt+ft,wt-at,mt+ft,wt,.5,Et,Et,Nt,Dt,At);var Kt=Pt(Nt.x,Nt.y),Wt=new go.PathFigure(Nt.x*et,Nt.y*nt,!0);ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,wt*nt,Dt.x*et,Dt.y*nt,At.x*et,At.y*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-ft)*et,wt*nt,(mt-at)*et,(wt+ft)*nt,(mt-ft)*et,(wt+at)*nt)),de(mt-ft,wt,mt-ft,wt-at,mt-at,wt-ft,mt,wt-ft,.5,Dt,At,Nt,Et,Et),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Nt.x*et,Nt.y*nt,Dt.x*et,Dt.y*nt,At.x*et,At.y*nt)),at=Jt*.3,ft=.3,de(mt-ft,wt,mt-ft,wt-at,mt-at,wt-ft,mt,wt-ft,.5,Dt,At,Nt,Et,Et),Wt.add(new go.PathSegment(go.PathSegment.Line,Nt.x*et,Nt.y*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-ft)*et,wt*nt,At.x*et,At.y*nt,Dt.x*et,Dt.y*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+ft)*nt,(mt-ft)*et,(wt+at)*nt,(mt-at)*et,(wt+ft)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+ft)*et,wt*nt,(mt+at)*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),de(mt,wt-ft,mt+at,wt-ft,mt+ft,wt-at,mt+ft,wt,.5,Et,Et,Nt,Dt,At),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Nt.x*et,Nt.y*nt,At.x*et,At.y*nt,Dt.x*et,Dt.y*nt).close());var Wt=new go.PathFigure(.45*et,0,!0);return ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),Wt.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),It(Et),It(Nt),It(Dt),It(At),It(Kt),ht.spot1=new go.Spot(.25,.45),ht.spot2=new go.Spot(.75,.8),ht}),go.Shape.defineFigureGenerator("Fallout",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,nt/2,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,180,360,et/2,nt/2,et/2,nt/2));function ft(mt,wt,Et){mt.add(new go.PathSegment(go.PathSegment.Move,(.3+wt)*et,(.8+Et)*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,(.5+wt)*et,(.5+Et)*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,(.1+wt)*et,(.5+Et)*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,(.3+wt)*et,(.8+Et)*nt).close())}return ft(at,0,0),ft(at,.4,0),ft(at,.2,-.3),ht}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.2*et,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.3*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close()),ht.spot1=new go.Spot(.3,.3),ht.spot2=new go.Spot(.7,.7),ht}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.37*et,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.11*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.77*et,.04*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.33*et,.49*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.37*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.63*et,.86*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.77*et,.91*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.34*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.34*et,.78*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.44*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.65*et,.56*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt).close()),ht}),go.Shape.defineFigureGenerator("FireHazard",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.1*et,nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.29*et,0,-.25*et,.63*nt,.45*et,.44*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.51*et,.42*nt,.48*et,.17*nt,.54*et,.35*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.59*et,.18*nt,.59*et,.29*nt,.58*et,.28*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,.6*nt,.8*et,.34*nt,.88*et,.43*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.88*et,.31*nt,.87*et,.48*nt,.88*et,.43*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,1.17*et,.76*nt,.82*et,.8*nt).close()),ht.spot1=new go.Spot(.07,.445),ht.spot2=new go.Spot(.884,.958),ht}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ot,et,nt){var ht=new go.Geometry,at=.5,ft=0,mt=0,wt=at*Jt,Et=.4*Math.SQRT2/2+.5,Nt=.5-.5*Math.SQRT2/2,Dt=1,At=.5,Kt=.5,Wt=0,xe=new go.PathFigure(Et*et,(1-Nt)*nt,!1);return ht.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,Dt*et,At*nt,Dt*et,.7*nt,Dt*et,At*nt)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Kt+ft)*et,(Wt+ft)*nt,(.5+at+ft)*et,(.5-wt+ft)*nt,(.5+wt+ft)*et,(.5-at+ft)*nt)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ft)*et,(.5+mt)*nt,(.5-wt+ft)*et,(.5-at+mt)*nt,(.5-at+ft)*et,(.5-wt+mt)*nt)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.35+ft)*et,.9*nt,(.5-at+ft)*et,(.5+wt+mt)*nt,(.5-wt+ft)*et,.9*nt)),xe.add(new go.PathSegment(go.PathSegment.Move,(.25+ft)*et,.8*nt)),xe.add(new go.PathSegment(go.PathSegment.Line,(.35+ft)*et,.9*nt)),xe.add(new go.PathSegment(go.PathSegment.Line,(.2+ft)*et,.95*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Move,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Move,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);ht.add(at);var ft=new go.PathFigure(et,nt,!1);ht.add(ft);var mt=new go.PathFigure(0,.5*nt,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.2*et,.35*nt,.3*et,.35*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.7*et,.65*nt,.8*et,.65*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.5*nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close()),ht}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.2*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt).close());var at=new go.PathFigure(0,.2*nt,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),ht}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.7*et,nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,0,.6*et,.5*nt,0,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.7*et,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,nt,.4*et,.5*nt,et,.5*nt).close());var ft=new go.PathFigure(.45*et,.73*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.7*et,.73*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.38*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.63*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.31*et,.27*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.56*et,.27*nt)),ht}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);ht.add(at);var ft=new go.PathFigure(.335*et,(1-.555)*nt,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,et,.68*nt,(1-.12)*et,.46*nt,(1-.02)*et,.54*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.335*et,(1-.555)*nt,.02*et,.54*nt,.12*et,.46*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.365*et,(1-.595)*nt));var mt=.5-.285,wt=.5,Et=mt,Nt=Math.PI/4,Dt=4*(1-Math.cos(Nt))/(3*Math.sin(Nt)),At=Dt*.5,Kt=mt,Wt=mt,xe=Dt*Kt,Vt=Dt*Wt;ft.add(new go.PathSegment(go.PathSegment.Bezier,(wt-Kt)*et,Et*nt,(wt-(xe+Kt)/2)*et,(Et+(Wt+Vt)/2)*nt,(wt-Kt)*et,(Et+Vt)*nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,(Et-Wt)*nt,(wt-Kt)*et,(Et-Vt)*nt,(wt-xe)*et,(Et-Wt)*nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(wt+Kt)*et,Et*nt,(wt+xe)*et,(Et-Wt)*nt,(wt+Kt)*et,(Et-Vt)*nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(wt+Kt)*et,(Et+Vt)*nt,(wt+(xe+Kt)/2)*et,(Et+(Wt+Vt)/2)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*et,(1-.595)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt));var Ie=new go.PathFigure(.2*et,nt,!1);ht.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*et,.8*nt));var Se=new go.PathFigure(.8*et,nt,!1);return ht.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.1*et,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var ft=new go.PathFigure(.2*et,.2*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),ft.add(new go.PathSegment(go.PathSegment.Move,.2*et,.8*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.33*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);ht.add(at);var ft=new go.PathFigure(et,nt,!1);ht.add(ft);var mt=new go.PathFigure(.1*et,nt,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),mt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Caution",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.05*et,nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.8*nt,0,nt,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.45*et,.1*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.1*nt,.5*et,0,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.95*et,.9*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,et,nt,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.05*et,nt));var ft=.05;return at.add(new go.PathSegment(go.PathSegment.Move,(.5-ft)*et,.875*nt)),at.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*et,.875*nt,ft*et,ft*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.5*et,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.325*nt,.575*et,.725*nt,.625*et,.375*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.75*nt,.375*et,.375*nt,.425*et,.725*nt)),ht}),go.Shape.defineFigureGenerator("Recycle",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.45*et,.95*nt,!1);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*et,.95*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.185*et,.85*nt,.17*et,.95*nt,.15*et,.9*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.235*et,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.3*et,.625*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.35*et,.65*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.275*et,.45*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.05*et,.45*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.05*et,.575*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.1875*et,.95*nt,0,.675*nt,0,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.45*et,.95*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.45*et,.775*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.22*et,.775*nt));var ft=new go.PathFigure(.475*et,.2*nt,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.225*et,.3*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.275*et,.175*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.325*et,.05*nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.05*nt,.35*et,0,.375*et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.575*et,.375*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.525*et,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.75*et,.475*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.85*et,.315*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.32*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.65*et,.05*nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,0,.65*et,.05*nt,.625*et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.38*et,.0105*nt));var mt=new go.PathFigure(.675*et,.575*nt,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.875*et,.525*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.85*et,.95*nt,et,.8*nt,et,.85*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.95*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.85*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.725*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.775*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.775*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),mt.add(new go.PathSegment(go.PathSegment.Move,.675*et,.575*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.775*et,.775*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ot,et,nt){var ht=new go.Geometry,at=.5,ft=Jt*.5,mt=new go.PathFigure(et,at*nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,at*et,nt,et,(at+ft)*nt,(at+ft)*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,at*nt,(at-ft)*et,nt,0,(at+ft)*nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,at*et,0,0,(at-ft)*nt,(at-ft)*et,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et,at*nt,(at+ft)*et,0,et,(at-ft)*nt));var wt=new go.PathFigure(at*et,0,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,at*et,.15*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,at*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,at*et,.85*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,0,at*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.15*et,at*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,at*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.85*et,at*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,at*et,at*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.58*et,.1*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,at*et,at*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.78*et,.54*nt)),ht}),go.Shape.defineFigureGenerator("Package",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.15*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var ft=new go.PathFigure(0,.15*nt,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,0,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.65*et,.15*nt).close()),ht.spot1=new go.Spot(0,.1),ht.spot2=new go.Spot(1,1),ht}),go.Shape.defineFigureGenerator("Class",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ft=new go.PathFigure(0,.2*nt,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var mt=new go.PathFigure(0,.5*nt,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Component",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et,nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt).close());var ft=new go.PathFigure(0,.2*nt,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.45*et,.2*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close());var mt=new go.PathFigure(0,.6*nt,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.6*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.8*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt).close()),ht}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.15*et,.6*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt));var ft=new go.PathFigure(.15*et,.6*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ht}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et,nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*et,.33*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.66*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.33*et,.33*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht}),go.Shape.defineFigureGenerator("Workcell",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.35*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Supermarket",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.33*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),at.add(new go.PathSegment(go.PathSegment.Move,et,.33*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.66*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.66*nt)),at.add(new go.PathSegment(go.PathSegment.Move,et,.66*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ht}),go.Shape.defineFigureGenerator("TruckShipment",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ft=new go.PathFigure(et,.8*nt,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt).close());var mt=.1,wt=Jt*.1,Et=.2,Nt=.9,Dt=new go.PathFigure((Et-mt)*et,Nt*nt,!0);ht.add(Dt),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt-mt)*nt,(Et-mt)*et,(Nt-wt)*nt,(Et-wt)*et,(Nt-mt)*nt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Et+mt)*et,Nt*nt,(Et+wt)*et,(Nt-mt)*nt,(Et+mt)*et,(Nt-wt)*nt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt+mt)*nt,(Et+mt)*et,(Nt+wt)*nt,(Et+wt)*et,(Nt+mt)*nt)),Dt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-mt)*et,Nt*nt,(Et-wt)*et,(Nt+mt)*nt,(Et-mt)*et,(Nt+wt)*nt).close()),mt=.1,wt=Jt*.1,Et=.8,Nt=.9;var At=new go.PathFigure((Et-mt)*et,Nt*nt,!0);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt-mt)*nt,(Et-mt)*et,(Nt-wt)*nt,(Et-wt)*et,(Nt-mt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Et+mt)*et,Nt*nt,(Et+wt)*et,(Nt-mt)*nt,(Et+mt)*et,(Nt-wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt+mt)*nt,(Et+mt)*et,(Nt+wt)*nt,(Et+wt)*et,(Nt+mt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Et-mt)*et,Nt*nt,(Et-wt)*et,(Nt+mt)*nt,(Et-mt)*et,(Nt+wt)*nt).close()),ht}),go.Shape.defineFigureGenerator("KanbanPost",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.2*et,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),at.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),at.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ht}),go.Shape.defineFigureGenerator("Forklift",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0));var ft=new go.PathFigure(0,.5*nt,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var mt=new go.PathFigure(.5*et,.8*nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.1*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.1*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.8*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt));var wt=new go.PathFigure(.5*et,.7*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt));var Et=.1,Nt=Jt*.1,Dt=.1,At=.9,Kt=new go.PathFigure((Dt-Et)*et,At*nt,!0);ht.add(Kt),Kt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*et,(At-Et)*nt,(Dt-Et)*et,(At-Nt)*nt,(Dt-Nt)*et,(At-Et)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Et)*et,At*nt,(Dt+Nt)*et,(At-Et)*nt,(Dt+Et)*et,(At-Nt)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*et,(At+Et)*nt,(Dt+Et)*et,(At+Nt)*nt,(Dt+Nt)*et,(At+Et)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Et)*et,At*nt,(Dt-Nt)*et,(At+Et)*nt,(Dt-Et)*et,(At+Nt)*nt)),Et=.1,Nt=Jt*.1,Dt=.4,At=.9;var Wt=new go.PathFigure((Dt-Et)*et,At*nt,!0);return ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*et,(At-Et)*nt,(Dt-Et)*et,(At-Nt)*nt,(Dt-Nt)*et,(At-Et)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt+Et)*et,At*nt,(Dt+Nt)*et,(At-Et)*nt,(Dt+Et)*et,(At-Nt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Dt*et,(At+Et)*nt,(Dt+Et)*et,(At+Nt)*nt,(Dt+Nt)*et,(At+Et)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Dt-Et)*et,At*nt,(Dt-Nt)*et,(At+Et)*nt,(Dt-Et)*et,(At+Nt)*nt)),ht}),go.Shape.defineFigureGenerator("RailShipment",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.1*et,.4*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,.4*nt).close());var ft=new go.PathFigure(.45*et,.7*nt,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt));var mt=new go.PathFigure(.55*et,.4*nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.4*nt).close());var Dt=.05,At=Jt*.05,Kt=.175,Wt=.95,wt=new go.PathFigure((Kt-Dt)*et,Wt*nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,Kt*et,(Wt-Dt)*nt,(Kt-Dt)*et,(Wt-At)*nt,(Kt-At)*et,(Wt-Dt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(Kt+Dt)*et,Wt*nt,(Kt+At)*et,(Wt-Dt)*nt,(Kt+Dt)*et,(Wt-At)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,Kt*et,(Wt+Dt)*nt,(Kt+Dt)*et,(Wt+At)*nt,(Kt+At)*et,(Wt+Dt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(Kt-Dt)*et,Wt*nt,(Kt-At)*et,(Wt+Dt)*nt,(Kt-Dt)*et,(Wt+At)*nt));var Dt=.05,At=Jt*.05,Kt=.375,Wt=.95,Et=new go.PathFigure((Kt-Dt)*et,Wt*nt,!0);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,Kt*et,(Wt-Dt)*nt,(Kt-Dt)*et,(Wt-At)*nt,(Kt-At)*et,(Wt-Dt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(Kt+Dt)*et,Wt*nt,(Kt+At)*et,(Wt-Dt)*nt,(Kt+Dt)*et,(Wt-At)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,Kt*et,(Wt+Dt)*nt,(Kt+Dt)*et,(Wt+At)*nt,(Kt+At)*et,(Wt+Dt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(Kt-Dt)*et,Wt*nt,(Kt-At)*et,(Wt+Dt)*nt,(Kt-Dt)*et,(Wt+At)*nt));var Dt=.05,At=Jt*.05,Kt=.625,Wt=.95,Nt=new go.PathFigure((Kt-Dt)*et,Wt*nt,!0);ht.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Kt*et,(Wt-Dt)*nt,(Kt-Dt)*et,(Wt-At)*nt,(Kt-At)*et,(Wt-Dt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Kt+Dt)*et,Wt*nt,(Kt+At)*et,(Wt-Dt)*nt,(Kt+Dt)*et,(Wt-At)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Kt*et,(Wt+Dt)*nt,(Kt+Dt)*et,(Wt+At)*nt,(Kt+At)*et,(Wt+Dt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Kt-Dt)*et,Wt*nt,(Kt-At)*et,(Wt+Dt)*nt,(Kt-Dt)*et,(Wt+At)*nt));var Dt=.05,At=Jt*.05,Kt=.825,Wt=.95,xe=new go.PathFigure((Kt-Dt)*et,Wt*nt,!0);ht.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,Kt*et,(Wt-Dt)*nt,(Kt-Dt)*et,(Wt-At)*nt,(Kt-At)*et,(Wt-Dt)*nt)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Kt+Dt)*et,Wt*nt,(Kt+At)*et,(Wt-Dt)*nt,(Kt+Dt)*et,(Wt-At)*nt)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Kt*et,(Wt+Dt)*nt,(Kt+Dt)*et,(Wt+At)*nt,(Kt+At)*et,(Wt+Dt)*nt)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(Kt-Dt)*et,Wt*nt,(Kt-At)*et,(Wt+Dt)*nt,(Kt-Dt)*et,(Wt+At)*nt).close());var Vt=new go.PathFigure(0,nt,!1);return ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht}),go.Shape.defineFigureGenerator("Warehouse",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ft=new go.PathFigure(0,.2*nt,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var mt=new go.PathFigure(.15*et,nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.5*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt).close());var wt=.05,Et=Jt*.05,Nt=.35,Dt=.775,At=new go.PathFigure((Nt-wt)*et,Dt*nt,!0);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Dt-wt)*nt,(Nt-wt)*et,(Dt-Et)*nt,(Nt-Et)*et,(Dt-wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+wt)*et,Dt*nt,(Nt+Et)*et,(Dt-wt)*nt,(Nt+wt)*et,(Dt-Et)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Dt+wt)*nt,(Nt+wt)*et,(Dt+Et)*nt,(Nt+Et)*et,(Dt+wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-wt)*et,Dt*nt,(Nt-Et)*et,(Dt+wt)*nt,(Nt-wt)*et,(Dt+Et)*nt).close()),ht}),go.Shape.defineFigureGenerator("ControlCenter",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Move,.1*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt).close()),ht}),go.Shape.defineFigureGenerator("Bluetooth",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.75*nt,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Globe",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.5*et,0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.75*et,0,et,.25*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.75*nt,.75*et,nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.25*et,nt,0,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,.25*nt,.25*et,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,.15*et,.25*nt,.15*et,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.85*et,.75*nt,.85*et,.25*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.15*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.15*nt,.35*et,.3*nt,.65*et,.3*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.85*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.85*nt,.35*et,.7*nt,.65*et,.7*nt)),ht}),go.Shape.defineFigureGenerator("Wave",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.25*nt,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.25*nt,.1*et,0,.2*et,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.25*nt,.425*et,.5*nt,.575*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,et,.25*nt,.8*et,0,.9*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.75*nt,.1*et,.5*nt,.2*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.75*nt,.425*et,nt,.575*et,nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,et,.75*nt,.8*et,.5*nt,.9*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Operator",function(Ot,et,nt){var ht=new go.Geometry,at=.3,ft=Jt*.3,mt=.5,wt=.7,Et=new go.PathFigure((mt-at)*et,wt*nt,!0);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-at)*nt,(mt-at)*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+at)*et,wt*nt,(mt+ft)*et,(wt-at)*nt,(mt+at)*et,(wt-ft)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt-at)*et,wt*nt,(mt-ft)*et,(wt+at)*nt,(mt-at)*et,(wt+ft)*nt));var Nt=new go.PathFigure(0,.7*nt,!1);return ht.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),ht}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.5*et,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.65*et,.3*nt,.65*et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.35*et,.5*nt,.35*et,.3*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.3*et,.6*nt,.1*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.2*et,nt,.35*et,.95*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,.7*et,.6*nt,.9*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.8*et,nt,.65*et,.95*nt)),ht}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et,0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,0,.075*nt,0,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,0,nt,.4*et,nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.4*nt,.8*et,nt,.85*et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,0)),ht}),go.Shape.defineFigureGenerator("Battery",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Move,.4*et,.1*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*et,.1*nt));var ft=new go.PathFigure(0,.6*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Move,0,.4*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Delete",function(Ot,et,nt){var ht=new go.Geometry,at=.5,ft=Jt*.5,mt=.5,wt=.5,Et=new go.PathFigure((mt-at)*et,wt*nt,!0);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-at)*nt,(mt-at)*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+at)*et,wt*nt,(mt+ft)*et,(wt-at)*nt,(mt+at)*et,(wt-ft)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt-at)*et,wt*nt,(mt-ft)*et,(wt+at)*nt,(mt-at)*et,(wt+ft)*nt));var Nt=new go.PathFigure(.15*et,.5*nt,!1);return ht.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Flag",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.1*nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Move,0,.1*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.1*nt,.15*et,0,.35*et,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,.65*et,.2*nt,.85*et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.85*et,.6*nt,.65*et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.35*et,.4*nt,.15*et,.4*nt).close()),ht}),go.Shape.defineFigureGenerator("Help",function(Ot,et,nt){var ht=new go.Geometry,at=.5,ft=Jt*.5,mt=.5,wt=.5,Et=new go.PathFigure((mt-at)*et,wt*nt,!1);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-at)*nt,(mt-at)*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt+at)*et,wt*nt,(mt+ft)*et,(wt-at)*nt,(mt+at)*et,(wt-ft)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(mt-at)*et,wt*nt,(mt-ft)*et,(wt+at)*nt,(mt-at)*et,(wt+ft)*nt).close()),at=.05,ft=Jt*.05,mt=.5,wt=.8;var Nt=new go.PathFigure((mt-at)*et,wt*nt,!1);return ht.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt-at)*nt,(mt-at)*et,(wt-ft)*nt,(mt-ft)*et,(wt-at)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+at)*et,wt*nt,(mt+ft)*et,(wt-at)*nt,(mt+at)*et,(wt-ft)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,mt*et,(wt+at)*nt,(mt+at)*et,(wt+ft)*nt,(mt+ft)*et,(wt+at)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-at)*et,wt*nt,(mt-ft)*et,(wt+at)*nt,(mt-at)*et,(wt+ft)*nt).close()),Nt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,.75*et,.475*nt,.75*et,.225*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.35*nt,.4*et,.2*nt,.3*et,.25*nt)),ht}),go.Shape.defineFigureGenerator("Location",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.975*et,.025*nt,.5*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*et,.5*nt,.5*et,0,.025*et,.025*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*et,.3*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.5*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var ft=new go.PathFigure(.2*et,.5*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.3*nt)),ht}),go.Shape.defineFigureGenerator("Unlocked",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.5*nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var ft=new go.PathFigure(.2*et,.5*nt,!1);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),ft.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.35*nt)),ht}),go.Shape.defineFigureGenerator("Gear",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(.9375*et,.56246875*nt,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.80621875*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.763*et,.3316875*nt,.79840625*et,.39915625*nt,.7834375*et,.3635*nt)).add(new go.PathSegment(go.PathSegment.Line,.8566875*et,.23796875*nt)).add(new go.PathSegment(go.PathSegment.Line,.76825*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.67596875*et,.24184375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*et,.19378125*nt,.64228125*et,.2188125*nt,.603875*et,.2021875*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.19378125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*et,.239375*nt,.39759375*et,.20190625*nt,.36053125*et,.2176875*nt)).add(new go.PathSegment(go.PathSegment.Line,.2379375*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.14953125*et,.2379375*nt)).add(new go.PathSegment(go.PathSegment.Line,.23934375*et,.3278125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*et,.4375*nt,.21765625*et,.36059375*nt,.201875*et,.397625*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Line,.1938125*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*et,.67596875*nt,.20221875*et,.603875*nt,.21884375*et,.64228125*nt)).add(new go.PathSegment(go.PathSegment.Line,.1495625*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.238*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.3316875*et,.76296875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*et,.80621875*nt,.36353125*et,.78340625*nt,.3991875*et,.79840625*nt)).add(new go.PathSegment(go.PathSegment.Line,.43753125*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.80621875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*et,.760625*nt,.602375*et,.79809375*nt,.63946875*et,.78234375*nt)).add(new go.PathSegment(go.PathSegment.Line,.76828125*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.85671875*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.76065625*et,.67221875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*et,.56246875*nt,.78234375*et,.63940625*nt,.798125*et,.602375*nt)).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.56246875*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*et,.5*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.5*nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.3*nt,0,.375*nt,.05*et,.325*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.075*nt,.3*et,.225*nt,.4*et,.175*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.525*et,.075*nt,.46*et,.05*nt,.525*et,.05*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.4*nt,.525*et,.275*nt,.475*et,.325*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.55*nt,et,.4*nt,et,.55*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.425*et,.55*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.6*et,.55*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.7*nt,.675*et,.55*nt,.675*et,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.575*et,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,.85*nt,.65*et,.7*nt,.65*et,.85*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.4*et,.85*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.535*et,nt,.61*et,.85*nt,.61*et,nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,.435*et,nt,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Map",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,.2*nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),at.add(new go.PathSegment(go.PathSegment.Move,.25*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),at.add(new go.PathSegment(go.PathSegment.Move,.75*et,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("Eject",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,nt,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et,nt)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt*.7)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt*.7).close());var ft=new go.PathFigure(0,nt*.6,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close()),ht}),go.Shape.defineFigureGenerator("Pencil",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close()))}),go.Shape.defineFigureGenerator("Building",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*1,nt*1,!1);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.3)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt*.3)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.85)),at.add(new go.PathSegment(go.PathSegment.Line,et,nt*.85).close());var ft=new go.PathFigure(.126*et,.85*nt,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,.126*et,.45*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.322*et,.45*nt)),ft.add(new go.PathSegment(go.PathSegment.Line,.322*et,.85*nt).close());var mt=new go.PathFigure(.402*et,.85*nt,!1);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.402*et,.45*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.45*nt)),mt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.85*nt).close());var wt=new go.PathFigure(.678*et,.85*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.678*et,.45*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.45*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.85*nt).close());var Et=new go.PathFigure(.5*et,.1*nt,!1);return ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),ht}),go.Shape.defineFigureGenerator("Staircase",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,nt*1,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.8)),at.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.8)),at.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.6)),at.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.6)),at.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.4)),at.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.4)),at.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.2)),at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.2)),at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.15)),at.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.15)),at.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),at.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.35)),at.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),at.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.55)),at.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt*.95).close()),ht}),go.Shape.defineFigureGenerator("5Bars",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,nt*1,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*(1-.184)).close());var ft=new go.PathFigure(et*.204,nt,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et*.204,nt*(1-.184))),ft.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*(1-.184*2))),ft.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*1).close());var mt=new go.PathFigure(et*.408,nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et*.408,nt*(1-.184*2))),mt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*(1-.184*3))),mt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*1).close());var wt=new go.PathFigure(et*.612,nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.612,nt*(1-.184*3))),wt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*(1-.184*4))),wt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*1).close());var Et=new go.PathFigure(et*.816,nt,!0);return ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),Et.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),Et.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),ht}),go.Shape.defineFigureGenerator("PC",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.3,0).close());var ft=new go.PathFigure(et*.055,.07*nt,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.07)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.1)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.1).close());var mt=new go.PathFigure(et*.055,.13*nt,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.13)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.16)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.16).close());var wt=new go.PathFigure(et*.055,.18*nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.18)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.21)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.21).close());var Et=new go.PathFigure(et*1,0,!0);return ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),Et.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),ht}),go.Shape.defineFigureGenerator("Plane",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(.55*et,nt,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.1*et,.475*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.35*et,.525*nt,0,.4*nt,.225*et,.45*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.4*et,.475*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.15*et,.35*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.2*et,.325*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.6*et,.325*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.85*et,.1*nt)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.2*nt,.975*et,0,et,.08*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.7*et,.45*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.6*et,.95*nt)),at.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt).close()),ht}),go.Shape.defineFigureGenerator("Key",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*1,nt*.5,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et*.9,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.5,.4*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.5,.35*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.45,.35*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.3,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.15,.2*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.35*nt)),at.add(new go.PathSegment(go.PathSegment.Line,0,.65*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.15,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.3,.8*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.45,.65*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.5,.65*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.5,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.6,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.65,.55*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.7,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.75,.55*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.8,.6*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.85,.575*nt)),at.add(new go.PathSegment(go.PathSegment.Line,et*.9,.6*nt).close()),at.add(new go.PathSegment(go.PathSegment.Move,.17*et,.425*nt)),at.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*et,.5*nt,.075*et,.075*nt).close()),ht}),go.Shape.defineFigureGenerator("FilmTape",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(0,0,!1);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*0,et*.3,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*.95)),at.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var ft=new go.PathFigure(0,0,!1);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*0)),ft.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*1,et*.3,et*.055)),ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var mt=new go.PathFigure(et*.11,nt*.1,!1);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.1)),mt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.8)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.11,nt*.8).close());var wt=new go.PathFigure(et*(.11+.24133333*1+.028*1),nt*.1,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.1)),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.8)),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*1),nt*.8).close());var Et=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),Et.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),Et.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),ht}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ot,et,nt){var ht=new go.Geometry,at=8,ft=at*Jt,mt=new go.PathFigure(at,0,!1);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et*.86,0)),mt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.14)),mt.add(new go.PathSegment(go.PathSegment.Line,et,nt-at)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et-at,nt,et,nt-ft,et-ft,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,at,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-at,ft,nt,0,nt-ft)),mt.add(new go.PathSegment(go.PathSegment.Line,0,at)),mt.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,ft,ft,0).close());var wt=new go.PathFigure(et*.83,0,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.3)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.3)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*0).close());var Et=new go.PathFigure(et*.83,nt*1,!1);ht.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var Nt=new go.PathFigure(et*.78,nt*.05,!1);return ht.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.05)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.25)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.78,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ot,et,nt){var ht=Ot?Ot.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=15),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var at=ht*Jt,ft=nt*.8,mt=new go.Geometry,wt=new go.PathFigure(ht,0,!0);return mt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,et-at,0,et,at)),wt.add(new go.PathSegment(go.PathSegment.Line,et,ft-ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,ft,et,ft-at,et-at,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.7,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.55,ft)),wt.add(new go.PathSegment(go.PathSegment.Line,ht,ft)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,ft-ht,at,ft,0,ft-at)),wt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,at,at,0).close()),at>1?(mt.spot1=new go.Spot(0,0,at,at),mt.spot2=new go.Spot(1,.8,-at,-at)):(mt.spot1=go.Spot.TopLeft,mt.spot2=new go.Spot(1,.8)),mt}),go.Shape.defineFigureGenerator("Repeat",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*0,nt*.45,!0);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.45)),at.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.45)),at.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.9)),at.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.9)),at.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.45).close());var ft=new go.PathFigure(et*1,nt*.55,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*1)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.55)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.55)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.1)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.1)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*0)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.55).close()),ht}),go.Shape.defineFigureGenerator("Windows",function(Ot,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()).add(new go.PathSegment(go.PathSegment.Move,.4*et,.4*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.1*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.1*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*0,nt*.1,!1);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.1)),at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.9)),at.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.9).close());var ft=new go.PathFigure(et*.1,nt*.2,!0);ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.25)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.22,nt*.285)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.32)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.37)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.32)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.25).close());var mt=new go.PathFigure(et*.28,nt*.37,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.37)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.41)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.28,nt*.41).close()),ht}),go.Shape.defineFigureGenerator("Beaker",function(Ot,et,nt){var ht=new go.Geometry,at=15,ft=at*Jt,mt=new go.PathFigure(et*.62,nt*.475,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et,nt-at)),mt.add(new go.PathSegment(go.PathSegment.Bezier,et-at,nt,et,nt-ft,et-ft,nt)),mt.add(new go.PathSegment(go.PathSegment.Line,at,nt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-at,ft,nt,0,nt-ft)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.475)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.03)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*0)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*0)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.62,nt*.03).close()),ft>1?(ht.spot1=new go.Spot(0,0,ft,ft),ht.spot2=new go.Spot(1,1,-ft,-ft)):(ht.spot1=go.Spot.TopLeft,ht.spot2=go.Spot.BottomRight),ht}),go.Shape.defineFigureGenerator("Download",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*0,nt*1,!0);ht.add(at);var ft=.1/.3;at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-ft)).close());var mt=new go.PathFigure(et*.4,nt*0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.66)),mt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.26),nt*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*0).close()),ht}),go.Shape.defineFigureGenerator("Bin",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*0,nt*1,!0);ht.add(at);var ft=.1/.3;return at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-ft)).close()),ht}),go.Shape.defineFigureGenerator("Upload",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*0,nt*1,!0);ht.add(at);var ft=.1/.3;at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-ft))),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-ft)).close());var mt=new go.PathFigure(et*.5,nt*0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.25)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.25)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.63)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.63)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.25)),mt.add(new go.PathSegment(go.PathSegment.Line,et*.74,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*.15,nt*0,!1);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close()),ht}),go.Shape.defineFigureGenerator("Drink",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*.15,nt*0,!1);ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),at.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close());var ft=new go.PathFigure(et*.235,nt*.28,!0);return ht.add(ft),ft.add(new go.PathSegment(go.PathSegment.Line,et*.765,nt*.28)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.655,nt*.97)),ft.add(new go.PathSegment(go.PathSegment.Line,et*.345,nt*.97).close()),ht}),go.Shape.defineFigureGenerator("4Arrows",function(Ot,et,nt){var ht=new go.Geometry,at=new go.PathFigure(et*.5,nt*0,!0);return ht.add(at),at.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.25)),at.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.25)),at.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.45)),at.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.45)),at.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),at.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.5)),at.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.65)),at.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.55)),at.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),at.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*1)),at.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.75)),at.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.55)),at.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.55)),at.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.65)),at.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.5)),at.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.35)),at.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.45)),at.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.45)),at.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.25)),at.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Sn={},Ve="5.0",Pt={},vt=null,It=!1,oe=!1,de=null,$t=!1,Ut=null,Jt=null,De=0;De<arguments.length;De++){var we=arguments[De];if(we!==null)switch(typeof we){case"number":Ve=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ve=we:de=we;break;case"object":typeof we.is3D!="undefined"?vt=we:Pt=we;break;case"boolean":It=we,oe=!0;break}}vt===null&&(vt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Pt.material_id!==void 0&&!oe&&(It=!0)),de!==null&&Pt.id===void 0&&(Pt.id=de);var te="",Fe="",re=!1,me=null,Ot=null,et=null,nt=!1,ht=null,at=null,ft=null,mt=null,wt=null;Pt.height!==void 0&&(Pt.height=Math.round(Pt.height)),Pt.width!==void 0&&(Pt.width=Math.round(Pt.width));var Et=function(Ee){return parseFloat(Ee)>4?parseFloat(Ee):5};Sn.setHTML5Codebase=function(Ee,Ke){Jt=Ee,ke(Ee,Ke)},Sn.setJavaCodebase=Sn.setJavaCodebaseVersion=Sn.isCompiledInstalled=Sn.setPreCompiledScriptPath=Sn.setPreCompiledResourcePath=function(){},Sn.setHTML5CodebaseVersion=function(Ee,Ke){var gn=parseFloat(Ee);if(gn!==NaN&&gn<5){console.log("The GeoGebra HTML5 codebase version "+gn+" is deprecated. Using version latest instead.");return}Ut=Ee,Ht(Ee,Ke)},Sn.getHTML5CodebaseVersion=function(){return Ot},Sn.getParameters=function(){return Pt},Sn.setFontsCSSURL=function(Ee){mt=Ee},Sn.setGiacJSURL=function(Ee){},Sn.setJNLPFile=function(Ee){te=Ee},Sn.setJNLPBaseDir=function(Ee){},Sn.inject=function(){function Ee(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ke="auto",gn=Pt.id,Bn,dn=!1,In=0;In<arguments.length;In++){var Ce=arguments[In];typeof Ce=="string"?(Ce=Ce.toLowerCase(),Ce.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ke=Ce:gn=arguments[In]):typeof Ce=="boolean"?dn=Ce:Ce instanceof HTMLElement&&(Bn=Ce)}$n();function $n(){if(!$t){setTimeout($n,200);return}Ke=Ue(Ke);var Qn=Bn||document.getElementById(gn);if(!Qn){console.log("possibly bug on ajax loading? ");return}if(Sn.removeExistingApplet(Qn,!1),Pt.width===void 0&&Qn.clientWidth&&(Pt.width=Qn.clientWidth),Pt.height===void 0&&Qn.clientHeight&&(Pt.height=Qn.clientHeight),!(Pt.width&&Pt.height)&&Ke==="html5"&&(delete Pt.width,delete Pt.height),me=Ke,Ke==="screenshot")Se(Qn,Pt);else{var jt=!1;Pt.hasOwnProperty("playButton")&&Pt.playButton||Pt.hasOwnProperty("clickToLoad")&&Pt.clickToLoad?jt=!0:Pt.hasOwnProperty("playButtonAutoDecide")&&Pt.playButtonAutoDecide&&(jt=(!Nt()||Ee())&&Dt()),jt?(me="screenshot",Le(Qn,Pt,dn,Ke)):Ie(Qn,Pt,dn)}}};function Nt(){try{return window.self!==window.top}catch(Ee){return!0}}function Dt(){return Pt.hasOwnProperty("screenshotGenerator")&&Pt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Sn.getViews=function(){return vt},Sn.isJavaInstalled=function(){return!1};var At=function(Ee){var Ke=function(In){var Ce=JSON.parse(In),$n=function(Lt){return Lt.type=="G"||Lt.type=="E"},Qn=Ce.elements?Ce.elements.filter($n)[0]:Ce;if(!Qn||!Qn.url){gn();return}Pt.fileName=Qn.url,Kt(Qn.settings||{}),vt.is3D=!0;var jt="https://www.geogebra.org/images/";Sn.setPreviewImage(ht||Qn.previewUrl,jt+"GeoGebra_loading.png",jt+"applet_play.png"),Ee()},gn=function(){Pt.onError&&Pt.onError(),pn("Error: Fetching material (id "+Pt.material_id+") failed.",Pt)},Bn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",dn="/materials/"+Pt.material_id+"?scope=basic";Wt("https://"+Bn+"/api/proxy.php?path="+encodeURIComponent(dn),Ke,gn)};function Kt(Ee){var Ke=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(gn){Ee[gn]=!!Ee[gn]}),Ke.forEach(function(gn){Pt[gn]===void 0&&Ee[gn]!==void 0&&(Pt[gn]=Ee[gn])}),Pt.showToolBarHelp===void 0&&(Pt.showToolBarHelp=Pt.showToolBar)}function Wt(Ee,Ke,gn){var Bn=new XMLHttpRequest;Bn.open("GET",Ee),Bn.onload=function(){Ke(Bn.responseText)},Bn.onerror=gn,Bn.send()}Sn.isHTML5Installed=function(){return!0},Sn.getLoadedAppletType=function(){return me},Sn.setPreviewImage=function(Ee,Ke,gn){ht=Ee,at=Ke,ft=gn},Sn.removeExistingApplet=function(Ee,Ke){var gn;typeof Ee=="string"&&(Ee=document.getElementById(Ee)),me=null;var Bn=null;for(gn=0;gn<Ee.childNodes.length;gn++){var dn=Ee.childNodes[gn],In=dn.className;In==="applet_screenshot"?Ke?(dn.style.display="block",me="screenshot"):dn.style.display="none":In!=="applet_scaler prerender"&&(Ee.removeChild(dn),Bn=In&&In.indexOf("appletParameters")!=-1?dn.id:null,gn--)}var Ce=Pt.id!==void 0?Pt.id:Bn,$n=window[Ce];$n&&typeof $n.getBase64=="function"&&($n.remove(),window[Ce]=null)},Sn.refreshHitPoints=function(){if(Et(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ee=Sn.getAppletObject();return Ee&&typeof Ee.recalculateEnvironments=="function"?(Ee.recalculateEnvironments(),!0):!1},Sn.startAnimation=function(){var Ee=Sn.getAppletObject();return Ee&&typeof Ee.startAnimation=="function"?(Ee.startAnimation(),!0):!1},Sn.stopAnimation=function(){var Ee=Sn.getAppletObject();return Ee&&typeof Ee.stopAnimation=="function"?(Ee.stopAnimation(),!0):!1},Sn.getAppletObject=function(){var Ee=Pt.id!==void 0?Pt.id:"ggbApplet";return window[Ee]},Sn.resize=function(){};var xe=function(Ee,Ke,gn){var Bn=document.createElement("param");Bn.setAttribute("name",Ke),Bn.setAttribute("value",gn),Ee.appendChild(Bn)},Vt=function(Ee){return Ee&&Ee!=="false"},Ie=function(Ee,Ke,gn){Et(Ot)<=4.2&&(gn=!0);var Bn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ot||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(Bn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var dn=document.createElement("div");dn.classList.add("appletParameters","notranslate");var In=Ke.width,Ce=Ke.height;if(Ke.disableAutoScale=Ke.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ke.disableAutoScale,Ke.width!==void 0)if(Et(Ot)<=4.4)Vt(Ke.showToolBar)&&(Ke.height-=7),Vt(Ke.showAlgebraInput)&&(Ke.height-=37),Ke.width<605&&Vt(Ke.showToolBar)&&(Ke.width=605,In=605);else{var $n=100;(Vt(Ke.showToolBar)||Vt(Ke.showMenuBar))&&(Ke.hasOwnProperty("customToolBar")&&(Ke.customToolbar=Ke.customToolBar),$n=Vt(Ke.showMenuBar)?245:155),In<$n&&(Ke.width=$n,In=$n)}dn.style.border="none",dn.style.display="inline-block";for(var Qn in Ke)Ke.hasOwnProperty(Qn)&&Qn!=="appletOnLoad"&&dn.setAttribute("data-param-"+Qn,Ke[Qn]);mt&&dn.setAttribute("data-param-fontscssurl",mt),Sn.resize=function(){GGBAppletUtils.responsiveResize(Ee,Ke)},window.addEventListener("resize",function(ne){Sn.resize()});var jt=typeof Ke.appletOnLoad=="function"?Ke.appletOnLoad:function(){};if(!gn&&Ke.width!==void 0){Ke.hasOwnProperty("showSplash")||dn.setAttribute("data-param-showSplash","false");var Lt=Ee.querySelector(".applet_scaler.prerender"),xt=Lt!==null;if(xt)var Tt=Lt.querySelector(".ggb_preview");else{var Tt=We(In,Ce,Ke.borderColor,!1);Lt=document.createElement("div"),Lt.className="applet_scaler",Lt.style.position="relative",Lt.style.display="block",Lt.style.width=In+"px",Lt.style.height=Ce+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Lt,"66%"),Et(Ot)>=5?(Ke.appletOnLoad=function(ne){var Ne=Ee.querySelector(".ggb_preview");Ne&&Ne.parentNode.removeChild(Ne),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Lt),window.GGBT_wsf_view&&$(window).trigger("resize"),jt(ne)},xt||Lt.appendChild(Tt)):dn.appendChild(Tt),Lt.appendChild(dn),xt||Ee.appendChild(Lt),setTimeout(function(){Sn.resize()},1)}else{var Ft=document.createElement("div");Ft.className="applet_scaler",Ft.style.position="relative",Ft.style.display="block",Ft.appendChild(dn),Ee.appendChild(Ft),Ke.appletOnLoad=function(ne){Sn.resize(),jt(ne)}}function yt(ne,Ne){Ne&&typeof Ne.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ne,Ne.appletOnLoad):renderGGBElement(ne),pn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ne)}function ee(ne,Ne){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ne,params:Ne}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(hn){yt(hn.article,hn.params)}),html5AppletsToProcess=null)},Et(Ot)<5&&(ne.className+=" geogebraweb")):yt(ne,Ne)}if(Bn){scriptLoadStarted=!0;for(var pe=0;pe<dn.childNodes.length;pe++){var qt=dn.childNodes[pe].tagName;qt==="TABLE"&&(dn.removeChild(dn.childNodes[pe]),pe--)}if(ggbHTML5LoadedScript!==null){var Zt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Zt!=null&&Zt.parentNode.removeChild(Zt)}var fe=document.createElement("script"),ce=function(){ee(dn,Ke)};fe.src=Fe+et,ggbHTML5LoadedCodebaseIsWebSimple=nt,ggbHTML5LoadedCodebaseVersion=Ot,ggbHTML5LoadedScript=fe.src,pn("GeoGebra HTML5 codebase loaded: '"+Fe+"'.",Ke),!Jt&&(!Ut||Ut=="5.0")?(nt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),ce()):Fe.requirejs?__webpack_require__.e(4184).then(function(){var ne=[__webpack_require__(74620)];ce.apply(null,ne)}.bind(this)).catch(__webpack_require__.oe):(fe.onload=ce,Ee.appendChild(fe))}else ee(dn,Ke);Ke.height=Ce,Ke.width=In},Se=function(Ee,Ke,gn){var Bn=We(Ke.width,Ke.height,Ke.borderColor,gn),dn=document.createElement("div");dn.style.position="relative",dn.style.display="block",dn.style.width=Ke.width+"px",dn.style.height=Ke.height+"px",dn.className="applet_screenshot applet_scaler"+(gn?" applet_screenshot_play":""),dn.appendChild(Bn);var In=GGBAppletUtils.getScale(Ke,Ee,gn);gn?(Ee.appendChild(Pe()),window.GGBT_wsf_view||(Ee.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(dn,"66%"),Ee.appendChild(dn),In!==1&&!isNaN(In)&&(GGBAppletUtils.scaleElement(dn,In),dn.style.width=Ke.width+"px",dn.style.height=Ke.height+"px",dn.parentNode.style.width=Ke.width*In+"px",dn.parentNode.style.height=Ke.height*In+"px"),Sn.resize=function(){Ye(Ee,Bn,dn,gn)},window.addEventListener("resize",function(Ce){Sn.resize()}),Sn.resize()};function Ye(Ee,Ke,gn,Bn){if(Ee.contains(Ke)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ee.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ee)}var dn=GGBAppletUtils.getScale(Pt,Ee,Bn);gn.parentNode!==null&&(!isNaN(dn)&&dn!==1?(GGBAppletUtils.scaleElement(gn,dn),gn.parentNode.style.width=Pt.width*dn+"px",gn.parentNode.style.height=Pt.height*dn+"px"):(GGBAppletUtils.scaleElement(gn,1),gn.parentNode.style.width=Pt.width+"px",gn.parentNode.style.height=Pt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ee),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Sn.onExitFullscreen=function(Ee,Ke){Ke.appendChild(Ee)};var Le=function(Ee,Ke,gn,Bn){Se(Ee,Ke,!0);for(var dn=function(){var $n=[];for(Ce=0;Ce<Ee.childNodes.length;Ce++)$n.push(Ee.childNodes[Ce]);if(window.GGBT_wsf_view){var Qn=window.GGBT_wsf_view.renderFullScreen(Ee,Ke.id),jt=document.getElementById("fullscreencontainer"),Lt=jQuery(Ee).find(".fullscreencontent");Lt.length>0?(Qn.remove(),Lt.attr("id","fullscreencontent").show(),jQuery(jt).append(Lt),window.dispatchEvent(new Event("resize"))):Ie(Qn,Ke,!1),window.GGBT_wsf_view.launchFullScreen(jt)}else me=Bn,Ie(Ee,Ke,!1);if(!window.GGBT_wsf_view)for(Ce=0;Ce<$n.length;Ce++)Ee.removeChild($n[Ce])},In=Ee.getElementsByClassName("ggb_preview_play"),Ce=0;Ce<In.length;Ce++)In[Ce].addEventListener("click",dn,!1),In[Ce].addEventListener("ontouchstart",dn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ee),Dt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Pe=function(){var Ee=document.createElement("div");if(Ee.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ke='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',gn=document.createElement("style");gn.styleSheet?gn.styleSheet.cssText=Ke:gn.appendChild(document.createTextNode(Ke)),document.getElementsByTagName("head")[0].appendChild(gn)}return Ee},We=function(Ee,Ke,gn,Bn){var dn=document.createElement("div");dn.className="ggb_preview",dn.style.position="absolute",dn.style.zIndex="90",dn.style.width=Ee-2+"px",dn.style.height=Ke-2+"px",dn.style.top="0px",dn.style.left="0px",dn.style.overflow="hidden",dn.style.backgroundColor="white";var In="lightgrey";gn!==void 0&&(gn==="none"?In="transparent":In=gn),dn.style.border="1px solid "+In;var Ce=document.createElement("img");if(Ce.style.position="relative",Ce.style.zIndex="1000",Ce.style.top="-1px",Ce.style.left="-1px",ht!==null&&Ce.setAttribute("src",ht),Ce.style.opacity=.7,at!==null){var $n,Qn,jt;if(!Bn){$n=document.createElement("img"),$n.style.position="absolute",$n.style.zIndex="1001",$n.style.opacity=1,Ce.style.opacity=.3,Qn=360,Qn>Ee/4*3&&(Qn=Ee/4*3),jt=Qn/5.8,$n.setAttribute("src",at),$n.setAttribute("width",Qn),$n.setAttribute("height",jt);var Lt=(Ee-Qn)/2,xt=(Ke-jt)/2;$n.style.left=Lt+"px",$n.style.top=xt+"px",dn.appendChild($n)}}return dn.appendChild(Ce),dn},Ue=function(Ee){return Ee=Ee.toLowerCase(),Ee==="html5"||Ee==="screenshot"?Ee:"html5"},ue=["web","webSimple","web3d","tablet","tablet3d","phone"],Ht=function(Ee,Ke){if(Ot=Ee,Ke){ke(Ot,!0);return}var gn=!It;if(gn){var Bn=Et(Ot);!isNaN(Bn)&&Bn<4.4&&(gn=!1)}var dn,In;window.location.protocol.substr(0,4)==="http"?dn=window.location.protocol:dn="http:";var Ce=Ot.indexOf("//");Ce>0?In=Ot:Ce===0?In=dn+Ot:In="https://www.geogebra.org/apps/5.2.814.0/";for(var $n in ue)if(Ot.slice(ue[$n].length*-1)===ue[$n]||Ot.slice((ue[$n].length+1)*-1)===ue[$n]+"/"){ke(In,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&gn&&!vt.is3D&&!vt.AV&&!vt.SV&&!vt.CV&&!vt.EV2&&!vt.CP&&!vt.PC&&!vt.DA&&!vt.FI&&!vt.PV&&!Vt(Pt.showToolBar)&&!Vt(Pt.showMenuBar)&&!Vt(Pt.showAlgebraInput)&&!Vt(Pt.enableRightClick)&&(!Pt.appName||Pt.appName=="classic")?In+="webSimple/":In+="web3d/",ke(In,!1)},ke=function(Ee,Ke){if(Ee.requirejs){Fe=Ee;return}Ee.slice(-1)!=="/"&&(Ee+="/"),Fe=Ee,Ke===null&&(Ke=Ee.indexOf("http")===-1),re=Ke,et="web.nocache.js",nt=!1;var gn=Fe.split("/");gn.length>1&&(!Ke&&gn[gn.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):ue.indexOf(gn[gn.length-2])>=0&&(et=gn[gn.length-2]+".nocache.js")),gn=Ee.split("/"),Ot=gn[gn.length-3],Ot.substr(0,4)==="test"?Ot=Ot.substr(4,1)+"."+Ot.substr(5,1):(Ot.substr(0,3)==="war"||Ot.substr(0,4)==="beta")&&(Ot="5.0");var Bn=parseFloat(Ot);Bn!==NaN&&Bn<5&&Ee.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Bn+" is deprecated. Using version latest instead."),Ht("5.0",Ke))},pn=function(Ee,Ke){window.console&&window.console.log&&(!Ke||typeof Ke.showLogging=="undefined"||Ke.showLogging&&Ke.showLogging!=="false")&&console.log(Ee)};Pt.material_id!==void 0?At(ln):ln();function ln(){var Ee=Ve;Ut!==null?Ee=Ut:parseFloat(Ee)<5&&(Ee="5.0"),Ht(Ee,!1),Jt!==null&&ke(Jt,re),$t=!0}return Sn},GGBAppletUtils=function(){"use strict";function Sn(){return window.GGBT_wsf_edit!==void 0}function Ve($t,Ut){Ut!=1?($t.style.transformOrigin="0% 0% 0px",$t.style.webkitTransformOrigin="0% 0% 0px",$t.style.transform="scale("+Ut+","+Ut+")",$t.style.webkitTransform="scale("+Ut+","+Ut+")",$t.style.maxWidth="initial",$t.querySelector(".ggb_preview")!==null&&($t.querySelector(".ggb_preview").style.maxWidth="initial"),$t.querySelectorAll(".ggb_preview img")[0]!==void 0&&($t.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),$t.querySelectorAll(".ggb_preview img")[1]!==void 0&&($t.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):($t.style.transform="none",$t.style.webkitTransform="none")}function Pt($t,Ut,Jt,De,we,te){var Fe=null;if(te!=null&&te!="")for(var re=$t.parentNode;re!=null;)if((" "+re.className+" ").indexOf(" "+te+" ")>-1){Fe=re;break}else re=re.parentNode;var me=0,Ot=0,et=0,nt=0,ht=0,at=0,ft=0;if(Fe)me=Fe.offsetWidth,Ot=Math.max(De?Fe.offsetWidth:0,Fe.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(me=Math.min(window.innerWidth,document.documentElement.clientWidth),Ot=Math.min(window.innerHeight,document.documentElement.clientHeight),et=me):(me=window.innerWidth,Ot=window.innerHeight,et=window.innerWidth),$t){var mt=$t.getBoundingClientRect();mt.left>0&&mt.left<=me&&(we===void 0||!we)&&(document.dir==="rtl"?(ht=me-mt.width-mt.left,at=et<=480?10:30):(at=mt.left,ht=et<=480?10:30),nt=at+ht)}if($t&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var wt=$t.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,ft=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,ft=40)}}return $t&&((Jt===void 0||!Jt)&&Ut>0&&Ut+nt<me?me=Ut:me-=nt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Jt===void 0||!Jt)&&(Ot-=ft)),{width:me,height:Ot}}function vt($t,Ut,Jt,De,we){if($t.isScreenshoGenerator)return 1;var te=De!==void 0&&De,Fe=$t.noScaleMargin!=null&&$t.noScaleMargin,re=function(wt){return wt&&wt!=="false"},me=re($t.autoHeight),Ot=Pt(Ut,$t.width,Jt,me,te&&window.GGBT_wsf_view||Fe,we),et=parseInt(Ot.width),nt=$t.width,ht=$t.height;if(nt===void 0){var at=Ut.querySelector(".appletParameters");at&&(nt=at.offsetWidth,ht=at.offsetHeight)}var ft=et/nt,mt=te?1:Ot.height/ht;return Jt!==void 0&&!Jt&&(ft=Math.min(1,ft),mt=Math.min(1,mt)),Math.min(ft,mt)}function It($t,Ut,Jt){var De=1,we,te=!1;if($t.hasOwnProperty("allowUpscale")&&(te=$t.allowUpscale),$t.hasOwnProperty("scale")&&(De=parseFloat($t.scale),(isNaN(De)||De===null||De===0)&&(De=1),De>1&&(te=!0)),Ut&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(te=!0),!($t.hasOwnProperty("disableAutoScale")&&$t.disableAutoScale))we=vt($t,Ut,te,Jt,$t.scaleContainerClass);else return De;return te&&(!$t.hasOwnProperty("scale")||De===1)?we:Math.min(De,we)}function oe($t){var Ut=Math.min(window.innerWidth,document.documentElement.clientWidth),Jt=Math.min(window.innerHeight,document.documentElement.clientHeight),De=$t.getBoundingClientRect(),we=(Ut-De.width)/2,te=(Jt-De.height)/2;te<0&&(te=0),$t.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?$t.style.left="40px":$t.style.left=we+"px",$t.style.top=te+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(te<40?$t.style.top="40px":$t.style.top=te+"px",$t.style.left=we+"px")}function de($t,Ut){var Jt=$t.querySelector(".appletParameters");if(Jt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ut.id!==Jt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition($t)}if(Jt.parentElement&&/fullscreen/.test(Jt.parentElement.className))return;var De=It(Ut,$t);Sn()&&Jt.setAttribute("data-param-scale",De);for(var we=null,te=0;te<$t.childNodes.length;te++)if($t.childNodes[te].className!==void 0&&$t.childNodes[te].className.match(/^applet_scaler/)){we=$t.childNodes[te];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var Fe=Ut.id!==void 0?Ut.id:"ggbApplet",re=window[Fe];(re==null||!re.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(De)&&De!==1?(we.parentNode.style.width=Ut.width*De+"px",we.parentNode.style.height=Ut.height*De+"px",Ve(we,De)):(Ve(we,1),we.parentNode.style.width=Ut.width+"px",we.parentNode.style.height=Ut.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&oe($t),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Jt).parents(".content-added-content"))}}return{responsiveResize:de,isFlexibleWorksheetEditor:Sn,positionCenter:oe,getScale:It,scaleElement:Ve}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Sn=n.location.search;return Sn.indexOf(J)!=-1||Sn.indexOf(K)!=-1}function q(Sn,Ve){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Sn){var Ve=s[L].bindings;s[L].bindings=function(){for(var Pt=Ve?Ve():{},vt=Sn[webModule.__softPermutationId],It=O;It<vt.length;It++){var oe=vt[It];Pt[oe[O]]=oe[P]}return Pt}};var t;function u(){return v(),t}function v(){if(!t){var Sn=o.createElement(Q);if(Sn.id=L,Sn.style.cssText=R+S,Sn.tabIndex=-1,o.body.appendChild(Sn),t=Sn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ve=document.compatMode==U?V:W;t.write(Ve+X),t.close()}}}function w(Sn){function Ve(vt){function It(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var oe=It();if(oe){vt();return}function de(){if(!oe){if(!It())return;oe=!0,vt(),o.removeEventListener&&o.removeEventListener(Z,de,!1),$t&&clearInterval($t)}}o.addEventListener&&o.addEventListener(Z,de,!1);var $t=setInterval(function(){de()},$)}function Pt(vt){var It=u(),oe=It.body,de=It.createElement(_);de.language=ab,de.crossOrigin=W,de.src=vt,webModule.__errFn&&(de.onerror=function(){webModule.__errFn(L,new Error(bb+vt))}),oe.appendChild(de)}Ve(function(){Pt(Sn)})}webModule.__startLoadingFragment=function(Sn){return C(Sn)},webModule.__installRunAsyncCode=function(Sn){var Ve=u(),Pt=Ve.body,vt=Ve.createElement(_);vt.language=ab,vt.text=Sn,Pt.appendChild(vt),Pt.removeChild(vt)};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(Sn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Sn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Sn){var Ve=c[Sn];return Ve==null?null:Ve},r=d,webModule.__errFn=e}function B(){function Sn($t){var Ut=$t.lastIndexOf(rb);Ut==-1&&(Ut=$t.length);var Jt=$t.indexOf(sb);Jt==-1&&(Jt=$t.length);var De=$t.lastIndexOf(tb,Math.min(Jt,Ut));return De>=O?$t.substring(O,De+P):W}function Ve($t){if(!$t.match(/^\w+:\/\//)){var Ut=o.createElement(ub);Ut.src=$t+vb,$t=Sn(Ut.src)}return $t}function Pt(){var $t=__gwt_getMetaProperty(wb);return $t!=null?$t:W}function vt(){for(var $t=o.getElementsByTagName(_),Ut=O;Ut<$t.length;++Ut)if($t[Ut].src.indexOf(xb)!=-1)return Sn($t[Ut].src);return W}function It(){var $t=o.getElementsByTagName(yb);return $t.length>O?$t[$t.length-P].href:W}function oe(){var $t=o.location;return $t.href==$t.protocol+zb+$t.host+$t.pathname+$t.search+$t.hash}var de=Pt();return de==W&&(de=vt()),de==W&&(de=It()),de==W&&oe()&&(de=Sn(o.location.href)),de=Ve(de),de}function C(Sn){return Sn.match(/^\//)||Sn.match(/^[a-zA-Z]+:\/\//)?Sn:webModule.__moduleBase+Sn}function D(){var Sn=[],Ve=O,Pt=[],vt=[];function It($t){var Ut=vt[$t](),Jt=Pt[$t];if(Ut in Jt)return Ut;var De=[];for(var we in Jt)De[Jt[we]]=we;throw r&&r($t,De,Ut),null}if(__gwt_isKnownPropertyValue=function($t,Ut){return Ut in Pt[$t]},webModule.__getPropMap=function(){var $t={};for(var Ut in Pt)Pt.hasOwnProperty(Ut)&&($t[Ut]=It(Ut));return $t},webModule.__computePropValue=It,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var oe;try{oe=Cb;var de=oe.indexOf(Db);de!=-1&&(Ve=parseInt(oe.substring(de+P),$),oe=oe.substring(O,de))}catch($t){}return webModule.__softPermutationId=Ve,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})()},77903:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Ax:function(){return de},Ds:function(){return $t},KI:function(){return Jt},SI:function(){return oe},f1:function(){return It}});var vt=Pt(3294);function It(De){let we=!0;if(De.length>0){for(let te=0;te<De.length;te++)if(De[te].compile_success==0||!De[te].compile_success){we=!1;break}}else we=!1;return we}function oe(De,we=""){let te=[];for(let Fe=0;Fe<De.length;Fe++){let re=De[Fe],me=we?`${we}/${re.name}`:`${re.name}`;te.push({title:re.name,type:re.type,isLeaf:re.type!=="tree",key:me})}return te}function de(De,we,te){for(let Fe=0;Fe<De.length;Fe++){let re=De[Fe];if(re.key===we){re.children=te;break}re.children&&de(re.children,we,te)}return De}function $t(De,we,te){let Fe;return function(){let re=this,me=arguments,Ot=function(){Fe=null,te||De.apply(re,me)},et=te&&!Fe;clearTimeout(Fe),Fe=setTimeout(Ot,we),et&&De.apply(re,me)}}const Ut=!0,Jt=vt.Z.API_SERVER},73524:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return Fe}});var vt=Pt(59301),It={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},oe=Pt(92310),de=Pt.n(oe),$t=Pt(71418),Ut=Pt(2859),Jt=Pt(99064),De=Pt(955),we=(re,me,Ot)=>new Promise((et,nt)=>{var ht=mt=>{try{ft(Ot.next(mt))}catch(wt){nt(wt)}},at=mt=>{try{ft(Ot.throw(mt))}catch(wt){nt(wt)}},ft=mt=>mt.done?et(mt.value):Promise.resolve(mt.value).then(ht,at);ft((Ot=Ot.apply(re,me)).next())}),Fe=({data:re,className:me,fullWidth:Ot,style:et={},onClose:nt,onOk:ht,showFullTools:at,noAssociationId:ft})=>{const mt=(0,vt.useRef)(null),wt=(0,vt.useRef)(null),Et=(0,vt.useRef)(null),Nt=(0,vt.useRef)(null),[Dt,At]=(0,vt.useState)(!1),[Kt,Wt]=(0,vt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,vt.useEffect)(()=>(Et.current||(Et.current=document.createElement("style"),document.head.appendChild(Et.current)),re!=null&&re.visible?(document.body.setAttribute("data-custom","y-hidden"),Et.current.innerHTML=" html { overflow-y: hidden; }",re!=null&&re.src&&xe()):(document.body.removeAttribute("data-custom"),Et.current&&(document.head.removeChild(Et.current),Et.current=null)),()=>{document.body.removeAttribute("data-custom"),Et.current&&(document.head.removeChild(Et.current),Et.current=null)}),[re==null?void 0:re.visible]);const xe=()=>we(void 0,null,function*(){At(!0),Wt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ye=yield(0,De.ZJ)(re==null?void 0:re.src);mt.current.src="",mt.current.src=Ye,mt.current.onload=function(){Se()},At(!1),Wt("")}),Vt=Ye=>we(void 0,null,function*(){At(!0),Wt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Le=yield(0,Jt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:re.title,file:Ye.dataUrl}});Le!=null&&Le.id&&!ft?(yield(0,Jt.ZP)(`/api/attachments/${re.id}/add_subitem.json`,{method:"post",body:{subitem_id:Le==null?void 0:Le.id,settings:JSON.stringify(Ye.state)}})).status===0&&ht():Le!=null&&Le.id&&ht(Le),At(!1),Wt("")}),Ie=()=>{const Ye=document.querySelector('a[href="https://markerjs.com/"]');Ye&&Ye.parentNode&&(Ye.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(Pe=>{const We=document.querySelector(Pe.name);We&&We.setAttribute("title",Pe.title)})},Se=()=>{wt.current=new Ut.hP(mt.current),wt.current.targetRoot=Nt.current,wt.current.addEventListener("render",Vt),wt.current.addEventListener("beforeclose",nt),at&&(wt.current.availableMarkerTypes=wt.current.ALL_MARKER_TYPES,wt.current.uiStyleSettings.redoButtonVisible=!0,wt.current.uiStyleSettings.notesButtonVisible=!0,wt.current.uiStyleSettings.zoomButtonVisible=!0,wt.current.uiStyleSettings.zoomOutButtonVisible=!0,wt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=wt.current.uiStyleSettings,wt.current.show(),re!=null&&re.snapshotData&&wt.current.restoreState(re.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ie()},300)};return vt.createElement(vt.Fragment,null,(re==null?void 0:re.visible)&&vt.createElement($t.Z,{spinning:Dt,tip:Kt,style:{position:"absolute",width:"100vw"}},vt.createElement("div",{ref:Nt,className:de()(It.imageDimensions,me,Ot?It.fullWidth:""),style:et},vt.createElement("img",{className:It.img,ref:mt}))))}},41588:function(Sn,Ve,Pt){"use strict";var vt=Pt(59301),It=Pt(95237),oe=Pt(43604),de=Pt(99313),$t=Pt(3113),Ut=Pt(85149),Jt=Pt(88010),De=Pt(48136),we=Pt(59301);const te=(0,vt.forwardRef)(({callback:Fe,showSaveButton:re,value:me=""},Ot)=>{const et=(0,vt.useRef)(),nt=[{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 "}]}]}],ht=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],at=wt=>{et.current.setValue(et.current.getValue()+" "+wt.value+" ")},ft=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(It.Z,{className:Jt.Z.lists,gutter:[10,10]},nt.map((wt,Et)=>we.createElement(oe.Z,{flex:"110px",className:Jt.Z.item},we.createElement("div",null,we.createElement(Ut.Z,{value:`$$${wt.value}$$`}),wt.name),we.createElement("div",{className:Jt.Z.children},wt.children.map((Nt,Dt)=>we.createElement("div",{key:Dt},we.createElement("h1",null,Nt.name),we.createElement(It.Z,{gutter:[10,10]},Nt.data.map((At,Kt)=>we.createElement(oe.Z,{key:Kt,onClick:()=>at(At),className:Jt.Z.diamond},we.createElement(Ut.Z,{value:"`$$"+At.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(It.Z,{className:Jt.Z.lists,gutter:[10,10]},ht.map((wt,Et)=>we.createElement(oe.Z,{flex:"110px",className:Jt.Z.item},we.createElement("div",null,we.createElement(Ut.Z,{value:"`$$"+wt.value+"$$`"}),wt.name),we.createElement("div",{className:Jt.Z.children},wt.children.map((Nt,Dt)=>we.createElement("div",{key:Dt},Nt.name&&we.createElement("h1",null,Nt.name),we.createElement(It.Z,{gutter:[10,10]},Nt.data.map((At,Kt)=>we.createElement(oe.Z,{key:Kt,onClick:()=>at(At),className:Jt.Z.diamond},we.createElement(Ut.Z,{value:"`$$"+At.value+"$$`"}))))))))))}],mt=()=>{var wt=document.createElement("div");wt.innerHTML=et.current.getValue();var Et=wt.innerText;return Fe&&Fe(Et),Et};return(0,vt.useImperativeHandle)(Ot,()=>({getData:mt})),we.createElement("div",{className:Jt.Z.mathWrap},we.createElement(de.default,{defaultActiveKey:"1",items:ft}),we.createElement("math-field",{locale:"zh_cn",className:Jt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},me||""),re&&we.createElement("div",{className:Jt.Z.button},we.createElement($t.ZP,{size:"large",onClick:mt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ve.Z=te},8797:function(Sn,Ve,Pt){"use strict";var vt=Pt(59301),It=Pt(93314),oe=Pt(3113),de=Object.defineProperty,$t=Object.defineProperties,Ut=Object.getOwnPropertyDescriptors,Jt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,te=(Ot,et,nt)=>et in Ot?de(Ot,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Ot[et]=nt,Fe=(Ot,et)=>{for(var nt in et||(et={}))De.call(et,nt)&&te(Ot,nt,et[nt]);if(Jt)for(var nt of Jt(et))we.call(et,nt)&&te(Ot,nt,et[nt]);return Ot},re=(Ot,et)=>$t(Ot,Ut(et));const me=({img:Ot,buttonProps:et={},styles:nt={},customText:ht,ButtonText:at,ButtonClick:ft,Buttonclass:mt,ButtonTwo:wt,imgStyles:Et,loading:Nt=!1})=>vt.createElement("section",{className:"tc animated fadeIn",style:Fe(Fe({},{color:"#999",margin:"100px auto",visibility:Nt?"hidden":"visible"}),nt)},vt.createElement("img",{src:Ot||It,style:re(Fe({},Et),{pointerEvents:"none",userSelect:"none"})}),vt.createElement("p",{className:"mt20 font14"},ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),at&&vt.createElement(oe.ZP,Fe({className:mt,onClick:ft},et),at),wt&&wt);Ve.Z=me},23210:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return mt}});var vt=Pt(59301),It={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},oe=Pt(3113),de=Pt(70557),$t=Pt(23954),Ut=Pt(6848),Jt=Pt(955),De=Pt(94941),we=Pt(8797),te=Pt(3294),Fe=Pt(19381),re=Pt(59301),me=Object.defineProperty,Ot=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(wt,Et,Nt)=>Et in wt?me(wt,Et,{enumerable:!0,configurable:!0,writable:!0,value:Nt}):wt[Et]=Nt,at=(wt,Et)=>{for(var Nt in Et||(Et={}))et.call(Et,Nt)&&ht(wt,Nt,Et[Nt]);if(Ot)for(var Nt of Ot(Et))nt.call(Et,Nt)&&ht(wt,Nt,Et[Nt]);return wt},ft=(wt,Et,Nt)=>new Promise((Dt,At)=>{var Kt=Vt=>{try{xe(Nt.next(Vt))}catch(Ie){At(Ie)}},Wt=Vt=>{try{xe(Nt.throw(Vt))}catch(Ie){At(Ie)}},xe=Vt=>Vt.done?Dt(Vt.value):Promise.resolve(Vt.value).then(Kt,Wt);xe((Nt=Nt.apply(wt,Et)).next())}),mt=({editOffice:wt="view",data:Et,theme:Nt,type:Dt,filename:At,monacoEditor:Kt,className:Wt,style:xe,close:Vt,onClose:Ie,hasMask:Se,disabledDownload:Ye,onImgDimensions:Le,showNodata:Pe,recordInfo:We})=>{const[Ue,ue]=(0,vt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ht,ke]=(0,vt.useState)(""),[pn,ln]=(0,vt.useState)(),Ee=window.ENV==="build"?"/react/build":"",Ke=location.host.startsWith("localhost")?te.Z.PROXY_SERVER:te.Z.API_SERVER,Bn=10*(1024*1024),dn=(0,vt.useRef)();Et!=null&&Et.startsWith("/api")&&Dt!=="txt"&&(Et=te.Z.API_SERVER+Et);const In=jt=>jt.substring(jt.lastIndexOf("/")+1).split(".").pop();At&&Kt&&(Kt.filename=At),(0,vt.useEffect)(()=>{var jt,Lt;const xt=(Lt=(jt=document.cookie)==null?void 0:jt.replace(/\s/g,""))==null?void 0:Lt.split(";");xt==null||xt.map(Tt=>{let Ft=Tt.split("=");Ft[0]==="_educoder_session"&&ke(Ft[1])})},[]),(0,vt.useEffect)(()=>{Dt==="office"&&(Et.indexOf("bigfilescdn.")>-1||Et.indexOf("bigfiles1")>-1?ln({url:Et,fileType:In(Et),model:Et.indexOf("model=edit")?"edit":"view"}):Ce())},[Dt,Et]);const Ce=()=>ft(void 0,null,function*(){console.log("data:",Et);let jt=Et;Et.startsWith("http")||(jt=location.origin+jt);let Lt=new URL(jt).pathname.split("/").pop();const xt=yield(0,De.gJ)({attachment_id:Lt});xt.url=Ke+xt.url,ln(xt)}),$n=()=>{if(Et.startsWith("http")||Et.startsWith("blob:")){Qn();return}(0,Jt.Sv)(At||"educoder",Et,At)},Qn=()=>{We&&(0,Fe.fc)({id:We==null?void 0:We.id,watch_type:1,course_id:We==null?void 0:We.course_id}),(0,Jt.Nd)(At||"educoder",decodeURIComponent(Et))};return re.createElement("div",{style:at({},xe||{}),className:`${Se&&It.bgBlack} ${Dt?It.wrp:"hide"}`},Vt&&re.createElement("div",{className:It.close,ref:dn},!!Le&&re.createElement(Ut.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>dn.current},re.createElement("span",{onClick:()=>{Ie(),Le()}},re.createElement("i",{className:"icon-yulanpizhu"}))),!Ye&&re.createElement(Ut.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>dn.current},re.createElement("span",{onClick:Qn},re.createElement("i",{className:"icon-quxiaozhiding"}))),re.createElement(Ut.Z,{title:"\u5173\u95ED",getPopupContainer:()=>dn.current},re.createElement("span",{className:"",onClick:Ie},re.createElement("i",{className:"icon-guanbi1"})))),re.createElement("div",{className:`${It[Wt]} ${Wt} ${It.monaco} ${Dt==="txt"?"show":"hide"}`},Dt==="txt"&&re.createElement(re.Fragment,null,re.createElement($t.ZP,at({},Kt)))),Dt==="audio"&&re.createElement("audio",{src:`${(Et==null?void 0:Et.indexOf("http://"))>-1||(Et==null?void 0:Et.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Et}`,autoPlay:!0}),Dt==="video"&&re.createElement(re.Fragment,null,(Et==null?void 0:Et.indexOf("http"))>-1?re.createElement("video",{controls:!0,src:`${Et}`,autoPlay:!0}):re.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Et}`,autoPlay:!0})),Dt==="office"&&pn&&re.createElement("iframe",{src:`${Ee}/office.html?key=${pn.key}&url=${btoa(pn.url)}&callbackUrl=${Ke+(pn.callbackUrl||"")}&fileType=${pn.fileType}&title=${pn.title||""}&model=${wt}&officeServer=${te.Z.ONLYOFFICE}&disabledDownload=${!!Ye}`}),Dt==="html"&&re.createElement("iframe",{src:Et+"&disposition=inline"}),Dt==="pdf"&&re.createElement("iframe",{src:`${Ee}/js/pdfview/index.html?filename=${At||"educoder.pdf"}&url=${encodeURIComponent(Et)}&disabledDownload=${!!Ye}`}),Dt==="image"&&re.createElement("img",{src:`${(Et==null?void 0:Et.indexOf("http://"))>-1||(Et==null?void 0:Et.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Et}`}),(Dt==="other"||Dt==="download")&&re.createElement(re.Fragment,null,Pe?re.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:re.createElement(oe.ZP,{icon:re.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:$n,disabled:Ye},"\u4E0B\u8F7D")}):re.createElement(oe.ZP,{type:"primary",size:"middle",onClick:$n,disabled:Ye},re.createElement(de.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{z:function(){return Dt},Z:function(){return At}});var vt=Pt(59301),It=Pt(50304),oe=Pt(24768),de=Pt(64018),$t=Pt(40846),Ut=Pt(3294),Jt=Pt(955),De=Pt(15342),we=Pt(1012),te=Pt(23210),Fe=Pt(59301),me=({html:Kt})=>{const Wt=(0,vt.useRef)(null),xe=(0,vt.useRef)(null),Vt=`.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,vt.useEffect)(()=>{const Ie=Wt.current.attachShadow({mode:"open"});xe.current=document.createElement("div"),xe.current.className="markdown-body",xe.current.innerHTML=Kt,Ie.appendChild(xe.current);const Se=document.createElement("style");return Se.textContent=Vt,Ie.appendChild(Se),()=>{Ie.innerHTML=""}},[]),(0,vt.useEffect)(()=>{xe.current&&(xe.current.innerHTML=Kt)},[Kt]),Fe.createElement("div",{ref:Wt})},Ot=Object.defineProperty,et=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,at=(Kt,Wt,xe)=>Wt in Kt?Ot(Kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:xe}):Kt[Wt]=xe,ft=(Kt,Wt)=>{for(var xe in Wt||(Wt={}))nt.call(Wt,xe)&&at(Kt,xe,Wt[xe]);if(et)for(var xe of et(Wt))ht.call(Wt,xe)&&at(Kt,xe,Wt[xe]);return Kt};const mt="@\u2581\u2581@",wt="@\u2581@",Et=/<pre[^>]*>/g;function Nt(Kt){let Wt=document.createElement("div");return Wt.innerHTML=Kt,Wt.childNodes.length===0?"":Wt.childNodes[0].nodeValue}const Dt=(Kt,Wt)=>{Kt=Kt||"";const xe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Vt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ie=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Se=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Wt?Kt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(xe,(Ye,Le,Pe,We,Ue,ue,Ht)=>{const ke=Le||We||ue,pn=Pe||Ue||Ht||"?";return Ut.Z.API_SERVER+"/api/attachments/"+ke+pn+"&t="+(0,Jt.Jn)(ke,Date.now())+(Ye.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Kt=Kt.replace(Se,(Ye,Le,Pe,We,Ue,ue,Ht)=>{const ke=Le||We||ue,pn=Pe||Ue||Ht||"?";return Ut.Z.API_SERVER+"/attachments/download/"+ke+pn+"&t="+(0,Jt.Jn)(ke,Date.now())+(Ye.indexOf(")")>-1?")":"&")}).replace(xe,(Ye,Le,Pe,We,Ue,ue,Ht)=>{const ke=Le||We||ue,pn=Pe||Ue||Ht||"?";return Ut.Z.API_SERVER+"/api/attachments/"+ke+pn+"&t="+(0,Jt.Jn)(ke,Date.now())+(Ye.indexOf(")")>-1?")":"&")}).replace(Vt,(Ye,Le,Pe,We,Ue)=>{const ue=Le||We,Ht=Pe||Ue||"";return'"'+Ut.Z.API_SERVER+"/api/attachments/"+ue+Ht+ue+Ht+"&t="+(0,Jt.Jn)(ue,Date.now())}).replace(Ie,(Ye,Le,Pe,We,Ue)=>{const ue=Le||We,Ht=Pe||Ue||"";return"("+Ut.Z.API_SERVER+"/files/uploads/"+ue+Ht+ue+Ht+"&t="+(0,Jt.Jn)(ue,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,`
|
|
|
`),Kt)};var At=({value:Kt="",className:Wt,showTextOnly:xe,showLines:Vt,style:Ie={},stylesPrev:Se={},highlightKeywords:Ye,showProgramFill:Le,isProgramFill:Pe,disabledFill:We=!1,programFillValue:Ue,onFillChange:ue=pn=>{},onFillBlur:Ht=()=>{},onFillFocus:ke=()=>{}})=>{let pn=String(Kt);const[ln,Ee]=(0,vt.useState)(""),[Ke,gn]=(0,vt.useState)("office"),[Bn,dn]=(0,vt.useState)([]),In=(0,vt.useRef)("a"+(0,we.Z)()),Ce={},$n=(fe,ce,ne)=>{const Ne=document.createElement(fe===wt?"input":"textarea");Ne.style.width="100%",Ne.style.height=fe===wt?"40px":"151px",Ne.rows=5,Ne.spellcheck=!1,Ne.name="edu-program-fill",Ne.placeholder="\u8BF7\u8F93\u5165",Ne.dataset.id=ce;const hn=Object.keys(Ce).length;return Ce[hn]=Ne,`<span class="edu-program-fill-wrap ${fe===wt?"":"show"}" style="width:${fe===wt?"400px":"100%"}" title=${ne||""}><span>${Ne.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Qn(fe){return fe=fe.replace(/!\[.*?\]\(.*?\)/g,""),fe=fe.replace(/\[.*?\]\(.*?\)/g,""),fe=fe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),fe=fe.replace(/<embed.*?>/g,""),fe=fe.replace(/<img.*?>/g,""),fe=fe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),fe=fe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),fe=fe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),fe=fe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),fe}const jt=fe=>fe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(ce,ne){let Ne=ne.replace(/(\n|\r)/g,"").split("}"),hn=[];return Ne.map(an=>{an!=""&&hn.push(`.${In.current} ${an}`)}),`<style>${hn.join("}")}</style>`}),Lt=(0,vt.useMemo)(()=>{try{const Ne=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,hn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,an=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,_e=/\(\/attachments\/download\//g;pn=pn.replace(_e,"("+Ut.Z.API_SERVER+"/attachments/download/").replace(Ne,"("+Ut.Z.API_SERVER+"/api/attachments/").replace(hn,'"'+Ut.Z.API_SERVER+"/api/attachments/").replace(an,'"'+Ut.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(Ne){}if(Le){let Ne=-1;return pn=pn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(hn,an,_e){var En;return++Ne,$n(hn,Ne,(En=Ue==null?void 0:Ue[Ne])==null?void 0:En.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${jt(pn||"")}</pre>`}let fe=jt(pn);fe=(0,oe.ZP)(fe);const ce=(0,oe.ez)();pn.match(/\[TOC\]/)&&(fe=fe.replace("<p>[TOC]</p>",(0,oe.Qv)()),(0,oe.Iy)()),fe=fe.replace(/(__special_katext_id_\d+__)/g,(Ne,hn)=>{const{type:an,expression:_e}=ce[hn];return(0,De.renderToString)(Nt(_e)||"",{displayMode:an==="block",throwOnError:!1,output:"html"})}),fe=fe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,oe.AL)();const ne=document.createElement("div");if(ne.innerHTML=fe,xe)return ne.innerText;if(Ye){const Ne=Ye.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return yt(ne,Ne),ne.innerHTML}return setTimeout(()=>qt(),500),ne.innerHTML},[pn,Ye]);(0,vt.useEffect)(()=>{ee.current&&ee.current.querySelectorAll(["input","textarea"]).forEach(ce=>{ce.oninput=xt,ce.onblur=Tt,ce.onfocus=Ft})},[Bn]),(0,vt.useEffect)(()=>{var fe,ce,ne,Ne,hn;if(Ue!=null&&Ue.length)try{const an=ee.current.querySelectorAll(".edu-program-fill-score"),_e=ee.current.querySelectorAll('[name="edu-program-fill"]');for(const[En,Ln]of _e.entries())Ln.value=((fe=Ue==null?void 0:Ue[En])==null?void 0:fe.value)||"",((ce=Ue==null?void 0:Ue[En])==null?void 0:ce.type)==="warning"?Ln.className="program-fill-warning":((ne=Ue==null?void 0:Ue[En])==null?void 0:ne.type)==="success"?Ln.className="program-fill-success":Ln.className="";for(const[En,Ln]of an.entries())Ln.innerHTML=(Ne=Ue==null?void 0:Ue[En])!=null&&Ne.score?`${(hn=Ue==null?void 0:Ue[En])==null?void 0:hn.score}\u5206`:"";dn(Ue)}catch(an){console.log(an,"error")}},[Ue]);const xt=fe=>{Bn[fe.target.dataset.id]=Bn[fe.target.dataset.id]||{},Bn[fe.target.dataset.id].value=fe.target.value,dn([...Bn]),ue(Bn,fe.target.dataset.id)},Tt=fe=>{Bn[fe.target.dataset.id]=Bn[fe.target.dataset.id]||{},Bn[fe.target.dataset.id].value=fe.target.value,dn([...Bn]),Ht(Bn,fe.target.dataset.id)},Ft=fe=>{Bn[fe.target.dataset.id]=Bn[fe.target.dataset.id]||{},Bn[fe.target.dataset.id].value=fe.target.value,dn([...Bn]),ke(Bn,fe.target.dataset.id)};function yt(fe,ce){return fe.childNodes.forEach(ne=>{var Ne;if(ne.childNodes.length>0)yt(ne,ce);else if(ne.nodeName!=="IMG")if(ne.innerHTML)ne.innerHTML=(Ne=ne.innerHTML)==null?void 0:Ne.replace(new RegExp(ce,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const hn=document.createElement("span");hn.innerHTML=ne.textContent.replace(new RegExp(ce,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ne.replaceWith(hn)}})}const ee=(0,vt.useRef)();oe.jb.WebkitLineClamp=Vt,Vt&&(Ie=ft(ft({},Ie),oe.jb));function pe(fe){let ce=fe.target;if(ce.tagName.toUpperCase()==="A"){let ne=ce.getAttribute("href");if(ne.indexOf("office")>-1)fe.preventDefault(),Ee(ne),gn("office");else if(ne.indexOf("application/pdf")>-1)fe.preventDefault(),Ee(ne),gn("pdf");else if(ne.indexOf("text/html")>-1)fe.preventDefault(),Ee(ne),gn("html");else if(ne.startsWith("#")){fe.preventDefault();let Ne=document.getElementById(ne.replace("#",""));Ne&&Ne.scrollIntoView(!0)}}}const qt=()=>{var fe;const ce=(fe=ee.current)==null?void 0:fe.querySelectorAll("video");ce==null||ce.forEach(ne=>{if(ne.oncontextmenu=()=>!1,ne.src.indexOf(".m3u8")>-1&&!ne.canPlayType("application/vnd.apple.mpegurl")){if($t.ZP.isSupported()){var Ne=new $t.ZP;Ne.loadSource(ne.src),Ne.attachMedia(ne)}}})};(0,vt.useEffect)(()=>{if(ee.current&&Lt&&Lt.match(Et)&&window.PR.prettyPrint(),ee.current)return ee.current.addEventListener("click",pe),()=>{var fe;(fe=ee.current)==null||fe.removeEventListener("click",pe),(0,oe.AL)(),(0,oe.Iy)()}},[Lt,ee.current,pe]),(0,vt.useEffect)(()=>{var fe;const ce=ne=>{ne.preventDefault(),ne.clipboardData.setData("text",window.getSelection().toString())};return(fe=ee.current)==null||fe.addEventListener("copy",ce),()=>{var ne;(ne=ee.current)==null||ne.removeEventListener("copy",ce)}},[ee.current]);const Zt=fe=>/<style[\s\S]*?>/i.test(fe||"");return vt.createElement(vt.Fragment,null,xe&&vt.createElement("div",{ref:ee},Lt),!xe&&!Zt(Lt)&&vt.createElement("div",{ref:ee,style:ft({},Ie),className:`${Wt||""} ${We?"disabled-fill":""} markdown-body ${In.current}`,dangerouslySetInnerHTML:{__html:Lt}}),!xe&&Zt(Lt)&&vt.createElement(me,{html:Lt}),vt.createElement(te.Z,{close:!0,data:ln,type:ln!=null&&ln.length?Ke:"",style:ft({},Se),onClose:()=>Ee("")}))}},97692:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{h:function(){return wt}});var vt=Pt(59301),It=Pt(57809),oe=Pt(78241),de=Pt(3113),$t=Pt(89780),Ut=Pt.n($t),Jt=Pt(37036),De=Pt(95625),we=Object.defineProperty,te=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,et=(Et,Nt,Dt)=>Nt in Et?we(Et,Nt,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):Et[Nt]=Dt,nt=(Et,Nt)=>{for(var Dt in Nt||(Nt={}))me.call(Nt,Dt)&&et(Et,Dt,Nt[Dt]);if(re)for(var Dt of re(Nt))Ot.call(Nt,Dt)&&et(Et,Dt,Nt[Dt]);return Et},ht=(Et,Nt)=>te(Et,Fe(Nt));const at=It.default.Option,ft={labelCol:{span:4},wrapperCol:{span:20}},mt={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Ve.Z=({callback:Et,onCancel:Nt})=>{const[Dt,At]=(0,vt.useState)("python");function Kt(xe){At(mt[xe][1])}function Wt(xe){Et(xe)}return vt.createElement(oe.default,ht(nt({},ft),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Wt,style:{width:500}}),vt.createElement(oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},vt.createElement(It.default,{getPopupContainer:xe=>xe.parentNode,onChange:Kt},Object.keys(mt).map(xe=>vt.createElement(at,{key:xe,value:xe},mt[xe][0])))),vt.createElement(oe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},vt.createElement(wt,{mode:Dt})),vt.createElement("div",{className:"flex-container flex-end"},vt.createElement(de.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),vt.createElement(de.ZP,{type:"ghost",onClick:Nt},"\u53D6\u6D88")))};function wt({value:Et,onChange:Nt,mode:Dt,options:At={}}){const Kt=(0,vt.useRef)(),[Wt,xe]=(0,vt.useState)();return(0,vt.useEffect)(()=>{if(Wt){let Vt=function(Ie){const Se=Ie.getValue();Nt&&Nt(Se)};return Wt.on("change",Vt),()=>{Wt.off("change",Vt)}}},[Wt,Nt]),(0,vt.useEffect)(()=>{Wt&&Wt.setOption("mode",Dt)},[Wt,Dt]),(0,vt.useEffect)(()=>{Wt&&(Et!==Wt.getValue()||Et==="")&&setTimeout(()=>{Wt.setValue(Et||"")},300)},[Wt,Et]),(0,vt.useEffect)(()=>{if(Kt.current&&!Wt){const Vt=Ut().fromTextArea(Kt.current,nt({mode:Dt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},At));xe(Vt)}},[Kt.current,Wt]),vt.createElement("div",{className:"my-codemirror-container"},vt.createElement("textarea",{ref:Kt}))}},12290:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return di}});var vt=Pt(59301),It=Pt(89780),oe=Pt.n(It),de=Pt(76374),$t=Pt(37036),Ut=Pt(6313),Jt=Pt(25717),De=Pt(99498),we=Pt(25419),te=Pt(67549),Fe=Pt(85149),re=({value:Ae="",className:Be,showTextOnly:_t,showLines:Je,style:cn={}})=>{const ve=(0,vt.useMemo)(()=>"",[Ae]);return vt.createElement(vt.Fragment,null,vt.createElement("div",{dangerouslySetInnerHTML:{__html:ve}}))},me=Pt(59301),Ot=Object.defineProperty,et=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,mt=(Ae,Be,_t)=>Be in Ae?Ot(Ae,Be,{enumerable:!0,configurable:!0,writable:!0,value:_t}):Ae[Be]=_t,wt=(Ae,Be)=>{for(var _t in Be||(Be={}))at.call(Be,_t)&&mt(Ae,_t,Be[_t]);if(ht)for(var _t of ht(Be))ft.call(Be,_t)&&mt(Ae,_t,Be[_t]);return Ae},Et=(Ae,Be)=>et(Ae,nt(Be));let Nt=[{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 Dt({onActionCallback:Ae,title:Be,icon:_t,actionName:Je,className:cn="",children:ve}){function ie(){Ae(Je)}return me.createElement("a",{title:Be,className:cn,onClick:ie},me.createElement("i",{className:`${_t}`}),ve)}var At=({watch:Ae,showNullButton:Be,showNullProgramButton:_t,onActionCallback:Je,fullScreen:cn,insertTemp:ve,hidetoolBar:ie,extraUse:Qe})=>{const yn=[...Nt,{title:`${Ae?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ae?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return me.createElement("ul",{className:"markdown-toolbar-container"},!ie&&yn.map((Nn,_n)=>me.createElement("li",{key:_n},Nn.actionName?me.createElement(Dt,Et(wt({},Nn),{onActionCallback:Je})):me.createElement("span",{className:"v-line"}))),Be?me.createElement("li",null,me.createElement(Dt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Je},me.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,_t?me.createElement(me.Fragment,null,me.createElement("li",null,me.createElement(Dt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Je},me.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),me.createElement("li",null,me.createElement(Dt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Je},me.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,ve&&me.createElement("li",null,me.createElement(Dt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${ve}`,onActionCallback:Je},me.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Qe&&me.createElement("li",null,Qe),me.createElement("li",{className:"btn-full-screen"},me.createElement(Dt,{icon:`${cn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:cn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Je})))},Kt=Pt(79346),Wt=Pt(78241),xe=Pt(92832),Vt=Pt(3113),Ie=Object.defineProperty,Se=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Ue=(Ae,Be,_t)=>Be in Ae?Ie(Ae,Be,{enumerable:!0,configurable:!0,writable:!0,value:_t}):Ae[Be]=_t,ue=(Ae,Be)=>{for(var _t in Be||(Be={}))Pe.call(Be,_t)&&Ue(Ae,_t,Be[_t]);if(Le)for(var _t of Le(Be))We.call(Be,_t)&&Ue(Ae,_t,Be[_t]);return Ae},Ht=(Ae,Be)=>Se(Ae,Ye(Be));const ke={labelCol:{span:4},wrapperCol:{span:20}};var pn=({callback:Ae,onCancel:Be})=>{function _t(Je){Ae(Je)}return vt.createElement(Wt.default,Ht(ue({},ke),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:_t,style:{width:500}}),vt.createElement(Wt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},vt.createElement(xe.default,null)),vt.createElement(Wt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},vt.createElement(xe.default,null)),vt.createElement("div",{className:"flex-container flex-end"},vt.createElement(Vt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),vt.createElement(Vt.ZP,{type:"ghost",onClick:Be},"\u53D6\u6D88")))},ln=Pt(97692),Ee=Pt(28451),Ke=Pt(43418),gn=Pt(95237),Bn=Pt(73524),dn=Pt(59301),In=({callback:Ae,onCancel:Be})=>{const _t=document.createElement("canvas"),Je=_t.getContext("2d");_t.width=1e3,_t.height=800,Je.fillStyle="#ffffff",Je.fillRect(0,0,_t.width,_t.height);const cn=_t.toDataURL("image/png");return dn.createElement(Ke.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},dn.createElement(gn.Z,{style:{height:"100vh"}},dn.createElement(Bn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:cn,visible:!0,title:String(Date.now())},onOk:ve=>{Ae({src:ve.url})},onClose:Be})))},Ce=Pt(12378);function $n(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit($n,go.CommandHandler),$n.prototype.canAlignSelection=function(){var Ae=this.diagram;return!(Ae===null||Ae.isReadOnly||Ae.isModelReadOnly||Ae.selection.count<2)},$n.prototype.alignLeft=function(){var Ae=this.diagram;Ae.startTransaction("aligning left");var Be=1/0;Ae.selection.each(function(_t){_t instanceof go.Link||(Be=Math.min(_t.position.x,Be))}),Ae.selection.each(function(_t){_t instanceof go.Link||_t.move(new go.Point(Be,_t.position.y))}),Ae.commitTransaction("aligning left")},$n.prototype.alignRight=function(){var Ae=this.diagram;Ae.startTransaction("aligning right");var Be=-1/0;Ae.selection.each(function(_t){if(!(_t instanceof go.Link)){var Je=_t.actualBounds.x+_t.actualBounds.width;Be=Math.max(Je,Be)}}),Ae.selection.each(function(_t){_t instanceof go.Link||_t.move(new go.Point(Be-_t.actualBounds.width,_t.position.y))}),Ae.commitTransaction("aligning right")},$n.prototype.alignTop=function(){var Ae=this.diagram;Ae.startTransaction("alignTop");var Be=1/0;Ae.selection.each(function(_t){_t instanceof go.Link||(Be=Math.min(_t.position.y,Be))}),Ae.selection.each(function(_t){_t instanceof go.Link||_t.move(new go.Point(_t.position.x,Be))}),Ae.commitTransaction("alignTop")},$n.prototype.alignBottom=function(){var Ae=this.diagram;Ae.startTransaction("aligning bottom");var Be=-1/0;Ae.selection.each(function(_t){if(!(_t instanceof go.Link)){var Je=_t.actualBounds.y+_t.actualBounds.height;Be=Math.max(Je,Be)}}),Ae.selection.each(function(_t){_t instanceof go.Link||_t.move(new go.Point(_t.actualBounds.x,Be-_t.actualBounds.height))}),Ae.commitTransaction("aligning bottom")},$n.prototype.alignCenterX=function(){var Ae=this.diagram,Be=Ae.selection.first();if(Be){Ae.startTransaction("aligning Center X");var _t=Be.actualBounds.x+Be.actualBounds.width/2;Ae.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(_t-Je.actualBounds.width/2,Je.actualBounds.y))}),Ae.commitTransaction("aligning Center X")}},$n.prototype.alignCenterY=function(){var Ae=this.diagram,Be=Ae.selection.first();if(Be){Ae.startTransaction("aligning Center Y");var _t=Be.actualBounds.y+Be.actualBounds.height/2;Ae.selection.each(function(Je){Je instanceof go.Link||Je.move(new go.Point(Je.actualBounds.x,_t-Je.actualBounds.height/2))}),Ae.commitTransaction("aligning Center Y")}},$n.prototype.alignColumn=function(Ae){var Be=this.diagram;Be.startTransaction("align Column"),Ae===void 0&&(Ae=0),Ae=parseFloat(Ae);var _t=new Array;Be.selection.each(function(Qe){Qe instanceof go.Link||_t.push(Qe)});for(var Je=0;Je<_t.length-1;Je++){var cn=_t[Je],ve=cn.actualBounds.y+cn.actualBounds.height+Ae,ie=_t[Je+1];ie.move(new go.Point(cn.actualBounds.x,ve))}Be.commitTransaction("align Column")},$n.prototype.alignRow=function(Ae){Ae===void 0&&(Ae=0),Ae=parseFloat(Ae);var Be=this.diagram;Be.startTransaction("align Row");var _t=new Array;Be.selection.each(function(Qe){Qe instanceof go.Link||_t.push(Qe)});for(var Je=0;Je<_t.length-1;Je++){var cn=_t[Je],ve=cn.actualBounds.x+cn.actualBounds.width+Ae,ie=_t[Je+1];ie.move(new go.Point(ve,cn.actualBounds.y))}Be.commitTransaction("align Row")},$n.prototype.canRotate=function(Ae){var Be=this.diagram;return!(Be===null||Be.isReadOnly||Be.isModelReadOnly||Be.selection.count<1)},$n.prototype.rotate=function(Ae){Ae===void 0&&(Ae=90);var Be=this.diagram;Be.startTransaction("rotate "+Ae.toString());var Be=this.diagram;Be.selection.each(function(_t){_t instanceof go.Link||_t instanceof go.Group||(_t.angle+=Ae)}),Be.commitTransaction("rotate "+Ae.toString())},$n.prototype.pullToFront=function(){var Ae=this.diagram;Ae.startTransaction("pullToFront");var Be=new go.Map;Ae.selection.each(function(_t){Be.set(_t.layer,0)}),Be.iteratorKeys.each(function(_t){var Je=0;_t.parts.each(function(cn){if(!cn.isSelected){var ve=cn.zOrder;isNaN(ve)?cn.zOrder=0:Je=Math.max(Je,ve)}}),Be.set(_t,Je)}),Ae.selection.each(function(_t){$n._assignZOrder(_t,Be.get(_t.layer)+1)}),Ae.commitTransaction("pullToFront")},$n.prototype.pushToBack=function(){var Ae=this.diagram;Ae.startTransaction("pushToBack");var Be=new go.Map;Ae.selection.each(function(_t){Be.set(_t.layer,0)}),Be.iteratorKeys.each(function(_t){var Je=0;_t.parts.each(function(cn){if(!cn.isSelected){var ve=cn.zOrder;isNaN(ve)?cn.zOrder=0:Je=Math.min(Je,ve)}}),Be.set(_t,Je)}),Ae.selection.each(function(_t){$n._assignZOrder(_t,Be.get(_t.layer)-1-$n._findGroupDepth(_t))}),Ae.commitTransaction("pushToBack")},$n._assignZOrder=function(Ae,Be,_t){_t===void 0&&(_t=Ae),Ae.layer===_t.layer&&(Ae.zOrder=Be),Ae instanceof go.Group&&Ae.memberParts.each(function(Je){$n._assignZOrder(Je,Be+1,_t)})},$n._findGroupDepth=function(Ae){if(Ae instanceof go.Group){var Be=0;return Ae.memberParts.each(function(_t){Be=Math.max(Be,$n._findGroupDepth(_t))}),Be+1}else return 0},$n.prototype.doKeyDown=function(){var Ae=this.diagram;if(Ae!==null){var Be=Ae.lastInput;if(Be.key==="Up"||Be.key==="Down"||Be.key==="Left"||Be.key==="Right"){var _t=this.arrowKeyBehavior;if(_t==="none")return;if(_t==="select"){this._arrowKeySelect();return}else if(_t==="move"){this._arrowKeyMove();return}else if(_t==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},$n.prototype._getAllParts=function(){var Ae=new Array;return this.diagram.nodes.each(function(Be){Ae.push(Be)}),this.diagram.parts.each(function(Be){Ae.push(Be)}),Ae},$n.prototype._arrowKeyMove=function(){var Ae=this.diagram,Be=Ae.lastInput,_t=0,Je=0;if(Be.control||Be.meta)_t=1,Je=1;else if(Ae.grid!==null){var cn=Ae.grid.gridCellSize;Je=cn.width,_t=cn.height}Ae.startTransaction("arrowKeyMove"),Ae.selection.each(function(ve){Be.key==="Up"?ve.move(new go.Point(ve.actualBounds.x,ve.actualBounds.y-_t)):Be.key==="Down"?ve.move(new go.Point(ve.actualBounds.x,ve.actualBounds.y+_t)):Be.key==="Left"?ve.move(new go.Point(ve.actualBounds.x-Je,ve.actualBounds.y)):Be.key==="Right"&&ve.move(new go.Point(ve.actualBounds.x+Je,ve.actualBounds.y))}),Ae.commitTransaction("arrowKeyMove")},$n.prototype._arrowKeySelect=function(){var Ae=this.diagram,Be=Ae.lastInput,_t=null;Be.key==="Up"?_t=this._findNearestPartTowards(270):Be.key==="Down"?_t=this._findNearestPartTowards(90):Be.key==="Left"?_t=this._findNearestPartTowards(180):Be.key==="Right"&&(_t=this._findNearestPartTowards(0)),_t!==null&&(Be.shift?_t.isSelected=!0:Be.control||Be.meta?_t.isSelected=!_t.isSelected:Ae.select(_t))},$n.prototype._findNearestPartTowards=function(Ae){var Be=this.diagram.selection.first();if(Be===null)return null;for(var _t=Be.actualBounds.center,Je=this._getAllParts(),cn=1/0,ve=Be,ie=0;ie<Je.length;ie++){var Qe=Je[ie];if(Qe!==Be&&Qe.canSelect()){var yn=Qe.actualBounds.center,Nn=_t.directionPoint(yn),_n=this._angleCloseness(Nn,Ae);if(_n<=45){var le=_t.distanceSquaredPoint(yn);le*=1+Math.sin(_n*Math.PI/180),le<cn&&(cn=le,ve=Qe)}}}return ve},$n.prototype._angleCloseness=function(Ae,Be){return Math.min(Math.abs(Be-Ae),Math.min(Math.abs(Be+360-Ae),Math.abs(Be-360-Ae)))},$n.prototype._arrowKeyTree=function(){var Ae=this.diagram,Be=Ae.selection.first();if(Be instanceof go.Node){var _t=Ae.lastInput;if(_t.key==="Right"){if(!Be.isTreeLeaf)if(!Be.isTreeExpanded)Ae.commandHandler.canExpandTree(Be)&&Ae.commandHandler.expandTree(Be);else{var Je=this._sortTreeChildrenByY(Be).first();Je!==null&&Ae.select(Je)}}else if(_t.key==="Left")if(!Be.isTreeLeaf&&Be.isTreeExpanded)Ae.commandHandler.canCollapseTree(Be)&&Ae.commandHandler.collapseTree(Be);else{var cn=Be.findTreeParentNode();cn!==null&&Ae.select(cn)}else if(_t.key==="Up"){var cn=Be.findTreeParentNode();if(cn!==null){var ve=this._sortTreeChildrenByY(cn),ie=ve.indexOf(Be);if(ie>0){for(var Qe=ve.elt(ie-1);Qe!==null&&Qe.isTreeExpanded&&!Qe.isTreeLeaf;){var yn=this._sortTreeChildrenByY(Qe);Qe=yn.last()}Qe!==null&&Ae.select(Qe)}else Ae.select(cn)}}else if(_t.key==="Down")if(Be.isTreeExpanded&&!Be.isTreeLeaf){var Je=this._sortTreeChildrenByY(Be).first();Je!==null&&Ae.select(Je)}else for(;Be!==null;){var cn=Be.findTreeParentNode();if(cn===null)break;var ve=this._sortTreeChildrenByY(cn),ie=ve.indexOf(Be);if(ie<ve.length-1){Ae.select(ve.elt(ie+1));break}else Be=cn}var Nn=Ae.selection.first();Nn!==null&&Ae.scrollToRect(Nn.actualBounds)}},$n.prototype._sortTreeChildrenByY=function(Ae){var Be=new go.List().addAll(Ae.findTreeChildrenNodes());return Be.sort(function(_t,Je){var cn=_t.location,ve=Je.location;return cn.y<ve.y?-1:cn.y>ve.y?1:cn.x<ve.x?-1:cn.x>ve.x?1:0}),Be},$n.prototype.copyToClipboard=function(Ae){go.CommandHandler.prototype.copyToClipboard.call(this,Ae),this._lastPasteOffset.set(this.pasteOffset)},$n.prototype.pasteFromClipboard=function(){var Ae=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Ae,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Ae},Object.defineProperty($n.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Ae){if(Ae!=="move"&&Ae!=="select"&&Ae!=="scroll"&&Ae!=="tree"&&Ae!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Ae);this._arrowKeyBehavior=Ae}}),Object.defineProperty($n.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Ae){if(!(Ae instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Ae);this._pasteOffset.set(Ae)}});var Qn=$n,jt=Pt(74413),Lt=Pt(43604),xt=Pt(99064),Tt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Ft=Pt(24065),yt=Pt(59301),ee=(Ae,Be,_t)=>new Promise((Je,cn)=>{var ve=yn=>{try{Qe(_t.next(yn))}catch(Nn){cn(Nn)}},ie=yn=>{try{Qe(_t.throw(yn))}catch(Nn){cn(Nn)}},Qe=yn=>yn.done?Je(yn.value):Promise.resolve(yn.value).then(ve,ie);Qe((_t=_t.apply(Ae,Be)).next())});function pe({onCancel:Ae,callback:Be}){let _t=(0,vt.useRef)(),Je=(0,vt.useRef)(),cn=(0,vt.useRef)(),ve=(0,vt.useRef)(!1);const ie=(0,vt.useRef)(!1),[Qe,yn]=(0,vt.useState)(0);function Nn(){const le=Ce.bx.make,mn={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"};_t.current=new Ce.S0(Je.current,{padding:20,grid:le(Ce.s_,"Grid",le(Ce.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),le(Ce.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Vn=>{var ze=Vn.diagram.commandHandler.addTopLevelParts(Vn.diagram.selection,!0);ze||Vn.diagram.currentTool.doCancel()},commandHandler:le(Qn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Vn=>{var ze=Vn.subject;ze.location=ze.location.copy().snapToGridPoint(Vn.diagram.grid.gridOrigin,Vn.diagram.grid.gridCellSize),setTimeout(()=>{Vn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Vn=>{var ze=Vn.subject;setTimeout(()=>{Vn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Vn=>{var ze=Vn.parameter.part;ze.invalidateConnectedLinks();var Ge=Vn.subject;Vn.diagram.toolManager.linkingTool.isForwards?Ge.toNode.invalidateConnectedLinks():Ge.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),_t.current.nodeTemplate=le(Ce.NB,"Auto",{locationSpot:Ce.z6.Center,locationObjectName:"SHAPE",desiredSize:new Ce.$u(120,60),minSize:new Ce.$u(40,40),resizable:!0,resizeCellSize:new Ce.$u(10,10),rotatable:!0},new Ce.KX("location","loc",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),new Ce.KX("desiredSize","size",Ce.$u.parse).makeTwoWay(Ce.$u.stringify),le(Ce.bn,{name:"SHAPE",fill:mn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ce.z6.AllSides,toSpot:Ce.z6.AllSides},new Ce.KX("figure"),new Ce.KX("fill"),new Ce.KX("stroke","borderColor"),new Ce.KX("strokeWidth","thickness"),new Ce.KX("strokeDashArray","dash")),le(Ce.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),le(Ce.al,{margin:1,textAlign:"center",overflow:Ce.al.OverflowEllipsis,editable:!0},new Ce.KX("text").makeTwoWay(),new Ce.KX("stroke","color"))),_t.current.nodeTemplate.toolTip=le("ToolTip",le(Ce.s_,"Vertical",{maxSize:new Ce.$u(200,NaN)},le(Ce.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ce.KX("text")),le(Ce.al,{font:"10pt sans-serif",textAlign:"center"},new Ce.KX("text","details"))));function Gn(Vn,ze){var Ge=(Oe,un)=>{Oe.handled=!0,Oe.diagram.model.commit(kn=>{var Tn=un.part.adornedPart,Rn=new Ce.E9().setRectSpot(Tn.actualBounds,Vn);Rn.subtract(Tn.location),Rn.scale(2,2),Rn.x+=Math.sign(Rn.x)*130,Rn.y+=Math.sign(Rn.y)*130,Rn.add(Tn.location),Rn.snapToGridPoint(Oe.diagram.grid.gridOrigin,Oe.diagram.grid.gridCellSize);var ei=kn.copyNodeData(Tn.data);kn.setGroupKeyForNodeData(ei,kn.getGroupKeyForNodeData(Tn.data)),kn.addNodeData(ei);var qe={from:Tn.key,to:kn.getKeyForNodeData(ei)};kn.addLinkData(qe);var pi=Oe.diagram.findNodeForData(ei);pi.location=Rn,Oe.diagram.select(pi),setTimeout(()=>{Oe.diagram.commandHandler.editTextBlock()},20)})};return le(Ce.bn,{figure:ze,alignment:Vn,alignmentFocus:Vn.opposite(),width:Vn.equals(Ce.z6.Top)||Vn.equals(Ce.z6.Bottom)?25:18,height:Vn.equals(Ce.z6.Top)||Vn.equals(Ce.z6.Bottom)?18:25,fill:"orange",stroke:mn.white,strokeWidth:4,mouseEnter:(Oe,un)=>un.fill="dodgerblue",mouseLeave:(Oe,un)=>un.fill="orange",isActionable:!0,click:Ge,contextClick:Ge})}function si(Vn){return le(Ce.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:(ze,Ge)=>Ge.fill="dodgerblue",mouseLeave:(ze,Ge)=>Ge.fill="orange",click:(ze,Ge)=>{ze.diagram.commandHandler.showContextMenu(Ge.part.adornedPart)}},Vn||{})}_t.current.nodeTemplate.selectionAdornmentTemplate=le(Ce.uz,"Spot",le(Ce.Vm,{padding:10}),Gn(Ce.z6.Top,"TriangleUp"),Gn(Ce.z6.Left,"TriangleLeft"),Gn(Ce.z6.Right,"TriangleRight"),Gn(Ce.z6.Bottom,"TriangleDown"),si({alignment:new Ce.z6(.75,0)}));function Re(Vn,ze){return(Ge,Oe)=>{Ge.handled=!0,Ge.diagram.model.commit(un=>{un.set(Oe.part.adornedPart.data,Vn,ze)})}}function fn(Vn,ze){return ze||(ze="color"),le(Ce.bn,{width:16,height:16,stroke:"lightgray",fill:Vn,margin:1,background:"transparent",mouseEnter:(Ge,Oe)=>Oe.stroke="dodgerblue",mouseLeave:(Ge,Oe)=>Oe.stroke="lightgray",click:Re(ze,Vn),contextClick:Re(ze,Vn)})}function He(){return[le("ContextMenuButton",le(Ce.s_,"Horizontal",fn(mn.white,"fill"),fn(mn.beige,"fill"),fn(mn.extralightblue,"fill"),fn(mn.extralightred,"fill"))),le("ContextMenuButton",le(Ce.s_,"Horizontal",fn(mn.lightgray,"fill"),fn(mn.lightgreen,"fill"),fn(mn.lightblue,"fill"),fn(mn.lightred,"fill")))]}function je(){return[le("ContextMenuButton",le(Ce.s_,"Horizontal",fn(mn.black),fn(mn.green),fn(mn.blue),fn(mn.red))),le("ContextMenuButton",le(Ce.s_,"Horizontal",fn(mn.white),fn(mn.magenta),fn(mn.purple),fn(mn.orange)))]}function vn(Vn,ze){return ze||(ze="thickness"),le(Ce.bn,"LineH",{width:16,height:16,strokeWidth:Vn,margin:1,background:"transparent",mouseEnter:(Ge,Oe)=>Oe.background="dodgerblue",mouseLeave:(Ge,Oe)=>Oe.background="transparent",click:Re(ze,Vn),contextClick:Re(ze,Vn)})}function rn(Vn,ze){return ze||(ze="dash"),le(Ce.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Vn,margin:1,background:"transparent",mouseEnter:(Ge,Oe)=>Oe.background="dodgerblue",mouseLeave:(Ge,Oe)=>Oe.background="transparent",click:Re(ze,Vn),contextClick:Re(ze,Vn)})}function bn(){return[le("ContextMenuButton",le(Ce.s_,"Horizontal",vn(1),vn(2),vn(3),vn(4))),le("ContextMenuButton",le(Ce.s_,"Horizontal",rn(null),rn([2,4]),rn([4,4])))]}function xn(Vn,ze){return ze||(ze="figure"),le(Ce.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Vn,margin:1,background:"transparent",mouseEnter:(Ge,Oe)=>Oe.fill="dodgerblue",mouseLeave:(Ge,Oe)=>Oe.fill="lightgray",click:Re(ze,Vn),contextClick:Re(ze,Vn)})}_t.current.nodeTemplate.contextMenu=le("ContextMenu",le("ContextMenuButton",le(Ce.s_,"Horizontal",xn("Rectangle"),xn("RoundedRectangle"),xn("Ellipse"),xn("Diamond"))),le("ContextMenuButton",le(Ce.s_,"Horizontal",xn("Parallelogram2"),xn("ManualOperation"),xn("Procedure"),xn("Cylinder1"))),le("ContextMenuButton",le(Ce.s_,"Horizontal",xn("Terminator"),xn("CreateRequest"),xn("Document"),xn("TriangleDown"))),He(),je(),bn()),_t.current.groupTemplate=le(Ce.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ce.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Vn,ze)=>{var Ge=ze.addMembers(ze.diagram.selection,!0);Ge||ze.diagram.currentTool.doCancel()},avoidable:!1},new Ce.KX("location","loc",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),le(Ce.s_,"Auto",{name:"BODY"},le(Ce.bn,{parameter1:10,fill:mn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ce.z6.AllSides,toSpot:Ce.z6.AllSides},new Ce.KX("fill"),new Ce.KX("stroke","color"),new Ce.KX("strokeWidth","thickness"),new Ce.KX("strokeDashArray","dash")),le(Ce.Vm,{background:"transparent",margin:20})),le(Ce.al,{alignment:Ce.z6.Top,alignmentFocus:Ce.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Ce.KX("text"),new Ce.KX("stroke","color"))),_t.current.groupTemplate.selectionAdornmentTemplate=le(Ce.uz,"Spot",le(Ce.s_,"Auto",le(Ce.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),le(Ce.Vm,{margin:1.5})),si({alignment:Ce.z6.TopRight,alignmentFocus:Ce.z6.BottomRight})),_t.current.groupTemplate.contextMenu=le("ContextMenu",He(),je(),bn()),_t.current.linkTemplate=le(Ce.rU,{layerName:"Foreground",routing:Ce.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Ce.KX("fromSpot","fromSpot",Ce.z6.parse),new Ce.KX("toSpot","toSpot",Ce.z6.parse),new Ce.KX("fromShortLength","dir",Vn=>Vn>=1?10:0),new Ce.KX("toShortLength","dir",Vn=>Vn>=1?10:0),new Ce.KX("points").makeTwoWay(),le(Ce.bn,{strokeWidth:2},new Ce.KX("stroke","color"),new Ce.KX("strokeWidth","thickness"),new Ce.KX("strokeDashArray","dash")),le(Ce.bn,{segmentIndex:0,segmentOffset:new Ce.E9(15,0),segmentOrientation:Ce.rU.OrientAlong,alignmentFocus:Ce.z6.Right,figure:"circle",width:10,strokeWidth:0},new Ce.KX("fill","color"),new Ce.KX("visible","dir",Vn=>Vn===1)),le(Ce.bn,{segmentIndex:-1,segmentOffset:new Ce.E9(-10,6),segmentOrientation:Ce.rU.OrientPlus90,alignmentFocus:Ce.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ce.KX("fill","color"),new Ce.KX("visible","dir",Vn=>Vn>=1),new Ce.KX("width","thickness",Vn=>7+3*Vn),new Ce.KX("height","thickness",Vn=>7+3*Vn),new Ce.KX("segmentOffset","thickness",Vn=>new Ce.E9(-15,4+1.5*Vn))),le(Ce.bn,{segmentIndex:0,segmentOffset:new Ce.E9(15,-6),segmentOrientation:Ce.rU.OrientMinus90,alignmentFocus:Ce.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ce.KX("fill","color"),new Ce.KX("visible","dir",Vn=>Vn===2),new Ce.KX("width","thickness",Vn=>7+3*Vn),new Ce.KX("height","thickness",Vn=>7+3*Vn),new Ce.KX("segmentOffset","thickness",Vn=>new Ce.E9(-15,4+1.5*Vn))),le(Ce.al,{alignmentFocus:new Ce.z6(0,1,-4,0),editable:!0},new Ce.KX("text").makeTwoWay(),new Ce.KX("stroke","color"))),_t.current.linkTemplate.selectionAdornmentTemplate=le(Ce.uz,le(Ce.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:On(2)},new Ce.KX("pathPattern","thickness",On)),si({alignmentFocus:new Ce.z6(0,0,-6,-4)}));function On(Vn){return le(Ce.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Vn+4).toString()+" H3"})}function zn(Vn){var ze="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Vn===0?ze="M0 0 M16 16 M0 8 L16 8":Vn===2&&(ze="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),le(Ce.bn,{geometryString:ze,margin:2,background:"transparent",mouseEnter:(Ge,Oe)=>Oe.background="dodgerblue",mouseLeave:(Ge,Oe)=>Oe.background="transparent",click:Re("dir",Vn),contextClick:Re("dir",Vn)})}function yi(Vn){var ze=(Ge,Oe)=>{Ge.handled=!0,Ge.diagram.model.commit(un=>{var kn=Oe.part.adornedPart;un.set(kn.data,Vn?"toSpot":"fromSpot",Ce.z6.stringify(Ce.z6.AllSides)),(Vn?kn.toNode:kn.fromNode).invalidateConnectedLinks()})};return le(Ce.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Ge,Oe)=>Oe.background="dodgerblue",mouseLeave:(Ge,Oe)=>Oe.background="transparent",click:ze,contextClick:ze})}function Xe(Vn,ze){var Ge=0,Oe=Ce.z6.RightSide;Vn.equals(Ce.z6.Top)?(Ge=270,Oe=Ce.z6.TopSide):Vn.equals(Ce.z6.Left)?(Ge=180,Oe=Ce.z6.LeftSide):Vn.equals(Ce.z6.Bottom)&&(Ge=90,Oe=Ce.z6.BottomSide),ze||(Ge-=180);var un=(kn,Tn)=>{kn.handled=!0,kn.diagram.model.commit(Rn=>{var ei=Tn.part.adornedPart;Rn.set(ei.data,ze?"toSpot":"fromSpot",Ce.z6.stringify(Oe)),(ze?ei.toNode:ei.fromNode).invalidateConnectedLinks()})};return le(Ce.bn,{alignment:Vn,alignmentFocus:Vn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Ge,background:"transparent",mouseEnter:(kn,Tn)=>Tn.background="dodgerblue",mouseLeave:(kn,Tn)=>Tn.background="transparent",click:un,contextClick:un})}_t.current.linkTemplate.contextMenu=le("ContextMenu",je(),bn(),le("ContextMenuButton",le(Ce.s_,"Horizontal",zn(0),zn(1),zn(2))),le("ContextMenuButton",le(Ce.s_,"Horizontal",le(Ce.s_,"Spot",yi(!1),Xe(Ce.z6.Top,!1),Xe(Ce.z6.Left,!1),Xe(Ce.z6.Right,!1),Xe(Ce.z6.Bottom,!1)),le(Ce.s_,"Spot",{margin:new Ce.Zt(0,0,0,2)},yi(!0),Xe(Ce.z6.Top,!0),Xe(Ce.z6.Left,!0),Xe(Ce.z6.Right,!0),Xe(Ce.z6.Bottom,!0)))));const Li=`{ "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 ji=["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 Ei(Vn){return console.log("shapeName:",Vn),ji.indexOf(Vn)>=0}var nn=new Ce.YI(cn.current,{maxSelectionCount:1,linkTemplate:le(Ce.rU,{locationSpot:Ce.z6.Center,selectionAdornmentTemplate:le(Ce.uz,"Link",{locationSpot:Ce.z6.Center},le(Ce.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),le(Ce.bn,{toArrow:"Standard",stroke:null}))},{routing:Ce.rU.AvoidsNodes,curve:Ce.rU.JumpOver,corner:5,toShortLength:4},new Ce.KX("points"),le(Ce.bn,{isPanelMain:!0,strokeWidth:2}),le(Ce.bn,{toArrow:"Standard",stroke:null})),model:new Ce.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Ce.bn.getFigureGenerators().toArray().map(Vn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Vn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return _t.current.addDiagramListener("TextEdited",function(Vn){var ze;const Ge=Vn.subject.part;var Oe=(ze=document.activeElement)==null?void 0:ze.value;typeof Oe=="string"&&Oe.trim()===""&&_t.current.model.commit(function(un){un.set(Ge.data,"text","\u672A\u547D\u540D"),_t.current.commandHandler.stopCommand()},"increment")}),nn.nodeTemplate=le(Ce.NB,"Auto",{locationSpot:Ce.z6.Center},new Ce.KX("location","location",Ce.E9.parse).makeTwoWay(Ce.E9.stringify),le(Ce.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 Ce.KX("stroke").makeTwoWay(),new Ce.KX("fill").makeTwoWay(),new Ce.KX("figure")),le(Ce.al,{margin:new Ce.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Ce.$u(16,16),maxSize:new Ce.$u(10,NaN),textAlign:"center",editable:!0},new Ce.KX("key").makeTwoWay())),setTimeout(()=>{_t.current.grid=le(Ce.s_,"Grid",le(Ce.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),le(Ce.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),_t.current.grid.visible=!0,_t.current.grid.gridCellStroke="darkgray",_t.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=_t.current,_t.current}const _n=()=>ee(this,null,function*(){var le,mn=_t.current.makeImage();const Gn=yield(0,xt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:mn.src,file_data:JSON.stringify({login:(le=(0,Ft.eY)())==null?void 0:le.login,data:JSON.parse(_t.current.model.toJson())})}});Be({src:Gn.url})});return(0,vt.useEffect)(()=>(setTimeout(()=>{Nn()},500),yn(Qe+1),()=>{_t.current=null}),[]),yt.createElement("div",{ref:ie,className:ve.current?`${Tt.maxH60} body-overflow-initial`:"body-overflow-initial"},yt.createElement(Ke.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Qe,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:yt.createElement(gn.Z,null,yt.createElement(Lt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),yt.createElement(Lt.Z,{onClick:()=>{var le,mn,Gn=_t.current.selection.first();if(ve.current=!ve.current,document.activeElement&&Gn){let si=(mn=(le=document.activeElement)==null?void 0:le.value)==null?void 0:mn.trim();typeof si=="string"&&_t.current.model.commit(function(Re){Re.set(Gn.data,"text",si||"\u672A\u547D\u540D"),_t.current.commandHandler.stopCommand()},"increment")}yn(Qe+1)}},yt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Ae},yt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Tt.flowChartWrp},yt.createElement("div",{style:{display:"flex",height:"100%"}},yt.createElement("div",{style:{width:"300px",height:"100%"}},yt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),yt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Tt.myPaletteDiv,ref:cn})),yt.createElement("div",{style:{flex:1,position:"relative"}},yt.createElement("div",{ref:Je,style:{height:"80vh"}}))),yt.createElement("div",{className:"tr"},yt.createElement(Vt.ZP,{size:"large",onClick:_n,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var qt=pe,Zt=Pt(5112),fe=Pt(5871);const ce=Zt.ZP.Group,ne={margin:"0 8px"};var Ne=({callback:Ae,onCancel:Be})=>{function _t(Je){Ae(Je)}return vt.createElement(Wt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:_t},vt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},vt.createElement("span",{style:ne},"\u5355\u5143\u683C\u6570\uFF1A"),vt.createElement("span",{style:ne},"\u884C\u6570"),vt.createElement(Wt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},vt.createElement(fe.Z,null)),vt.createElement("span",{style:ne},"\u5217\u6570"),vt.createElement(Wt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},vt.createElement(fe.Z,null))),vt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},vt.createElement("span",{style:ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),vt.createElement(Wt.default.Item,{name:"align"},vt.createElement(ce,null,vt.createElement(Zt.ZP,{value:"default"},vt.createElement("i",{className:"fa fa-align-justify"})),vt.createElement(Zt.ZP,{value:"left"},vt.createElement("i",{className:"fa fa-align-left"})),vt.createElement(Zt.ZP,{value:"center"},vt.createElement("i",{className:"fa fa-align-center"})),vt.createElement(Zt.ZP,{value:"right"},vt.createElement("i",{className:"fa fa-align-right"}))))),vt.createElement("div",{className:"flex-container flex-end"},vt.createElement(Vt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),vt.createElement(Vt.ZP,{type:"ghost",onClick:Be},"\u53D6\u6D88")))},hn=Pt(78673),an=Pt(80727),_e=Pt.n(an),Ln=(0,vt.forwardRef)(({use3d:Ae,width:Be,height:_t,callback:Je,showSaveButton:cn},ve)=>{const ie=(0,vt.useRef)(),Qe=(0,vt.useRef)(),[yn,Nn]=(0,vt.useState)(!1),_n=(0,vt.useRef)({id:ie,appName:"graphing",width:Be||1e3,height:_t||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,vt.useEffect)(()=>{Qe.current=new(_e())(_n.current,!0),window.onload=function(){Qe.current.inject("applet_container")}},[]);const le=()=>{var mn=window.ggbApplet.getPNGBase64(1,!0,72);return Je&&Je(mn),mn};return(0,vt.useEffect)(()=>{_n.current.appName=yn?"3D":"graphing",Qe.current.inject("applet_container")},[yn]),(0,vt.useEffect)(()=>{Nn(Ae)},[Ae]),(0,vt.useImperativeHandle)(ve,()=>({getImgData:le})),vt.createElement(vt.Fragment,null,vt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ie}),vt.createElement(gn.Z,{align:"middle"},vt.createElement(Lt.Z,{flex:1},vt.createElement(hn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:yn,onChange:mn=>Nn(mn)})),vt.createElement(Lt.Z,null,vt.createElement(Vt.ZP,{size:"large",onClick:le,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ye=Pt(41588),on=Pt(8591);const Pn="link",Cn="upload-image",An="add-flowchart",Jn="draw-image",ui="add-flowchart",ni="code-block",fi="add-table",Bi="------------",Ti={default:Bi,left:`:${Bi}`,center:`:${Bi}:`,right:`${Bi}:`};var Di=Pt(58856);function io(){}let to=0;const Ri=1e4,Qi="\u2581",Zn="@\u2581\u2581@",Mt="@\u2581@",so=`
|
|
|
**\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`,Ii=["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 Wi(Ae){return/^\d+$/.test(Ae)?`${Ae}px`:Ae}const Bo=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Mo={[Bo+"-B"]:"bold",[Bo+"-I"]:"italic"},ai={[Pn]:"\u6DFB\u52A0\u94FE\u63A5",[ni]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Cn]:"\u6DFB\u52A0\u56FE\u7247",[Jn]:"\u6DFB\u52A0\u753B\u56FE",[An]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[fi]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var di=({defaultValue:Ae="",onChange:Be,width:_t="100%",height:Je=400,miniToolbar:cn=!1,isFocus:ve=!1,watch:ie,insertTemp:Qe,mode:yn="markdown",id:Nn="markdown-editor-id",showResizeBar:_n=!1,noStorage:le=!1,showNullButton:mn=!1,showNullProgramButton:Gn=!1,hidetoolBar:si=!1,fullScreen:Re=!1,onBlur:fn,onCMBeforeChange:He,onFullScreen:je,className:vn="",disablePaste:rn=!1,disabled:bn=!1,disabledFill:xn=!1,placeholder:On="",values:zn="",extraUse:yi})=>{const[Xe,Li]=(0,vt.useState)(null),[ji,Ei]=(0,vt.useState)(Ae),[nn,Vn]=(0,vt.useState)(ie),[ze,Ge]=(0,vt.useState)(Re),[Oe,un]=(0,vt.useState)(""),[kn,Tn]=(0,vt.useState)(0),[Rn,ei]=(0,vt.useState)(Je),[qe,pi]=(0,vt.useState)(!1),[tn,Ci]=(0,vt.useState)(0),[Ui,$i]=(0,vt.useState)(0),Co=(0,vt.useRef)(),lo=(0,vt.useRef)(),Si=(0,vt.useRef)(),ii=(0,vt.useRef)();(0,vt.useEffect)(()=>{const Pi=window.scrollY||window.pageYOffset;Ei(zn),Xe==null||Xe.setValue(zn),window.scrollTo(0,Pi)},[zn]),(0,vt.useEffect)(()=>{je==null||je(ze)},[ze]),(0,vt.useEffect)(()=>{if(Co.current){let Pi=function(Wn,zi){var xo;if(rn){zi.preventDefault();return}const Ko=zi.clipboardData;if(Ko){const Uo=Ko.types.toString(),Qo=Ko.items;if(Uo==="Files"||Ko.types.indexOf("Files")>-1){if(zi.preventDefault(),yn=="stex")return;try{let ar=Qo[1];((xo=Qo[0])==null?void 0:xo.kind)==="file"&&(ar=Qo[0]);const Ro=ar.getAsFile(),er=Ro.name.split(".").pop();(0,Ee.I)(Ro,nr=>{var qr,sn,wr;nr.id?((qr=Ro==null?void 0:Ro.type)==null?void 0:qr.indexOf("image"))>-1?Ni.replaceSelection(`<img width="100%" src="/api/attachments/${nr.id}?type=${nr.content_type})" alt="" />`):((sn=Ro==null?void 0:Ro.type)==null?void 0:sn.indexOf("video"))>-1?Ni.replaceSelection(`<video width="100%" controls src="/api/attachments/${nr.id}"></video>`):((wr=Ro==null?void 0:Ro.type)==null?void 0:wr.indexOf("pdf"))>-1?Ni.replaceSelection(`<a href="/api/attachments/${nr.id}?type=${Ro.type}&disposition=inline" target="_blank">${Ro.name}</a>`):Ii.includes(er)?Ni.replaceSelection(`<a href="/api/attachments/${nr.id}?type=office&disposition=inline" target="_blank">${Ro.name}</a>`):Ni.replaceSelection(`[${Ro.name}](/api/attachments/${nr.id}?type=${nr.content_type})`):(nr==null?void 0:nr.status)===401&&(document.location.href="/user/login")})}catch(ar){on.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ni=oe().fromTextArea(Co.current,{mode:yn,lineNumbers:!cn,lineWrapping:!0,value:Ae,autoCloseTags:!0,autoCloseBrackets:!0});return Ni.on("keyup",function(Wn,zi){zi.keyCode===8&&(Wn.getValue()==""?Ni.setOption("placeholder",On):Ni.setOption("placeholder",null))}),Ni.on("keydown",function(Wn,zi){if(zi.keyCode===8){var xo=oo(Wn);xo&&zi.preventDefault()}}),ve&&Ni.focus(),Ni.on("paste",Pi),bn&&Ni.on("beforeChange",function(Wn,zi){(zi.origin==="paste"||zi.origin==="+input")&&zi.cancel()}),Li(Ni),()=>{Ni.off("paste",Pi)}}},[]);const Yi=(0,vt.useCallback)(()=>{if(lo.current)try{}catch(Pi){console.log(Pi,"---- to set md editor body height")}},[Rn,lo,ze]);(0,vt.useEffect)(()=>{function Pi(){let Ni=new de.Z(Wn=>{for(let zi of Wn)(zi.target.offsetHeight>0||zi.target.offsetWidth>0)&&(Yi(),Xe.setSize("100%","100%"),Xe.refresh())});return Ni.observe(Co.current.parentElement),Ni}if(Xe){const Ni=Pi();return()=>{var Wn,zi;(Wn=Co.current)!=null&&Wn.parentElement&&Ni.unobserve((zi=Co.current)==null?void 0:zi.parentElement)}}},[Xe,Yi]),(0,vt.useEffect)(()=>{if(Xe){let Pi=[];for(const[Ni,Wn]of Object.entries(Mo)){let zi={[Ni]:()=>{Yn(Wn)}};Pi.push(zi),Xe.addKeyMap(zi)}return()=>{for(let Ni of Pi)Xe.removeKeyMap(Ni)}}},[Xe]),(0,vt.useEffect)(()=>{Re!==ze&&Ge(Re)},[Re]),(0,Di.Z)(()=>{if(!le&&kn>0){let Pi=new Date().getTime(),Ni=window.sessionStorage.getItem(Nn);Pi>=kn+Ri&&(!Ni||Ni!==ji)&&(window.sessionStorage.setItem(Nn,ji),pi(!0))}},Ri),(0,vt.useEffect)(()=>{Vn(ie)},[Xe,ie]),(0,vt.useEffect)(()=>{Xe&&ve&&Xe.focus()},[Xe,ve]),(0,vt.useEffect)(()=>{if(nn&&Xe){let Pi=function(Wn){let zi=Wn.target;if(ii.current){let xo=zi.scrollTop/zi.scrollHeight;ii.current.scrollTop=ii.current.scrollHeight*xo}};const Ni=Xe.getScrollerElement();return Ni.addEventListener("scroll",Pi),()=>{Ni.removeEventListener("scroll",Pi)}}},[Xe,nn]),(0,vt.useEffect)(()=>{if(Xe&&He){let Pi=function(Ni,Wn){He(Ni,Wn)};return Xe.on("beforeChange",Pi),()=>{Xe.off("beforeChange",Pi)}}},[Xe,He]),(0,vt.useEffect)(()=>{if(Xe&&fn){let Pi=function(){fn(Xe.getValue())};return Xe.on("blur",Pi),()=>{Xe.off("blur",Pi)}}},[Xe,fn]);function oo(Pi,Ni){var Wn=Pi.getDoc(),zi=Wn.getCursor(),xo=Wn.getLine(zi.line),Ko=xo.charAt(zi.ch-1),Uo=xo.lastIndexOf("@\u2581@",zi.ch),Qo=xo.lastIndexOf("@\u2581\u2581@",zi.ch),ar=Uo>Qo?Uo:Qo,Ro=Uo>Qo?3:4;if(Zn.indexOf(Ko)===-1)return null;if(console.log("change1:",Ni,Pi,xo,zi,ar,Uo,Qo,Ko),ar>=0&&zi.ch-ar<5){var er=ar+Ro;return Wn.replaceRange("",{line:zi.line,ch:ar},{line:zi.line,ch:er}),{line:zi.line,ch:er}}return null}(0,vt.useEffect)(()=>{if(Xe){let Pi=function(Ni,Wn){const zi=Ni.getValue();Ei(zi),Tn(new Date().getTime()),Ni.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Be&&(Gn?Be(zi,xi(zi)):Be(zi))};return Xe.on("change",Pi),()=>{Xe.off("change",Pi)}}},[Xe,Be]),(0,vt.useEffect)(()=>{if(Xe)if(Ae==null)Xe.setValue(""),Ei("");else{const Pi=window.scrollY||window.pageYOffset;Ae!==Xe.getValue()&&(Xe.setValue(Ae),Ei(Ae),Xe.setCursor(bn?1:Xe.lineCount(),0),window.scrollTo(0,Pi))}},[Xe,Ae]);const Yn=(0,vt.useCallback)(Pi=>{const Ni=Xe.getCursor(),Wn=Xe.getSelection();let zi=Wn.split(`
|
|
|
`);switch(Pi){case"bold":return Xe.replaceSelection("**"+Wn+"**"),Wn===""&&Xe.setCursor(Ni.line,Ni.ch+2),Xe.focus();case"italic":return Xe.replaceSelection("*"+Wn+"*"),Wn===""&&Xe.setCursor(Ni.line,Ni.ch+1),Xe.focus();case"code":return Xe.replaceSelection("`"+Wn+"`"),Wn===""&&Xe.setCursor(Ni.line,Ni.ch+1),Xe.focus();case"inline-latex":return un("inline-latex"),Xe.focus();case"latex":return Xe.replaceSelection("```latex\n"+Wn+"\n```"),Xe.setCursor(Ni.line+1,Wn.length+1),Xe.focus();case"line-break":return Xe.replaceSelection(`<br/>
|
|
|
`),Xe.focus();case"list-ul":return Wn===""?Xe.replaceSelection("- "+Wn):Xe.replaceSelection(zi.map(xo=>xo===""?"":`- ${xo}`).join(`
|
|
|
`)),Xe.focus();case"list-ol":return Wn===""?Xe.replaceSelection("1. "+Wn):Xe.replaceSelection(zi.map((xo,Ko)=>xo===""?"":`${Ko+1}. ${xo}`).join(`
|
|
|
`)),Xe.focus();case"add-null-ch":return Wn===""&&Xe.setCursor(Ni.line,Ni.ch),Xe.replaceSelection(Qi),Xe.focus();case"add-signal":return Wn===""&&Xe.setCursor(Ni.line,Ni.ch),Xe.replaceSelection(Mt),Xe.focus();case"add-multiple":return Wn===""&&Xe.setCursor(Ni.line,Ni.ch),Xe.replaceSelection(Zn),Xe.focus();case"inster-template-1":return Wn===""&&Xe.setCursor(Ni.line,Ni.ch),Xe.replaceSelection(so),Xe.focus();case"eraser":return Xe.setValue(""),Xe.focus();case"trigger-watch":return Vn(!nn),Xe.focus();case"trigger-full-screen":return Ge(!ze),Xe.focus();case Pn:un(Pn);return;case ni:un(ni);return;case Cn:un(Cn);return;case Jn:un(Jn);return;case"maths-latex":un("maths-latex");return;case An:un(An);return;case fi:un(fi);return;default:throw new Error}},[Xe,nn,ze]),zt=(0,vt.useCallback)((Pi,Ni)=>{var Wn,zi,xo,Ko,Uo,Qo;switch(un(""),Oe){case Pn:const{title:qr,link:sn}=Pi;return Xe.replaceSelection(`[${qr}](${sn})`),Xe.focus();case ni:const{language:wr,content:Sa}=Pi;return Xe.replaceSelection(["```"+wr,Sa,"```"].join(`
|
|
|
`)),Xe.focus();case"maths-latex":for(var ar=atob(Pi),Ro=new Uint8Array(ar.length),er=0;er<ar.length;er++)Ro[er]=ar.charCodeAt(er);var nr=new Blob([Ro],{type:"image/png"});(0,Ee.I)(nr,no=>{no.id?Xe.replaceSelection(``):(no==null?void 0:no.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Xe.replaceSelection("`$$"+Pi+"$$`");break;case Cn:case Jn:case ui:const{src:Cs,alt:jo}=Pi,Lo=Ni,vr=(xo=(zi=(Wn=Lo==null?void 0:Lo.name)==null?void 0:Wn.split("."))==null?void 0:zi.pop)==null?void 0:xo.call(zi);return((Ko=Lo==null?void 0:Lo.type)==null?void 0:Ko.indexOf("image"))>-1||!(Lo!=null&&Lo.type)?Lo!=null&&Lo.align||Lo!=null&&Lo.width?Xe.replaceSelection(`<p style="text-align:${Lo.align||"initial"}"><img width="${Lo.width?Lo.width+"%":"initial"}" src="${Cs}" alt="${jo||""}" /></p>`):Xe.replaceSelection(`<img width="100%" src="${Cs}" alt="${jo||""}" />`):((Uo=Lo==null?void 0:Lo.type)==null?void 0:Uo.indexOf("video"))>-1?Xe.replaceSelection(`<video width="100%" controls src="${Cs}"></video>`):((Qo=Lo==null?void 0:Lo.type)==null?void 0:Qo.indexOf("pdf"))>-1?Xe.replaceSelection(`<a href="${Cs}?type=${Lo.type}&disposition=inline" target="_blank">${Lo.name}</a>`):Ii.includes(vr)?Xe.replaceSelection(`<a href="${Cs}?type=office&disposition=inline" target="_blank">${Lo.name}</a>`):Xe.replaceSelection(`[${Lo.name}](${Cs})`),Xe.focus();case fi:const{row:Xo,col:bo,align:Ao}=Pi;let ur=`
|
|
|
`;for(let no=0;no<Xo;no++){let ko=[],No=[];for(let mi=0;mi<bo;mi++)no===1&&No.push(Ti[Ao]),ko.push(" ");no===1&&(ur+=`| ${No.join(" | ")} |
|
|
|
`),ur+=`| ${ko.join(bo===1?"":" | ")} |
|
|
|
`}return Xe.replaceSelection(ur+`
|
|
|
`),Xe.focus();default:throw new Error}},[Xe,Oe]),Ai=(0,vt.useMemo)(()=>{switch(Oe){case Pn:return vt.createElement(pn,{callback:zt,onCancel:vo});case ni:return vt.createElement(ln.Z,{callback:zt,onCancel:vo});case Cn:return vt.createElement(Ee.Z,{callback:zt,onCancel:vo});case An:return vt.createElement(qt,{callback:zt,onCancel:vo});case fi:return vt.createElement(Ne,{callback:zt,onCancel:vo});case"maths-latex":return vt.createElement(Ln,{showSaveButton:!0,callback:zt});case"inline-latex":return vt.createElement(ye.Z,{showSaveButton:!0,callback:zt});default:return null}},[Oe]);function vo(){un("")}(0,vt.useEffect)(()=>{if(Si.current){let Pi=function(Uo){xo=!0,Ko=Uo.pageY},Ni=function(){xo=!1},Wn=function(Uo){if(xo){let Qo=Uo.pageY-Ko;Qo<0&&(Qo=0),Qo>300&&(Qo=300);let ar=Je+Qo+"px";ei(ar)}},zi=Si.current,xo=!1,Ko=0;return zi.addEventListener("mousedown",Pi),document.addEventListener("mousemove",Wn),document.addEventListener("mouseup",Ni),()=>{zi.removeEventListener("mousedown",Pi),document.removeEventListener("mousemove",Wn),document.removeEventListener("mouseup",Ni)}}},[Xe,Si]),(0,vt.useEffect)(()=>{ei(Je)},[Je]);const ao=Wi(_t),Eo=Wi(Rn),Ho={width:ao,height:Eo},Zi=(0,vt.useMemo)(()=>{if(kn){let Pi=new Date(kn),Ni=Pi.getHours(),Wn=Pi.getMinutes(),zi=Pi.getSeconds();return Ni=Ni<10?"0"+Ni:Ni,Wn=Wn<10?"0"+Wn:Wn,zi=zi<10?"0"+zi:zi,`${Ni}:${Wn}:${zi}`}return 0},[kn]),xi=Pi=>{const Ni=[];if(Gn){let Wn=-1;Pi=Pi.replace(/(@▁▁@|@▁@)/g,function(zi,xo,Ko){Ni.push({multiLine:zi!==Mt})})}return Ni};function Fi(){window.sessionStorage.removeItem(Nn),pi(!1),Tn(0)}function Mi(){pi(!1),Tn(0),Xe.setValue(window.sessionStorage.getItem(Nn))}(0,vt.useEffect)(()=>{ai[Oe]&&Oe!==Jn&&Oe!==An&&setTimeout(()=>{const Pi=document.getElementsByClassName("markdown-popup-form")[0],Ni=window.innerWidth/2-Pi.offsetWidth/2,Wn=window.innerHeight/2-Pi.offsetHeight/2;Ci(Ni),$i(Wn)},0)},[Oe]);const co=Pi=>{Pi.preventDefault();const Ni=Pi.clientX-tn,Wn=Pi.clientY-Ui;document.body.onmousemove=zi=>{let xo=zi.clientX-Ni,Ko=zi.clientY-Wn;const Uo=document.getElementsByClassName("markdown-popup-form")[0],Qo=window.innerWidth-Uo.offsetWidth,ar=window.innerHeight-Uo.offsetHeight;xo=Math.max(0,Math.min(xo,Qo)),Ko=Math.max(0,Math.min(Ko,ar)),uo(zi.clientX,zi.clientY,Ni,Wn)&&(Ci(xo),$i(Ko))},document.body.onmouseup=function(){document.body.onmousemove=null}},uo=(Pi,Ni,Wn,zi)=>{const xo=document.body.clientHeight,Ko=document.body.clientWidth;return Pi<20&&Wn>Pi||Pi>Ko-20&&Wn<Pi||Ni<20&&zi>Ni||Ni>xo-20&&zi<Ni?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return vt.createElement(vt.Fragment,null,vt.createElement("div",{className:"markdown-editor-wrapper",ref:lo},vt.createElement("div",{className:`markdown-editor-container ${vn} ${nn?"on-preview":""} ${cn?"mini":""} ${ze?"full-screen":""}`,style:Ho},vt.createElement(At,{insertTemp:Qe,watch:nn,fullScreen:ze,showNullButton:mn,showNullProgramButton:Gn,onActionCallback:Yn,hidetoolBar:si,extraUse:yi}),vt.createElement("div",{className:"markdown-editor-body"},vt.createElement("div",{className:"codemirror-container"},vt.createElement("textarea",{ref:Co,placeholder:On})),nn?vt.createElement("div",{ref:ii,className:"preview-container"},yn==="stex"&&vt.createElement(re,{value:ji}),yn!=="stex"&&vt.createElement(Fe.Z,{disabledFill:xn,showProgramFill:Gn,value:ji})):null))),_n?vt.createElement("a",{ref:Si,className:"editor-resize"}):null,Oe===Jn&&vt.createElement(In,{callback:zt,onCancel:vo}),Oe===An&&vt.createElement(qt,{callback:zt,onCancel:vo}),vt.createElement(Kt.Z,null,ai[Oe]&&Oe!==Jn&&Oe!==An?vt.createElement(Ke.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:tn,top:Ui},title:vt.createElement("div",{style:{cursor:"move"},onMouseDown:co},ai[Oe]),open:!0,onCancel:vo,footer:null,destroyOnClose:!0,width:Oe===An?"1200px":null,height:Oe===An?"80vh":null,className:"markdown-popup-form"},Ai):null))}},28451:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return Nt},I:function(){return At}});var vt=Pt(78241),It=Pt(8591),oe=Pt(92832),de=Pt(81327),$t=Pt(5871),Ut=Pt(5112),Jt=Pt(3113),De=Pt(77903),we=Pt(59301),te=Pt(59301),Fe=Object.defineProperty,re=Object.defineProperties,me=Object.getOwnPropertyDescriptors,Ot=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(Kt,Wt,xe)=>Wt in Kt?Fe(Kt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:xe}):Kt[Wt]=xe,at=(Kt,Wt)=>{for(var xe in Wt||(Wt={}))et.call(Wt,xe)&&ht(Kt,xe,Wt[xe]);if(Ot)for(var xe of Ot(Wt))nt.call(Wt,xe)&&ht(Kt,xe,Wt[xe]);return Kt},ft=(Kt,Wt)=>re(Kt,me(Wt));const{useForm:mt}=vt.default,wt={width:280,marginRight:10},Et={labelCol:{span:5},wrapperCol:{span:19}};var Nt=({callback:Kt,onCancel:Wt})=>{const[xe]=mt();let Vt=(0,we.useRef)();function Ie(Le){Vt.current.width=xe.getFieldValue("width"),Vt.current.align=xe.getFieldValue("align"),Kt(Le,Vt.current)}function Se(Le,Pe){if(Le.status===-1){It.ZP.error(Le.message);return}xe.setFieldsValue({src:`/api/attachments/${Le.id}`,type:Pe.type})}function Ye(Le){let Pe=Le.target.files[0];Vt.current=Pe,At(Pe,Se)}return te.createElement(vt.default,ft(at({form:xe},Et),{className:"upload-image-panel",onFinish:Ie,style:{width:470,overflow:"hidden"}}),te.createElement(vt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},te.createElement("div",{className:"flex-container"},te.createElement(vt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},te.createElement(oe.default,{style:wt})),te.createElement(Dt,{onFileChange:Ye}))),te.createElement(vt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},te.createElement(oe.default,{style:{width:264}})),te.createElement(vt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},te.createElement(de.Z,null,te.createElement(vt.default.Item,{name:"width",style:{margin:0}},te.createElement($t.Z,{style:{width:264}})),te.createElement("span",{className:"ml8"},"%"))),te.createElement(vt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},te.createElement(Ut.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"}]})),te.createElement("aside",null,te.createElement(vt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},te.createElement(Jt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),te.createElement(Jt.ZP,{type:"default",onClick:Wt},"\u53D6\u6D88"))))};function Dt({onFileChange:Kt}){return te.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",te.createElement("input",{type:"file",onChange:Kt}))}function At(Kt,Wt){if(!Kt)throw new String("\u6CA1\u6709\u6587\u4EF6");let xe=new FormData;xe.append("editormd-image-file",Kt),xe.append("file_param_name","editormd-image-file"),xe.append("byxhr","true");var Vt=new window.XMLHttpRequest;Vt.withCredentials=!0,Vt.addEventListener("load",function(Ie){Wt(JSON.parse(Ie.target.responseText),Kt)},!1),Vt.addEventListener("error",function(Ie){console.error(Ie)},!1),Vt.open("POST",`${De.KI}/api/attachments.json`),Vt.send(xe)}},79346:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return oe}});var vt=Pt(59301),It=Pt(4676);class oe extends vt.Component{constructor($t){super($t);const Ut=window.document;this.node=Ut.createElement("div"),Ut.body.appendChild(this.node)}render(){const{children:$t}=this.props;return(0,It.createPortal)($t,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{SV:function(){return ee},ZP:function(){return yt}});var vt=Pt(59301),It=Pt(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"]},de={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"]},$t={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(`
|
|
|
`)}]},Ut={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(`
|
|
|
`)}]},Jt={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 De=Pt(53184),we=Pt.n(De),te=Object.defineProperty,Fe=Object.defineProperties,re=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,nt=(pe,qt,Zt)=>qt in pe?te(pe,qt,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):pe[qt]=Zt,ht=(pe,qt)=>{for(var Zt in qt||(qt={}))Ot.call(qt,Zt)&&nt(pe,Zt,qt[Zt]);if(me)for(var Zt of me(qt))et.call(qt,Zt)&&nt(pe,Zt,qt[Zt]);return pe},at=(pe,qt)=>Fe(pe,re(qt)),ft=(pe,qt,Zt)=>new Promise((fe,ce)=>{var ne=an=>{try{hn(Zt.next(an))}catch(_e){ce(_e)}},Ne=an=>{try{hn(Zt.throw(an))}catch(_e){ce(_e)}},hn=an=>an.done?fe(an.value):Promise.resolve(an.value).then(ne,Ne);hn((Zt=Zt.apply(pe,qt)).next())});const mt={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"]}},wt=(pe,qt)=>qt.map(Zt=>({label:Zt,kind:pe.languages.CompletionItemKind.Keyword,insertText:Zt})),Et=pe=>Object.keys(mt.tables).map(qt=>({label:qt,kind:pe.languages.CompletionItemKind.Variable,insertText:qt})),Nt=(pe,qt)=>{const Zt=mt.tables[pe];return Zt?Zt.map(fe=>({label:fe,kind:qt.languages.CompletionItemKind.Field,insertText:fe})):[]};function Dt(pe,qt,Zt,fe,ce){let ne=qt.getWordUntilPosition(Zt),Ne={startLineNumber:Zt.lineNumber,endLineNumber:Zt.lineNumber,startColumn:ne.startColumn,endColumn:ne.endColumn},hn=fe.map(an=>({label:an,kind:pe.languages.CompletionItemKind.Keyword,insertText:an,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}));return ce.map(an=>{hn.push(at(ht({},an),{range:Ne}))}),hn}var At=pe=>{mt.languages.map(ce=>(pe.languages.registerDocumentFormattingEditProvider(ce,{provideDocumentFormattingEdits(ne,Ne,hn){return ft(this,null,function*(){const an=we()(ne.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:ne.getFullModelRange(),text:an}]})}}),ce));const qt=$t.quickKey.map(ce=>({label:ce.label,kind:pe.languages.CompletionItemKind.Method,insertText:ce.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Zt=Ut.quickKey.map(ce=>({label:ce.label,kind:pe.languages.CompletionItemKind.Method,insertText:ce.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),fe=de.quickKey.map(ce=>({label:ce.label,kind:pe.languages.CompletionItemKind.Method,insertText:ce.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));pe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(ce,ne){var Ne=ce.getWordUntilPosition(ne),hn={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:Ne.startColumn,endColumn:Ne.endColumn},an=ce.getLineContent(ne.lineNumber).substring(Ne.startColumn-2,Ne.endColumn);return{suggestions:[...$t.keywords.map(_e=>({label:_e,kind:pe.languages.CompletionItemKind.Function,documentation:_e,insertText:_e,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:hn})),...$t.quickKey.map(_e=>({label:_e.label,kind:pe.languages.CompletionItemKind.Function,documentation:_e.content,insertText:an.startsWith("#")?_e.content.replace(/#/,""):_e.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:hn}))]}}}),pe.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(ce,ne){var Ne=ce.getWordUntilPosition(ne),hn={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:Ne.startColumn,endColumn:Ne.endColumn};return{suggestions:[...oe.keywords.map(an=>({label:an,kind:pe.languages.CompletionItemKind.Function,documentation:an,insertText:an,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:hn}))]}}}),pe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(ce,ne){var Ne=ce.getWordUntilPosition(ne),hn={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:Ne.startColumn,endColumn:Ne.endColumn},an=ce.getLineContent(ne.lineNumber).substring(Ne.startColumn-2,Ne.endColumn);return{suggestions:[...de.keywords.map(_e=>({label:_e,kind:pe.languages.CompletionItemKind.Function,documentation:_e,insertText:_e,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:hn})),...de.quickKey.map(_e=>({label:_e.label,kind:pe.languages.CompletionItemKind.Function,documentation:_e.content,insertText:an.startsWith("#")?_e.content.replace(/#/,""):_e.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:hn}))]}}}),pe.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(ce,ne){var Ne=ce.getWordUntilPosition(ne),hn={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:Ne.startColumn,endColumn:Ne.endColumn},an=ce.getLineContent(ne.lineNumber).substring(Ne.startColumn-2,Ne.endColumn);return{suggestions:[...Jt.keywords.map(_e=>({label:_e,kind:pe.languages.CompletionItemKind.Function,documentation:_e,insertText:_e,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:hn})),...Jt.quickKey.map(_e=>({label:_e.label,kind:pe.languages.CompletionItemKind.Function,documentation:_e.content,insertText:an.startsWith("#")?_e.content.replace(/#/,""):_e.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:hn}))]}}}),pe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(ce,ne){var Ne=ce.getWordUntilPosition(ne),hn={startLineNumber:ne.lineNumber,endLineNumber:ne.lineNumber,startColumn:Ne.startColumn,endColumn:Ne.endColumn},an=ce.getLineContent(ne.lineNumber).substring(Ne.startColumn-2,Ne.endColumn);return{suggestions:[...Ut.keywords.map(_e=>({label:_e,kind:pe.languages.CompletionItemKind.Function,documentation:_e,insertText:_e,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:hn})),...Ut.quickKey.map(_e=>({label:_e.label,kind:pe.languages.CompletionItemKind.Function,documentation:_e.content,insertText:an.startsWith("#")?_e.content.replace(/#/,""):_e.content,insertTextRules:pe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:hn}))]}}})};const Kt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Wt=Object.defineProperty,xe=(pe,qt,Zt)=>qt in pe?Wt(pe,qt,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):pe[qt]=Zt,Vt=(pe,qt,Zt)=>xe(pe,typeof qt!="symbol"?qt+"":qt,Zt);const Ie=class wx{constructor(qt,Zt,fe){this.placeholder=qt,this.editor=Zt,this.monaco=fe,Zt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return wx.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)}};Vt(Ie,"ID","editor.widget.placeholderHint");var Ye=Ie,Le=Pt(96236),Pe=Pt(8591),We=Pt(6848),Ue=Pt(89392),ue=Pt(34604),Ht=Pt(56102),ke=Object.defineProperty,pn=Object.defineProperties,ln=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable,Bn=(pe,qt,Zt)=>qt in pe?ke(pe,qt,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):pe[qt]=Zt,dn=(pe,qt)=>{for(var Zt in qt||(qt={}))Ke.call(qt,Zt)&&Bn(pe,Zt,qt[Zt]);if(Ee)for(var Zt of Ee(qt))gn.call(qt,Zt)&&Bn(pe,Zt,qt[Zt]);return pe},In=(pe,qt)=>pn(pe,ln(qt)),Ce=(pe,qt)=>{var Zt={};for(var fe in pe)Ke.call(pe,fe)&&qt.indexOf(fe)<0&&(Zt[fe]=pe[fe]);if(pe!=null&&Ee)for(var fe of Ee(pe))qt.indexOf(fe)<0&&gn.call(pe,fe)&&(Zt[fe]=pe[fe]);return Zt},$n=(pe,qt,Zt)=>new Promise((fe,ce)=>{var ne=an=>{try{hn(Zt.next(an))}catch(_e){ce(_e)}},Ne=an=>{try{hn(Zt.throw(an))}catch(_e){ce(_e)}},hn=an=>an.done?fe(an.value):Promise.resolve(an.value).then(ne,Ne);hn((Zt=Zt.apply(pe,qt)).next())});function Qn(pe){return/^\d+$/.test(pe)?`${pe}px`:pe}function jt(){}let Lt=!1;const xt={"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 Tt(pe=[]){let qt=pe;if(Array.isArray(pe)){for(let Zt=0;Zt<pe.length;Zt++){let fe=xt[pe[Zt]];if(fe)return fe}return qt[0]}return xt[qt]||qt}let Ft=null;var yt=pe=>{var qt=pe,{width:Zt="100%",height:fe="100%",value:ce,language:ne="javascript",style:Ne={},options:hn={},overrideServices:an={},theme:_e="vs-dark",onEditBlur:En,isCopy:Ln=!1,onSave:ye,autoHeight:on=!1,forbidCopy:Pn=!1,onChange:Cn=jt,editorDidMount:An=jt,onFocus:Jn=jt,onBreakPoint:ui=jt,breakPointValue:ni=[],filename:fi="educoder.txt",errorLine:Bi,errorContent:Ti="",highlightLine:Di,openBreakPoint:io=!1,placeholder:to=""}=qt,Ri=Ce(qt,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"]);const Qi=(0,vt.useRef)(),Zn=(0,vt.useRef)({}),Mt=(0,vt.useRef)(),so=(0,vt.useRef)(),Ii=(0,vt.useRef)([]),Wi=(0,vt.useRef)(!1),ki=(0,vt.useRef)(),Bo=(0,vt.useRef)(),Mo=(0,vt.useRef)(!1),[ai,di]=(0,vt.useState)(!1);function Ae(){let Re;return Qi.current&&(Re=new It.Z(fn=>{for(let He of fn)(He.target.offsetHeight>0||He.target.offsetWidth>0)&&Zn.current.instance.layout()}),Re.observe(Qi.current)),Re}function Be(){Pe.ZP.warning({content:decodeURIComponent(Kt),key:"monaco-editor-tip"})}const _t=()=>{let Re=Zn.current.instance;if(ce!=null&&Re&&ai){const fn=Re.getModel();fn&&ce!==fn.getValue()&&(Lt=!0,fn.setValue(ce),Re.layout(),Lt=!1)}};(0,vt.useEffect)(()=>{const Re=ue.Z.subscribe("formatDocument",fn=>{var He;let je=Zn.current.instance;(He=je==null?void 0:je.getAction)==null||He.call(je,"editor.action.formatDocument").run()});return window.updateMonacoValue=fn=>{Cn(fn)},Re},[]),(0,vt.useEffect)(()=>{var Re;let fn=Zn.current.instance;so.current&&clearTimeout(so.current),so.current=setTimeout(()=>{_t()},500),ce&&(ce!=null&&ce.length)&&((Re=fn==null?void 0:fn.updateOptions)==null||Re.call(fn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ce.split(/\r\n|\r|\n/g).length))+3,5)}))},[ce,ai,Zn.current]),(0,vt.useEffect)(()=>{if(Bi&&Zn.current&&Zn.current.instance){let fn=Zn.current.instance;fn.changeViewZones(function(He){var je=document.createElement("div");je.style.padding="10px 20px",je.style.width="calc(100% - 20px)",je.className="my-error-line-wrp",je.innerHTML=Ti,He.addZone({afterLineNumber:Bi||11,heightInLines:3,domNode:je})});var Re={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}};fn.addOverlayWidget(Re),fn.revealPositionInCenter({lineNumber:20,column:1})}},[Bi,Zn.current,ai]);const Je=(Re="",fn)=>{if(!Re||Re.trim()==="")return!0;const je=Zn.current.instance.getModel().getLineTokens(fn);let vn=!1;for(let rn=0;rn<2;rn++)je.getStandardTokenType(rn)===1&&(vn=!0);return vn};(0,vt.useEffect)(()=>{var Re;const fn=(Re=Zn.current)==null?void 0:Re.instance;if(fn&&ai&&Pn){const He=fn.onDidBlurEditorWidget(()=>{Mo.current=!1}),je=fn.onDidFocusEditorText(()=>{Mo.current=!0});return()=>{He.dispose(),je.dispose()}}},[Zn.current,ai,Pn]),(0,vt.useEffect)(()=>{var Re;if((Re=Zn.current)!=null&&Re.instance&&ai&&io){let fn=Zn.current.instance,He=fn.getModel();if(!He)return;(()=>{var Ei;let nn=[],Vn=[];const ze=He.getAllDecorations();for(let Oe of ze)Oe.options.className==="highlighted-line"&&(nn.push((Ei=Oe==null?void 0:Oe.range)==null?void 0:Ei.startLineNumber),Vn.push(Oe==null?void 0:Oe.id));if(Di===nn[0])return;He.deltaDecorations(Vn,[]);const Ge=He.getLineCount();Di&&Di<=Ge&&(fn.deltaDecorations([],[{range:new Ft.Range(Di,1,Di,He.getLineMaxColumn(Di)),options:{isWholeLine:!0,className:"highlighted-line"}}]),fn.revealLineInCenter(Di))})();const vn=(Ei=!1)=>{var nn;let Vn=[],ze=[];const Ge=He.getAllDecorations();for(let Oe of Ge)Oe.options.linesDecorationsClassName==="breakpoints-select"&&(Vn.push((nn=Oe==null?void 0:Oe.range)==null?void 0:nn.startLineNumber),ze.push(Oe==null?void 0:Oe.id));if(Ei)return{lines:Vn,ids:ze};ui(Vn)},rn=Ei=>$n(void 0,null,function*(){let nn={range:new Ft.Range(Ei,1,Ei,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield He.deltaDecorations([],[nn]),vn()}),bn=Ei=>$n(void 0,null,function*(){let nn=[];const Vn=fn.getLineDecorations(Ei);for(let ze of Vn)ze.options.linesDecorationsClassName==="breakpoints-select"&&nn.push(ze.id);yield He.deltaDecorations(nn,[]),vn()}),xn=Ei=>{let nn=fn.getLineDecorations(Ei);for(let Vn of nn)if(Vn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ue.isEqual)(ni,vn(!0).lines)){He.deltaDecorations(vn(!0).ids,[]);const Ei=ni.map(nn=>({range:new Ft.Range(nn,1,nn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));He.deltaDecorations([],Ei)}const On=fn.onDidChangeModelContent(Ei=>{let nn=fn.getPosition();if(nn){let Vn=nn.lineNumber;clearTimeout(Bo.current),Bo.current=setTimeout(()=>{Je(He.getLineContent(Vn),Vn)?bn(Vn):xn(Vn)?(bn(Vn),rn(Vn)):vn()},100)}}),zn=fn.onMouseDown(Ei=>{var nn,Vn,ze;if(Ei.target.detail&&((ze=(Vn=(nn=Ei.target)==null?void 0:nn.element)==null?void 0:Vn.className)!=null&&ze.includes("line-numbers"))){let Ge=Ei.target.position.lineNumber;if(Je(He.getLineContent(Ge),Ge))return;xn(Ge)?bn(Ge):rn(Ge)}}),yi=Ei=>{let nn={range:new Ft.Range(Ei,1,Ei,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ii.current=fn.deltaDecorations(Ii.current,[nn])},Xe=()=>{Ii.current=fn.deltaDecorations(Ii.current,[])},Li=fn.onMouseMove(Ei=>{var nn,Vn,ze;if(Xe(),Ei.target.detail&&((ze=(Vn=(nn=Ei.target)==null?void 0:nn.element)==null?void 0:Vn.className)!=null&&ze.includes("line-numbers"))){let Ge=Ei.target.position.lineNumber;if(Je(He.getLineContent(Ge),Ge))return;yi(Ge)}}),ji=fn.onMouseLeave(()=>{Xe()});return()=>{On.dispose(),zn.dispose(),Li.dispose(),ji.dispose()}}},[Zn.current,ai,ni,Di,io,ne]),(0,vt.useEffect)(()=>{var Re;(Re=Zn.current)!=null&&Re.instance&&io&&Zn.current.instance.setPosition({lineNumber:0,column:0})},[Di]);function cn(){let Re=Zn.current.instance;if(Re){const fn=Re.getSelection(),He=Zn.current.pastePos||{},je=new Ft.Range(He.startLineNumber||fn.endLineNumber,He.startColumn||fn.endColumn,He.endLineNumber||fn.endLineNumber,He.endColumn||fn.endColumn);setTimeout(()=>{Re.executeEdits("",[{range:je,text:""}])},300)}}function ve(Re){(window.navigator.platform.match("Mac")?Re.metaKey:Re.ctrlKey)&&Re.keyCode==83&&(Re.preventDefault(),ye())}const ie=()=>{if(on&&Zn.current.instance){const Re=Zn.current.instance.getContentHeight();Gn(Re<fe?fe:Re)}else Gn(fe)};function Qe(Re){var fn=document.createEvent("MouseEvents");fn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Re.dispatchEvent(fn)}const yn=Re=>{if(!Mo.current)return;const{keyCode:fn,ctrlKey:He,metaKey:je,target:vn,type:rn}=Re;return(rn==="paste"||(fn===67||fn===86)&&(je||He))&&vn.nodeName==="TEXTAREA"&&(Be(),Re.preventDefault()),!1};function Nn(Re,fn){var He=window.URL||window.webkitURL||window,je=new Blob([fn]),vn=document.createElementNS("http://www.w3.org/1999/xhtml","a");vn.href=He.createObjectURL(je),vn.download=Re,Qe(vn)}(0,vt.useEffect)(()=>{ie()},[ie]),(0,vt.useEffect)(()=>{Qi.current&&!ai&&Promise.all([Pt.e(8909),Pt.e(3267)]).then(Pt.bind(Pt,71448)).then(Re=>{try{Ft=Re,Zn.current.instance=Ft.editor.create(Qi.current,{value:ce,language:Tt(ne),theme:_e,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},an);const fn=Zn.current.instance;let vn=[...Le.BH._menuItems].find(On=>On[0]._debugName=="EditorContext")[1],rn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],bn=(On,zn)=>{var yi,Xe;let Li=On._first;do zn.includes((Xe=(yi=Li.element)==null?void 0:yi.command)==null?void 0:Xe.id)&&On._remove(Li);while(Li=Li.next)};if(An(fn,Ft),setTimeout(()=>{ie(),Zn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Nn(fi||"educoder.txt",fn.getValue())}})},500),Zn.current.subscription=fn.onDidChangeModelContent(On=>{Wi.current?clearTimeout(ki.current):(ie(),Cn(fn.getValue(),On)),ki.current=setTimeout(()=>{Wi.current=!1},500)}),window.Monaco||At(Ft,Tt(ne)),Pn&&(bn(vn,rn),Qi.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",yn),window.removeEventListener("paste",yn),window.addEventListener("keydown",yn),window.addEventListener("paste",yn)),window.Monaco=Ft,En&&fn.onDidBlurEditorWidget(()=>{En(fn.getValue())}),Jn&&fn.onDidFocusEditorText(()=>{Jn(fn.getValue())}),Pn)try{fn.onDidPaste(On=>{const zn=fn.getSelection(),yi=Zn.current.pastePos||{},Xe=new Ft.Range(yi.startLineNumber||zn.endLineNumber,yi.startColumn||zn.endColumn,yi.endLineNumber||zn.endLineNumber,yi.endColumn||zn.endColumn);fn.executeEdits("",[{range:On.range,text:""}])})}catch(On){}let xn=Ae();return to&&typeof to=="string"&&new Ye(to,fn,Ft),di(!0),()=>{const On=Zn.current.instance;On.dispose();const zn=On.getModel();zn&&zn.dispose(),Zn.current.subscription&&Zn.current.subscription.dispose(),xn.unobserve(Qi.current)}}catch(fn){}})},[]),(0,vt.useEffect)(()=>{if(Zn.current.instance&&ai)return document.addEventListener("keydown",ve,!1),()=>{document.removeEventListener("keydown",ve)}},[ye,ai]),(0,vt.useEffect)(()=>{let Re=Zn.current.instance;if(Re&&ai){let fn=Tt(ne);Ft.editor.setModelLanguage(Re.getModel(),fn)}},[ne,ai]),(0,vt.useEffect)(()=>{Zn.current.instance&&ai&&Ft.editor.setTheme(_e)},[_e,ai]),(0,vt.useEffect)(()=>{let Re=Zn.current.instance;Mt.current=hn,Re&&ai&&(Re.updateOptions(dn({},hn)),setTimeout(()=>{Re.getModel().updateOptions(dn({},hn))},200))},[JSON.stringify(hn),ai]),(0,vt.useEffect)(()=>{let Re=Zn.current.instance;Re&&ai&&Re.layout()},[Zt,fe,ai]);const[_n,le]=(0,vt.useState)(Qn(Zt)),[mn,Gn]=(0,vt.useState)(Qn(fe)),si=In(dn({},Ne),{width:_n,height:mn,position:"relative"});return vt.createElement("div",{className:"my-monaco-editor",ref:Qi,style:si},Ln&&vt.createElement(Ht.CopyToClipboard,{text:ce,onCopy:()=>Pe.ZP.success("\u590D\u5236\u6210\u529F")},vt.createElement(We.Z,{title:"\u590D\u5236\u4EE3\u7801"},vt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},vt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ee({width:pe="100%",height:qt="100%",original:Zt,modified:fe,language:ce,options:ne={}}){const Ne=(0,vt.useRef)(),[hn,an]=(0,vt.useState)(null);function _e(on){let Pn;return Ne.current&&(Pn=new It.Z(Cn=>{for(let An of Cn)(An.target.offsetHeight>0||An.target.offsetWidth>0)&&on.layout()}),Pn.observe(Ne.current)),Pn}(0,vt.useEffect)(()=>(Ne.current&&Promise.all([Pt.e(8909),Pt.e(9404)]).then(Pt.bind(Pt,2550)).then(on=>{Ft=on;const Pn=Ft.editor.createDiffEditor(Ne.current,In(dn({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},ne),{wordWrap:!0}));an(Pn);let Cn=_e(Pn);return()=>{Pn.dispose();const An=Pn.getModel();An&&An.dispose(),Cn.unobserve(Ne.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,vt.useEffect)(()=>{hn&&hn.setModel({original:Ft.editor.createModel(Zt,ce),modified:Ft.editor.createModel(fe,ce)})},[Zt,fe,ce,hn]);const En=Qn(pe),Ln=Qn(qt),ye={width:En,height:Ln};return vt.createElement("div",{className:"my-diff-editor",ref:Ne,style:ye})}},85057:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{jL:function(){return $t},w9:function(){return Ke},QD:function(){return Cn},cQ:function(){return Ht},op:function(){return _e},O5:function(){return Mo},_b:function(){return Bi},t7:function(){return at},Gi:function(){return $n},YG:function(){return In},qp:function(){return Fe},vr:function(){return ui},qE:function(){return ye},Je:function(){return wt},wb:function(){return Le},cq:function(){return Ft},tp:function(){return Ot}});var vt=Pt(59301),It={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",$t=({dataSource:ai=[],img:di,imgWidth:Ae=346,title:Be,sunTitle:_t,bannerExtraContent:Je})=>vt.createElement("div",{className:It.banner},vt.createElement("div",{className:It.content},vt.createElement("aside",null,vt.createElement("p",null,vt.createElement("b",null,Be),vt.createElement("span",null,_t)),ai.length>0&&vt.createElement("div",{className:It.btns},ai.map((cn,ve)=>vt.createElement("div",{key:ve,onClick:cn.click},cn.name,cn.sign?vt.createElement("img",{src:oe,width:39}):null))),Je),di&&vt.createElement("img",{style:{marginTop:33,marginRight:38},src:di,width:Ae}))),Ut={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},Jt=Pt(92310),De=Pt.n(Jt),we=Pt(89392),Fe=({dataSource:ai=[],value:di,onChange:Ae,onTitleChange:Be,className:_t,title:Je,titleWidth:cn=41,style:ve={},fontColor:ie="#6A7283",showCount:Qe})=>{const[yn,Nn]=(0,vt.useState)(0),[_n,le]=(0,vt.useState)(!1),mn=(0,vt.useRef)(null),Gn=(0,vt.useRef)(null);return(0,vt.useEffect)(()=>{var si;ai.length!==0&&(((si=mn==null?void 0:mn.current)==null?void 0:si.clientHeight)>97?Nn(1):Nn(0)),ai.length===0&&Nn(0),le(!1)},[ai]),vt.createElement("div",{className:De()(Ut.row,_t),style:ve},vt.createElement("div",{onClick:(0,we.throttle)(()=>Be==null?void 0:Be(),2e3),style:{width:cn,marginTop:_n?12:4},className:`${Ut.title} ${Be?"current":""}`},Je),vt.createElement("div",{className:_n?`${Ut.tagsWrap} ${Ut.tagsBorderWrap}`:Ut.tagsWrap},vt.createElement("div",{className:Ut.bar,ref:Gn,style:yn>0?{height:yn===1?97:"auto",overflow:yn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},vt.createElement("div",{className:Ut.tag,ref:mn},ai==null?void 0:ai.map(si=>vt.createElement("span",{onClick:()=>Ae(si.id),key:si.id,style:{color:ie},className:di===si.id?Ut.active:""},vt.createElement("span",{title:si.name,className:Ut.name},si.name),!!Qe&&vt.createElement("span",{className:Ut.num},si.count))))),!!yn&&vt.createElement(vt.Fragment,null,yn===1?vt.createElement("div",{onClick:()=>{var si;Nn(2),((si=mn==null?void 0:mn.current)==null?void 0:si.clientHeight)>245?le(!0):le(!1)},className:Ut.action},"\u5C55\u5F00",vt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):vt.createElement("div",{onClick:()=>{Gn.current.scrollTop=0,Nn(1),le(!1)},className:Ut.action},"\u6536\u8D77",vt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},re={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Ot=({dataSource:ai=[],value:di,onChange:Ae,className:Be,style:_t={}})=>vt.createElement("div",{style:_t,className:De()(re.tabs,Be)},ai.map(Je=>vt.createElement("span",{onClick:()=>Ae(Je.id),className:di===Je.id?re.active:"",key:Je.id},Je.name))),et={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},nt=Pt(92832),at=({dataSource:ai=[],value:di="",onChange:Ae,onInputChange:Be=()=>{},className:_t,style:Je={},placeholder:cn,allowClear:ve=!1})=>{var ie;const[Qe,yn]=(0,vt.useState)(""),[Nn,_n]=(0,vt.useState)("");(0,vt.useEffect)(()=>{var Gn;let si=di;(Gn=JSON.stringify(di))!=null&&Gn.includes("{")&&(yn(di.id),si=di.value||"");try{_n(decodeURIComponent(si||""))}catch(Re){_n(decodeURIComponent(si||""))}},[di]);const le=()=>{Ae(encodeURIComponent(Nn),Qe||null)},mn=Gn=>{Gn!==Qe&&(yn(Gn),Ae(encodeURIComponent(Nn),Gn))};return vt.createElement("div",{className:De()(et.input,_t),style:Je},!!ai.length&&vt.createElement("div",{className:et.dropdown},vt.createElement("div",{className:et.text},(ie=ai.find(Gn=>Gn.id===Qe))==null?void 0:ie.name,vt.createElement("i",{className:"iconfont icon-zhankai4"}),vt.createElement("b",{className:et.b1}),vt.createElement("b",{className:et.b2})),vt.createElement("div",{className:et.menu},ai.map((Gn,si)=>vt.createElement("div",{key:si,onClick:()=>mn(Gn.id)},Gn.name)))),vt.createElement(nt.default,{onPressEnter:le,value:Nn,onChange:Gn=>{_n(Gn.target.value),Be(encodeURIComponent(Gn.target.value),Qe||null)},bordered:!1,placeholder:cn}),vt.createElement("i",{onClick:le,className:"iconfont icon-sousuo9 font14 pl10 current"}))},ft={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},wt=({value:ai,onChange:di,className:Ae,total:Be,pageSize:_t,style:Je={}})=>{const cn=ai<2,ve=ai>=Math.ceil(Be/_t);return Be<=_t?vt.createElement(vt.Fragment,null):vt.createElement("div",{className:De()(ft.quickPager,Ae),style:Je},vt.createElement("div",{onClick:()=>{cn||di(ai-1,"prev")},className:cn?ft.disabled:""},"\u4E0A\u4E00\u9875"),vt.createElement("div",{onClick:()=>{ve||di(ai+1,"next")},className:ve?ft.disabled:""},"\u4E0B\u4E00\u9875"))},Et={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Nt=Pt(71418),Dt=Pt(6848),At=Pt(13570),Kt=Pt(3294),Wt=Pt(955),xe=Pt(96908),Vt=Pt(57177),Ie=Pt(81378),Se=Pt(8797),Le=({className:ai,dataSource:di=[],col:Ae=4,right:Be,bottom:_t=23,precision:Je=0,wrapWidth:cn=1200,trackEventItems:ve,loading:ie})=>{const Qe=Math.floor((cn-(Ae-1)*Be)/Ae);return vt.createElement(Nt.Z,{spinning:ie},vt.createElement("div",{className:De()(Et.list,ai)},!!di.length&&di.map((yn,Nn)=>{const{name:_n,id:le,identifier:mn,power:Gn,cover_image_id:si,pic:Re}=yn;return vt.createElement("div",{className:Et.wrap,key:le,style:{width:Qe,marginRight:(1+Nn)%Ae===0?0:Be+Je,marginBottom:_t}},vt.createElement("a",{target:"_blank",href:`/shixuns/${mn}/challenges`,className:Et.li,onClick:fn=>{fn.preventDefault(),ve&&(0,Wt.L9)([ve]),Gn&&(0,Wt.xg)(`/shixuns/${mn}/challenges`)}},vt.createElement("div",{className:Et.img},vt.createElement("img",{className:Et.cover,src:`${Re}`}),yn.is_jupyter&&vt.createElement("img",{className:Et.sign,src:xe}),yn.is_jupyter_lab&&vt.createElement("img",{className:Et.sign,src:Vt}),yn.is_unity_3d&&vt.createElement("img",{className:Et.sign,src:Ie})),vt.createElement("div",{className:Et.name},vt.createElement(Dt.Z,{title:_n||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},vt.createElement("span",{className:Et.e},_n||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),vt.createElement("div",{className:Et.tags},vt.createElement(Dt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},vt.createElement("span",null,vt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),vt.createElement("span",null,yn.challenges_count))),!!yn.myshixuns_count&&vt.createElement(Dt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},vt.createElement("span",null,vt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),vt.createElement("span",null,yn.myshixuns_count))),vt.createElement(Dt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},vt.createElement("span",null,vt.createElement("span",null,yn.level))),vt.createElement("div",{className:Et.rate},vt.createElement(At.Z,{allowHalf:!0,disabled:!0,defaultValue:yn.score_info}),vt.createElement("span",null,"\xA0",yn.score_info?`${yn.score_info}\u5206`:"5\u5206")))),!Gn&&vt.createElement("div",{className:Et.lockWrap},vt.createElement("img",{src:`${Kt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),vt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!di.length&&vt.createElement(Se.Z,null)))},Pe={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},We=Pt(24065),Ue=Pt(59301),Ht=({className:ai,dataSource:di=[],col:Ae=4,right:Be,bottom:_t=23,precision:Je=0,wrapWidth:cn=1200,trackEventItems:ve,loading:ie,onRemove:Qe=()=>{},isCurrent:yn=!0,showAlias:Nn=!1})=>{const _n=Math.floor((cn-(Ae-1)*Be)/Ae),le=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return Ue.createElement(Nt.Z,{spinning:ie},Ue.createElement("div",{className:De()(Pe.list,ai)},!!(di!=null&&di.length)&&(di==null?void 0:di.map((mn,Gn)=>{var si;const{name:Re,id:fn,identifier:He,featured:je,school_name:vn,image_url:rn,excellent:bn,is_plan:xn}=mn;return Ue.createElement("div",{key:fn,className:Pe.wrap,style:{width:_n,marginRight:(1+Gn)%Ae===0?0:Be+Je,marginBottom:_t}},Ue.createElement("a",{className:Pe.li,onClick:On=>{On.preventDefault(),On.stopPropagation(),ve&&(0,Wt.L9)([ve]),(0,Wt.xg)(`/paths/${He}`)}},Ue.createElement("div",{className:Pe.img},Ue.createElement("img",{className:Pe.cover,src:`${rn}`}),yn&&(0,We.bg)()&&(mn==null?void 0:mn.studying)&&Ue.createElement("div",{className:`${Pe.movebq} user-path-items`,onClick:On=>{On.stopPropagation(),Qe(mn)}},Ue.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Ue.createElement("span",{className:"c-red"},"\u79FB\u9664")),(si=mn==null?void 0:mn.subject_tags)==null?void 0:si.map((On,zn)=>{var yi,Xe;if(zn===0){const ji=(yi=le.find(Ei=>Ei.name==On))==null?void 0:yi.swimg;return Ue.createElement("img",{className:Pe.sign,src:ji,style:{left:"-4px"}})}const Li=(Xe=le.find(ji=>ji.name==On))==null?void 0:Xe.ptimg;return Ue.createElement("img",{className:Pe.sign,src:Li,style:{left:`${48+52*(zn-1)+2*zn}px`}})}),Ue.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(mn==null?void 0:mn.excellent)&&Ue.createElement("div",{className:Pe.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Ue.createElement("div",{className:Pe.name},Ue.createElement(Dt.Z,{title:Nn&&(mn!=null&&mn.excellent_alias_name)?Ue.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Re}`,Ue.createElement("br",null),Ue.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${mn==null?void 0:mn.excellent_alias_name}`)):Re},Ue.createElement("span",{className:Pe.e},Nn&&(mn==null?void 0:mn.excellent_alias_name)||Re))),Ue.createElement(Dt.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${vn}`},Ue.createElement("div",{className:Pe.unit},Ue.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),vn)),Ue.createElement("div",{className:Pe.tags},Ue.createElement("div",null,Ue.createElement(Dt.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Ue.createElement("span",null,Ue.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Ue.createElement("span",null,mn.stages_count))),Ue.createElement(Dt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Ue.createElement("span",null,Ue.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Ue.createElement("span",null,mn.members_count)))))))})),!di.length&&Ue.createElement(Se.Z,null)))},ke={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},pn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",ln=Pt(59301),Ke=({className:ai,dataSource:di=[],col:Ae=4,right:Be,bottom:_t=23,precision:Je=0,wrapWidth:cn=1200,trackEventItems:ve,loading:ie,handleVery:Qe=()=>!0})=>{const yn=Math.floor((cn-(Ae-1)*Be)/Ae);return ln.createElement(Nt.Z,{spinning:ie},ln.createElement("div",{className:De()(ke.list,ai)},!!di.length&&di.map((Nn,_n)=>{const{subject_identifier:le,id:mn,identifier:Gn,power:si}=Nn,Re=Nn.is_public!=0&&Nn.is_public;return ln.createElement("div",{className:ke.wrap,key:mn,style:{width:yn,marginRight:(1+_n)%Ae===0?0:Be+Je,marginBottom:_t}},ln.createElement("a",{className:ke.li,onClick:fn=>{fn.preventDefault(),Qe(Nn==null?void 0:Nn.first_category_url)&&(ve&&(0,Wt.L9)([ve]),(0,Wt.xg)(Nn.first_category_url))}},ln.createElement("div",{className:ke.top},ln.createElement(Dt.Z,{title:Nn.name},ln.createElement("div",{className:ke.name},Nn.name)),ln.createElement("img",{className:ke.img,src:Kt.Z.IMG_SERVER+"/images/"+Nn.avatar_url}),ln.createElement("div",{className:ke.text,title:Nn.creator},Nn.creator),le&&ln.createElement("div",{className:ke.btns},ln.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),ln.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Re&&ln.createElement("div",{className:ke.sign},"\u516C\u5F00")),ln.createElement("div",{className:ke.bottom},Nn.visits>0&&ln.createElement(Dt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},ln.createElement("span",null,ln.createElement("i",{className:"iconfont icon-liulanyan"}),ln.createElement("span",null,Nn.visits))),Nn.course_members_count>0&&ln.createElement(Dt.Z,{title:"\u6210\u5458",placement:"bottom"},ln.createElement("span",null,ln.createElement("i",{className:"iconfont icon-chengyuan"}),Nn.course_members_count)),Nn.tasks_count>0&&ln.createElement(Dt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},ln.createElement("span",null,ln.createElement("i",{className:"iconfont icon-zuoye"}),Nn.tasks_count)),Nn.is_end?ln.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):ln.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Nn.is_accessible&&ln.createElement("div",{className:ke.lockWrap},ln.createElement("img",{src:`${Kt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ln.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!di.length&&ln.createElement(Se.Z,null)))},gn={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Bn=Pt(89070),In=({dataSource:ai=[],value:di,onChange:Ae,className:Be,style:_t={},tabBarExtraContent:Je})=>vt.createElement("div",{className:De()(gn.tabs,Be),style:_t},vt.createElement("div",{className:gn.tabsWrap},ai.map((cn,ve)=>!(cn!=null&&cn.hide)&&vt.createElement("aside",{className:gn.tab,onClick:()=>{Ae(cn.id),cn.link&&Bn.history.push(cn.link)},key:ve},vt.createElement("div",{className:di===cn.id?gn.active:""},cn.name),(cn==null?void 0:cn.resetCount)==null&&(cn==null?void 0:cn.total)!==void 0&&vt.createElement("span",null,"\uFF08",cn==null?void 0:cn.total,"\uFF09"),(cn==null?void 0:cn.resetCount)!==void 0&&(cn==null?void 0:cn.total)!==void 0&&vt.createElement(Dt.Z,{title:(cn==null?void 0:cn.tip)!=null?cn==null?void 0:cn.tip:""},vt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",vt.createElement("span",{style:{color:"#000"}},cn==null?void 0:cn.resetCount),"/",vt.createElement("span",null,cn==null?void 0:cn.total),"\uFF09"))))),vt.createElement("div",{className:gn.tabBar},Je)),$n=({className:ai,style:di={},children:Ae})=>vt.createElement("div",{className:De()(ai),style:di},Ae),Qn={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},jt=Pt(38854),Lt=Pt(20834);const xt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Ft=({sortValue:ai,dropValue:di,className:Ae,onSort:Be,onDrop:_t,dataSource:Je=xt})=>{var cn;return vt.createElement("div",{className:De()(Qn.orderWrap,Ae)},vt.createElement(jt.Z,{dropdownRender:()=>vt.createElement(Lt.default,null,Je.map((ve,ie)=>vt.createElement(Lt.default.Item,{key:ie,onClick:()=>_t(ve.id)},ve.name)))},vt.createElement("span",{className:Qn.orderTextWrap},(cn=Je.find(ve=>di===ve.id))==null?void 0:cn.name)),vt.createElement("span",{className:Qn.orderIconWrap},vt.createElement("span",{className:Qn.orderAsc},vt.createElement("i",{className:ai==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Qn.cursorPointer} ${Qn.active}`:`iconfont icon-sanjiaoxing-up font12 ${Qn.cursorPointer}`,onClick:()=>Be(ai==="asc"?"desc":"asc")})),vt.createElement("span",{className:Qn.orderDesc},vt.createElement("i",{className:ai==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Qn.cursorPointer} ${Qn.active}`:`iconfont icon-sanjiaoxing-down font12 ${Qn.cursorPointer}`,onClick:()=>Be(ai==="asc"?"desc":"asc")}))))},yt={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},ee=Pt(3113),pe=Object.defineProperty,qt=Object.getOwnPropertySymbols,Zt=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,ce=(ai,di,Ae)=>di in ai?pe(ai,di,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):ai[di]=Ae,ne=(ai,di)=>{for(var Ae in di||(di={}))Zt.call(di,Ae)&&ce(ai,Ae,di[Ae]);if(qt)for(var Ae of qt(di))fe.call(di,Ae)&&ce(ai,Ae,di[Ae]);return ai},Ne=(ai,di)=>{var Ae={};for(var Be in ai)Zt.call(ai,Be)&&di.indexOf(Be)<0&&(Ae[Be]=ai[Be]);if(ai!=null&&qt)for(var Be of qt(ai))di.indexOf(Be)<0&&fe.call(ai,Be)&&(Ae[Be]=ai[Be]);return Ae},hn=(ai,di,Ae)=>new Promise((Be,_t)=>{var Je=ie=>{try{ve(Ae.next(ie))}catch(Qe){_t(Qe)}},cn=ie=>{try{ve(Ae.throw(ie))}catch(Qe){_t(Qe)}},ve=ie=>ie.done?Be(ie.value):Promise.resolve(ie.value).then(Je,cn);ve((Ae=Ae.apply(ai,di)).next())}),_e=ai=>{var di=ai,{className:Ae,style:Be,children:_t,loading:Je=!1,openLoading:cn,onClick:ve=()=>{},size:ie="middle",shape:Qe="round"}=di,yn=Ne(di,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Nn,_n]=(0,vt.useState)(!1);return vt.createElement(ee.ZP,ne({onClick:(0,we.throttle)(le=>hn(void 0,null,function*(){cn&&_n(!0);try{yield ve(le)}catch(mn){console.log("error",mn)}cn&&_n(!1)}),2e3,{leading:!0,trailing:!1}),className:De()(yt.btn,yt[`${ie}-${Qe}`],Ae),style:Be,size:ie,shape:Qe,loading:Nn||Je},yn),_t)},En={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},ye=({className:ai,style:di,children:Ae=null,onClick:Be,title:_t})=>vt.createElement("div",{className:De()(En.head,ai),style:di},vt.createElement("span",{className:"primary-hover",onClick:Be},vt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),vt.createElement("b",{title:_t},_t),vt.createElement("div",{className:En.node},Ae)),on={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Cn=({confirmShow:ai=!0,confirmTitle:di,confirmClick:Ae,cancelShow:Be=!0,cancelTitle:_t,cancelClick:Je,className:cn,style:ve,confirmLoading:ie=!1})=>vt.createElement("div",{className:De()(on.btns,cn),style:ve},ai&&vt.createElement(ee.ZP,{loading:ie,onClick:Ae,type:"primary",className:on.confirm},di),Be&&vt.createElement(ee.ZP,{onClick:Je,className:on.cancel},_t)),An={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},ui=({className:ai,style:di={},LeftContent:Ae,children:Be,RightContent:_t})=>vt.createElement("div",{className:De()(An.fixedBottom,ai),style:di},vt.createElement("div",{className:An.wrap},vt.createElement("div",{className:An.left},Ae),vt.createElement("div",{className:An.center},Be),vt.createElement("div",{className:An.right},_t))),ni={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},Bi=({className:ai,style:di={},dataSource:Ae=[]})=>vt.createElement("div",{className:De()(ni.crumbs,ai),style:di},Ae.map((Be,_t)=>_t<Ae.length-1?vt.createElement(vt.Fragment,{key:_t},Be.path||Be.onClick?vt.createElement("span",{className:ni.hover,onClick:Be!=null&&Be.onClick?Be.onClick:()=>Bn.history.push(Be.path)},Be.name):vt.createElement("span",null,Be.name),vt.createElement("span",null,"\xA0",">","\xA0")):vt.createElement("span",{key:_t,style:{color:"#5F6368"}},Be.name))),Ti=Pt(31797),Di=Object.defineProperty,io=Object.defineProperties,to=Object.getOwnPropertyDescriptors,Ri=Object.getOwnPropertySymbols,Qi=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable,Mt=(ai,di,Ae)=>di in ai?Di(ai,di,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):ai[di]=Ae,so=(ai,di)=>{for(var Ae in di||(di={}))Qi.call(di,Ae)&&Mt(ai,Ae,di[Ae]);if(Ri)for(var Ae of Ri(di))Zn.call(di,Ae)&&Mt(ai,Ae,di[Ae]);return ai},Ii=(ai,di)=>io(ai,to(di)),Wi=(ai,di)=>{var Ae={};for(var Be in ai)Qi.call(ai,Be)&&di.indexOf(Be)<0&&(Ae[Be]=ai[Be]);if(ai!=null&&Ri)for(var Be of Ri(ai))di.indexOf(Be)<0&&Zn.call(ai,Be)&&(Ae[Be]=ai[Be]);return Ae};const{Countdown:ki}=Ti.default;var Mo=ai=>{var di=ai,{onChange:Ae}=di,Be=Wi(di,["onChange"]);const[_t,Je]=(0,vt.useState)(null);(0,vt.useEffect)(()=>{typeof _t=="number"&&_t>=0&&Ae(_t)},[_t]);const cn=ve=>{const ie=Math.floor(ve/1e3);Je(ie)};return vt.createElement(ki,Ii(so({},Be),{onChange:cn}))}},58856:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return It}});var vt=Pt(59301);function It(oe,de){const $t=(0,vt.useRef)();(0,vt.useEffect)(()=>{$t.current=oe}),(0,vt.useEffect)(()=>{function Ut(){$t.current()}if(de!==null){let Jt=setInterval(Ut,de);return()=>clearInterval(Jt)}},[de])}},79803:function(Sn,Ve,Pt){"use strict";Pt.r(Ve),Pt.d(Ve,{default:function(){return Vn}});var vt=Pt(59301),It=Pt(89070),oe=Pt(78241),de=Pt(43418),$t=Pt(95237),Ut=Pt(71418),Jt=Pt(8591),De=Pt(24905),we={flex_box_center:"flex_box_center___JKPl3",flex_space_between:"flex_space_between___QuVBb",flex_box_vertical_center:"flex_box_vertical_center___Ksaxh",flex_box_center_end:"flex_box_center_end___nIhjx",flex_box_column:"flex_box_column___NAJ16",wrap:"wrap___NZWPs",content:"content___OLcvS",name:"name____Thh2",list:"list___F7fxl",head:"head___ffJpn",models:"models___kudCc",btns:"btns___CQDPq",rowsHead:"rowsHead___oC1SU",time:"time___r7Qed",rowsBody:"rowsBody___ZNF9c"},te=Pt(99064),Fe=Pt(85057),re=Pt(12290),me=Pt(85149),Ot=Pt(76895),et=Pt(24065),nt=Pt(955),ht=Pt(3113),at=Pt(6848),ft=Pt(38854),mt=Pt(57809),wt=Pt(92832),Et=Pt(17574),Nt=Pt(43604),Dt=Pt(54580),At=Pt(73755),Kt=Pt(92310),Wt=Pt.n(Kt),xe=Pt(29301),Vt=Pt(8654),Ie=Pt(69507),Se=Pt(36355),Ye=Pt(8628),Pe=vt.createContext({}),We=Pt(17313),Ue=Pt(83116),ue=Pt(37613);const Ht=ze=>{const{antCls:Ge,componentCls:Oe,iconCls:un,avatarBg:kn,avatarColor:Tn,containerSize:Rn,containerSizeLG:ei,containerSizeSM:qe,textFontSize:pi,textFontSizeLG:tn,textFontSizeSM:Ci,borderRadius:Ui,borderRadiusLG:$i,borderRadiusSM:Co,lineWidth:lo,lineType:Si}=ze,ii=(Yi,oo,Yn)=>({width:Yi,height:Yi,lineHeight:`${Yi-lo*2}px`,borderRadius:"50%",[`&${Oe}-square`]:{borderRadius:Yn},[`${Oe}-string`]:{position:"absolute",left:{_skip_check_:!0,value:"50%"},transformOrigin:"0 center"},[`&${Oe}-icon`]:{fontSize:oo,[`> ${un}`]:{margin:0}}});return{[Oe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,We.Wf)(ze)),{position:"relative",display:"inline-block",overflow:"hidden",color:Tn,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:kn,border:`${lo}px ${Si} transparent`,"&-image":{background:"transparent"},[`${Ge}-image-img`]:{display:"block"}}),ii(Rn,pi,Ui)),{"&-lg":Object.assign({},ii(ei,tn,$i)),"&-sm":Object.assign({},ii(qe,Ci,Co)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},ke=ze=>{const{componentCls:Ge,groupBorderColor:Oe,groupOverlapping:un,groupSpace:kn}=ze;return{[`${Ge}-group`]:{display:"inline-flex",[`${Ge}`]:{borderColor:Oe},"> *:not(:first-child)":{marginInlineStart:un}},[`${Ge}-group-popover`]:{[`${Ge} + ${Ge}`]:{marginInlineStart:kn}}}};var pn=(0,Ue.Z)("Avatar",ze=>{const{colorTextLightSolid:Ge,colorTextPlaceholder:Oe}=ze,un=(0,ue.TS)(ze,{avatarBg:Oe,avatarColor:Ge});return[Ht(un),ke(un)]},ze=>{const{controlHeight:Ge,controlHeightLG:Oe,controlHeightSM:un,fontSize:kn,fontSizeLG:Tn,fontSizeXL:Rn,fontSizeHeading3:ei,marginXS:qe,marginXXS:pi,colorBorderBg:tn}=ze;return{containerSize:Ge,containerSizeLG:Oe,containerSizeSM:un,textFontSize:Math.round((Tn+Rn)/2),textFontSizeLG:ei,textFontSizeSM:kn,groupSpace:pi,groupOverlapping:-qe,groupBorderColor:tn}}),ln=Pt(19716),Ee=function(ze,Ge){var Oe={};for(var un in ze)Object.prototype.hasOwnProperty.call(ze,un)&&Ge.indexOf(un)<0&&(Oe[un]=ze[un]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var kn=0,un=Object.getOwnPropertySymbols(ze);kn<un.length;kn++)Ge.indexOf(un[kn])<0&&Object.prototype.propertyIsEnumerable.call(ze,un[kn])&&(Oe[un[kn]]=ze[un[kn]]);return Oe};const Ke=(ze,Ge)=>{const[Oe,un]=vt.useState(1),[kn,Tn]=vt.useState(!1),[Rn,ei]=vt.useState(!0),qe=vt.useRef(null),pi=vt.useRef(null),tn=(0,Vt.sQ)(Ge,qe),{getPrefixCls:Ci,avatar:Ui}=vt.useContext(Se.E_),$i=vt.useContext(Pe),Co=()=>{if(!pi.current||!qe.current)return;const Ro=pi.current.offsetWidth,er=qe.current.offsetWidth;if(Ro!==0&&er!==0){const{gap:nr=4}=ze;nr*2<er&&un(er-nr*2<Ro?(er-nr*2)/Ro:1)}};vt.useEffect(()=>{Tn(!0)},[]),vt.useEffect(()=>{ei(!0),un(1)},[ze.src]),vt.useEffect(Co,[ze.gap]);const lo=()=>{const{onError:Ro}=ze;(Ro==null?void 0:Ro())!==!1&&ei(!1)},{prefixCls:Si,shape:ii,size:Yi,src:oo,srcSet:Yn,icon:zt,className:Ai,rootClassName:vo,alt:ao,draggable:Eo,children:Ho,crossOrigin:Zi}=ze,xi=Ee(ze,["prefixCls","shape","size","src","srcSet","icon","className","rootClassName","alt","draggable","children","crossOrigin"]),Fi=(0,ln.Z)(Ro=>{var er,nr;return(nr=(er=Yi!=null?Yi:$i==null?void 0:$i.size)!==null&&er!==void 0?er:Ro)!==null&&nr!==void 0?nr:"default"}),Mi=Object.keys(typeof Fi=="object"?Fi||{}:{}).some(Ro=>["xs","sm","md","lg","xl","xxl"].includes(Ro)),co=(0,Ye.Z)(Mi),uo=vt.useMemo(()=>{if(typeof Fi!="object")return{};const Ro=Ie.c4.find(nr=>co[nr]),er=Fi[Ro];return er?{width:er,height:er,lineHeight:`${er}px`,fontSize:zt?er/2:18}:{}},[co,Fi]),Pi=Ci("avatar",Si),[Ni,Wn]=pn(Pi),zi=Wt()({[`${Pi}-lg`]:Fi==="large",[`${Pi}-sm`]:Fi==="small"}),xo=vt.isValidElement(oo),Ko=ii||($i==null?void 0:$i.shape)||"circle",Uo=Wt()(Pi,zi,Ui==null?void 0:Ui.className,`${Pi}-${Ko}`,{[`${Pi}-image`]:xo||oo&&Rn,[`${Pi}-icon`]:!!zt},Ai,vo,Wn),Qo=typeof Fi=="number"?{width:Fi,height:Fi,lineHeight:`${Fi}px`,fontSize:zt?Fi/2:18}:{};let ar;if(typeof oo=="string"&&Rn)ar=vt.createElement("img",{src:oo,draggable:Eo,srcSet:Yn,onError:lo,alt:ao,crossOrigin:Zi});else if(xo)ar=oo;else if(zt)ar=zt;else if(kn||Oe!==1){const Ro=`scale(${Oe}) translateX(-50%)`,er={msTransform:Ro,WebkitTransform:Ro,transform:Ro},nr=typeof Fi=="number"?{lineHeight:`${Fi}px`}:{};ar=vt.createElement(xe.Z,{onResize:Co},vt.createElement("span",{className:`${Pi}-string`,ref:pi,style:Object.assign(Object.assign({},nr),er)},Ho))}else ar=vt.createElement("span",{className:`${Pi}-string`,style:{opacity:0},ref:pi},Ho);return delete xi.onError,delete xi.gap,Ni(vt.createElement("span",Object.assign({},xi,{style:Object.assign(Object.assign(Object.assign(Object.assign({},Qo),uo),Ui==null?void 0:Ui.style),xi.style),className:Uo,ref:tn}),ar))};var Bn=vt.forwardRef(Ke),dn=Pt(11592),In=Pt(60324),Ce=Pt(92343);const $n=ze=>{const{size:Ge,shape:Oe}=vt.useContext(Pe),un=vt.useMemo(()=>({size:ze.size||Ge,shape:ze.shape||Oe}),[ze.size,ze.shape,Ge,Oe]);return vt.createElement(Pe.Provider,{value:un},ze.children)};var jt=ze=>{const{getPrefixCls:Ge,direction:Oe}=vt.useContext(Se.E_),{prefixCls:un,className:kn,rootClassName:Tn,style:Rn,maxCount:ei,maxStyle:qe,size:pi,shape:tn,maxPopoverPlacement:Ci="top",maxPopoverTrigger:Ui="hover",children:$i}=ze,Co=Ge("avatar",un),lo=`${Co}-group`,[Si,ii]=pn(Co),Yi=Wt()(lo,{[`${lo}-rtl`]:Oe==="rtl"},kn,Tn,ii),oo=(0,dn.Z)($i).map((zt,Ai)=>(0,Ce.Tm)(zt,{key:`avatar-key-${Ai}`})),Yn=oo.length;if(ei&&ei<Yn){const zt=oo.slice(0,ei),Ai=oo.slice(ei,Yn);return zt.push(vt.createElement(In.Z,{key:"avatar-popover-key",content:Ai,trigger:Ui,placement:Ci,overlayClassName:`${lo}-popover`},vt.createElement(Bn,{style:qe},`+${Yn-ei}`))),Si(vt.createElement($n,{shape:tn,size:pi},vt.createElement("div",{className:Yi,style:Rn},zt)))}return Si(vt.createElement($n,{shape:tn,size:pi},vt.createElement("div",{className:Yi,style:Rn},oo)))};const Lt=Bn;Lt.Group=jt;var xt=Lt,Tt=function(ze,Ge){return Tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Oe,un){Oe.__proto__=un}||function(Oe,un){for(var kn in un)Object.prototype.hasOwnProperty.call(un,kn)&&(Oe[kn]=un[kn])},Tt(ze,Ge)};function Ft(ze,Ge){if(typeof Ge!="function"&&Ge!==null)throw new TypeError("Class extends value "+String(Ge)+" is not a constructor or null");Tt(ze,Ge);function Oe(){this.constructor=ze}ze.prototype=Ge===null?Object.create(Ge):(Oe.prototype=Ge.prototype,new Oe)}var yt=function(){return yt=Object.assign||function(Ge){for(var Oe,un=1,kn=arguments.length;un<kn;un++){Oe=arguments[un];for(var Tn in Oe)Object.prototype.hasOwnProperty.call(Oe,Tn)&&(Ge[Tn]=Oe[Tn])}return Ge},yt.apply(this,arguments)};function ee(ze,Ge){var Oe={};for(var un in ze)Object.prototype.hasOwnProperty.call(ze,un)&&Ge.indexOf(un)<0&&(Oe[un]=ze[un]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var kn=0,un=Object.getOwnPropertySymbols(ze);kn<un.length;kn++)Ge.indexOf(un[kn])<0&&Object.prototype.propertyIsEnumerable.call(ze,un[kn])&&(Oe[un[kn]]=ze[un[kn]]);return Oe}function pe(ze,Ge,Oe,un){var kn=arguments.length,Tn=kn<3?Ge:un===null?un=Object.getOwnPropertyDescriptor(Ge,Oe):un,Rn;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Tn=Reflect.decorate(ze,Ge,Oe,un);else for(var ei=ze.length-1;ei>=0;ei--)(Rn=ze[ei])&&(Tn=(kn<3?Rn(Tn):kn>3?Rn(Ge,Oe,Tn):Rn(Ge,Oe))||Tn);return kn>3&&Tn&&Object.defineProperty(Ge,Oe,Tn),Tn}function qt(ze,Ge){return function(Oe,un){Ge(Oe,un,ze)}}function Zt(ze,Ge,Oe,un,kn,Tn){function Rn(ii){if(ii!==void 0&&typeof ii!="function")throw new TypeError("Function expected");return ii}for(var ei=un.kind,qe=ei==="getter"?"get":ei==="setter"?"set":"value",pi=!Ge&&ze?un.static?ze:ze.prototype:null,tn=Ge||(pi?Object.getOwnPropertyDescriptor(pi,un.name):{}),Ci,Ui=!1,$i=Oe.length-1;$i>=0;$i--){var Co={};for(var lo in un)Co[lo]=lo==="access"?{}:un[lo];for(var lo in un.access)Co.access[lo]=un.access[lo];Co.addInitializer=function(ii){if(Ui)throw new TypeError("Cannot add initializers after decoration has completed");Tn.push(Rn(ii||null))};var Si=(0,Oe[$i])(ei==="accessor"?{get:tn.get,set:tn.set}:tn[qe],Co);if(ei==="accessor"){if(Si===void 0)continue;if(Si===null||typeof Si!="object")throw new TypeError("Object expected");(Ci=Rn(Si.get))&&(tn.get=Ci),(Ci=Rn(Si.set))&&(tn.set=Ci),(Ci=Rn(Si.init))&&kn.unshift(Ci)}else(Ci=Rn(Si))&&(ei==="field"?kn.unshift(Ci):tn[qe]=Ci)}pi&&Object.defineProperty(pi,un.name,tn),Ui=!0}function fe(ze,Ge,Oe){for(var un=arguments.length>2,kn=0;kn<Ge.length;kn++)Oe=un?Ge[kn].call(ze,Oe):Ge[kn].call(ze);return un?Oe:void 0}function ce(ze){return typeof ze=="symbol"?ze:"".concat(ze)}function ne(ze,Ge,Oe){return typeof Ge=="symbol"&&(Ge=Ge.description?"[".concat(Ge.description,"]"):""),Object.defineProperty(ze,"name",{configurable:!0,value:Oe?"".concat(Oe," ",Ge):Ge})}function Ne(ze,Ge){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(ze,Ge)}function hn(ze,Ge,Oe,un){function kn(Tn){return Tn instanceof Oe?Tn:new Oe(function(Rn){Rn(Tn)})}return new(Oe||(Oe=Promise))(function(Tn,Rn){function ei(tn){try{pi(un.next(tn))}catch(Ci){Rn(Ci)}}function qe(tn){try{pi(un.throw(tn))}catch(Ci){Rn(Ci)}}function pi(tn){tn.done?Tn(tn.value):kn(tn.value).then(ei,qe)}pi((un=un.apply(ze,Ge||[])).next())})}function an(ze,Ge){var Oe={label:0,sent:function(){if(Tn[0]&1)throw Tn[1];return Tn[1]},trys:[],ops:[]},un,kn,Tn,Rn;return Rn={next:ei(0),throw:ei(1),return:ei(2)},typeof Symbol=="function"&&(Rn[Symbol.iterator]=function(){return this}),Rn;function ei(pi){return function(tn){return qe([pi,tn])}}function qe(pi){if(un)throw new TypeError("Generator is already executing.");for(;Rn&&(Rn=0,pi[0]&&(Oe=0)),Oe;)try{if(un=1,kn&&(Tn=pi[0]&2?kn.return:pi[0]?kn.throw||((Tn=kn.return)&&Tn.call(kn),0):kn.next)&&!(Tn=Tn.call(kn,pi[1])).done)return Tn;switch(kn=0,Tn&&(pi=[pi[0]&2,Tn.value]),pi[0]){case 0:case 1:Tn=pi;break;case 4:return Oe.label++,{value:pi[1],done:!1};case 5:Oe.label++,kn=pi[1],pi=[0];continue;case 7:pi=Oe.ops.pop(),Oe.trys.pop();continue;default:if(Tn=Oe.trys,!(Tn=Tn.length>0&&Tn[Tn.length-1])&&(pi[0]===6||pi[0]===2)){Oe=0;continue}if(pi[0]===3&&(!Tn||pi[1]>Tn[0]&&pi[1]<Tn[3])){Oe.label=pi[1];break}if(pi[0]===6&&Oe.label<Tn[1]){Oe.label=Tn[1],Tn=pi;break}if(Tn&&Oe.label<Tn[2]){Oe.label=Tn[2],Oe.ops.push(pi);break}Tn[2]&&Oe.ops.pop(),Oe.trys.pop();continue}pi=Ge.call(ze,Oe)}catch(tn){pi=[6,tn],kn=0}finally{un=Tn=0}if(pi[0]&5)throw pi[1];return{value:pi[0]?pi[1]:void 0,done:!0}}}var _e=Object.create?function(ze,Ge,Oe,un){un===void 0&&(un=Oe);var kn=Object.getOwnPropertyDescriptor(Ge,Oe);(!kn||("get"in kn?!Ge.__esModule:kn.writable||kn.configurable))&&(kn={enumerable:!0,get:function(){return Ge[Oe]}}),Object.defineProperty(ze,un,kn)}:function(ze,Ge,Oe,un){un===void 0&&(un=Oe),ze[un]=Ge[Oe]};function En(ze,Ge){for(var Oe in ze)Oe!=="default"&&!Object.prototype.hasOwnProperty.call(Ge,Oe)&&_e(Ge,ze,Oe)}function Ln(ze){var Ge=typeof Symbol=="function"&&Symbol.iterator,Oe=Ge&&ze[Ge],un=0;if(Oe)return Oe.call(ze);if(ze&&typeof ze.length=="number")return{next:function(){return ze&&un>=ze.length&&(ze=void 0),{value:ze&&ze[un++],done:!ze}}};throw new TypeError(Ge?"Object is not iterable.":"Symbol.iterator is not defined.")}function ye(ze,Ge){var Oe=typeof Symbol=="function"&&ze[Symbol.iterator];if(!Oe)return ze;var un=Oe.call(ze),kn,Tn=[],Rn;try{for(;(Ge===void 0||Ge-- >0)&&!(kn=un.next()).done;)Tn.push(kn.value)}catch(ei){Rn={error:ei}}finally{try{kn&&!kn.done&&(Oe=un.return)&&Oe.call(un)}finally{if(Rn)throw Rn.error}}return Tn}function on(){for(var ze=[],Ge=0;Ge<arguments.length;Ge++)ze=ze.concat(ye(arguments[Ge]));return ze}function Pn(){for(var ze=0,Ge=0,Oe=arguments.length;Ge<Oe;Ge++)ze+=arguments[Ge].length;for(var un=Array(ze),kn=0,Ge=0;Ge<Oe;Ge++)for(var Tn=arguments[Ge],Rn=0,ei=Tn.length;Rn<ei;Rn++,kn++)un[kn]=Tn[Rn];return un}function Cn(ze,Ge,Oe){if(Oe||arguments.length===2)for(var un=0,kn=Ge.length,Tn;un<kn;un++)(Tn||!(un in Ge))&&(Tn||(Tn=Array.prototype.slice.call(Ge,0,un)),Tn[un]=Ge[un]);return ze.concat(Tn||Array.prototype.slice.call(Ge))}function An(ze){return this instanceof An?(this.v=ze,this):new An(ze)}function Jn(ze,Ge,Oe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var un=Oe.apply(ze,Ge||[]),kn,Tn=[];return kn={},Rn("next"),Rn("throw"),Rn("return"),kn[Symbol.asyncIterator]=function(){return this},kn;function Rn(Ui){un[Ui]&&(kn[Ui]=function($i){return new Promise(function(Co,lo){Tn.push([Ui,$i,Co,lo])>1||ei(Ui,$i)})})}function ei(Ui,$i){try{qe(un[Ui]($i))}catch(Co){Ci(Tn[0][3],Co)}}function qe(Ui){Ui.value instanceof An?Promise.resolve(Ui.value.v).then(pi,tn):Ci(Tn[0][2],Ui)}function pi(Ui){ei("next",Ui)}function tn(Ui){ei("throw",Ui)}function Ci(Ui,$i){Ui($i),Tn.shift(),Tn.length&&ei(Tn[0][0],Tn[0][1])}}function ui(ze){var Ge,Oe;return Ge={},un("next"),un("throw",function(kn){throw kn}),un("return"),Ge[Symbol.iterator]=function(){return this},Ge;function un(kn,Tn){Ge[kn]=ze[kn]?function(Rn){return(Oe=!Oe)?{value:An(ze[kn](Rn)),done:!1}:Tn?Tn(Rn):Rn}:Tn}}function ni(ze){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Ge=ze[Symbol.asyncIterator],Oe;return Ge?Ge.call(ze):(ze=typeof Ln=="function"?Ln(ze):ze[Symbol.iterator](),Oe={},un("next"),un("throw"),un("return"),Oe[Symbol.asyncIterator]=function(){return this},Oe);function un(Tn){Oe[Tn]=ze[Tn]&&function(Rn){return new Promise(function(ei,qe){Rn=ze[Tn](Rn),kn(ei,qe,Rn.done,Rn.value)})}}function kn(Tn,Rn,ei,qe){Promise.resolve(qe).then(function(pi){Tn({value:pi,done:ei})},Rn)}}function fi(ze,Ge){return Object.defineProperty?Object.defineProperty(ze,"raw",{value:Ge}):ze.raw=Ge,ze}var Bi=Object.create?function(ze,Ge){Object.defineProperty(ze,"default",{enumerable:!0,value:Ge})}:function(ze,Ge){ze.default=Ge};function Ti(ze){if(ze&&ze.__esModule)return ze;var Ge={};if(ze!=null)for(var Oe in ze)Oe!=="default"&&Object.prototype.hasOwnProperty.call(ze,Oe)&&_e(Ge,ze,Oe);return Bi(Ge,ze),Ge}function Di(ze){return ze&&ze.__esModule?ze:{default:ze}}function io(ze,Ge,Oe,un){if(Oe==="a"&&!un)throw new TypeError("Private accessor was defined without a getter");if(typeof Ge=="function"?ze!==Ge||!un:!Ge.has(ze))throw new TypeError("Cannot read private member from an object whose class did not declare it");return Oe==="m"?un:Oe==="a"?un.call(ze):un?un.value:Ge.get(ze)}function to(ze,Ge,Oe,un,kn){if(un==="m")throw new TypeError("Private method is not writable");if(un==="a"&&!kn)throw new TypeError("Private accessor was defined without a setter");if(typeof Ge=="function"?ze!==Ge||!kn:!Ge.has(ze))throw new TypeError("Cannot write private member to an object whose class did not declare it");return un==="a"?kn.call(ze,Oe):kn?kn.value=Oe:Ge.set(ze,Oe),Oe}function Ri(ze,Ge){if(Ge===null||typeof Ge!="object"&&typeof Ge!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof ze=="function"?Ge===ze:ze.has(Ge)}var Qi={__extends:Ft,__assign:yt,__rest:ee,__decorate:pe,__param:qt,__metadata:Ne,__awaiter:hn,__generator:an,__createBinding:_e,__exportStar:En,__values:Ln,__read:ye,__spread:on,__spreadArrays:Pn,__spreadArray:Cn,__await:An,__asyncGenerator:Jn,__asyncDelegator:ui,__asyncValues:ni,__makeTemplateObject:fi,__importStar:Ti,__importDefault:Di,__classPrivateFieldGet:io,__classPrivateFieldSet:to,__classPrivateFieldIn:Ri},Zn=Pt(12378);var Mt=function(ze){Ft(Ge,ze);function Ge(Oe){var un=ze.call(this,Oe)||this;return un.wasCleared=!1,un.modelChangedListener=null,un.divRef=vt.createRef(),un}return Ge.prototype.getDiagram=function(){return this.divRef.current===null?null:Zn.S0.fromDiv(this.divRef.current)},Ge.prototype.clear=function(){var Oe=this.getDiagram();Oe!==null&&(Oe.clear(),this.wasCleared=!0)},Ge.prototype.componentDidMount=function(){var Oe=this;if(this.divRef.current!==null){var un=this.props.initDiagram();un.div=this.divRef.current,this.modelChangedListener=function(kn){if(kn.isTransactionFinished&&kn.model&&!kn.model.isReadOnly&&Oe.props.onModelChange){var Tn=kn.model.toIncrementalData(kn);Tn!==null&&Oe.props.onModelChange(Tn)}},un.addModelChangedListener(this.modelChangedListener),un.delayInitialization(function(){Oe.mergeData(un,!0)})}},Ge.prototype.componentWillUnmount=function(){var Oe=this.getDiagram();Oe!==null&&(Oe.div=null,this.modelChangedListener!==null&&(Oe.removeModelChangedListener(this.modelChangedListener),this.modelChangedListener=null))},Ge.prototype.shouldComponentUpdate=function(Oe,un){return Oe.divClassName!==this.props.divClassName||Oe.style!==this.props.style?!0:!(Oe.skipsDiagramUpdate||Oe.nodeDataArray===this.props.nodeDataArray&&Oe.linkDataArray===this.props.linkDataArray&&Oe.modelData===this.props.modelData)},Ge.prototype.componentDidUpdate=function(Oe,un){var kn=this;if(!(Oe.nodeDataArray===this.props.nodeDataArray&&Oe.linkDataArray===this.props.linkDataArray&&Oe.modelData===this.props.modelData)){var Tn=this.getDiagram();Tn!==null&&(this.wasCleared?Tn.delayInitialization(function(){kn.mergeData(Tn,!0),kn.wasCleared=!1}):this.mergeData(Tn,!1))}},Ge.prototype.mergeData=function(Oe,un){var kn=this,Tn=Oe.model;Tn.commit(function(Rn){kn.props.modelData!==void 0&&Rn.assignAllDataProperties(Rn.modelData,kn.props.modelData),Rn.mergeNodeDataArray(kn.props.nodeDataArray),kn.props.linkDataArray!==void 0&&Rn instanceof Zn.FJ&&Rn.mergeLinkDataArray(kn.props.linkDataArray)},un?"initial merge":"merge data")},Ge.prototype.render=function(){return vt.createElement("div",{ref:this.divRef,className:this.props.divClassName,style:this.props.style})},Ge}(vt.Component),so=function(ze){Ft(Ge,ze);function Ge(Oe){var un=ze.call(this,Oe)||this;return un.divRef=vt.createRef(),un}return Ge.prototype.getOverview=function(){return this.divRef.current===null?null:Zn.S0.fromDiv(this.divRef.current)},Ge.prototype.componentDidMount=function(){if(this.divRef.current!==null){var Oe;this.props.initOverview!==void 0?Oe=this.props.initOverview():(Oe=new Zn.g2,Oe.contentAlignment=Zn.z6.Center),Oe.div=this.divRef.current,Oe.observed=this.props.observedDiagram}},Ge.prototype.componentWillUnmount=function(){var Oe=this.getOverview();Oe!==null&&(Oe.div=null,Oe.observed=null)},Ge.prototype.shouldComponentUpdate=function(Oe,un){return Oe.divClassName!==this.props.divClassName||Oe.style!==this.props.style?!0:Oe.observedDiagram!==this.props.observedDiagram},Ge.prototype.componentDidUpdate=function(Oe,un){if(Oe.observedDiagram!==this.props.observedDiagram){var kn=this.getOverview();kn!==null&&(kn.observed=this.props.observedDiagram)}},Ge.prototype.render=function(){return vt.createElement("div",{ref:this.divRef,className:this.props.divClassName,style:this.props.style})},Ge}(vt.Component),Ii=function(ze){Ft(Ge,ze);function Ge(Oe){var un=ze.call(this,Oe)||this;return un.wasCleared=!1,un.divRef=vt.createRef(),un}return Ge.prototype.getPalette=function(){return this.divRef.current===null?null:Zn.S0.fromDiv(this.divRef.current)},Ge.prototype.clear=function(){var Oe=this.getPalette();Oe!==null&&(Oe.clear(),this.wasCleared=!0)},Ge.prototype.componentDidMount=function(){var Oe=this;if(this.divRef.current!==null){var un=this.props.initPalette();un.div=this.divRef.current,un.delayInitialization(function(){Oe.mergeData(un,!0)})}},Ge.prototype.componentWillUnmount=function(){var Oe=this.getPalette();Oe!==null&&(Oe.div=null)},Ge.prototype.shouldComponentUpdate=function(Oe,un){return Oe.divClassName!==this.props.divClassName||Oe.style!==this.props.style?!0:!(Oe.nodeDataArray===this.props.nodeDataArray&&Oe.linkDataArray===this.props.linkDataArray&&Oe.modelData===this.props.modelData)},Ge.prototype.componentDidUpdate=function(Oe,un){var kn=this;if(!(Oe.nodeDataArray===this.props.nodeDataArray&&Oe.linkDataArray===this.props.linkDataArray&&Oe.modelData===this.props.modelData)){var Tn=this.getPalette();Tn!==null&&(this.wasCleared?Tn.delayInitialization(function(){kn.mergeData(Tn,!0),kn.wasCleared=!1}):this.mergeData(Tn,!1))}},Ge.prototype.mergeData=function(Oe,un){var kn=this,Tn=Oe.model;Tn.commit(function(Rn){kn.props.modelData!==void 0&&Rn.assignAllDataProperties(Rn.modelData,kn.props.modelData),Rn.mergeNodeDataArray(kn.props.nodeDataArray),kn.props.linkDataArray!==void 0&&Rn instanceof Zn.FJ&&Rn.mergeLinkDataArray(kn.props.linkDataArray)},un?"initial merge":"merge data")},Ge.prototype.render=function(){return vt.createElement("div",{ref:this.divRef,className:this.props.divClassName,style:this.props.style})},Ge}(vt.Component),Wi=Pt(4901),ki={flex_box_center:"flex_box_center___dw6yv",flex_space_between:"flex_space_between___bkc32",flex_box_vertical_center:"flex_box_vertical_center___jDpm2",flex_box_center_end:"flex_box_center_end___g9JOB",flex_box_column:"flex_box_column___ngIjI","diagram-component":"diagram-component___fHDp0",rightmodal:"rightmodal___Fwj_F",title:"title___YZZgl",button:"button___yQKxh",linetitles:"linetitles___CFVw5",line:"line___hSEjG",additem:"additem___cy1wv",lebels:"lebels___E2znG",describe:"describe___emw2X",describetitle:"describetitle___bgNOs",ehover:"ehover____RCDx",dhover:"dhover___IP_3b",header:"header___PCDQg",headeractivite:"headeractivite___x56tJ",a:"a___QYqeC"},Bo=Pt(8797),Mo=Pt(3294),ai=Pt(12911),di=Pt.n(ai),Ae=Pt(26724),Be=Pt.n(Ae),_t=Object.defineProperty,Je=Object.defineProperties,cn=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,yn=(ze,Ge,Oe)=>Ge in ze?_t(ze,Ge,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):ze[Ge]=Oe,Nn=(ze,Ge)=>{for(var Oe in Ge||(Ge={}))ie.call(Ge,Oe)&&yn(ze,Oe,Ge[Oe]);if(ve)for(var Oe of ve(Ge))Qe.call(Ge,Oe)&&yn(ze,Oe,Ge[Oe]);return ze},_n=(ze,Ge)=>Je(ze,cn(Ge)),le=(ze,Ge,Oe)=>new Promise((un,kn)=>{var Tn=qe=>{try{ei(Oe.next(qe))}catch(pi){kn(pi)}},Rn=qe=>{try{ei(Oe.throw(qe))}catch(pi){kn(pi)}},ei=qe=>qe.done?un(qe.value):Promise.resolve(qe.value).then(Tn,Rn);ei((Oe=Oe.apply(ze,Ge)).next())});class mn extends Zn.hD{isFixed(Ge){return Ge.node.isSelected}doLayout(Ge){this._isObserving||(this._isObserving=!0,this.diagram.addModelChangedListener(un=>{(un.modelChange!==""||un.change===Zn.Vk.Transaction&&un.propertyName==="StartingFirstTransaction")&&(this.network=null)}));var Oe=this.network;Oe===null?this.network=Oe=this.makeNetwork(Ge):this.diagram.nodes.each(un=>{var kn=Oe.findVertex(un);kn!==null&&(kn.bounds=un.actualBounds)}),super.doLayout(Ge),this.network=Oe}}let Gn=["\u6839\u8282\u70B9","\u7AE0\u8282\u77E5\u8BC6\u5355\u5143","\u8D44\u6E90\u77E5\u8BC6\u5355\u5143","\u77E5\u8BC6\u70B9"],si=["#3CDAA3","#30A7F1","#F84F90","#6656FF"],Re=[{name:"\u5B9E\u8BAD",type:"Shixun"},{name:"\u8BFE\u4EF6",type:"Attachment"},{name:"\u89C6\u9891",type:"VideoItem"},{name:"\u8003\u8BD5",type:"ExaminationBank"},{name:"\u4F5C\u4E1A",type:"SubjectHomework"},{name:"\u7EC3\u4E60",type:"Practice"},{name:"\u6587\u672C",type:"Text"}];const fn=({globalSetting:ze,dispatch:Ge,virtualSpaces:Oe})=>{var un,kn,Tn,Rn;const ei=(0,It.useParams)(),qe=(0,vt.useRef)(),[pi,tn]=(0,vt.useState)(!1),[Ci,Ui]=(0,vt.useState)(!1),[$i,Co]=(0,vt.useState)(!1),[lo,Si]=(0,vt.useState)(!1),[ii,Yi]=(0,vt.useState)(!0),[oo,Yn]=(0,vt.useState)(!1);let[zt,Ai]=(0,vt.useState)({});const[vo]=oe.default.useForm(),[ao,Eo]=(0,vt.useState)(!1),[Ho,Zi]=(0,vt.useState)(!0),[xi,Fi]=(0,vt.useState)({index:"",name:"",add:!1});let[Mi,co]=(0,vt.useState)({});const uo=(0,vt.useRef)(null),[Pi,Ni]=(0,vt.useState)(!1),[Wn,zi]=(0,vt.useState)(!1),[xo,Ko]=(0,vt.useState)([]),[Uo,Qo]=(0,vt.useState)([]),[ar,Ro]=(0,vt.useState)([]),[er,nr]=(0,vt.useState)(""),[qr,sn]=(0,vt.useState)(!0),[wr,Sa]=(0,vt.useState)(),[Cs,jo]=(0,vt.useState)([]),[Lo,vr]=(0,vt.useState)(!1),[Xo,bo]=(0,vt.useState)(!1),Ao=(0,vt.useRef)(),ur=(0,vt.useRef)(),[no,ko]=(0,vt.useState)(!1),[No,mi]=(0,vt.useState)({left:0,top:0,bottom:0,right:0}),Fr=(0,vt.useRef)(null),{virtualSpacesDetails:Or}=Oe,jr=(Or==null?void 0:Or.is_member)||(0,et.Ny)(),[xa,Ta]=(0,vt.useState)(!1),[ri,hr]=(0,vt.useState)(!1),[Dr,Js]=(0,vt.useState)([]),[Nl,sa]=(0,vt.useState)(!1),[po,hu]=(0,vt.useState)(1),[Gs,bs]=(0,vt.useState)(!1),Ws=(qn,li)=>{var Vi;const{clientWidth:wi,clientHeight:Hi}=window.document.documentElement,Fo=(Vi=Fr.current)==null?void 0:Vi.getBoundingClientRect();mi({left:-Fo.left+li.x,right:wi-(Fo.right-li.x),top:-Fo.top+li.y,bottom:Hi-(Fo.bottom-li.y)-70})};let[Tl,vl]=(0,vt.useState)(600);(0,vt.useEffect)(()=>{co({}),hs()},[ei,ii]),(0,vt.useEffect)(()=>{Ks(),Jt.ZP.config({getContainer:()=>uo.current,top:100})},[]);const Ks=()=>{if(ur.current)return;const qn=Zn.bx.make;var li=new Zn.S0("myDiagramDiv",{"commandHandler.copiesTree":!1,"commandHandler.copiesParentKey":!1,"commandHandler.deletesTree":!1,"draggingTool.dragsTree":!1,"undoManager.isEnabled":!1,doubleClick:!1});ur.current=li;var Vi=Zn.bx.make(Zn.FF);Vi.angle=0,Vi.arrangement=Zn.FF.ArrangementFixedRoots,li.layout=Vi,li.nodeTemplate=qn(Zn.NB,"Vertical",{selectionObjectName:"TEXT"},qn(Zn.al,{name:"TEXT",minSize:new Zn.$u(30,15)},new Zn.KX("text","text").makeTwoWay(),new Zn.KX("scale","scale").makeTwoWay(),new Zn.KX("font","font").makeTwoWay()),qn(Zn.bn,"LineH",{stretch:Zn.bx.Horizontal,strokeWidth:3,height:3,portId:"",fromSpot:Zn.z6.LeftRightSides,toSpot:Zn.z6.LeftRightSides},new Zn.KX("stroke","brush"),new Zn.KX("fromSpot","dir",Hi=>$a(Hi,!0)),new Zn.KX("toSpot","dir",Hi=>$a(Hi,!1))),new Zn.KX("location","loc",Zn.E9.parse).makeTwoWay(Zn.E9.stringify),new Zn.KX("locationSpot","dir",Hi=>$a(Hi,!1)),{click(Hi,Fo){hr(!1),Ai(Fo==null?void 0:Fo.data),mi({left:0,top:0,bottom:0,right:0})}}),li.allowDoubleClick=!1,li.allowSelect="single",li.commandHandler.canDeleteSelection=!1,li.commandHandler.canUndo=!1;const wi=li.toolManager.clickSelectingTool;wi.canStartMulti=!1,li.linkTemplate=qn(Zn.rU,{curve:Zn.rU.Bezier,fromShortLength:-2,toShortLength:-2,selectable:!1},qn(Zn.bn,{strokeWidth:3},new Zn.KX("stroke","toNode",Hi=>Hi.data.brush?Hi.data.brush:"black").ofObject()))};function aa(qn,li){var Vi=qn.findNodeForKey(li);if(Vi!==null){qn.startTransaction("Layout");var wi=new Zn.l4,Hi=new Zn.l4;Vi.findLinksConnected().each(Fo=>{var lr=Fo.toNode;lr.data.dir==="left"?(Hi.add(Vi),Hi.add(Fo),Hi.addAll(lr.findTreeParts())):(wi.add(Vi),wi.add(Fo),wi.addAll(lr.findTreeParts()))}),Kl(wi,0),Kl(Hi,180),qn.commitTransaction("Layout")}}function Kl(qn,li){var Vi=Zn.bx.make(Zn.FF,{angle:li,arrangement:Zn.FF.ArrangementFixedRoots,nodeSpacing:5,layerSpacing:20,setsPortSpot:!1,setsChildPortSpot:!1});Vi.doLayout(qn)}function Du(qn){var li;const Vi=(li=qn==null?void 0:qn[0])==null?void 0:li.id;let wi=0;ur.current.model=Zn.Hn.fromJson(JSON.stringify({class:"go.TreeModel",nodeDataArray:qn.map(Hi=>(Hi.parent==Vi&&(wi%2===0?Hi.dir="left":Hi.dir="right",++wi),Hi.brush=Hi.unit_type===0?"#3CDAA3":[1,2,5,6,7,8].includes(Hi.unit_type)?"#F84F90":Hi.unit_type===3?"#30A7F1":"#6656FF",Hi))})),aa(ur.current,Vi)}function hs(){return le(this,null,function*(){var qn,li;let Vi=ii?"/api/knowledge_graphs/tree.json":"/api/knowledge_graphs/map.json",wi=yield(0,te.ZP)(Vi,{method:"get",params:{type:2,identifier:ei.virtual_spacesId,type:2,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}});if(wi.status===0){let Hi=(qn=wi==null?void 0:wi.nodeData)==null?void 0:qn.map((lr,fr)=>_n(Nn({},lr),{bgcolor:lr.unit_type===0?"#3CDAA3":[1,2,5,6,7,8].includes(lr.unit_type)?"#F84F90":lr.unit_type===3?"#30A7F1":"#6656FF",parent:lr.parent_id}));co(_n(Nn({},wi),{nodeData:Hi})),ii?(Du(Hi),setTimeout(()=>{Qs()},300)):Qs();let Fo=(li=wi==null?void 0:wi.nodeData)==null?void 0:li.filter(lr=>lr.id===zt.id);(Fo==null?void 0:Fo.length)>0&&Ai(Nn({},Fo==null?void 0:Fo[0]))}})}const xh={onRemove:()=>{Ko([])},beforeUpload:qn=>{if(console.log(qn),(qn==null?void 0:qn.size)>1024*1024*50)return Jt.ZP.info("\u6587\u4EF6\u8D85\u8FC750M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;let li=[];return li.push(qn),Ko([...li]),!1},fileList:xo,accept:".xls,.xlsx"},$l=(0,vt.useMemo)(()=>{const qn=li=>li.map(Vi=>{const wi=Vi.title,Hi=wi.indexOf(er),Fo=wi.substring(0,Hi),lr=wi.slice(Hi+er.length),fr=Hi>-1?vt.createElement("span",null,Fo,vt.createElement("span",{style:{color:"#f50"}},er),lr):vt.createElement("span",null,wi);return Vi.children?{title:fr,key:Vi.key,children:qn(Vi.children)}:{title:fr,key:Vi.key}});return qn(Uo)},[er,Uo]);function du(){const qn=Zn.bx.make,li=qn(Zn.S0,{allowSelect:!1,"undoManager.isEnabled":!0,initialAutoScale:Zn.S0.Uniform,contentAlignment:Zn.z6.Center,layout:qn(mn,{defaultSpringLength:30,defaultElectricalCharge:100}),SelectionMoved:wi=>wi.diagram.layout.invalidateLayout(),model:qn(Zn.FJ,{linkKeyProperty:"key",makeUniqueKeyFunction:(wi,Hi)=>{let Fo=Hi.key||1;for(;wi.findNodeDataForKey(Fo);)Fo++;return Hi.key=Fo,Fo},makeUniqueLinkKeyFunction:(wi,Hi)=>{let Fo=Hi.key||-1;for(;wi.findLinkDataForKey(Fo);)Fo--;return Hi.key=Fo,Fo}})});li.toolManager.draggingTool.doMouseMove=function(){Zn.h1.prototype.doMouseMove.call(this),this.isActive&&this.diagram.layout.doLayout(!0)},li.nodeTemplate=qn(Zn.NB,"Auto",{minSize:new Zn.$u(100,100)},qn(Zn.bn,"Circle",{stroke:"white",spot1:new Zn.z6(0,0,5,5),spot2:new Zn.z6(1,1,-5,-5)},new Zn.KX("fill","bgcolor")),qn(Zn.al,{font:"bold 10pt helvetica, bold arial, sans-serif",stroke:"white",textAlign:"center",maxSize:new Zn.$u(100,NaN)},new Zn.KX("text","text")),{click(wi,Hi){hr(!1),Ai(Hi==null?void 0:Hi.data),mi({left:0,top:0,bottom:0,right:0})}}),li.linkTemplate=qn(Zn.rU,{layerName:"Background"},qn(Zn.bn,{stroke:"black"}),qn(Zn.bn,{toArrow:"standard",stroke:null}),qn(Zn.s_,"Auto",qn(Zn.bn,{fill:qn(Zn.BD,"Radial",{0:"rgb(240, 240, 240)",.3:"rgb(240, 240, 240)",1:"rgba(240, 240, 240, 0)"}),stroke:null}),qn(Zn.al,{textAlign:"center",font:"10pt helvetica, arial, sans-serif",stroke:"#555555",margin:4},new Zn.KX("text","text")))),li.doubleClick=!1,li.allowDoubleClick=!1,li.allowSelect="single",li.commandHandler.canDeleteSelection=!1,li.commandHandler.canUndo=!1,li.allowInsert=!1;const Vi=li.toolManager.clickSelectingTool;return Vi.canStartMulti=!1,Ao.current=li,li}function $a(qn,li){return qn==="left"?li?Zn.z6.Left:Zn.z6.Right:li?Zn.z6.Right:Zn.z6.Left}function Qs(){var qn,li,Vi,wi;vl(600),(li=(qn=ur.current)==null?void 0:qn.zoomToFit)==null||li.call(qn),(wi=(Vi=Ao.current)==null?void 0:Vi.zoomToFit)==null||wi.call(Vi)}return vt.createElement("div",{ref:uo,style:{paddingBottom:20,background:"#FFF",position:"relative",height:"100vh"}},vt.createElement(Ut.Z,{spinning:oo},(Mi==null?void 0:Mi.is_root)&&vt.createElement(Bo.Z,{ButtonClick:()=>le(void 0,null,function*(){Yn(!0);let qn=yield(0,te.ZP)("/api/knowledge_graphs/set_root.json",{method:"post",body:{type:2,identifier:ei.virtual_spacesId,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}});Yn(!1),qn.status===0&&hs()}),buttonProps:{type:"primary"},ButtonText:jr&&"\u65B0\u589E\u8282\u70B9",ButtonTwo:jr&&vt.createElement(ht.ZP,{style:{marginLeft:20},onClick:()=>{zi(!0)},type:"primary"},"\u6587\u4EF6\u5BFC\u5165"),styles:{margin:"auto",paddingTop:100}}),!(Mi!=null&&Mi.is_root)&&vt.createElement("div",{style:{height:60,border:"1px solid #e7e7e7",display:"flex"}},vt.createElement("div",{onClick:()=>{Yi(!0),Ai({})},className:ii?ki.headeractivite:ki.header},vt.createElement("div",null," ",vt.createElement("i",{className:"iconfont icon-zhishishu"})),vt.createElement("div",null,"\u77E5\u8BC6\u6811")),vt.createElement("div",{onClick:()=>{Yi(!1),Ai({})},className:ii?ki.header:ki.headeractivite},vt.createElement("div",null," ",vt.createElement("i",{className:"iconfont icon-guanxitu"})),vt.createElement("div",null,"\u5173\u7CFB\u56FE")),vt.createElement("div",{onClick:()=>{var qn,li,Vi,wi,Hi=ii?ur.current.viewportBounds.width:Ao.current.viewportBounds.width,Fo=ii?ur.current.viewportBounds.height:Ao.current.viewportBounds.height;(li=(qn=ur.current)==null?void 0:qn.zoomToRect)==null||li.call(qn,new Zn.UL(1,1,Hi/1.1,Fo/1.1)),(wi=(Vi=Ao.current)==null?void 0:Vi.zoomToRect)==null||wi.call(Vi,new Zn.UL(1,1,Hi/1.1,Fo/1.1))},className:ki.header},vt.createElement("div",null," ",vt.createElement("i",{className:"iconfont icon-fangda3"})),vt.createElement("div",null,"\u653E\u5927")),vt.createElement("div",{onClick:()=>{var qn,li,Vi,wi,Hi=ii?ur.current.viewportBounds.width:Ao.current.viewportBounds.width,Fo=ii?ur.current.viewportBounds.height:Ao.current.viewportBounds.height;(li=(qn=ur.current)==null?void 0:qn.zoomToRect)==null||li.call(qn,new Zn.UL(1,1,Hi*1.1,Fo*1.1)),(wi=(Vi=Ao.current)==null?void 0:Vi.zoomToRect)==null||wi.call(Vi,new Zn.UL(1,1,Hi*1.1,Fo*1.1))},className:ki.header},vt.createElement("div",null," ",vt.createElement("i",{className:"iconfont icon-suoxiao3"})),vt.createElement("div",null,"\u7F29\u5C0F")),vt.createElement("div",{onClick:()=>{var qn,li,Vi,wi;vl(600),(li=(qn=ur.current)==null?void 0:qn.zoomToFit)==null||li.call(qn),(wi=(Vi=Ao.current)==null?void 0:Vi.zoomToFit)==null||wi.call(Vi)},className:ki.header},vt.createElement("div",null," ",vt.createElement("i",{className:"iconfont icon-zishiying"})),vt.createElement("div",null,"\u6700\u4F73\u9002\u5E94")),vt.createElement("div",{onClick:()=>le(void 0,null,function*(){var qn;bo(!0);let li=yield(0,te.ZP)("/api/knowledge_graphs.json",{method:"get",params:{type:2,identifier:ei.virtual_spacesId}});li.status===0&&(jo(li==null?void 0:li.list),Qo(li==null?void 0:li.knowledge_graphs),Ro((qn=li==null?void 0:li.list)==null?void 0:qn.map(Vi=>Vi.key)))}),className:ki.header},vt.createElement("div",null," ",vt.createElement("i",{className:"iconfont icon-chazhao"})),vt.createElement("div",null,"\u67E5\u627E")),jr&&vt.createElement("div",{onClick:()=>{zi(!0)},className:ki.header},vt.createElement("div",null," ",vt.createElement("i",{className:"iconfont icon-daoru"})),vt.createElement("div",null,"\u5BFC\u5165")),vt.createElement("div",{style:{flex:1,textAlign:"end",lineHeight:"60px"}},jr&&vt.createElement(at.Z,{title:"\u5386\u53F2\u8BB0\u5F55"},vt.createElement("i",{className:`iconfont icon-lishijilu ${ki.ehover}`,onClick:()=>le(void 0,null,function*(){var qn;let li=yield(0,te.ZP)("/api/knowledge_graphs/history.json",{method:"get",params:{identifier:ei.virtual_spacesId,limit:10,type:2,page:po}});li.status===0&&(bs(!0),((qn=li==null?void 0:li.histories)==null?void 0:qn.length)<10&&sa(!1),Js(li==null?void 0:li.histories))}),style:{marginRight:30}})),jr&&vt.createElement(at.Z,{title:"\u6E05\u7A7A\u6240\u6709\u6570\u636E",getPopupContainer:()=>uo.current},vt.createElement("i",{onClick:()=>{de.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,getContainer:()=>uo.current,content:"\u8BF7\u786E\u5B9A\u662F\u5426\u5C06\u77E5\u8BC6\u56FE\u8C31\u6240\u6709\u7684\u6570\u636E\u6E05\u7A7A\uFF0C\u6062\u590D\u7A7A\u72B6\u6001\uFF0C\u6E05\u7A7A\u540E\u6570\u636E\u4E0D\u53EF\u6062\u590D\uFF01\u672C\u6B21\u6E05\u7A7A\u4E0D\u4F1A\u5F71\u54CD\u5230\u8BFE\u7A0B\u7AE0\u8282\u5185\u5BB9\uFF0C\u4EC5\u4F5C\u7528\u4E8E\u77E5\u8BC6\u56FE\u8C31\u7684\u6570\u636E\u3002",onOk:()=>le(void 0,null,function*(){(yield(0,te.ZP)("/api/knowledge_graphs/delete_all.json",{method:"DELETE",body:{type:2,identifier:ei.virtual_spacesId,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}})).status===0&&(hs(),Ai({}))})})},className:`iconfont icon-shanchu14 ${ki.dhover}`})),jr&&vt.createElement(at.Z,{title:"\u540C\u6B65\u8BFE\u7A0B\u77E5\u8BC6\u7ED3\u6784",getPopupContainer:()=>uo.current},vt.createElement("i",{onClick:()=>{de.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,getContainer:()=>uo.current,content:"\u8BF7\u786E\u5B9A\u662F\u5426\u5C06\u540C\u6B65\u8BFE\u7A0B\u77E5\u8BC6\u7ED3\u6784\uFF0C\u66F4\u65B0\u540E\u539F\u6709\u77E5\u8BC6\u7ED3\u6784\u5C06\u88AB\u8986\u76D6\uFF0C\u8986\u76D6\u540E\u4E0D\u53EF\u64A4\u9500\u6062\u590D\u3002",onOk:()=>le(void 0,null,function*(){Yn(!0);let qn=yield(0,te.ZP)("/api/knowledge_graphs/sync.json",{method:"post",body:{identifier:ei.pathId,type:2}});Yn(!1),qn.status===0&&hs()})})},style:{margin:"0px 30px"},className:`iconfont icon-jiazai_shuaxin_o ${ki.ehover}`})),jr&&vt.createElement(ft.Z,{getPopupContainer:()=>uo.current,menu:{items:[{key:"1",style:{width:100},label:vt.createElement("a",{href:`${Mo.Z.API_SERVER}/api/knowledge_graphs/export.xlsx?identifier=${ei.virtual_spacesId}&type=2`},"\u5BFC\u51FAExcel")},{key:"2",label:vt.createElement("a",{href:`${Mo.Z.API_SERVER}/api/knowledge_graphs/export.json?identifier=${ei.virtual_spacesId}&type=2`},"\u5BFC\u51FAWord")}]}},vt.createElement("i",{className:`iconfont icon-xiazai6 ${ki.ehover}`})),vt.createElement("i",{onClick:()=>{(0,Wi.vp)()?(Ni(!1),(0,Wi.BU)()):(Ni(!0),(0,Wi.Dj)(uo.current)),Qs()},style:{marginLeft:30,marginRight:20},className:`iconfont ${Pi?"icon-tuichuquanping3":"icon-quanping4"} ${ki.ehover}`}))),vt.createElement("div",{className:"relative"},!ii&&vt.createElement(Mt,{ref:qe,divClassName:"diagram-component",style:{backgroundColor:"#fff",height:Pi?"calc(100vh - 100px)":540,visibility:Mi!=null&&Mi.is_root?"hidden":"visible"},initDiagram:du,nodeDataArray:Mi==null?void 0:Mi.nodeData,linkDataArray:Mi==null?void 0:Mi.linkData}),vt.createElement("div",{id:"myDiagramDiv",style:{height:Pi?"calc(100vh - 100px)":540,width:"100%",visibility:Mi!=null&&Mi.is_root?"hidden":ii?"visible":"hidden",position:ii?"relative":"absolute"}})),vt.createElement("div",null,!(Mi!=null&&Mi.is_root)&&Gn.map((qn,li)=>vt.createElement("span",{style:{marginLeft:li===0&&20,marginRight:30}},vt.createElement("span",{style:{marginRight:6,width:16,height:8,background:si[li],display:"inline-flex",borderRadius:4}}),vt.createElement("span",{style:{color:"#9096A3"}},qn))))),vt.createElement("div",{style:{zIndex:1e3}},vt.createElement(di(),{disabled:no,bounds:No,onStart:(qn,li)=>Ws(qn,li)},vt.createElement("div",{ref:Fr,style:{position:"fixed",cursor:"move",right:0,top:Pi?60:260,zIndex:12}},vt.createElement("div",{onMouseOver:()=>{no&&ko(!Ho)},onMouseOut:()=>{ko(!0)}},zt.id&&vt.createElement("div",{className:ki.rightmodal},vt.createElement(Ut.Z,{spinning:oo},vt.createElement("div",{style:{display:"flex",padding:25,paddingBottom:0}},vt.createElement("div",{className:ki.title},zt.text," ",ri&&vt.createElement("i",{onClick:()=>{tn(!0),vo.setFieldsValue({name:zt.text})},className:"iconfont icon-bianji3",style:{marginLeft:14,color:"#666666",cursor:"pointer"}})),vt.createElement("div",null,vt.createElement("i",{style:{cursor:"pointer"},onClick:()=>{var qn,li;if(ri){hr(!1);return}Ai({}),(qn=ur.current)==null||qn.clearSelection(),(li=Ao.current)==null||li.clearSelection()},className:"iconfont icon-danchuangguanbi"}))),vt.createElement("div",{style:{maxHeight:580,overflow:"auto",padding:25,paddingTop:0}},ri&&vt.createElement("div",{style:{marginTop:25}},vt.createElement("span",{className:ki.button,onClick:()=>{if(zt.unit_type>=4||zt.unit_type===0){zt.unit_type===0?Jt.ZP.info("\u6839\u8282\u70B9\u6682\u4E0D\u652F\u6301\u63D2\u5165\u77E5\u8BC6\u70B9"):Jt.ZP.info("\u77E5\u8BC6\u70B9\u4E3A\u6700\u5C0F\u5355\u4F4D\u6682\u4E0D\u652F\u6301\u63D2\u5165\u77E5\u8BC6\u70B9");return}vo.setFieldsValue({name:""}),Co(!0)}},vt.createElement("i",{style:{marginRight:8},className:"iconfont icon-charuzhishidian1"})," \u63D2\u5165\u77E5\u8BC6\u70B9"),vt.createElement("span",{className:ki.button,onClick:()=>{if(zt.unit_type>=4){Jt.ZP.info("\u77E5\u8BC6\u70B9\u4E3A\u6700\u5C0F\u5355\u4F4D\u6682\u4E0D\u652F\u6301\u63D2\u5165\u77E5\u8BC6\u5355\u5143");return}vo.setFieldsValue({name:"",unit_type:3,url:""}),Si(!0)}},vt.createElement("i",{style:{marginRight:8},className:"iconfont icon-charuzhishidanyuan"})," \u63D2\u5165\u77E5\u8BC6\u5355\u5143"),vt.createElement("span",{className:ki.button,onClick:()=>{de.default.confirm({icon:null,title:"\u63D0\u793A",centered:!0,getContainer:()=>uo.current,content:"\u5220\u9664\u8BE5\u8282\u70B9\u4F1A\u5BFC\u81F4\u5B83\u7684\u5B50\u8282\u70B9\u4E00\u5E76\u5220\u9664\uFF0C\u5220\u9664\u8282\u70B9\u4E0D\u4F1A\u5F71\u54CD\u5230\u8BFE\u7A0B\u7AE0\u8282\u5185\u5BB9\uFF0C\u5220\u9664\u540E\uFF0C\u6570\u636E\u4E0D\u53EF\u6062\u590D\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664",onOk:()=>le(void 0,null,function*(){Yn(!0);let qn=yield(0,te.ZP)(`/api/knowledge_graphs/${zt.id}.json`,{method:"DELETE"});Yn(!1),(qn==null?void 0:qn.status)===0&&(Ai({}),hs())})})}},vt.createElement("i",{style:{marginRight:8},className:"iconfont icon-shanchujiedian"})," \u5220\u9664\u8282\u70B9"),vt.createElement("span",{className:ki.button,onClick:()=>le(void 0,null,function*(){var qn;Eo(!0);let li=yield(0,te.ZP)("/api/knowledge_graphs.json",{method:"get",params:{identifier:ei.pathId,type:2}});li.status===0&&(jo(li==null?void 0:li.list),Qo(li==null?void 0:li.knowledge_graphs),Ro((qn=li==null?void 0:li.list)==null?void 0:qn.map(Vi=>Vi.key)))})},vt.createElement("i",{style:{marginRight:8},className:"iconfont icon-guanxi"})," \u5173\u7CFB")),ri&&vt.createElement("div",{style:{marginTop:20}},vt.createElement("div",{className:ki.linetitles},vt.createElement("span",{className:ki.line}),"\u5C5E\u6027"),zt.unit_type!=4&&zt.unit_type>0&&vt.createElement("div",{style:{paddingLeft:8}},vt.createElement("label",{className:ki.lebels},"\u7C7B\u578B"),vt.createElement(mt.default,{size:"large",getPopupContainer:()=>uo.current,style:{width:"100%",marginTop:6},value:zt.unit_type,onChange:qn=>le(void 0,null,function*(){zt.unit_type=qn,Ai(Nn({},zt)),Yn(!0);let li=yield(0,te.ZP)(`/api/knowledge_graphs/${zt.id}.json`,{method:"put",body:{unit_type:qn}});Yn(!1),li.status===0&&(tn(!1),hs())}),placeholder:"\u8BF7\u9009\u62E9\u7C7B\u578B"},vt.createElement(mt.default.Option,{value:1},"\u8BFE\u4EF6"),vt.createElement(mt.default.Option,{value:3},"\u6587\u672C"),vt.createElement(mt.default.Option,{value:2},"\u5B9E\u8BAD"),vt.createElement(mt.default.Option,{value:5},"\u8003\u8BD5"),vt.createElement(mt.default.Option,{value:6},"\u4F5C\u4E1A"),vt.createElement(mt.default.Option,{value:7},"\u7EC3\u4E60"),vt.createElement(mt.default.Option,{value:8},"\u89C6\u9891"))),vt.createElement("div",{style:{paddingLeft:8,marginTop:15}},vt.createElement("label",{className:ki.lebels,style:{display:"flex"}},"\u8DF3\u8F6C\u5730\u5740"),vt.createElement(wt.default,{size:"large",value:zt.url,onChange:qn=>{zt.url=qn.target.value,Ai(Nn({},zt))},disabled:Ho,onBlur:qn=>le(void 0,null,function*(){if(ko(!1),qn.target.value){var li=new RegExp(/^(https?:\/\/)?([\w.-]+)\.([a-z]{2,})(\/\S*)?$/,"i");if(!li.test(qn.target.value)){Jt.ZP.info("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u8DF3\u8F6C\u5730\u5740");return}}Yn(!0);let Vi=yield(0,te.ZP)(`/api/knowledge_graphs/${zt.id}.json`,{method:"put",body:{url:qn.target.value}});Yn(!1),Zi(!0),Vi.status===0&&(tn(!1),hs())}),style:{width:"81%",marginTop:6}}),vt.createElement("i",{onClick:()=>{Zi(!1)},className:"iconfont icon-bianji3",style:{marginLeft:12,marginRight:20,color:"#666666",cursor:"pointer"}}),vt.createElement("span",{className:ki.button,style:{marginRight:0},onClick:()=>{if(!zt.url){Jt.ZP.info("\u94FE\u63A5\u4E0D\u80FD\u4E3A\u7A7A");return}window.open(zt.url)}},"\u8DF3\u8F6C"))),ri&&vt.createElement("div",{style:{marginTop:20}},vt.createElement("div",{className:ki.linetitles},vt.createElement("span",{className:ki.line}),"\u5173\u7CFB"),(un=zt==null?void 0:zt.relations)==null?void 0:un.map((qn,li)=>vt.createElement("div",{style:{display:"flex",paddingLeft:8}},vt.createElement("div",{className:ki.multi_ellipsis1},"\u4E0E\u8282\u70B9\u201C",vt.createElement("span",{style:{fontWeight:600,color:"#000000"}},qn.name),"\u201D\u4E3A",qn.relation,"\u5173\u7CFB"),vt.createElement("div",{style:{width:"10%",textAlign:"end"}},vt.createElement("i",{onClick:()=>{de.default.confirm({icon:null,title:"\u63D0\u793A",getContainer:()=>uo.current,centered:!0,content:"\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u8282\u70B9\u4E4B\u95F4\u7684\u5173\u7CFB\u89E3\u7ED1",onOk:()=>le(void 0,null,function*(){var Vi;Yn(!0);let wi=yield(0,te.ZP)(`/api/knowledge_graphs/${zt==null?void 0:zt.id}/delete_relation.json`,{method:"POST",body:{relation_id:qn.relation_id}});Yn(!1),wi.status===0&&((Vi=zt.relations)==null||Vi.splice(li,1),Ai(Nn({},zt)),hs())})})},className:`${ki.dhover} iconfont icon-shanchu10`}))))),!ri&&vt.createElement("div",{style:{marginTop:20}},vt.createElement("div",{className:ki.linetitles},vt.createElement("span",{className:ki.line}),"\u5B66\u4E60\u8D44\u6E90"),(kn=zt==null?void 0:zt.sub_knowledge_graphs)==null?void 0:kn.map((qn,li)=>{var Vi,wi;return vt.createElement("div",{className:ki.a,onClick:()=>{window.open(qn==null?void 0:qn.url)},style:{display:"flex",paddingLeft:8,alignItems:"center",cursor:"pointer"}},vt.createElement("i",{className:"iconfont icon-lianjie2",style:{marginRight:10,fontSize:12}}),vt.createElement("span",{className:`${ki.multi_ellipsis1} ${ki.a}`,style:{fontWeight:600,marginTop:0,width:"90%",display:"inline-flex"}}," \u3010",((wi=(Vi=Re==null?void 0:Re.filter(Hi=>qn.type===Hi.type))==null?void 0:Vi[0])==null?void 0:wi.name)||"\u6587\u672C","\u3011 ",qn.name," "),vt.createElement("div",null,"\u67E5\u770B"))})),!ri&&vt.createElement("div",{style:{marginTop:20}},vt.createElement("div",{className:ki.linetitles},vt.createElement("span",{className:ki.line}),"\u5B58\u5728\u5173\u7CFB\u7684\u77E5\u8BC6\u8282\u70B9"),(Tn=zt==null?void 0:zt.relations)==null?void 0:Tn.map((qn,li)=>vt.createElement("div",{className:ki.a,onClick:()=>{var Vi,wi,Hi,Fo,lr,fr,gr,Sr,xr,yr,Za,la;(Vi=ur.current)==null||Vi.clearSelection(),(wi=Ao.current)==null||wi.clearSelection();const Cr=(Fo=(Hi=Ao.current)==null?void 0:Hi.findNodeForKey)==null?void 0:Fo.call(Hi,qn==null?void 0:qn.relation_id),Bu=(fr=(lr=ur.current)==null?void 0:lr.findNodeForKey)==null?void 0:fr.call(lr,qn==null?void 0:qn.relation_id);(Sr=(gr=ur.current)==null?void 0:gr.commandHandler)==null||Sr.scrollToPart(Bu),(yr=(xr=Ao.current)==null?void 0:xr.commandHandler)==null||yr.scrollToPart(Cr),Cr&&(Cr.isSelected=!0),Bu&&(Bu.isSelected=!0);let hd=(la=(Za=Mi==null?void 0:Mi.nodeData)==null?void 0:Za.filter(Ph=>(Ph==null?void 0:Ph.id)===(qn==null?void 0:qn.relation_id)))==null?void 0:la[0];Ai(Nn({},hd))},style:{display:"flex",paddingLeft:8,cursor:"pointer"}},vt.createElement("div",{className:ki.multi_ellipsis1},"\u3010",qn.relation,"\u3011",qn.name)))),vt.createElement("div",{style:{marginTop:20}},vt.createElement("div",{className:ki.linetitles},vt.createElement("span",{className:ki.line}),"\u63CF\u8FF0",vt.createElement("div",{style:{flex:1,textAlign:"end"}},ri&&vt.createElement("span",{onClick:()=>{Fi({add:!0,name:""}),vo.setFieldsValue({describe:""})},className:ki.additem},vt.createElement("i",{style:{fontSize:12},className:"iconfont icon-tianjiashitixiaojiahao"})," \u6DFB\u52A0"))),vt.createElement("div",{style:{height:200,overflow:"auto"}},(Rn=zt.descriptions)==null?void 0:Rn.map((qn,li)=>vt.createElement("div",{className:ki.describe},vt.createElement("div",{className:ki.describetitle},vt.createElement("div",{style:{fontSize:14,color:"#000000",fontWeight:500}},"\u63CF\u8FF0",li+1),ri&&vt.createElement("div",null,vt.createElement("i",{onClick:()=>{Fi({index:li,name:qn}),vo.setFieldsValue({describe:qn})},style:{marginRight:10},className:`iconfont icon-bianji-moren ${ki.ehover}`}),vt.createElement("i",{onClick:()=>{de.default.confirm({icon:null,title:"\u63D0\u793A",getContainer:()=>uo.current,centered:!0,content:"\u5220\u9664\u63CF\u8FF0\u540E\uFF0C\u6570\u636E\u4E0D\u53EF\u6062\u590D\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664",onOk:()=>le(void 0,null,function*(){var Vi;(Vi=zt.descriptions)==null||Vi.splice(li,1),Ai(Nn({},zt)),Yn(!0);let wi=yield(0,te.ZP)(`/api/knowledge_graphs/${zt.id}.json`,{method:"put",body:{descriptions:zt.descriptions}});Yn(!1),wi.status===0&&(tn(!1),hs())})})},className:`iconfont icon-shanchutimu ${ki.dhover}`}))),vt.createElement(me.Z,{value:qn||""})))),!ri&&jr&&vt.createElement("div",{style:{textAlign:"center",marginTop:10}},vt.createElement(ht.ZP,{type:"primary",style:{width:120},onClick:()=>{hr(!0)}},"\u7F16\u8F91")))))))))),vt.createElement(de.default,{open:pi,centered:!0,title:"\u7F16\u8F91",getContainer:()=>uo.current,onCancel:()=>tn(!1),okButtonProps:{loading:Ci},onOk:()=>{vo.submit()}},vt.createElement(oe.default,{size:"large",form:vo,onFinish:qn=>le(void 0,null,function*(){Ui(!0);let li=yield(0,te.ZP)(`/api/knowledge_graphs/${zt.id}.json`,{method:"put",body:{type:2,name:qn.name}});Ui(!1),li.status===0&&(ii&&(zt.text=qn.name,Ai(zt)),tn(!1),Jt.ZP.info("\u4FEE\u6539\u6210\u529F"),hs())})},vt.createElement(oe.default.Item,{name:"name",label:"\u540D\u79F0",rules:[{required:!0,validator:(qn,li)=>{var Vi;return((Vi=li==null?void 0:li.replaceAll(" ",""))==null?void 0:Vi.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u540D\u79F0")}}]},vt.createElement(wt.default,{maxLength:30})))),vt.createElement(de.default,{open:$i,centered:!0,title:"\u63D2\u5165\u77E5\u8BC6\u70B9",getContainer:()=>uo.current,onCancel:()=>Co(!1),okButtonProps:{loading:Ci},onOk:()=>{vo.submit()}},vt.createElement(oe.default,{size:"large",form:vo,onFinish:qn=>le(void 0,null,function*(){Ui(!0);let li=yield(0,te.ZP)("/api/knowledge_graphs.json",{method:"post",body:_n(Nn({},qn),{unit_type:4,type:2,identifier:ei.virtual_spacesId,parent_id:zt.id,virtual_module_id:window.localStorage.getItem("vtrsModuleId")})});Ui(!1),li.status===0&&(Co(!1),hs(),Jt.ZP.info("\u63D2\u5165\u77E5\u8BC6\u70B9\u6210\u529F"))})},vt.createElement(oe.default.Item,{name:"name",label:"\u77E5\u8BC6\u70B9\u540D\u79F0",rules:[{required:!0,validator:(qn,li)=>{var Vi;return((Vi=li==null?void 0:li.replaceAll(" ",""))==null?void 0:Vi.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0")}}]},vt.createElement(wt.default,{maxLength:20})))),vt.createElement(de.default,{open:lo,centered:!0,width:550,title:"\u63D2\u5165\u77E5\u8BC6\u5355\u5143",getContainer:()=>uo.current,onCancel:()=>Si(!1),okButtonProps:{loading:Ci},onOk:()=>{vo.submit()}},vt.createElement(oe.default,{size:"large",form:vo,labelCol:{span:5},onFinish:qn=>le(void 0,null,function*(){let li=yield(0,te.ZP)("/api/knowledge_graphs.json",{method:"post",body:_n(Nn({},qn),{type:2,identifier:ei.virtual_spacesId,parent_id:zt.id,virtual_module_id:window.localStorage.getItem("vtrsModuleId")})});Ui(!1),li.status===0&&(Si(!1),hs(),Jt.ZP.info("\u63D2\u5165\u77E5\u8BC6\u5355\u5143\u6210\u529F"))})},vt.createElement(oe.default.Item,{name:"name",label:"\u77E5\u8BC6\u5355\u5143\u540D\u79F0",rules:[{required:!0,validator:(qn,li)=>{var Vi;return((Vi=li==null?void 0:li.replaceAll(" ",""))==null?void 0:Vi.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u77E5\u8BC6\u5355\u5143\u540D\u79F0")}}]},vt.createElement(wt.default,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u5355\u5143\u540D\u79F0",maxLength:20})),vt.createElement(oe.default.Item,{name:"unit_type",label:"\u7C7B\u578B"},vt.createElement(mt.default,{getPopupContainer:()=>uo.current,placeholder:"\u8BF7\u9009\u62E9\u7C7B\u578B"},vt.createElement(mt.default.Option,{value:1},"\u8BFE\u4EF6"),vt.createElement(mt.default.Option,{value:3},"\u6587\u672C"),vt.createElement(mt.default.Option,{value:2},"\u5B9E\u8BAD"),vt.createElement(mt.default.Option,{value:5},"\u8003\u8BD5"),vt.createElement(mt.default.Option,{value:6},"\u4F5C\u4E1A"),vt.createElement(mt.default.Option,{value:7},"\u7EC3\u4E60"),vt.createElement(mt.default.Option,{value:8},"\u89C6\u9891"))),vt.createElement(oe.default.Item,{name:"url",label:"\u8DF3\u8F6C\u5730\u5740",rules:[{pattern:new RegExp(/^(https?:\/\/)?([\w.-]+)\.([a-z]{2,})(\/\S*)?$/,"i"),message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u5730\u5740"}]},vt.createElement(wt.default,{placeholder:"\u8BF7\u8F93\u5165\u70B9\u51FB\u8BE5\u8282\u70B9\u8DF3\u8F6C\u7684\u94FE\u63A5\u5730\u5740"})))),ao&&vt.createElement(de.default,{open:ao,centered:!0,width:550,title:"\u6DFB\u52A0\u5173\u7CFB",getContainer:()=>uo.current,onCancel:()=>{Sa(""),Eo(!1)},okButtonProps:{loading:Ci},onOk:()=>{if(!wr){Jt.ZP.info("\u8BF7\u5148\u9009\u62E9\u8282\u70B9");return}Eo(!1),vr(!0),vo.setFieldsValue({relation:1}),nr("")}},vt.createElement(wt.default.Search,{size:"large",onChange:qn=>{let li=qn.target.value;const Vi=Cs.filter(wi=>wi.title.indexOf(li)>-1).map(wi=>wi.key);Ro(Vi),sn(!0),nr(qn.target.value)}}),vt.createElement(Et.default,{onExpand:qn=>{Ro(qn),sn(!1)},style:{maxHeight:300,height:300,marginTop:20,overflow:"auto"},onSelect:qn=>{console.log("---",qn),Sa(qn==null?void 0:qn[0])},expandedKeys:ar,defaultExpandAll:!0,autoExpandParent:qr,treeData:$l})),(xi.name||xi.add)&&vt.createElement(de.default,{open:xi.name||xi.add,title:"\u63CF\u8FF0",width:900,getContainer:()=>uo.current,centered:!0,onCancel:()=>{Fi("")},okButtonProps:{loading:Ci},onOk:()=>{vo.submit()}},vt.createElement(oe.default,{form:vo,onFinish:qn=>le(void 0,null,function*(){Ui(!0),xi.add?(zt.descriptions.push(qn.describe),Ai(Nn({},zt))):(zt.descriptions[xi.index]=qn.describe,Ai(Nn({},zt)));let li=yield(0,te.ZP)(`/api/knowledge_graphs/${zt.id}.json`,{method:"put",body:{type:2,descriptions:zt.descriptions}});Ui(!1),Fi(""),li.status===0&&(tn(!1),hs())})},vt.createElement(oe.default.Item,{name:"describe",style:{marginBottom:-10},rules:[{required:!0,validator:(qn,li)=>{var Vi;return((Vi=li==null?void 0:li.replaceAll(" ",""))==null?void 0:Vi.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9")}}]},vt.createElement(re.Z,{placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u5185\u5BB9\uFF0C\u6700\u5927\u9650\u5236\u4E3A65000\u4E2A\u5B57\u7B26",watch:!0,defaultValue:xi.name})))),vt.createElement(de.default,{title:"\u6587\u4EF6\u5BFC\u5165",open:Wn,centered:!0,getContainer:()=>uo.current,okButtonProps:{loading:Ci},onCancel:()=>{zi(!1),Ko([])},onOk:()=>le(void 0,null,function*(){var qn;const li=new FormData;if(xo.length>0)li.append("file",xo[0]);else{Jt.ZP.warning("\u8BF7\u9009\u62E9\u6587\u4EF6");return}Ui(!0),li.append("ec_year_id",ei.ec_year_id),li.append("identifier",ei.virtual_spacesId),li.append("type","2"),li.append("virtual_module_id",window.localStorage.getItem("vtrsModuleId"));let Vi=yield(0,te.ZP)("/api/knowledge_graphs/import.json",{method:"post",body:li},!0);Ui(!1),(Vi==null?void 0:Vi.status)===0&&(((qn=Vi==null?void 0:Vi.fail)==null?void 0:qn.length)>0&&de.default.confirm({icon:null,title:"\u5BFC\u5165\u5931\u8D25",content:vt.createElement("span",null,"\u68C0\u6D4B\u5230\u672C\u6B21\u5BFC\u5165\u5B58\u5728\u4E0D\u7B26\u5408\u8981\u6C42\u7684\u6570\u636E\uFF0C\u70B9\u51FB\u4E0B\u8F7D",vt.createElement("a",{href:`${Mo.Z.API_SERVER}${Vi==null?void 0:Vi.url}`,download:"\u5931\u8D25\u6570\u636E.xlsx"},"\u5BFC\u5165\u5931\u8D25\u7684\u6570\u636E"),"\u67E5\u770B")}),Ko([]),zt={},Ai({}),(Vi==null?void 0:Vi.success)>0&&Jt.ZP.info("\u6DFB\u52A0\u6210\u529F"),hs(),zi(!1))})},!(Mi!=null&&Mi.is_root)&&vt.createElement("div",{style:{marginBottom:30,color:"#333333"}},"\u68C0\u6D4B\u5F53\u524D\u5DF2\u5B58\u5728\u6570\u636E\uFF0C\u5BFC\u5165\u540E\u539F\u6570\u636E\u5C06\u4F1A\u88AB\u5220\u9664\uFF0C\u6309\u7167\u6700\u65B0\u5BFC\u5165\u7684\u4E3A\u4E3B\uFF0C\u5982\u7EE7\u7EED\u5BFC\u5165\uFF0C\u8BF7\u6309\u7167\u4E0B\u65B9\u6B65\u9AA4\u8FDB\u884C"),vt.createElement("p",{style:{color:"#5F6368"}},"\u6B65\u9AA41\uFF1A",vt.createElement("span",{style:{color:"#000000"}},"\u4E0B\u8F7D"),vt.createElement("a",{href:`${Mo.Z.API_SERVER}/api/knowledge_graphs/down_template.json`,download:"\u6A21\u7248.xlsx"},"\u77E5\u8BC6\u56FE\u8C31\u5BFC\u5165\u6A21\u7248")),vt.createElement($t.Z,null,vt.createElement(Nt.Z,{style:{color:"#5F6368"}},"\u6B65\u9AA42\uFF1A",vt.createElement("span",{style:{color:"#000000"}},"\u4E0A\u4F20\u586B\u5199\u597D\u7684\u300A\u77E5\u8BC6\u56FE\u8C31\u5BFC\u5165\u6A21\u7248\u300B"))),vt.createElement($t.Z,{style:{marginTop:10,marginLeft:50}},vt.createElement(Dt.default,Nn({},xh),vt.createElement("span",{style:{padding:"0px 16px",color:"#3061D0",cursor:"pointer",height:32,alignItems:"center",display:"inline-flex",borderRadius:2,border:"1px solid #BACFFE",background:"#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)",boxShadow:"0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)"}},vt.createElement("i",{style:{fontSize:12,marginRight:6},className:"iconfont icon-tianjiashitixiaojiahao"})," \u9009\u62E9\u6587\u4EF6")))),vt.createElement(de.default,{open:Lo,title:"\u6DFB\u52A0\u5173\u7CFB",width:500,getContainer:()=>uo.current,centered:!0,onCancel:()=>{vr(!1),vo.setFieldsValue({relation:null})},okButtonProps:{loading:Ci},onOk:()=>{vo.submit()}},vt.createElement(oe.default,{form:vo,onFinish:qn=>le(void 0,null,function*(){Ui(!0);let li=yield(0,te.ZP)(`/api/knowledge_graphs/${zt.id}/relation.json`,{method:"post",body:Nn({type:2,parent_id:wr},qn)});Ui(!1),li.status===0&&(Jt.ZP.info("\u5173\u8054\u6210\u529F"),hs(),Sa(""),vr(!1),vo.setFieldsValue({relation:null}))})},vt.createElement(oe.default.Item,{name:"relation",label:"\u7C7B\u578B"},vt.createElement(mt.default,{getPopupContainer:()=>uo.current,placeholder:"\u8BF7\u9009\u62E9\u7C7B\u578B"},vt.createElement(mt.default.Option,{value:1},"\u5173\u8054"),vt.createElement(mt.default.Option,{value:2},"\u540E\u5E8F"))))),Xo&&vt.createElement(de.default,{open:Xo,centered:!0,width:550,title:"\u67E5\u627E",getContainer:()=>uo.current,onCancel:()=>{Sa(""),bo(!1)},okButtonProps:{loading:Ci},onOk:()=>{var qn,li,Vi,wi,Hi,Fo,lr,fr,gr,Sr;bo(!1),(qn=ur.current)==null||qn.clearSelection(),(li=Ao.current)==null||li.clearSelection();const xr=(wi=(Vi=Ao.current)==null?void 0:Vi.findNodeForKey)==null?void 0:wi.call(Vi,wr),yr=(Fo=(Hi=ur.current)==null?void 0:Hi.findNodeForKey)==null?void 0:Fo.call(Hi,wr);(fr=(lr=ur.current)==null?void 0:lr.commandHandler)==null||fr.scrollToPart(yr),(Sr=(gr=Ao.current)==null?void 0:gr.commandHandler)==null||Sr.scrollToPart(xr),xr&&(xr.isSelected=!0,jr&&(mi({left:0,top:0,bottom:0,right:0}),Ai(xr.data))),yr&&(yr.isSelected=!0,jr&&(mi({left:0,top:0,bottom:0,right:0}),Ai(yr.data))),Sa(""),nr("")}},vt.createElement(wt.default.Search,{size:"large",allowClear:!0,onChange:qn=>{let li=qn.target.value;const Vi=Cs.filter(wi=>wi.title.indexOf(li)>-1).map(wi=>wi.key);Ro(Vi),Vi.length<=0?Ta(!0):Ta(!1),sn(!0),nr(qn.target.value)}}),xa?vt.createElement(Bo.Z,null):vt.createElement(Et.default,{onExpand:qn=>{Ro(qn),sn(!1)},style:{maxHeight:400,height:400,marginTop:20,overflow:"auto"},onSelect:qn=>{Sa(qn==null?void 0:qn[0])},expandedKeys:ar,defaultExpandAll:!0,autoExpandParent:qr,treeData:$l})),vt.createElement(de.default,{title:"\u5386\u53F2\u8BB0\u5F55",open:Gs,onCancel:()=>bs(!1),footer:!1},vt.createElement("div",{style:{maxHeight:200,overflow:"auto",padding:10}},vt.createElement(Be(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:()=>le(void 0,null,function*(){var qn;hu(po+1);let li=yield(0,te.ZP)("/api/knowledge_graphs/history.json",{method:"get",params:{identifier:ei.virtual_spacesId,limit:10,page:po+1}});li.status===0&&(Js([...Dr,...li==null?void 0:li.histories]),((qn=li==null?void 0:li.histories)==null?void 0:qn.length)<10&&sa(!1))}),hasMore:Nl,useWindow:!1},vt.createElement(At.Z,{dataSource:Dr,renderItem:qn=>vt.createElement(At.Z.Item,{key:qn.id},vt.createElement(At.Z.Item.Meta,{avatar:vt.createElement(xt,{src:Mo.Z.IMG_SERVER+"/images/"+qn.avatar_url}),title:vt.createElement("span",null,qn.real_name),description:qn.content}),vt.createElement("div",null,qn.created_at))})))))};var He=(0,It.connect)(({virtualSpaces:ze,globalSetting:Ge})=>({globalSetting:Ge,virtualSpaces:ze}))(fn),je=Pt(59301),vn=Object.defineProperty,rn=Object.defineProperties,bn=Object.getOwnPropertyDescriptors,xn=Object.getOwnPropertySymbols,On=Object.prototype.hasOwnProperty,zn=Object.prototype.propertyIsEnumerable,yi=(ze,Ge,Oe)=>Ge in ze?vn(ze,Ge,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):ze[Ge]=Oe,Xe=(ze,Ge)=>{for(var Oe in Ge||(Ge={}))On.call(Ge,Oe)&&yi(ze,Oe,Ge[Oe]);if(xn)for(var Oe of xn(Ge))zn.call(Ge,Oe)&&yi(ze,Oe,Ge[Oe]);return ze},Li=(ze,Ge)=>rn(ze,bn(Ge)),ji=(ze,Ge,Oe)=>new Promise((un,kn)=>{var Tn=qe=>{try{ei(Oe.next(qe))}catch(pi){kn(pi)}},Rn=qe=>{try{ei(Oe.throw(qe))}catch(pi){kn(pi)}},ei=qe=>qe.done?un(qe.value):Promise.resolve(qe.value).then(Tn,Rn);ei((Oe=Oe.apply(ze,Ge)).next())});const Ei={1:"position_and_target",2:"desc",3:"knowledge_graph",4:"knowledge"},nn=({globalSetting:ze,dispatch:Ge,virtualSpaces:Oe})=>{var un;const[kn]=(0,It.useSearchParams)(),[Tn,Rn]=(0,vt.useState)(!0),[ei,qe]=(0,vt.useState)(!1),[pi,tn]=(0,vt.useState)(!1),[Ci,Ui]=(0,vt.useState)(!1),[$i,Co]=(0,vt.useState)({}),[lo,Si]=(0,vt.useState)(""),[ii,Yi]=(0,vt.useState)((kn==null?void 0:kn.get("active"))||"position_and_target"),{virtualSpacesDetails:oo}=Oe,Yn=(0,It.useParams)(),zt=(oo==null?void 0:oo.is_member)||(0,et.Ny)(),[Ai]=oe.default.useForm();(0,vt.useEffect)(()=>{Eo()},[ii,window.localStorage.getItem("vtrsModuleId")]);const[vo,ao]=(0,vt.useState)([]),Eo=()=>ji(void 0,null,function*(){Rn(!0);let xi=yield(0,te.ZP)(`/api/virtual_classrooms/${Yn.virtual_spacesId}/knowledge_systems/show.json`,{method:"get",params:{column:ii,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}});if((xi==null?void 0:xi.status)!==-1){Co(Xe({},xi)),Si((xi==null?void 0:xi[ii])||"");let Fi=[],Mi=[],co=[];const uo=xi==null?void 0:xi.knowledge_tabs;Object.entries(uo).forEach(([Pi,Ni])=>{if(Ni)switch(Pi){case"show_position_and_target":Fi.push(1),co.push("position_and_target"),Mi.push({id:"position_and_target",name:"\u8BFE\u7A0B\u5B9A\u4F4D\u4E0E\u76EE\u6807"});break;case"show_knowledge_point":Fi.push(2),co.push("desc"),Mi.push({id:"desc",name:"\u8BFE\u7A0B\u77E5\u8BC6\u70B9"});break;case"show_knowledge_graph_desc":Fi.push(3),co.push("knowledge_graph"),Mi.push({id:"knowledge_graph",name:"\u77E5\u8BC6\u56FE\u8C31\u63CF\u8FF0"});break;case"show_knowledge_graph":Fi.push(4),co.push("knowledge"),Mi.push({id:"knowledge",name:"\u77E5\u8BC6\u56FE\u8C31"});break;default:break}}),Ai.setFieldValue("checkData",Fi),ao([...Mi]),co!=null&&co.includes(ii)||Yi(Ei[Fi[0]])}Rn(!1)}),Ho=()=>ji(void 0,null,function*(){qe(!0);const xi={};xi[ii]=lo;let Fi=yield(0,te.ZP)(`/api/virtual_classrooms/${Yn.virtual_spacesId}/knowledge_systems/edit.json`,{method:"put",body:Li(Xe({},xi),{virtual_module_id:window.localStorage.getItem("vtrsModuleId")})});(Fi==null?void 0:Fi.status)!==-1&&(Eo(),tn(!1)),qe(!1)}),Zi=(xi,Fi)=>{de.default.confirm({title:"\u63D0\u793A",okText:"\u786E\u5B9A\u5220\u9664",okButtonProps:{danger:!0},icon:!1,className:Ot.Z.CustomTipsModalCss,cancelText:"\u53D6\u6D88",content:je.createElement("div",null,je.createElement("div",null,"\u786E\u8BA4\u5220\u9664 ",Fi," \u5417\uFF1F"),je.createElement("div",{className:"mt10"},"\u5220\u9664\u540E\uFF0C\u5C06\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C")),onOk:()=>ji(void 0,null,function*(){const Mi=yield(0,te.ZP)(`/api/virtual_classrooms/${Yn.virtual_spacesId}/knowledge_systems/${xi}/del_content.json`,{method:"delete"});(Mi==null?void 0:Mi.status)!==-1&&Eo()})})};return je.createElement("section",{className:we.wrap},je.createElement(Fe.YG,{value:ii,onChange:xi=>{xi!==ii&&(Yi(xi),tn(!1))},tabBarExtraContent:zt&&je.createElement("div",{style:{display:"flex",alignItems:"center"}},je.createElement("i",{className:"iconfont icon-a-bianzu21 font20 mr20",style:{cursor:"pointer"},onClick:()=>{Ui(!0)}}),ii==="position_and_target"&&je.createElement(Fe.op,{onClick:()=>tn(!0)}," ",je.createElement("i",{className:"iconfont icon-bianji7 font14 mr5"}),"\u7F16\u8F91"),ii==="desc"&&je.createElement($t.Z,{align:"middle"},je.createElement(Fe.op,{onClick:()=>tn(!0)}," ",je.createElement("i",{className:"iconfont icon-bianji7 font14 mr5"}),"\u7F16\u8F91\u8BF4\u660E"),je.createElement(Fe.op,{onClick:()=>{It.history.push(`/${nt.AS}/${Yn.virtual_spacesId}/knowledge/add?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)},className:"ml20"}," ",je.createElement("i",{className:"iconfont icon-tianjiashitixiaojiahao font14 mr5"}),"\u65B0\u589E\u77E5\u8BC6\u70B9\u6A21\u5757")),ii==="knowledge_graph"&&je.createElement(Fe.op,{onClick:()=>tn(!0)}," ",je.createElement("i",{className:"iconfont icon-bianji7 font14 mr5"}),"\u7F16\u8F91\u77E5\u8BC6\u56FE\u8C31")),dataSource:vo}),je.createElement(Ut.Z,{spinning:Tn},ii!=="desc"&&je.createElement("div",{className:ii!=="knowledge"&&"mt20"},pi?je.createElement(je.Fragment,null,je.createElement(re.Z,{onChange:xi=>Si(xi),watch:!0,defaultValue:lo}),je.createElement(Fe.QD,{confirmTitle:"\u4FDD\u5B58",confirmLoading:ei,confirmClick:Ho,cancelClick:()=>{tn(!1),Si($i[ii]||"")},cancelTitle:"\u53D6\u6D88",className:"mb25"})):je.createElement(me.Z,{value:lo})),ii==="knowledge"&&je.createElement(He,null),ii==="desc"&&je.createElement("div",{className:we.content},!!lo&&je.createElement("div",{className:we.name},je.createElement("aside",null,"\u8BF4\u660E"),je.createElement(me.Z,{value:lo})),(un=$i==null?void 0:$i.subject_modules)==null?void 0:un.map(xi=>{const{members:{module_content:Fi,module_name:Mi,subject_module_id:co}}=xi;return je.createElement("div",{className:we.list,key:co},je.createElement("div",{className:we.head},je.createElement("div",{className:we.models},Mi),zt&&je.createElement("div",{className:we.btns},je.createElement("div",{onClick:()=>It.history.push(`/${nt.AS}/${Yn.virtual_spacesId}/knowledge/${co}/edit?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)},je.createElement("span",{className:"primary-hover"},je.createElement("i",{className:"iconfont icon-bianji7 font14 mr5"}),"\u7F16\u8F91")),je.createElement("div",{onClick:()=>Zi(co,Mi)},je.createElement("span",{className:"delete-hover"}," ",je.createElement("i",{className:"iconfont icon-piliangshanchubeifen font14 mr5"}),"\u5220\u9664")))),je.createElement("div",{className:we.rowsHead},je.createElement("div",null,"\u77E5\u8BC6\u70B9"),je.createElement("div",null,"\u4E3B\u8981\u5185\u5BB9"),je.createElement("div",null,"\u80FD\u529B\u76EE\u6807"),je.createElement("div",{className:we.time},"\u5B66\u65F6"),je.createElement("div",{style:{marginRight:0}},"\u6559\u6848")),Fi==null?void 0:Fi.map((uo,Pi)=>{const{knowledge_point:Ni,content:Wn,target:zi,class_hour:xo,lesson_plan:Ko}=uo;return je.createElement("div",{className:we.rowsBody,key:Pi},je.createElement("div",null,Ni),je.createElement("pre",null,Wn),je.createElement("pre",null,zi),je.createElement("div",{className:we.time},xo),je.createElement("div",{style:{marginRight:0}},je.createElement(me.Z,{value:Ko})))}))})),je.createElement(de.default,{title:"\u7F16\u8F91\u8BF4\u660E",destroyOnClose:!0,open:ii==="desc"&&pi,onOk:Ho,centered:!0,onCancel:()=>{tn(!1),Si($i[ii]||"")},confirmLoading:ei,width:686,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",wrapClassName:Ot.Z.CustomCss},je.createElement("div",null,"\u8BF4\u660E\uFF1A"),je.createElement(re.Z,{onChange:xi=>Si(xi),watch:!0,defaultValue:lo})),je.createElement(de.default,{title:"\u77E5\u8BC6\u4F53\u7CFB\u6A21\u5757\u8BBE\u7F6E",destroyOnClose:!0,open:Ci,onOk:()=>ji(void 0,null,function*(){var xi,Fi,Mi,co,uo;if(((xi=Ai.getFieldValue("checkData"))==null?void 0:xi.length)==0)return Jt.ZP.error("\u81F3\u5C11\u9700\u8981\u9009\u62E9\u4E00\u4E2A\u9009\u9879"),!1;const Pi=yield(0,te.ZP)(`/api/virtual_classrooms/${Yn.virtual_spacesId}/knowledge_systems/tabs_setting.json`,{method:"put",body:{virtual_module_id:window.localStorage.getItem("vtrsModuleId"),knowledge_system_id:$i==null?void 0:$i.id,show_position_and_target:(Fi=Ai.getFieldValue("checkData"))==null?void 0:Fi.includes(1),show_knowledge_point:(Mi=Ai.getFieldValue("checkData"))==null?void 0:Mi.includes(2),show_knowledge_graph_desc:(co=Ai.getFieldValue("checkData"))==null?void 0:co.includes(3),show_knowledge_graph:(uo=Ai.getFieldValue("checkData"))==null?void 0:uo.includes(4)}});(Pi==null?void 0:Pi.status)!==-1&&(Eo(),Ui(!1))}),centered:!0,onCancel:()=>{Ui(!1)},confirmLoading:ei,width:530,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",wrapClassName:Ot.Z.CustomCss},je.createElement(oe.default,{form:Ai,style:{marginBottom:"-20px",marginTop:"10px"}},je.createElement(oe.default.Item,{name:"checkData"},je.createElement(De.default.Group,null,je.createElement(De.default,{value:1},"\u8BFE\u7A0B\u5B9A\u4F4D\u4E0E\u76EE\u6807"),je.createElement(De.default,{value:2},"\u8BFE\u7A0B\u77E5\u8BC6\u70B9"),je.createElement(De.default,{value:3},"\u77E5\u8BC6\u56FE\u8C31\u63CF\u8FF0"),je.createElement(De.default,{value:4},"\u77E5\u8BC6\u56FE\u8C31")))))))};var Vn=(0,It.connect)(({virtualSpaces:ze,globalSetting:Ge})=>({globalSetting:Ge,virtualSpaces:ze}))(nn)},4901:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{BU:function(){return It},Dj:function(){return vt},gH:function(){return oe},vp:function(){return de}});function vt($t){try{$t.mozRequestFullScreen?$t.mozRequestFullScreen():$t.webkitRequestFullScreen&&$t.webkitRequestFullScreen()}catch(Ut){console.log(Ut,":e")}}function It(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const oe=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function de(){var $t=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,Ut=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",$t),window.isFullScreen?window.isFullScreen:$t!=null}},24768:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{AL:function(){return wt},Iy:function(){return Fe},Qv:function(){return Ot},ez:function(){return mt},jb:function(){return re}});var vt=Pt(32834),It=Pt.n(vt),oe=Pt(11690),de=Pt.n(oe);let $t=1;function Ut(Kt,Wt){const xe=Kt.match(/^(\s+)(?:```)/);if(xe===null)return Wt;const Vt=xe[1];return Wt.split(`
|
|
|
`).map(Ie=>{const Se=Ie.match(/^\s+/);if(Se===null)return Ie;const[Ye]=Se;return Ye.length>=Vt.length?Ie.slice(Vt.length):Ie}).join(`
|
|
|
`)}let Jt=[],De=["<ul>"];const we=new(It()).Renderer,te=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Fe(){Jt.length=0,De=["<ul>"]}const re={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function me(Kt,Wt,xe,Vt){if(Wt>=Kt.length||Kt[Wt].level<=xe)return Wt;var Ie=Kt[Wt];Vt.push("<li><a href='#"+$t+Ie.anchor+"'>"+Ie.text+"</a>"),Wt++;var Se=[];return Wt=me(Kt,Wt,Ie.level,Se),Se.length>0&&(Vt.push("<ul>"),Se.forEach(function(Ye){Vt.push(Ye)}),Vt.push("</ul>")),Vt.push("</li>"),Wt=me(Kt,Wt,xe,Vt),Wt}function Ot(){return me(Jt,0,0,De),De.push("</ul>"),De.join("")}const et={heading(Kt){const Wt=te.exec(Kt);if($t+=1,Wt)return{type:"heading",raw:Wt[0],depth:Wt[1].length,text:Wt[2]}},fences(Kt){const Wt=this.rules.block.fences.exec(Kt);if(Wt){const xe=Wt[0];let Vt=Ut(xe,Wt[3]||"");const Ie=Wt[2]?Wt[2].trim():Wt[2];if(["latex","katex","math"].indexOf(Ie)>=0){const Se=at(),Ye=Vt;Vt=Se,ft[Se]={type:"block",expression:Ye}}return{type:"code",raw:xe,lang:Ie,text:Vt}}}},nt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ht=0;const at=()=>`__special_katext_id_${ht++}__`;let ft={};function mt(){return ft}function wt(){ht=0,ft={}}function Et(Kt){return Kt=Kt.replace(nt,(Wt,xe)=>{const Vt=at();return ft[Vt]={type:"inline",expression:xe},Vt}),Kt}const Nt=we.listitem;we.listitem=function(Kt){return Nt(Et(Kt))};const Dt=we.paragraph;we.paragraph=function(Kt){return Dt(Et(Kt))};const At=we.tablecell;we.tablecell=function(Kt,Wt){return At(Et(Kt),Wt)},we.code=function(Kt,Wt,xe){const Vt=(Wt||"").match(/\S*/)[0];return Vt?["latex","katex","math"].indexOf(Vt)>=0?`<p class='editormd-tex'>${Kt}</p>`:`<pre class="prettyprint linenums"><code class="language-${Wt}">${xe?Kt:(0,oe.escape)(Kt,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(xe?Kt:(0,oe.escape)(Kt,!0))+"</code></pre>"},we.heading=function(Kt,Wt,xe){let Vt=this.options.headerPrefix+xe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Jt.push({anchor:Vt,level:Wt,text:Kt}),"<h"+Wt+' id="'+$t+Vt+'">'+Kt+"</h"+Wt+">"},It().setOptions({silent:!0,gfm:!0,pedantic:!1}),It().use({tokenizer:et,renderer:we}),Ve.ZP=It()},50371:function(Sn,Ve){"use strict";function Pt(){const vt=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let It=1;It<arguments.length;It++){const oe=It<0||arguments.length<=It?void 0:arguments[It];oe&&Object.keys(oe).forEach(de=>{const $t=oe[de];$t!==void 0&&(vt[de]=$t)})}return vt}Ve.Z=Pt},77578:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return vt}});const vt=It=>It?typeof It=="function"?It():It:null},56762:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return It}});var vt=Pt(59301);function It(){const[,oe]=vt.useReducer(de=>de+1,0);return oe}},24905:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{default:function(){return Dt}});var vt=Pt(92310),It=Pt.n(vt),oe=Pt(5630),de=Pt(59301),$t=Pt(36355),Ut=Pt(1684),Jt=Pt(32441),we=de.createContext(null),te=Pt(98447),Fe=Pt(14088),re=Pt(4572),me=function(At,Kt){var Wt={};for(var xe in At)Object.prototype.hasOwnProperty.call(At,xe)&&Kt.indexOf(xe)<0&&(Wt[xe]=At[xe]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,xe=Object.getOwnPropertySymbols(At);Vt<xe.length;Vt++)Kt.indexOf(xe[Vt])<0&&Object.prototype.propertyIsEnumerable.call(At,xe[Vt])&&(Wt[xe[Vt]]=At[xe[Vt]]);return Wt};const Ot=(At,Kt)=>{var Wt;const{prefixCls:xe,className:Vt,rootClassName:Ie,children:Se,indeterminate:Ye=!1,style:Le,onMouseEnter:Pe,onMouseLeave:We,skipGroup:Ue=!1,disabled:ue}=At,Ht=me(At,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:ke,direction:pn,checkbox:ln}=de.useContext($t.E_),Ee=de.useContext(we),{isFormItemInput:Ke}=de.useContext(Jt.aM),gn=de.useContext(Ut.Z),Bn=(Wt=(Ee==null?void 0:Ee.disabled)||ue)!==null&&Wt!==void 0?Wt:gn,dn=de.useRef(Ht.value);de.useEffect(()=>{Ee==null||Ee.registerValue(Ht.value)},[]),de.useEffect(()=>{if(!Ue)return Ht.value!==dn.current&&(Ee==null||Ee.cancelValue(dn.current),Ee==null||Ee.registerValue(Ht.value),dn.current=Ht.value),()=>Ee==null?void 0:Ee.cancelValue(Ht.value)},[Ht.value]);const In=ke("checkbox",xe),[Ce,$n]=(0,te.ZP)(In),Qn=Object.assign({},Ht);Ee&&!Ue&&(Qn.onChange=function(){Ht.onChange&&Ht.onChange.apply(Ht,arguments),Ee.toggleOption&&Ee.toggleOption({label:Se,value:Ht.value})},Qn.name=Ee.name,Qn.checked=Ee.value.includes(Ht.value));const jt=It()(`${In}-wrapper`,{[`${In}-rtl`]:pn==="rtl",[`${In}-wrapper-checked`]:Qn.checked,[`${In}-wrapper-disabled`]:Bn,[`${In}-wrapper-in-form-item`]:Ke},ln==null?void 0:ln.className,Vt,Ie,$n),Lt=It()({[`${In}-indeterminate`]:Ye},re.A,$n),xt=Ye?"mixed":void 0;return Ce(de.createElement(Fe.Z,{component:"Checkbox",disabled:Bn},de.createElement("label",{className:jt,style:Object.assign(Object.assign({},ln==null?void 0:ln.style),Le),onMouseEnter:Pe,onMouseLeave:We},de.createElement(oe.Z,Object.assign({"aria-checked":xt},Qn,{prefixCls:In,className:Lt,disabled:Bn,ref:Kt})),Se!==void 0&&de.createElement("span",null,Se))))};var nt=de.forwardRef(Ot),ht=Pt(19127),at=Pt(2738),ft=function(At,Kt){var Wt={};for(var xe in At)Object.prototype.hasOwnProperty.call(At,xe)&&Kt.indexOf(xe)<0&&(Wt[xe]=At[xe]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Vt=0,xe=Object.getOwnPropertySymbols(At);Vt<xe.length;Vt++)Kt.indexOf(xe[Vt])<0&&Object.prototype.propertyIsEnumerable.call(At,xe[Vt])&&(Wt[xe[Vt]]=At[xe[Vt]]);return Wt};const mt=(At,Kt)=>{const{defaultValue:Wt,children:xe,options:Vt=[],prefixCls:Ie,className:Se,rootClassName:Ye,style:Le,onChange:Pe}=At,We=ft(At,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Ue,direction:ue}=de.useContext($t.E_),[Ht,ke]=de.useState(We.value||Wt||[]),[pn,ln]=de.useState([]);de.useEffect(()=>{"value"in We&&ke(We.value||[])},[We.value]);const Ee=de.useMemo(()=>Vt.map(Tt=>typeof Tt=="string"||typeof Tt=="number"?{label:Tt,value:Tt}:Tt),[Vt]),Ke=Tt=>{ln(Ft=>Ft.filter(yt=>yt!==Tt))},gn=Tt=>{ln(Ft=>[].concat((0,ht.Z)(Ft),[Tt]))},Bn=Tt=>{const Ft=Ht.indexOf(Tt.value),yt=(0,ht.Z)(Ht);Ft===-1?yt.push(Tt.value):yt.splice(Ft,1),"value"in We||ke(yt),Pe==null||Pe(yt.filter(ee=>pn.includes(ee)).sort((ee,pe)=>{const qt=Ee.findIndex(fe=>fe.value===ee),Zt=Ee.findIndex(fe=>fe.value===pe);return qt-Zt}))},dn=Ue("checkbox",Ie),In=`${dn}-group`,[Ce,$n]=(0,te.ZP)(dn),Qn=(0,at.Z)(We,["value","disabled"]),jt=Vt.length?Ee.map(Tt=>de.createElement(nt,{prefixCls:dn,key:Tt.value.toString(),disabled:"disabled"in Tt?Tt.disabled:We.disabled,value:Tt.value,checked:Ht.includes(Tt.value),onChange:Tt.onChange,className:`${In}-item`,style:Tt.style,title:Tt.title},Tt.label)):xe,Lt={toggleOption:Bn,value:Ht,disabled:We.disabled,name:We.name,registerValue:gn,cancelValue:Ke},xt=It()(In,{[`${In}-rtl`]:ue==="rtl"},Se,Ye,$n);return Ce(de.createElement("div",Object.assign({className:xt,style:Le},Qn,{ref:Kt}),de.createElement(we.Provider,{value:Lt},jt)))},wt=de.forwardRef(mt);var Et=de.memo(wt);const Nt=nt;Nt.Group=Et,Nt.__ANT_CHECKBOX=!0;var Dt=Nt},98447:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{C2:function(){return $t}});var vt=Pt(17313),It=Pt(37613),oe=Pt(83116);const de=Ut=>{const{checkboxCls:Jt}=Ut,De=`${Jt}-wrapper`;return[{[`${Jt}-group`]:Object.assign(Object.assign({},(0,vt.Wf)(Ut)),{display:"inline-flex",flexWrap:"wrap",columnGap:Ut.marginXS,[`> ${Ut.antCls}-row`]:{flex:1}}),[De]:Object.assign(Object.assign({},(0,vt.Wf)(Ut)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${De}`]:{marginInlineStart:0},[`&${De}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Jt]:Object.assign(Object.assign({},(0,vt.Wf)(Ut)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Ut.borderRadiusSM,alignSelf:"center",[`${Jt}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Jt}-inner`]:Object.assign({},(0,vt.oN)(Ut))},[`${Jt}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Ut.checkboxSize,height:Ut.checkboxSize,direction:"ltr",backgroundColor:Ut.colorBgContainer,border:`${Ut.lineWidth}px ${Ut.lineType} ${Ut.colorBorder}`,borderRadius:Ut.borderRadiusSM,borderCollapse:"separate",transition:`all ${Ut.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Ut.checkboxSize/14*5,height:Ut.checkboxSize/14*8,border:`${Ut.lineWidthBold}px solid ${Ut.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Ut.motionDurationFast} ${Ut.motionEaseInBack}, opacity ${Ut.motionDurationFast}`}},"& + span":{paddingInlineStart:Ut.paddingXS,paddingInlineEnd:Ut.paddingXS}})},{[`
|
|
|
${De}:not(${De}-disabled),
|
|
|
${Jt}:not(${Jt}-disabled)
|
|
|
`]:{[`&:hover ${Jt}-inner`]:{borderColor:Ut.colorPrimary}},[`${De}:not(${De}-disabled)`]:{[`&:hover ${Jt}-checked:not(${Jt}-disabled) ${Jt}-inner`]:{backgroundColor:Ut.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Jt}-checked:not(${Jt}-disabled):after`]:{borderColor:Ut.colorPrimaryHover}}},{[`${Jt}-checked`]:{[`${Jt}-inner`]:{backgroundColor:Ut.colorPrimary,borderColor:Ut.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Ut.motionDurationMid} ${Ut.motionEaseOutBack} ${Ut.motionDurationFast}`}}},[`
|
|
|
${De}-checked:not(${De}-disabled),
|
|
|
${Jt}-checked:not(${Jt}-disabled)
|
|
|
`]:{[`&:hover ${Jt}-inner`]:{backgroundColor:Ut.colorPrimaryHover,borderColor:"transparent"}}},{[Jt]:{"&-indeterminate":{[`${Jt}-inner`]:{backgroundColor:Ut.colorBgContainer,borderColor:Ut.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Ut.fontSizeLG/2,height:Ut.fontSizeLG/2,backgroundColor:Ut.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${De}-disabled`]:{cursor:"not-allowed"},[`${Jt}-disabled`]:{[`&, ${Jt}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Jt}-inner`]:{background:Ut.colorBgContainerDisabled,borderColor:Ut.colorBorder,"&:after":{borderColor:Ut.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Ut.colorTextDisabled},[`&${Jt}-indeterminate ${Jt}-inner::after`]:{background:Ut.colorTextDisabled}}}]};function $t(Ut,Jt){const De=(0,It.TS)(Jt,{checkboxCls:`.${Ut}`,checkboxSize:Jt.controlInteractiveSize});return[de(De)]}Ve.ZP=(0,oe.Z)("Checkbox",(Ut,Jt)=>{let{prefixCls:De}=Jt;return[$t(De,Ut)]})},93891:function(Sn,Ve,Pt){"use strict";var vt=Pt(59301),It=Pt(36355),oe=Pt(64165);const de=$t=>{const{componentName:Ut}=$t,{getPrefixCls:Jt}=(0,vt.useContext)(It.E_),De=Jt("empty");switch(Ut){case"Table":case"List":return vt.createElement(oe.Z,{image:oe.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return vt.createElement(oe.Z,{image:oe.Z.PRESENTED_IMAGE_SIMPLE,className:`${De}-small`});default:return vt.createElement(oe.Z,null)}};Ve.Z=de},91857:function(Sn,Ve,Pt){"use strict";var vt=Pt(59301),It=Pt(38819),oe=Pt(92310),de=Pt.n(oe),$t=Pt(31561),Ut=Pt(70425),Jt=Pt(18929),De=Pt(2738),we=Pt(79676),te=Pt(53487),Fe=Pt(92343),re=Pt(36355),me=Pt(20834),Ot=Pt(40875),et=Pt(88088),nt=Pt(47211);const ht=null,at=Et=>{const{menu:Nt,arrow:Dt,prefixCls:At,children:Kt,trigger:Wt,disabled:xe,dropdownRender:Vt,getPopupContainer:Ie,overlayClassName:Se,rootClassName:Ye,open:Le,onOpenChange:Pe,visible:We,onVisibleChange:Ue,mouseEnterDelay:ue=.15,mouseLeaveDelay:Ht=.1,autoAdjustOverflow:ke=!0,placement:pn="",overlay:ln,transitionName:Ee}=Et,{getPopupContainer:Ke,getPrefixCls:gn,direction:Bn}=vt.useContext(re.E_),dn=vt.useMemo(()=>{const ne=gn();return Ee!==void 0?Ee:pn.includes("top")?`${ne}-slide-down`:`${ne}-slide-up`},[gn,pn,Ee]),In=vt.useMemo(()=>pn?pn.includes("Center")?pn.slice(0,pn.indexOf("Center")):pn:Bn==="rtl"?"bottomRight":"bottomLeft",[pn,Bn]),Ce=gn("dropdown",At),[$n,Qn]=(0,nt.Z)(Ce),[,jt]=(0,et.Z)(),Lt=vt.Children.only(Kt),xt=(0,Fe.Tm)(Lt,{className:de()(`${Ce}-trigger`,{[`${Ce}-rtl`]:Bn==="rtl"},Lt.props.className),disabled:xe}),Tt=xe?[]:Wt;let Ft;Tt&&Tt.includes("contextMenu")&&(Ft=!0);const[yt,ee]=(0,Jt.Z)(!1,{value:Le!=null?Le:We}),pe=(0,Ut.useEvent)(ne=>{Pe==null||Pe(ne),Ue==null||Ue(ne),ee(ne)}),qt=de()(Se,Ye,Qn,{[`${Ce}-rtl`]:Bn==="rtl"}),Zt=(0,we.Z)({arrowPointAtCenter:typeof Dt=="object"&&Dt.pointAtCenter,autoAdjustOverflow:ke,offset:jt.marginXXS,arrowWidth:Dt?jt.sizePopupArrow:0,borderRadius:jt.borderRadius}),fe=vt.useCallback(()=>{ee(!1)},[]),ce=()=>{let ne;return Nt!=null&&Nt.items?ne=vt.createElement(me.default,Object.assign({},Nt)):typeof ln=="function"?ne=ln():ne=ln,Vt&&(ne=Vt(ne)),ne=vt.Children.only(typeof ne=="string"?vt.createElement("span",null,ne):ne),vt.createElement(Ot.J,{prefixCls:`${Ce}-menu`,expandIcon:vt.createElement("span",{className:`${Ce}-menu-submenu-arrow`},vt.createElement(It.Z,{className:`${Ce}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:fe,validator:Ne=>{let{mode:hn}=Ne}},ne)};return $n(vt.createElement($t.Z,Object.assign({alignPoint:Ft},(0,De.Z)(Et,["rootClassName"]),{mouseEnterDelay:ue,mouseLeaveDelay:Ht,visible:yt,builtinPlacements:Zt,arrow:!!Dt,overlayClassName:qt,prefixCls:Ce,getPopupContainer:Ie||Ke,transitionName:dn,trigger:Tt,overlay:ce,placement:In,onVisibleChange:pe}),xt))};function ft(Et){return Object.assign(Object.assign({},Et),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const mt=(0,te.Z)(at,"dropdown",Et=>Et,ft),wt=Et=>vt.createElement(mt,Object.assign({},Et),vt.createElement("span",null));at._InternalPanelDoNotUseOrYouWillBeFired=wt,Ve.Z=at},38854:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return et}});var vt=Pt(91857),It=Pt(92310),oe=Pt.n(It),de=Pt(59301),$t=Pt(18785),Ut=Pt(3113),Jt=Pt(36355),De=Pt(81327),we=Pt(33234),te=Pt(47211),Fe=function(nt,ht){var at={};for(var ft in nt)Object.prototype.hasOwnProperty.call(nt,ft)&&ht.indexOf(ft)<0&&(at[ft]=nt[ft]);if(nt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mt=0,ft=Object.getOwnPropertySymbols(nt);mt<ft.length;mt++)ht.indexOf(ft[mt])<0&&Object.prototype.propertyIsEnumerable.call(nt,ft[mt])&&(at[ft[mt]]=nt[ft[mt]]);return at};const re=nt=>{const{getPopupContainer:ht,getPrefixCls:at,direction:ft}=de.useContext(Jt.E_),{prefixCls:mt,type:wt="default",danger:Et,disabled:Nt,loading:Dt,onClick:At,htmlType:Kt,children:Wt,className:xe,menu:Vt,arrow:Ie,autoFocus:Se,overlay:Ye,trigger:Le,align:Pe,open:We,onOpenChange:Ue,placement:ue,getPopupContainer:Ht,href:ke,icon:pn=de.createElement($t.Z,null),title:ln,buttonsRender:Ee=ce=>ce,mouseEnterDelay:Ke,mouseLeaveDelay:gn,overlayClassName:Bn,overlayStyle:dn,destroyPopupOnHide:In,dropdownRender:Ce}=nt,$n=Fe(nt,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),Qn=at("dropdown",mt),jt=`${Qn}-button`,[Lt,xt]=(0,te.Z)(Qn),Tt={menu:Vt,arrow:Ie,autoFocus:Se,align:Pe,disabled:Nt,trigger:Nt?[]:Le,onOpenChange:Ue,getPopupContainer:Ht||ht,mouseEnterDelay:Ke,mouseLeaveDelay:gn,overlayClassName:Bn,overlayStyle:dn,destroyPopupOnHide:In,dropdownRender:Ce},{compactSize:Ft,compactItemClassnames:yt}=(0,we.ri)(Qn,ft),ee=oe()(jt,yt,xe,xt);"overlay"in nt&&(Tt.overlay=Ye),"open"in nt&&(Tt.open=We),"placement"in nt?Tt.placement=ue:Tt.placement=ft==="rtl"?"bottomLeft":"bottomRight";const pe=de.createElement(Ut.ZP,{type:wt,danger:Et,disabled:Nt,loading:Dt,onClick:At,htmlType:Kt,href:ke,title:ln},Wt),qt=de.createElement(Ut.ZP,{type:wt,danger:Et,icon:pn}),[Zt,fe]=Ee([pe,qt]);return Lt(de.createElement(De.Z.Compact,Object.assign({className:ee,size:Ft,block:!0},$n),Zt,de.createElement(vt.Z,Object.assign({},Tt),fe)))};re.__ANT_BUTTON=!0;var me=re;const Ot=vt.Z;Ot.Button=me;var et=Ot},47211:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return Fe}});var vt=Pt(17313),It=Pt(13826),oe=Pt(92899),de=Pt(29878),$t=Pt(19447),Ut=Pt(83116),Jt=Pt(37613),we=re=>{const{componentCls:me,menuCls:Ot,colorError:et,colorTextLightSolid:nt}=re,ht=`${Ot}-item`;return{[`${me}, ${me}-menu-submenu`]:{[`${Ot} ${ht}`]:{[`&${ht}-danger:not(${ht}-disabled)`]:{color:et,"&:hover":{color:nt,backgroundColor:et}}}}}};const te=re=>{const{componentCls:me,menuCls:Ot,zIndexPopup:et,dropdownArrowDistance:nt,sizePopupArrow:ht,antCls:at,iconCls:ft,motionDurationMid:mt,dropdownPaddingVertical:wt,fontSize:Et,dropdownEdgeChildPadding:Nt,colorTextDisabled:Dt,fontSizeIcon:At,controlPaddingHorizontal:Kt,colorBgElevated:Wt}=re;return[{[me]:Object.assign(Object.assign({},(0,vt.Wf)(re)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:et,display:"block","&::before":{position:"absolute",insetBlock:-nt+ht/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${at}-btn`]:{[`& > ${ft}-down, & > ${at}-btn-icon > ${ft}-down`]:{fontSize:At}},[`${me}-wrap`]:{position:"relative",[`${at}-btn > ${ft}-down`]:{fontSize:At},[`${ft}-down::before`]:{transition:`transform ${mt}`}},[`${me}-wrap-open`]:{[`${ft}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${at}-slide-down-enter${at}-slide-down-enter-active${me}-placement-bottomLeft,
|
|
|
&${at}-slide-down-appear${at}-slide-down-appear-active${me}-placement-bottomLeft,
|
|
|
&${at}-slide-down-enter${at}-slide-down-enter-active${me}-placement-bottom,
|
|
|
&${at}-slide-down-appear${at}-slide-down-appear-active${me}-placement-bottom,
|
|
|
&${at}-slide-down-enter${at}-slide-down-enter-active${me}-placement-bottomRight,
|
|
|
&${at}-slide-down-appear${at}-slide-down-appear-active${me}-placement-bottomRight`]:{animationName:It.fJ},[`&${at}-slide-up-enter${at}-slide-up-enter-active${me}-placement-topLeft,
|
|
|
&${at}-slide-up-appear${at}-slide-up-appear-active${me}-placement-topLeft,
|
|
|
&${at}-slide-up-enter${at}-slide-up-enter-active${me}-placement-top,
|
|
|
&${at}-slide-up-appear${at}-slide-up-appear-active${me}-placement-top,
|
|
|
&${at}-slide-up-enter${at}-slide-up-enter-active${me}-placement-topRight,
|
|
|
&${at}-slide-up-appear${at}-slide-up-appear-active${me}-placement-topRight`]:{animationName:It.Qt},[`&${at}-slide-down-leave${at}-slide-down-leave-active${me}-placement-bottomLeft,
|
|
|
&${at}-slide-down-leave${at}-slide-down-leave-active${me}-placement-bottom,
|
|
|
&${at}-slide-down-leave${at}-slide-down-leave-active${me}-placement-bottomRight`]:{animationName:It.Uw},[`&${at}-slide-up-leave${at}-slide-up-leave-active${me}-placement-topLeft,
|
|
|
&${at}-slide-up-leave${at}-slide-up-leave-active${me}-placement-top,
|
|
|
&${at}-slide-up-leave${at}-slide-up-leave-active${me}-placement-topRight`]:{animationName:It.ly}})},(0,$t.ZP)(re,{colorBg:Wt,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${me} ${Ot}`]:{position:"relative",margin:0},[`${Ot}-submenu-popup`]:{position:"absolute",zIndex:et,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${me}, ${me}-menu-submenu`]:{[Ot]:Object.assign(Object.assign({padding:Nt,listStyleType:"none",backgroundColor:Wt,backgroundClip:"padding-box",borderRadius:re.borderRadiusLG,outline:"none",boxShadow:re.boxShadowSecondary},(0,vt.Qy)(re)),{[`${Ot}-item-group-title`]:{padding:`${wt}px ${Kt}px`,color:re.colorTextDescription,transition:`all ${mt}`},[`${Ot}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ot}-item-icon`]:{minWidth:Et,marginInlineEnd:re.marginXS,fontSize:re.fontSizeSM},[`${Ot}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${mt}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Ot}-item, ${Ot}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${wt}px ${Kt}px`,color:re.colorText,fontWeight:"normal",fontSize:Et,lineHeight:re.lineHeight,cursor:"pointer",transition:`all ${mt}`,borderRadius:re.borderRadiusSM,"&:hover, &-active":{backgroundColor:re.controlItemBgHover}},(0,vt.Qy)(re)),{"&-selected":{color:re.colorPrimary,backgroundColor:re.controlItemBgActive,"&:hover, &-active":{backgroundColor:re.controlItemBgActiveHover}},"&-disabled":{color:Dt,cursor:"not-allowed","&:hover":{color:Dt,backgroundColor:Wt,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${re.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:re.colorSplit},[`${me}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:re.paddingXS,[`${me}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:re.colorTextDescription,fontSize:At,fontStyle:"normal"}}}),[`${Ot}-item-group-list`]:{margin:`0 ${re.marginXS}px`,padding:0,listStyle:"none"},[`${Ot}-submenu-title`]:{paddingInlineEnd:Kt+re.fontSizeSM},[`${Ot}-submenu-vertical`]:{position:"relative"},[`${Ot}-submenu${Ot}-submenu-disabled ${me}-menu-submenu-title`]:{[`&, ${me}-menu-submenu-arrow-icon`]:{color:Dt,backgroundColor:Wt,cursor:"not-allowed"}},[`${Ot}-submenu-selected ${me}-menu-submenu-title`]:{color:re.colorPrimary}})}},[(0,It.oN)(re,"slide-up"),(0,It.oN)(re,"slide-down"),(0,oe.Fm)(re,"move-up"),(0,oe.Fm)(re,"move-down"),(0,de._y)(re,"zoom-big")]]};var Fe=(0,Ut.Z)("Dropdown",(re,me)=>{let{rootPrefixCls:Ot}=me;const{marginXXS:et,sizePopupArrow:nt,controlHeight:ht,fontSize:at,lineHeight:ft,paddingXXS:mt,componentCls:wt,borderRadiusLG:Et}=re,Nt=(ht-at*ft)/2,{dropdownArrowOffset:Dt}=(0,$t.fS)({contentRadius:Et}),At=(0,Jt.TS)(re,{menuCls:`${wt}-menu`,rootPrefixCls:Ot,dropdownArrowDistance:nt/2+et,dropdownArrowOffset:Dt,dropdownPaddingVertical:Nt,dropdownEdgeChildPadding:mt});return[te(At),we(At)]},re=>({zIndexPopup:re.zIndexPopupBase+50}))},64165:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return mt}});var vt=Pt(92310),It=Pt.n(vt),oe=Pt(59301),de=Pt(36355),$t=Pt(9763),Ut=Pt(64993),Jt=Pt(88088),we=()=>{const[,wt]=(0,Jt.Z)(),Nt=new Ut.C(wt.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return oe.createElement("svg",{style:Nt,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},oe.createElement("g",{fill:"none",fillRule:"evenodd"},oe.createElement("g",{transform:"translate(24 31.67)"},oe.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),oe.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),oe.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),oe.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),oe.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),oe.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),oe.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},oe.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),oe.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Fe=()=>{const[,wt]=(0,Jt.Z)(),{colorFill:Et,colorFillTertiary:Nt,colorFillQuaternary:Dt,colorBgContainer:At}=wt,{borderColor:Kt,shadowColor:Wt,contentColor:xe}=(0,oe.useMemo)(()=>({borderColor:new Ut.C(Et).onBackground(At).toHexShortString(),shadowColor:new Ut.C(Nt).onBackground(At).toHexShortString(),contentColor:new Ut.C(Dt).onBackground(At).toHexShortString()}),[Et,Nt,Dt,At]);return oe.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},oe.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},oe.createElement("ellipse",{fill:Wt,cx:"32",cy:"33",rx:"32",ry:"7"}),oe.createElement("g",{fillRule:"nonzero",stroke:Kt},oe.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),oe.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:xe}))))},re=Pt(83116),me=Pt(37613);const Ot=wt=>{const{componentCls:Et,margin:Nt,marginXS:Dt,marginXL:At,fontSize:Kt,lineHeight:Wt}=wt;return{[Et]:{marginInline:Dt,fontSize:Kt,lineHeight:Wt,textAlign:"center",[`${Et}-image`]:{height:wt.emptyImgHeight,marginBottom:Dt,opacity:wt.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Et}-description`]:{color:wt.colorText},[`${Et}-footer`]:{marginTop:Nt},"&-normal":{marginBlock:At,color:wt.colorTextDisabled,[`${Et}-description`]:{color:wt.colorTextDisabled},[`${Et}-image`]:{height:wt.emptyImgHeightMD}},"&-small":{marginBlock:Dt,color:wt.colorTextDisabled,[`${Et}-image`]:{height:wt.emptyImgHeightSM}}}}};var et=(0,re.Z)("Empty",wt=>{const{componentCls:Et,controlHeightLG:Nt}=wt,Dt=(0,me.TS)(wt,{emptyImgCls:`${Et}-img`,emptyImgHeight:Nt*2.5,emptyImgHeightMD:Nt,emptyImgHeightSM:Nt*.875});return[Ot(Dt)]}),nt=function(wt,Et){var Nt={};for(var Dt in wt)Object.prototype.hasOwnProperty.call(wt,Dt)&&Et.indexOf(Dt)<0&&(Nt[Dt]=wt[Dt]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var At=0,Dt=Object.getOwnPropertySymbols(wt);At<Dt.length;At++)Et.indexOf(Dt[At])<0&&Object.prototype.propertyIsEnumerable.call(wt,Dt[At])&&(Nt[Dt[At]]=wt[Dt[At]]);return Nt};const ht=oe.createElement(we,null),at=oe.createElement(Fe,null),ft=wt=>{var{className:Et,rootClassName:Nt,prefixCls:Dt,image:At=ht,description:Kt,children:Wt,imageStyle:xe,style:Vt}=wt,Ie=nt(wt,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Se,direction:Ye,empty:Le}=oe.useContext(de.E_),Pe=Se("empty",Dt),[We,Ue]=et(Pe),[ue]=(0,$t.Z)("Empty"),Ht=typeof Kt!="undefined"?Kt:ue==null?void 0:ue.description,ke=typeof Ht=="string"?Ht:"empty";let pn=null;return typeof At=="string"?pn=oe.createElement("img",{alt:ke,src:At}):pn=At,We(oe.createElement("div",Object.assign({className:It()(Ue,Pe,Le==null?void 0:Le.className,{[`${Pe}-normal`]:At===at,[`${Pe}-rtl`]:Ye==="rtl"},Et,Nt),style:Object.assign(Object.assign({},Le==null?void 0:Le.style),Vt)},Ie),oe.createElement("div",{className:`${Pe}-image`,style:xe},pn),Ht&&oe.createElement("div",{className:`${Pe}-description`},Ht),Wt&&oe.createElement("div",{className:`${Pe}-footer`},Wt)))};ft.PRESENTED_IMAGE_DEFAULT=ht,ft.PRESENTED_IMAGE_SIMPLE=at;var mt=ft},78241:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{default:function(){return Be}});var vt=Pt(19127),It=Pt(92310),oe=Pt.n(It),de=Pt(77900),$t=Pt(59301),Ut=Pt(62892),Jt=Pt(32441);function De(_t){const[Je,cn]=$t.useState(_t);return $t.useEffect(()=>{const ve=setTimeout(()=>{cn(_t)},_t.length?0:10);return()=>{clearTimeout(ve)}},[_t]),Je}var we=Pt(17313),te=Pt(29878),Fe=Pt(8378),re=Pt(37613),me=Pt(83116),et=_t=>{const{componentCls:Je}=_t,cn=`${Je}-show-help`,ve=`${Je}-show-help-item`;return{[cn]:{transition:`opacity ${_t.motionDurationSlow} ${_t.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[ve]:{overflow:"hidden",transition:`height ${_t.motionDurationSlow} ${_t.motionEaseInOut},
|
|
|
opacity ${_t.motionDurationSlow} ${_t.motionEaseInOut},
|
|
|
transform ${_t.motionDurationSlow} ${_t.motionEaseInOut} !important`,[`&${ve}-appear, &${ve}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${ve}-leave-active`]:{transform:"translateY(-5px)"}}}}};const nt=_t=>({legend:{display:"block",width:"100%",marginBottom:_t.marginLG,padding:0,color:_t.colorTextDescription,fontSize:_t.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${_t.lineWidth}px ${_t.lineType} ${_t.colorBorder}`},label:{fontSize:_t.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${_t.controlOutlineWidth}px ${_t.controlOutline}`},output:{display:"block",paddingTop:15,color:_t.colorText,fontSize:_t.fontSize,lineHeight:_t.lineHeight}}),ht=(_t,Je)=>{const{formItemCls:cn}=_t;return{[cn]:{[`${cn}-label > label`]:{height:Je},[`${cn}-control-input`]:{minHeight:Je}}}},at=_t=>{const{componentCls:Je}=_t;return{[_t.componentCls]:Object.assign(Object.assign(Object.assign({},(0,we.Wf)(_t)),nt(_t)),{[`${Je}-text`]:{display:"inline-block",paddingInlineEnd:_t.paddingSM},"&-small":Object.assign({},ht(_t,_t.controlHeightSM)),"&-large":Object.assign({},ht(_t,_t.controlHeightLG))})}},ft=_t=>{const{formItemCls:Je,iconCls:cn,componentCls:ve,rootPrefixCls:ie,labelRequiredMarkColor:Qe,labelColor:yn,labelFontSize:Nn,labelHeight:_n,labelColonMarginInlineStart:le,labelColonMarginInlineEnd:mn,itemMarginBottom:Gn}=_t;return{[Je]:Object.assign(Object.assign({},(0,we.Wf)(_t)),{marginBottom:Gn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${ie}-row`]:{display:"none"},"&-has-warning":{[`${Je}-split`]:{color:_t.colorError}},"&-has-error":{[`${Je}-split`]:{color:_t.colorWarning}},[`${Je}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${_t.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:_n,color:yn,fontSize:Nn,[`> ${cn}`]:{fontSize:_t.fontSize,verticalAlign:"top"},[`&${Je}-required:not(${Je}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:_t.marginXXS,color:Qe,fontSize:_t.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${ve}-hide-required-mark &`]:{display:"none"}},[`${Je}-optional`]:{display:"inline-block",marginInlineStart:_t.marginXXS,color:_t.colorTextDescription,[`${ve}-hide-required-mark &`]:{display:"none"}},[`${Je}-tooltip`]:{color:_t.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:_t.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:le,marginInlineEnd:mn},[`&${Je}-no-colon::after`]:{content:'"\\a0"'}}},[`${Je}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${ie}-col-'"]):not([class*="' ${ie}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:_t.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Je]:{"&-explain, &-extra":{clear:"both",color:_t.colorTextDescription,fontSize:_t.fontSize,lineHeight:_t.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:_t.controlHeightSM,transition:`color ${_t.motionDurationMid} ${_t.motionEaseOut}`},"&-explain":{"&-error":{color:_t.colorError},"&-warning":{color:_t.colorWarning}}},[`&-with-help ${Je}-explain`]:{height:"auto",opacity:1},[`${Je}-feedback-icon`]:{fontSize:_t.fontSize,textAlign:"center",visibility:"visible",animationName:te.kr,animationDuration:_t.motionDurationMid,animationTimingFunction:_t.motionEaseOutBack,pointerEvents:"none","&-success":{color:_t.colorSuccess},"&-error":{color:_t.colorError},"&-warning":{color:_t.colorWarning},"&-validating":{color:_t.colorPrimary}}})}},mt=_t=>{const{componentCls:Je,formItemCls:cn}=_t;return{[`${Je}-horizontal`]:{[`${cn}-label`]:{flexGrow:0},[`${cn}-control`]:{flex:"1 1 0",minWidth:0},[`${cn}-label[class$='-24'], ${cn}-label[class*='-24 ']`]:{[`& + ${cn}-control`]:{minWidth:"unset"}}}}},wt=_t=>{const{componentCls:Je,formItemCls:cn}=_t;return{[`${Je}-inline`]:{display:"flex",flexWrap:"wrap",[cn]:{flex:"none",marginInlineEnd:_t.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${cn}-label,
|
|
|
> ${cn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${cn}-label`]:{flex:"none"},[`${Je}-text`]:{display:"inline-block"},[`${cn}-has-feedback`]:{display:"inline-block"}}}}},Et=_t=>({padding:_t.verticalLabelPadding,margin:_t.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Nt=_t=>{const{componentCls:Je,formItemCls:cn,rootPrefixCls:ve}=_t;return{[`${cn} ${cn}-label`]:Et(_t),[Je]:{[cn]:{flexWrap:"wrap",[`${cn}-label, ${cn}-control`]:{[`&:not([class*=" ${ve}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Dt=_t=>{const{componentCls:Je,formItemCls:cn,rootPrefixCls:ve}=_t;return{[`${Je}-vertical`]:{[cn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${Je}-item-control`]:{width:"100%"}}},[`${Je}-vertical ${cn}-label,
|
|
|
.${ve}-col-24${cn}-label,
|
|
|
.${ve}-col-xl-24${cn}-label`]:Et(_t),[`@media (max-width: ${_t.screenXSMax}px)`]:[Nt(_t),{[Je]:{[`.${ve}-col-xs-24${cn}-label`]:Et(_t)}}],[`@media (max-width: ${_t.screenSMMax}px)`]:{[Je]:{[`.${ve}-col-sm-24${cn}-label`]:Et(_t)}},[`@media (max-width: ${_t.screenMDMax}px)`]:{[Je]:{[`.${ve}-col-md-24${cn}-label`]:Et(_t)}},[`@media (max-width: ${_t.screenLGMax}px)`]:{[Je]:{[`.${ve}-col-lg-24${cn}-label`]:Et(_t)}}}},At=(_t,Je)=>(0,re.TS)(_t,{formItemCls:`${_t.componentCls}-item`,rootPrefixCls:Je});var Kt=(0,me.Z)("Form",(_t,Je)=>{let{rootPrefixCls:cn}=Je;const ve=At(_t,cn);return[at(ve),ft(ve),et(ve),mt(ve),wt(ve),Dt(ve),(0,Fe.Z)(ve),te.kr]},_t=>({labelRequiredMarkColor:_t.colorError,labelColor:_t.colorTextHeading,labelFontSize:_t.fontSize,labelHeight:_t.controlHeight,labelColonMarginInlineStart:_t.marginXXS/2,labelColonMarginInlineEnd:_t.marginXS,itemMarginBottom:_t.marginLG,verticalLabelPadding:`0 0 ${_t.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Wt=[];function xe(_t,Je,cn){let ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof _t=="string"?_t:`${Je}-${ve}`,error:_t,errorStatus:cn}}var Ie=_t=>{let{help:Je,helpStatus:cn,errors:ve=Wt,warnings:ie=Wt,className:Qe,fieldId:yn,onVisibleChanged:Nn}=_t;const{prefixCls:_n}=$t.useContext(Jt.Rk),le=`${_n}-item-explain`,[,mn]=Kt(_n),Gn=(0,$t.useMemo)(()=>(0,Ut.Z)(_n),[_n]),si=De(ve),Re=De(ie),fn=$t.useMemo(()=>Je!=null?[xe(Je,"help",cn)]:[].concat((0,vt.Z)(si.map((je,vn)=>xe(je,"error","error",vn))),(0,vt.Z)(Re.map((je,vn)=>xe(je,"warning","warning",vn)))),[Je,cn,si,Re]),He={};return yn&&(He.id=`${yn}_help`),$t.createElement(de.default,{motionDeadline:Gn.motionDeadline,motionName:`${_n}-show-help`,visible:!!fn.length,onVisibleChanged:Nn},je=>{const{className:vn,style:rn}=je;return $t.createElement("div",Object.assign({},He,{className:oe()(le,vn,Qe,mn),style:rn,role:"alert"}),$t.createElement(de.CSSMotionList,Object.assign({keys:fn},(0,Ut.Z)(_n),{motionName:`${_n}-show-help-item`,component:!1}),bn=>{const{key:xn,error:On,errorStatus:zn,className:yi,style:Xe}=bn;return $t.createElement("div",{key:xn,className:oe()(yi,{[`${le}-${zn}`]:zn}),style:Xe},On)}))})},Se=Pt(95013),Ye=Pt(36355),Le=Pt(1684),Pe=Pt(52946),We=Pt(19716),Ue=Pt(16722);const ue=["parentNode"],Ht="form_item";function ke(_t){return _t===void 0||_t===!1?[]:Array.isArray(_t)?_t:[_t]}function pn(_t,Je){if(!_t.length)return;const cn=_t.join("_");return Je?`${Je}_${cn}`:ue.includes(cn)?`${Ht}_${cn}`:cn}function ln(_t,Je,cn,ve,ie,Qe){let yn=ve;return Qe!==void 0?yn=Qe:cn.validating?yn="validating":_t.length?yn="error":Je.length?yn="warning":(cn.touched||ie&&cn.validated)&&(yn="success"),yn}function Ee(_t){return ke(_t).join("_")}function Ke(_t){const[Je]=(0,Se.useForm)(),cn=$t.useRef({}),ve=$t.useMemo(()=>_t!=null?_t:Object.assign(Object.assign({},Je),{__INTERNAL__:{itemRef:ie=>Qe=>{const yn=Ee(ie);Qe?cn.current[yn]=Qe:delete cn.current[yn]}},scrollToField:function(ie){let Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const yn=ke(ie),Nn=pn(yn,ve.__INTERNAL__.name),_n=Nn?document.getElementById(Nn):null;_n&&(0,Ue.Z)(_n,Object.assign({scrollMode:"if-needed",block:"nearest"},Qe))},getFieldInstance:ie=>{const Qe=Ee(ie);return cn.current[Qe]}}),[_t,Je]);return[ve]}var gn=Pt(28726),Bn=function(_t,Je){var cn={};for(var ve in _t)Object.prototype.hasOwnProperty.call(_t,ve)&&Je.indexOf(ve)<0&&(cn[ve]=_t[ve]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,ve=Object.getOwnPropertySymbols(_t);ie<ve.length;ie++)Je.indexOf(ve[ie])<0&&Object.prototype.propertyIsEnumerable.call(_t,ve[ie])&&(cn[ve[ie]]=_t[ve[ie]]);return cn};const dn=(_t,Je)=>{const cn=$t.useContext(Le.Z),{getPrefixCls:ve,direction:ie,form:Qe}=$t.useContext(Ye.E_),{prefixCls:yn,className:Nn,rootClassName:_n,size:le,disabled:mn=cn,form:Gn,colon:si,labelAlign:Re,labelWrap:fn,labelCol:He,wrapperCol:je,hideRequiredMark:vn,layout:rn="horizontal",scrollToFirstError:bn,requiredMark:xn,onFinishFailed:On,name:zn,style:yi,feedbackIcons:Xe}=_t,Li=Bn(_t,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),ji=(0,We.Z)(le),Ei=$t.useContext(gn.Z),nn=(0,$t.useMemo)(()=>xn!==void 0?xn:Qe&&Qe.requiredMark!==void 0?Qe.requiredMark:!vn,[vn,xn,Qe]),Vn=si!=null?si:Qe==null?void 0:Qe.colon,ze=ve("form",yn),[Ge,Oe]=Kt(ze),un=oe()(ze,`${ze}-${rn}`,{[`${ze}-hide-required-mark`]:nn===!1,[`${ze}-rtl`]:ie==="rtl",[`${ze}-${ji}`]:ji},Oe,Qe==null?void 0:Qe.className,Nn,_n),[kn]=Ke(Gn),{__INTERNAL__:Tn}=kn;Tn.name=zn;const Rn=(0,$t.useMemo)(()=>({name:zn,labelAlign:Re,labelCol:He,labelWrap:fn,wrapperCol:je,vertical:rn==="vertical",colon:Vn,requiredMark:nn,itemRef:Tn.itemRef,form:kn,feedbackIcons:Xe}),[zn,Re,He,je,rn,Vn,nn,kn,Xe]);$t.useImperativeHandle(Je,()=>kn);const ei=(pi,tn)=>{if(pi){let Ci={block:"nearest"};typeof pi=="object"&&(Ci=pi),kn.scrollToField(tn,Ci)}},qe=pi=>{if(On==null||On(pi),pi.errorFields.length){const tn=pi.errorFields[0].name;if(bn!==void 0){ei(bn,tn);return}Qe&&Qe.scrollToFirstError!==void 0&&ei(Qe.scrollToFirstError,tn)}};return Ge($t.createElement(Le.n,{disabled:mn},$t.createElement(Pe.q,{size:ji},$t.createElement(Jt.RV,Object.assign({},{validateMessages:Ei}),$t.createElement(Jt.q3.Provider,{value:Rn},$t.createElement(Se.default,Object.assign({id:zn},Li,{name:zn,onFinishFailed:qe,form:kn,style:Object.assign(Object.assign({},Qe==null?void 0:Qe.style),yi),className:un})))))))};var Ce=$t.forwardRef(dn),$n=Pt(41799),Qn=Pt(8654),jt=Pt(92343),Lt=Pt(11592);function xt(_t){if(typeof _t=="function")return _t;const Je=(0,Lt.Z)(_t);return Je.length<=1?Je[0]:Je}const Tt=()=>{const{status:_t,errors:Je=[],warnings:cn=[]}=(0,$t.useContext)(Jt.aM);return{status:_t,errors:Je,warnings:cn}};Tt.Context=Jt.aM;var Ft=Tt,yt=Pt(16089);function ee(_t){const[Je,cn]=$t.useState(_t),ve=(0,$t.useRef)(null),ie=(0,$t.useRef)([]),Qe=(0,$t.useRef)(!1);$t.useEffect(()=>(Qe.current=!1,()=>{Qe.current=!0,yt.Z.cancel(ve.current),ve.current=null}),[]);function yn(Nn){Qe.current||(ve.current===null&&(ie.current=[],ve.current=(0,yt.Z)(()=>{ve.current=null,cn(_n=>{let le=_n;return ie.current.forEach(mn=>{le=mn(le)}),le})})),ie.current.push(Nn))}return[Je,yn]}function pe(){const{itemRef:_t}=$t.useContext(Jt.q3),Je=$t.useRef({});function cn(ve,ie){const Qe=ie&&typeof ie=="object"&&ie.ref,yn=ve.join("_");return(Je.current.name!==yn||Je.current.originRef!==Qe)&&(Je.current.name=yn,Je.current.originRef=Qe,Je.current.ref=(0,Qn.sQ)(_t(ve),Qe)),Je.current.ref}return cn}var qt=Pt(29194),Zt=Pt(34280),fe=Pt(2738),ce=Pt(27382),ne=Pt(37028);const Ne=_t=>{const{formItemCls:Je}=_t;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Je}-control`]:{display:"flex"}}}};var hn=(0,me.b)(["Form","item-item"],(_t,Je)=>{let{rootPrefixCls:cn}=Je;const ve=At(_t,cn);return[Ne(ve)]}),_e=_t=>{const{prefixCls:Je,status:cn,wrapperCol:ve,children:ie,errors:Qe,warnings:yn,_internalItemRender:Nn,extra:_n,help:le,fieldId:mn,marginBottom:Gn,onErrorVisibleChanged:si}=_t,Re=`${Je}-item`,fn=$t.useContext(Jt.q3),He=ve||fn.wrapperCol||{},je=oe()(`${Re}-control`,He.className),vn=$t.useMemo(()=>Object.assign({},fn),[fn]);delete vn.labelCol,delete vn.wrapperCol;const rn=$t.createElement("div",{className:`${Re}-control-input`},$t.createElement("div",{className:`${Re}-control-input-content`},ie)),bn=$t.useMemo(()=>({prefixCls:Je,status:cn}),[Je,cn]),xn=Gn!==null||Qe.length||yn.length?$t.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},$t.createElement(Jt.Rk.Provider,{value:bn},$t.createElement(Ie,{fieldId:mn,errors:Qe,warnings:yn,help:le,helpStatus:cn,className:`${Re}-explain-connected`,onVisibleChanged:si})),!!Gn&&$t.createElement("div",{style:{width:0,height:Gn}})):null,On={};mn&&(On.id=`${mn}_extra`);const zn=_n?$t.createElement("div",Object.assign({},On,{className:`${Re}-extra`}),_n):null,yi=Nn&&Nn.mark==="pro_table_render"&&Nn.render?Nn.render(_t,{input:rn,errorList:xn,extra:zn}):$t.createElement($t.Fragment,null,rn,xn,zn);return $t.createElement(Jt.q3.Provider,{value:vn},$t.createElement(ne.Z,Object.assign({},He,{className:je}),yi),$t.createElement(hn,{prefixCls:Je}))},En=Pt(61485),Ln=Pt(31724),ye=Pt(9763),on=Pt(6848),Pn=function(_t,Je){var cn={};for(var ve in _t)Object.prototype.hasOwnProperty.call(_t,ve)&&Je.indexOf(ve)<0&&(cn[ve]=_t[ve]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,ve=Object.getOwnPropertySymbols(_t);ie<ve.length;ie++)Je.indexOf(ve[ie])<0&&Object.prototype.propertyIsEnumerable.call(_t,ve[ie])&&(cn[ve[ie]]=_t[ve[ie]]);return cn};function Cn(_t){return _t?typeof _t=="object"&&!$t.isValidElement(_t)?_t:{title:_t}:null}var Jn=_t=>{let{prefixCls:Je,label:cn,htmlFor:ve,labelCol:ie,labelAlign:Qe,colon:yn,required:Nn,requiredMark:_n,tooltip:le}=_t;var mn;const[Gn]=(0,ye.Z)("Form"),{vertical:si,labelAlign:Re,labelCol:fn,labelWrap:He,colon:je}=$t.useContext(Jt.q3);if(!cn)return null;const vn=ie||fn||{},rn=Qe||Re,bn=`${Je}-item-label`,xn=oe()(bn,rn==="left"&&`${bn}-left`,vn.className,{[`${bn}-wrap`]:!!He});let On=cn;const zn=yn===!0||je!==!1&&yn!==!1;zn&&!si&&typeof cn=="string"&&cn.trim()!==""&&(On=cn.replace(/[:|:]\s*$/,""));const Xe=Cn(le);if(Xe){const{icon:nn=$t.createElement(En.Z,null)}=Xe,Vn=Pn(Xe,["icon"]),ze=$t.createElement(on.Z,Object.assign({},Vn),$t.cloneElement(nn,{className:`${Je}-item-tooltip`,title:""}));On=$t.createElement($t.Fragment,null,On,ze)}const Li=_n==="optional",ji=typeof _n=="function";ji?On=_n(On,{required:!!Nn}):Li&&!Nn&&(On=$t.createElement($t.Fragment,null,On,$t.createElement("span",{className:`${Je}-item-optional`,title:""},(Gn==null?void 0:Gn.optional)||((mn=Ln.Z.Form)===null||mn===void 0?void 0:mn.optional))));const Ei=oe()({[`${Je}-item-required`]:Nn,[`${Je}-item-required-mark-optional`]:Li||ji,[`${Je}-item-no-colon`]:!zn});return $t.createElement(ne.Z,Object.assign({},vn,{className:xn}),$t.createElement("label",{htmlFor:ve,className:Ei,title:typeof cn=="string"?cn:""},On))},ui=Pt(29679),ni=Pt(19248),fi=Pt(96512),Bi=Pt(58617);const Ti={success:ui.Z,warning:fi.Z,error:ni.Z,validating:Bi.Z};function Di(_t){let{children:Je,errors:cn,warnings:ve,hasFeedback:ie,validateStatus:Qe,prefixCls:yn,meta:Nn,noStyle:_n}=_t;const le=`${yn}-item`,{feedbackIcons:mn}=$t.useContext(Jt.q3),Gn=ln(cn,ve,Nn,null,!!ie,Qe),{isFormItemInput:si,status:Re}=$t.useContext(Jt.aM),fn=$t.useMemo(()=>{var He;let je;if(ie){const bn=ie!==!0&&ie.icons||mn,xn=Gn&&((He=bn==null?void 0:bn({status:Gn,errors:cn,warnings:ve}))===null||He===void 0?void 0:He[Gn]),On=Gn&&Ti[Gn];je=xn!==!1&&On?$t.createElement("span",{className:oe()(`${le}-feedback-icon`,`${le}-feedback-icon-${Gn}`)},xn||$t.createElement(On,null)):null}let vn=!0,rn=Gn||"";return _n&&(vn=si,rn=(Gn!=null?Gn:Re)||""),{status:rn,errors:cn,warnings:ve,hasFeedback:!!ie,feedbackIcon:je,isFormItemInput:vn}},[Gn,ie,_n,si,Re]);return $t.createElement(Jt.aM.Provider,{value:fn},Je)}var io=function(_t,Je){var cn={};for(var ve in _t)Object.prototype.hasOwnProperty.call(_t,ve)&&Je.indexOf(ve)<0&&(cn[ve]=_t[ve]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,ve=Object.getOwnPropertySymbols(_t);ie<ve.length;ie++)Je.indexOf(ve[ie])<0&&Object.prototype.propertyIsEnumerable.call(_t,ve[ie])&&(cn[ve[ie]]=_t[ve[ie]]);return cn};function to(_t){const{prefixCls:Je,className:cn,rootClassName:ve,style:ie,help:Qe,errors:yn,warnings:Nn,validateStatus:_n,meta:le,hasFeedback:mn,hidden:Gn,children:si,fieldId:Re,required:fn,isRequired:He,onSubItemMetaChange:je}=_t,vn=io(_t,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),rn=`${Je}-item`,{requiredMark:bn}=$t.useContext(Jt.q3),xn=$t.useRef(null),On=De(yn),zn=De(Nn),yi=Qe!=null,Xe=!!(yi||yn.length||Nn.length),Li=!!xn.current&&(0,qt.Z)(xn.current),[ji,Ei]=$t.useState(null);(0,Zt.Z)(()=>{if(Xe&&xn.current){const Oe=getComputedStyle(xn.current);Ei(parseInt(Oe.marginBottom,10))}},[Xe,Li]);const nn=Oe=>{Oe||Ei(null)},ze=function(){let Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const un=Oe?On:le.errors,kn=Oe?zn:le.warnings;return ln(un,kn,le,"",!!mn,_n)}(),Ge=oe()(rn,cn,ve,{[`${rn}-with-help`]:yi||On.length||zn.length,[`${rn}-has-feedback`]:ze&&mn,[`${rn}-has-success`]:ze==="success",[`${rn}-has-warning`]:ze==="warning",[`${rn}-has-error`]:ze==="error",[`${rn}-is-validating`]:ze==="validating",[`${rn}-hidden`]:Gn});return $t.createElement("div",{className:Ge,style:ie,ref:xn},$t.createElement(ce.Z,Object.assign({className:`${rn}-row`},(0,fe.Z)(vn,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),$t.createElement(Jn,Object.assign({htmlFor:Re},_t,{requiredMark:bn,required:fn!=null?fn:He,prefixCls:Je})),$t.createElement(_e,Object.assign({},_t,le,{errors:On,warnings:zn,prefixCls:Je,status:ze,help:Qe,marginBottom:ji,onErrorVisibleChanged:nn}),$t.createElement(Jt.qI.Provider,{value:je},$t.createElement(Di,{prefixCls:Je,meta:le,errors:le.errors,warnings:le.warnings,hasFeedback:mn,validateStatus:ze},si)))),!!ji&&$t.createElement("div",{className:`${rn}-margin-offset`,style:{marginBottom:-ji}}))}const Ri="__SPLIT__",Qi=null,Zn=$t.memo(_t=>{let{children:Je}=_t;return Je},(_t,Je)=>_t.value===Je.value&&_t.update===Je.update&&_t.childProps.length===Je.childProps.length&&_t.childProps.every((cn,ve)=>cn===Je.childProps[ve]));function Mt(_t){return _t!=null}function so(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Ii(_t){const{name:Je,noStyle:cn,className:ve,dependencies:ie,prefixCls:Qe,shouldUpdate:yn,rules:Nn,children:_n,required:le,label:mn,messageVariables:Gn,trigger:si="onChange",validateTrigger:Re,hidden:fn,help:He}=_t,{getPrefixCls:je}=$t.useContext(Ye.E_),{name:vn}=$t.useContext(Jt.q3),rn=xt(_n),bn=typeof rn=="function",xn=$t.useContext(Jt.qI),{validateTrigger:On}=$t.useContext(Se.FieldContext),zn=Re!==void 0?Re:On,yi=Mt(Je),Xe=je("form",Qe),[Li,ji]=Kt(Xe),Ei=$t.useContext(Se.ListContext),nn=$t.useRef(),[Vn,ze]=ee({}),[Ge,Oe]=(0,$n.Z)(()=>so()),un=tn=>{const Ci=Ei==null?void 0:Ei.getKey(tn.name);if(Oe(tn.destroy?so():tn,!0),cn&&He!==!1&&xn){let Ui=tn.name;if(tn.destroy)Ui=nn.current||Ui;else if(Ci!==void 0){const[$i,Co]=Ci;Ui=[$i].concat((0,vt.Z)(Co)),nn.current=Ui}xn(tn,Ui)}},kn=(tn,Ci)=>{ze(Ui=>{const $i=Object.assign({},Ui),lo=[].concat((0,vt.Z)(tn.name.slice(0,-1)),(0,vt.Z)(Ci)).join(Ri);return tn.destroy?delete $i[lo]:$i[lo]=tn,$i})},[Tn,Rn]=$t.useMemo(()=>{const tn=(0,vt.Z)(Ge.errors),Ci=(0,vt.Z)(Ge.warnings);return Object.values(Vn).forEach(Ui=>{tn.push.apply(tn,(0,vt.Z)(Ui.errors||[])),Ci.push.apply(Ci,(0,vt.Z)(Ui.warnings||[]))}),[tn,Ci]},[Vn,Ge.errors,Ge.warnings]),ei=pe();function qe(tn,Ci,Ui){return cn&&!fn?$t.createElement(Di,{prefixCls:Xe,hasFeedback:_t.hasFeedback,validateStatus:_t.validateStatus,meta:Ge,errors:Tn,warnings:Rn,noStyle:!0},tn):$t.createElement(to,Object.assign({key:"row"},_t,{className:oe()(ve,ji),prefixCls:Xe,fieldId:Ci,isRequired:Ui,errors:Tn,warnings:Rn,meta:Ge,onSubItemMetaChange:kn}),tn)}if(!yi&&!bn&&!ie)return Li(qe(rn));let pi={};return typeof mn=="string"?pi.label=mn:Je&&(pi.label=String(Je)),Gn&&(pi=Object.assign(Object.assign({},pi),Gn)),Li($t.createElement(Se.Field,Object.assign({},_t,{messageVariables:pi,trigger:si,validateTrigger:zn,onMetaChange:un}),(tn,Ci,Ui)=>{const $i=ke(Je).length&&Ci?Ci.name:[],Co=pn($i,vn),lo=le!==void 0?le:!!(Nn&&Nn.some(Yi=>{if(Yi&&typeof Yi=="object"&&Yi.required&&!Yi.warningOnly)return!0;if(typeof Yi=="function"){const oo=Yi(Ui);return oo&&oo.required&&!oo.warningOnly}return!1})),Si=Object.assign({},tn);let ii=null;if(Array.isArray(rn)&&yi)ii=rn;else if(!(bn&&(!(yn||ie)||yi))){if(!(ie&&!bn&&!yi))if((0,jt.l$)(rn)){const Yi=Object.assign(Object.assign({},rn.props),Si);if(Yi.id||(Yi.id=Co),He||Tn.length>0||Rn.length>0||_t.extra){const zt=[];(He||Tn.length>0)&&zt.push(`${Co}_help`),_t.extra&&zt.push(`${Co}_extra`),Yi["aria-describedby"]=zt.join(" ")}Tn.length>0&&(Yi["aria-invalid"]="true"),lo&&(Yi["aria-required"]="true"),(0,Qn.Yr)(rn)&&(Yi.ref=ei($i,rn)),new Set([].concat((0,vt.Z)(ke(si)),(0,vt.Z)(ke(zn)))).forEach(zt=>{Yi[zt]=function(){for(var Ai,vo,ao,Eo,Ho,Zi=arguments.length,xi=new Array(Zi),Fi=0;Fi<Zi;Fi++)xi[Fi]=arguments[Fi];(ao=Si[zt])===null||ao===void 0||(Ai=ao).call.apply(Ai,[Si].concat(xi)),(Ho=(Eo=rn.props)[zt])===null||Ho===void 0||(vo=Ho).call.apply(vo,[Eo].concat(xi))}});const Yn=[Yi["aria-required"],Yi["aria-invalid"],Yi["aria-describedby"]];ii=$t.createElement(Zn,{value:Si[_t.valuePropName||"value"],update:rn,childProps:Yn},(0,jt.Tm)(rn,Yi))}else bn&&(yn||ie)&&!yi?ii=rn(Ui):ii=rn}return qe(ii,Co,lo)}))}const Wi=Ii;Wi.useStatus=Ft;var ki=Wi,Bo=function(_t,Je){var cn={};for(var ve in _t)Object.prototype.hasOwnProperty.call(_t,ve)&&Je.indexOf(ve)<0&&(cn[ve]=_t[ve]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,ve=Object.getOwnPropertySymbols(_t);ie<ve.length;ie++)Je.indexOf(ve[ie])<0&&Object.prototype.propertyIsEnumerable.call(_t,ve[ie])&&(cn[ve[ie]]=_t[ve[ie]]);return cn},ai=_t=>{var{prefixCls:Je,children:cn}=_t,ve=Bo(_t,["prefixCls","children"]);const{getPrefixCls:ie}=$t.useContext(Ye.E_),Qe=ie("form",Je),yn=$t.useMemo(()=>({prefixCls:Qe,status:"error"}),[Qe]);return $t.createElement(Se.List,Object.assign({},ve),(Nn,_n,le)=>$t.createElement(Jt.Rk.Provider,{value:yn},cn(Nn.map(mn=>Object.assign(Object.assign({},mn),{fieldKey:mn.key})),_n,{errors:le.errors,warnings:le.warnings})))};function di(){const{form:_t}=(0,$t.useContext)(Jt.q3);return _t}const Ae=Ce;Ae.Item=ki,Ae.List=ai,Ae.ErrorList=Ie,Ae.useForm=Ke,Ae.useFormInstance=di,Ae.useWatch=Se.useWatch,Ae.Provider=Jt.RV,Ae.create=()=>{};var Be=Ae},8628:function(Sn,Ve,Pt){"use strict";var vt=Pt(59301),It=Pt(34280),oe=Pt(56762),de=Pt(69507);function $t(){let Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Jt=(0,vt.useRef)({}),De=(0,oe.Z)(),we=(0,de.ZP)();return(0,It.Z)(()=>{const te=we.subscribe(Fe=>{Jt.current=Fe,Ut&&De()});return()=>we.unsubscribe(te)},[]),Jt.current}Ve.Z=$t},9432:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return ft},n:function(){return ht}});var vt=Pt(19248),It=Pt(92310),oe=Pt.n(It),de=Pt(93681),$t=Pt(8654),Ut=Pt(59301),Jt=Pt(19080),De=Pt(36355),we=Pt(1684),te=Pt(19716),Fe=Pt(32441),re=Pt(33234),me=Pt(59412),Ot=Pt(9937);function et(mt){return!!(mt.prefix||mt.suffix||mt.allowClear)}var nt=function(mt,wt){var Et={};for(var Nt in mt)Object.prototype.hasOwnProperty.call(mt,Nt)&&wt.indexOf(Nt)<0&&(Et[Nt]=mt[Nt]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Nt=Object.getOwnPropertySymbols(mt);Dt<Nt.length;Dt++)wt.indexOf(Nt[Dt])<0&&Object.prototype.propertyIsEnumerable.call(mt,Nt[Dt])&&(Et[Nt[Dt]]=mt[Nt[Dt]]);return Et};function ht(mt,wt){if(!mt)return;mt.focus(wt);const{cursor:Et}=wt||{};if(Et){const Nt=mt.value.length;switch(Et){case"start":mt.setSelectionRange(0,0);break;case"end":mt.setSelectionRange(Nt,Nt);break;default:mt.setSelectionRange(0,Nt);break}}}var ft=(0,Ut.forwardRef)((mt,wt)=>{var Et;const{prefixCls:Nt,bordered:Dt=!0,status:At,size:Kt,disabled:Wt,onBlur:xe,onFocus:Vt,suffix:Ie,allowClear:Se,addonAfter:Ye,addonBefore:Le,className:Pe,style:We,styles:Ue,rootClassName:ue,onChange:Ht,classNames:ke}=mt,pn=nt(mt,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:ln,direction:Ee,input:Ke}=Ut.useContext(De.E_),gn=ln("input",Nt),Bn=(0,Ut.useRef)(null),[dn,In]=(0,Ot.ZP)(gn),{compactSize:Ce,compactItemClassnames:$n}=(0,re.ri)(gn,Ee),Qn=(0,te.Z)(hn=>{var an;return(an=Kt!=null?Kt:Ce)!==null&&an!==void 0?an:hn}),jt=Ut.useContext(we.Z),Lt=Wt!=null?Wt:jt,{status:xt,hasFeedback:Tt,feedbackIcon:Ft}=(0,Ut.useContext)(Fe.aM),yt=(0,Jt.F)(xt,At),ee=et(mt)||!!Tt,pe=(0,Ut.useRef)(ee);(0,Ut.useEffect)(()=>{var hn;ee&&pe.current,pe.current=ee},[ee]);const qt=(0,me.Z)(Bn,!0),Zt=hn=>{qt(),xe==null||xe(hn)},fe=hn=>{qt(),Vt==null||Vt(hn)},ce=hn=>{qt(),Ht==null||Ht(hn)},ne=(Tt||Ie)&&Ut.createElement(Ut.Fragment,null,Ie,Tt&&Ft);let Ne;return typeof Se=="object"&&(Se!=null&&Se.clearIcon)?Ne=Se:Se&&(Ne={clearIcon:Ut.createElement(vt.Z,null)}),dn(Ut.createElement(de.default,Object.assign({ref:(0,$t.sQ)(wt,Bn),prefixCls:gn,autoComplete:Ke==null?void 0:Ke.autoComplete},pn,{disabled:Lt,onBlur:Zt,onFocus:fe,style:Object.assign(Object.assign({},Ke==null?void 0:Ke.style),We),styles:Object.assign(Object.assign({},Ke==null?void 0:Ke.styles),Ue),suffix:ne,allowClear:Ne,className:oe()(Pe,ue,$n,Ke==null?void 0:Ke.className),onChange:ce,addonAfter:Ye&&Ut.createElement(re.BR,null,Ut.createElement(Fe.Ux,{override:!0,status:!0},Ye)),addonBefore:Le&&Ut.createElement(re.BR,null,Ut.createElement(Fe.Ux,{override:!0,status:!0},Le)),classNames:Object.assign(Object.assign(Object.assign({},ke),Ke==null?void 0:Ke.classNames),{input:oe()({[`${gn}-sm`]:Qn==="small",[`${gn}-lg`]:Qn==="large",[`${gn}-rtl`]:Ee==="rtl",[`${gn}-borderless`]:!Dt},!ee&&(0,Jt.Z)(gn,yt),ke==null?void 0:ke.input,(Et=Ke==null?void 0:Ke.classNames)===null||Et===void 0?void 0:Et.input,In)}),classes:{affixWrapper:oe()({[`${gn}-affix-wrapper-sm`]:Qn==="small",[`${gn}-affix-wrapper-lg`]:Qn==="large",[`${gn}-affix-wrapper-rtl`]:Ee==="rtl",[`${gn}-affix-wrapper-borderless`]:!Dt},(0,Jt.Z)(`${gn}-affix-wrapper`,yt,Tt),In),wrapper:oe()({[`${gn}-group-rtl`]:Ee==="rtl"},In),group:oe()({[`${gn}-group-wrapper-sm`]:Qn==="small",[`${gn}-group-wrapper-lg`]:Qn==="large",[`${gn}-group-wrapper-rtl`]:Ee==="rtl",[`${gn}-group-wrapper-disabled`]:Lt},(0,Jt.Z)(`${gn}-group-wrapper`,yt,Tt),In)}})))})},1643:function(Sn,Ve,Pt){"use strict";var vt=Pt(19248),It=Pt(92310),oe=Pt.n(It),de=Pt(9296),$t=Pt(59301),Ut=Pt(19080),Jt=Pt(36355),De=Pt(1684),we=Pt(19716),te=Pt(32441),Fe=Pt(9432),re=Pt(9937),me=function(et,nt){var ht={};for(var at in et)Object.prototype.hasOwnProperty.call(et,at)&&nt.indexOf(at)<0&&(ht[at]=et[at]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,at=Object.getOwnPropertySymbols(et);ft<at.length;ft++)nt.indexOf(at[ft])<0&&Object.prototype.propertyIsEnumerable.call(et,at[ft])&&(ht[at[ft]]=et[at[ft]]);return ht};const Ot=(0,$t.forwardRef)((et,nt)=>{const{prefixCls:ht,bordered:at=!0,size:ft,disabled:mt,status:wt,allowClear:Et,showCount:Nt,classNames:Dt,rootClassName:At,className:Kt}=et,Wt=me(et,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:xe,direction:Vt}=$t.useContext(Jt.E_),Ie=(0,we.Z)(ft),Se=$t.useContext(De.Z),Ye=mt!=null?mt:Se,{status:Le,hasFeedback:Pe,feedbackIcon:We}=$t.useContext(te.aM),Ue=(0,Ut.F)(Le,wt),ue=$t.useRef(null);$t.useImperativeHandle(nt,()=>{var Ee;return{resizableTextArea:(Ee=ue.current)===null||Ee===void 0?void 0:Ee.resizableTextArea,focus:Ke=>{var gn,Bn;(0,Fe.n)((Bn=(gn=ue.current)===null||gn===void 0?void 0:gn.resizableTextArea)===null||Bn===void 0?void 0:Bn.textArea,Ke)},blur:()=>{var Ke;return(Ke=ue.current)===null||Ke===void 0?void 0:Ke.blur()}}});const Ht=xe("input",ht);let ke;typeof Et=="object"&&(Et!=null&&Et.clearIcon)?ke=Et:Et&&(ke={clearIcon:$t.createElement(vt.Z,null)});const[pn,ln]=(0,re.ZP)(Ht);return pn($t.createElement(de.default,Object.assign({},Wt,{disabled:Ye,allowClear:ke,className:oe()(Kt,At),classes:{affixWrapper:oe()(`${Ht}-textarea-affix-wrapper`,{[`${Ht}-affix-wrapper-rtl`]:Vt==="rtl",[`${Ht}-affix-wrapper-borderless`]:!at,[`${Ht}-affix-wrapper-sm`]:Ie==="small",[`${Ht}-affix-wrapper-lg`]:Ie==="large",[`${Ht}-textarea-show-count`]:Nt},(0,Ut.Z)(`${Ht}-affix-wrapper`,Ue),ln)},classNames:Object.assign(Object.assign({},Dt),{textarea:oe()({[`${Ht}-borderless`]:!at,[`${Ht}-sm`]:Ie==="small",[`${Ht}-lg`]:Ie==="large"},(0,Ut.Z)(Ht,Ue),ln,Dt==null?void 0:Dt.textarea)}),prefixCls:Ht,suffix:Pe&&$t.createElement("span",{className:`${Ht}-textarea-suffix`},We),showCount:Nt,ref:ue})))});Ve.Z=Ot},59412:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return It}});var vt=Pt(59301);function It(oe,de){const $t=(0,vt.useRef)([]),Ut=()=>{$t.current.push(setTimeout(()=>{var Jt,De,we,te;!((Jt=oe.current)===null||Jt===void 0)&&Jt.input&&((De=oe.current)===null||De===void 0?void 0:De.input.getAttribute("type"))==="password"&&(!((we=oe.current)===null||we===void 0)&&we.input.hasAttribute("value"))&&((te=oe.current)===null||te===void 0||te.input.removeAttribute("value"))}))};return(0,vt.useEffect)(()=>(de&&Ut(),()=>$t.current.forEach(Jt=>{Jt&&clearTimeout(Jt)})),[]),Ut}},92832:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{default:function(){return Ie}});var vt=Pt(92310),It=Pt.n(vt),oe=Pt(59301),de=Pt(36355),$t=Pt(32441),Ut=Pt(9937),De=Se=>{const{getPrefixCls:Ye,direction:Le}=(0,oe.useContext)(de.E_),{prefixCls:Pe,className:We}=Se,Ue=Ye("input-group",Pe),ue=Ye("input"),[Ht,ke]=(0,Ut.ZP)(ue),pn=It()(Ue,{[`${Ue}-lg`]:Se.size==="large",[`${Ue}-sm`]:Se.size==="small",[`${Ue}-compact`]:Se.compact,[`${Ue}-rtl`]:Le==="rtl"},ke,We),ln=(0,oe.useContext)($t.aM),Ee=(0,oe.useMemo)(()=>Object.assign(Object.assign({},ln),{isFormItemInput:!1}),[ln]);return Ht(oe.createElement("span",{className:pn,style:Se.style,onMouseEnter:Se.onMouseEnter,onMouseLeave:Se.onMouseLeave,onFocus:Se.onFocus,onBlur:Se.onBlur},oe.createElement($t.aM.Provider,{value:Ee},Se.children)))},we=Pt(9432),te=Pt(73331),Fe=Pt(15277),re=Pt(2738),me=Pt(8654),Ot=Pt(59412),et=function(Se,Ye){var Le={};for(var Pe in Se)Object.prototype.hasOwnProperty.call(Se,Pe)&&Ye.indexOf(Pe)<0&&(Le[Pe]=Se[Pe]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,Pe=Object.getOwnPropertySymbols(Se);We<Pe.length;We++)Ye.indexOf(Pe[We])<0&&Object.prototype.propertyIsEnumerable.call(Se,Pe[We])&&(Le[Pe[We]]=Se[Pe[We]]);return Le};const nt=Se=>Se?oe.createElement(Fe.Z,null):oe.createElement(te.Z,null),ht={click:"onClick",hover:"onMouseOver"};var ft=oe.forwardRef((Se,Ye)=>{const{visibilityToggle:Le=!0}=Se,Pe=typeof Le=="object"&&Le.visible!==void 0,[We,Ue]=(0,oe.useState)(()=>Pe?Le.visible:!1),ue=(0,oe.useRef)(null);oe.useEffect(()=>{Pe&&Ue(Le.visible)},[Pe,Le]);const Ht=(0,Ot.Z)(ue),ke=()=>{const{disabled:Lt}=Se;Lt||(We&&Ht(),Ue(xt=>{var Tt;const Ft=!xt;return typeof Le=="object"&&((Tt=Le.onVisibleChange)===null||Tt===void 0||Tt.call(Le,Ft)),Ft}))},pn=Lt=>{const{action:xt="click",iconRender:Tt=nt}=Se,Ft=ht[xt]||"",yt=Tt(We),ee={[Ft]:ke,className:`${Lt}-icon`,key:"passwordIcon",onMouseDown:pe=>{pe.preventDefault()},onMouseUp:pe=>{pe.preventDefault()}};return oe.cloneElement(oe.isValidElement(yt)?yt:oe.createElement("span",null,yt),ee)},{className:ln,prefixCls:Ee,inputPrefixCls:Ke,size:gn}=Se,Bn=et(Se,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:dn}=oe.useContext(de.E_),In=dn("input",Ke),Ce=dn("input-password",Ee),$n=Le&&pn(Ce),Qn=It()(Ce,ln,{[`${Ce}-${gn}`]:!!gn}),jt=Object.assign(Object.assign({},(0,re.Z)(Bn,["suffix","iconRender","visibilityToggle"])),{type:We?"text":"password",className:Qn,prefixCls:In,suffix:$n});return gn&&(jt.size=gn),oe.createElement(we.Z,Object.assign({ref:(0,me.sQ)(Ye,ue)},jt))}),mt=Pt(47472),wt=Pt(92343),Et=Pt(3113),Nt=Pt(19716),Dt=Pt(33234),At=function(Se,Ye){var Le={};for(var Pe in Se)Object.prototype.hasOwnProperty.call(Se,Pe)&&Ye.indexOf(Pe)<0&&(Le[Pe]=Se[Pe]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,Pe=Object.getOwnPropertySymbols(Se);We<Pe.length;We++)Ye.indexOf(Pe[We])<0&&Object.prototype.propertyIsEnumerable.call(Se,Pe[We])&&(Le[Pe[We]]=Se[Pe[We]]);return Le},Wt=oe.forwardRef((Se,Ye)=>{const{prefixCls:Le,inputPrefixCls:Pe,className:We,size:Ue,suffix:ue,enterButton:Ht=!1,addonAfter:ke,loading:pn,disabled:ln,onSearch:Ee,onChange:Ke,onCompositionStart:gn,onCompositionEnd:Bn}=Se,dn=At(Se,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:In,direction:Ce}=oe.useContext(de.E_),$n=oe.useRef(!1),Qn=In("input-search",Le),jt=In("input",Pe),{compactSize:Lt}=(0,Dt.ri)(Qn,Ce),xt=(0,Nt.Z)(_e=>{var En;return(En=Ue!=null?Ue:Lt)!==null&&En!==void 0?En:_e}),Tt=oe.useRef(null),Ft=_e=>{_e&&_e.target&&_e.type==="click"&&Ee&&Ee(_e.target.value,_e,{source:"clear"}),Ke&&Ke(_e)},yt=_e=>{var En;document.activeElement===((En=Tt.current)===null||En===void 0?void 0:En.input)&&_e.preventDefault()},ee=_e=>{var En,Ln;Ee&&Ee((Ln=(En=Tt.current)===null||En===void 0?void 0:En.input)===null||Ln===void 0?void 0:Ln.value,_e,{source:"input"})},pe=_e=>{$n.current||pn||ee(_e)},qt=typeof Ht=="boolean"?oe.createElement(mt.Z,null):null,Zt=`${Qn}-button`;let fe;const ce=Ht||{},ne=ce.type&&ce.type.__ANT_BUTTON===!0;ne||ce.type==="button"?fe=(0,wt.Tm)(ce,Object.assign({onMouseDown:yt,onClick:_e=>{var En,Ln;(Ln=(En=ce==null?void 0:ce.props)===null||En===void 0?void 0:En.onClick)===null||Ln===void 0||Ln.call(En,_e),ee(_e)},key:"enterButton"},ne?{className:Zt,size:xt}:{})):fe=oe.createElement(Et.ZP,{className:Zt,type:Ht?"primary":void 0,size:xt,disabled:ln,key:"enterButton",onMouseDown:yt,onClick:ee,loading:pn,icon:qt},Ht),ke&&(fe=[fe,(0,wt.Tm)(ke,{key:"addonAfter"})]);const Ne=It()(Qn,{[`${Qn}-rtl`]:Ce==="rtl",[`${Qn}-${xt}`]:!!xt,[`${Qn}-with-button`]:!!Ht},We),hn=_e=>{$n.current=!0,gn==null||gn(_e)},an=_e=>{$n.current=!1,Bn==null||Bn(_e)};return oe.createElement(we.Z,Object.assign({ref:(0,me.sQ)(Tt,Ye),onPressEnter:pe},dn,{size:xt,onCompositionStart:hn,onCompositionEnd:an,prefixCls:jt,addonAfter:fe,suffix:ue,onChange:Ft,className:Ne,disabled:ln}))}),xe=Pt(1643);const Vt=we.Z;Vt.Group=De,Vt.Search=Wt,Vt.TextArea=xe.Z,Vt.Password=ft;var Ie=Vt},45818:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{D:function(){return mt},Z:function(){return Nt}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(At,Kt){return It.createElement($t.Z,(0,vt.Z)({},At,{ref:Kt,icon:de}))},Jt=It.forwardRef(Ut),De=Jt,we=Pt(33853),te=Pt(38819),Fe=Pt(92310),re=Pt.n(Fe),me=Pt(2738),et=Dt=>!isNaN(parseFloat(Dt))&&isFinite(Dt),nt=Pt(36355),ht=Pt(84966),at=function(Dt,At){var Kt={};for(var Wt in Dt)Object.prototype.hasOwnProperty.call(Dt,Wt)&&At.indexOf(Wt)<0&&(Kt[Wt]=Dt[Wt]);if(Dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xe=0,Wt=Object.getOwnPropertySymbols(Dt);xe<Wt.length;xe++)At.indexOf(Wt[xe])<0&&Object.prototype.propertyIsEnumerable.call(Dt,Wt[xe])&&(Kt[Wt[xe]]=Dt[Wt[xe]]);return Kt};const ft={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},mt=It.createContext({}),wt=(()=>{let Dt=0;return function(){let At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Dt+=1,`${At}${Dt}`}})();var Nt=It.forwardRef((Dt,At)=>{const{prefixCls:Kt,className:Wt,trigger:xe,children:Vt,defaultCollapsed:Ie=!1,theme:Se="dark",style:Ye={},collapsible:Le=!1,reverseArrow:Pe=!1,width:We=200,collapsedWidth:Ue=80,zeroWidthTriggerStyle:ue,breakpoint:Ht,onCollapse:ke,onBreakpoint:pn}=Dt,ln=at(Dt,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Ee}=(0,It.useContext)(ht.Gs),[Ke,gn]=(0,It.useState)("collapsed"in Dt?Dt.collapsed:Ie),[Bn,dn]=(0,It.useState)(!1);(0,It.useEffect)(()=>{"collapsed"in Dt&&gn(Dt.collapsed)},[Dt.collapsed]);const In=(xt,Tt)=>{"collapsed"in Dt||gn(xt),ke==null||ke(xt,Tt)},Ce=(0,It.useRef)();Ce.current=xt=>{dn(xt.matches),pn==null||pn(xt.matches),Ke!==xt.matches&&In(xt.matches,"responsive")},(0,It.useEffect)(()=>{function xt(Ft){return Ce.current(Ft)}let Tt;if(typeof window!="undefined"){const{matchMedia:Ft}=window;if(Ft&&Ht&&Ht in ft){Tt=Ft(`(max-width: ${ft[Ht]})`);try{Tt.addEventListener("change",xt)}catch(yt){Tt.addListener(xt)}xt(Tt)}}return()=>{try{Tt==null||Tt.removeEventListener("change",xt)}catch(Ft){Tt==null||Tt.removeListener(xt)}}},[Ht]),(0,It.useEffect)(()=>{const xt=wt("ant-sider-");return Ee.addSider(xt),()=>Ee.removeSider(xt)},[]);const $n=()=>{In(!Ke,"clickTrigger")},{getPrefixCls:Qn}=(0,It.useContext)(nt.E_),jt=()=>{const xt=Qn("layout-sider",Kt),Tt=(0,me.Z)(ln,["collapsed"]),Ft=Ke?Ue:We,yt=et(Ft)?`${Ft}px`:String(Ft),ee=parseFloat(String(Ue||0))===0?It.createElement("span",{onClick:$n,className:re()(`${xt}-zero-width-trigger`,`${xt}-zero-width-trigger-${Pe?"right":"left"}`),style:ue},xe||It.createElement(De,null)):null,Zt={expanded:Pe?It.createElement(te.Z,null):It.createElement(we.Z,null),collapsed:Pe?It.createElement(we.Z,null):It.createElement(te.Z,null)}[Ke?"collapsed":"expanded"],fe=xe!==null?ee||It.createElement("div",{className:`${xt}-trigger`,onClick:$n,style:{width:yt}},xe||Zt):null,ce=Object.assign(Object.assign({},Ye),{flex:`0 0 ${yt}`,maxWidth:yt,minWidth:yt,width:yt}),ne=re()(xt,`${xt}-${Se}`,{[`${xt}-collapsed`]:!!Ke,[`${xt}-has-trigger`]:Le&&xe!==null&&!ee,[`${xt}-below`]:!!Bn,[`${xt}-zero-width`]:parseFloat(yt)===0},Wt);return It.createElement("aside",Object.assign({className:ne},Tt,{style:ce,ref:At}),It.createElement("div",{className:`${xt}-children`},Vt),Le||Bn&&ee?fe:null)},Lt=It.useMemo(()=>({siderCollapsed:Ke}),[Ke]);return It.createElement(mt.Provider,{value:Lt},jt())})},84966:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{VY:function(){return mt},$_:function(){return ft},h4:function(){return at},Gs:function(){return me},ZP:function(){return wt}});var vt=Pt(19127),It=Pt(92310),oe=Pt.n(It),de=Pt(2738),$t=Pt(59301),Ut=Pt(36355),Jt=Pt(83116),we=Et=>{const{componentCls:Nt,bodyBg:Dt,lightSiderBg:At,lightTriggerBg:Kt,lightTriggerColor:Wt}=Et;return{[`${Nt}-sider-light`]:{background:At,[`${Nt}-sider-trigger`]:{color:Wt,background:Kt},[`${Nt}-sider-zero-width-trigger`]:{color:Wt,background:Kt,border:`1px solid ${Dt}`,borderInlineStart:0}}}};const te=Et=>{const{antCls:Nt,componentCls:Dt,colorText:At,triggerColor:Kt,footerBg:Wt,triggerBg:xe,headerHeight:Vt,headerPadding:Ie,headerColor:Se,footerPadding:Ye,triggerHeight:Le,zeroTriggerHeight:Pe,zeroTriggerWidth:We,motionDurationMid:Ue,motionDurationSlow:ue,fontSize:Ht,borderRadius:ke,bodyBg:pn,headerBg:ln,siderBg:Ee}=Et;return{[Dt]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:pn,"&, *":{boxSizing:"border-box"},[`&${Dt}-has-sider`]:{flexDirection:"row",[`> ${Dt}, > ${Dt}-content`]:{width:0}},[`${Dt}-header, &${Dt}-footer`]:{flex:"0 0 auto"},[`${Dt}-sider`]:{position:"relative",minWidth:0,background:Ee,transition:`all ${Ue}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Nt}-menu${Nt}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:Le},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:Le,color:Kt,lineHeight:`${Le}px`,textAlign:"center",background:xe,cursor:"pointer",transition:`all ${Ue}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Vt,insetInlineEnd:-We,zIndex:1,width:We,height:Pe,color:Kt,fontSize:Et.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Ee,borderStartStartRadius:0,borderStartEndRadius:ke,borderEndEndRadius:ke,borderEndStartRadius:0,cursor:"pointer",transition:`background ${ue} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${ue}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-We,borderStartStartRadius:ke,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:ke}}}}},we(Et)),{"&-rtl":{direction:"rtl"}}),[`${Dt}-header`]:{height:Vt,padding:Ie,color:Se,lineHeight:`${Vt}px`,background:ln,[`${Nt}-menu`]:{lineHeight:"inherit"}},[`${Dt}-footer`]:{padding:Ye,color:At,fontSize:Ht,background:Wt},[`${Dt}-content`]:{flex:"auto",minHeight:0}}};var Fe=(0,Jt.Z)("Layout",Et=>[te(Et)],Et=>{const{colorBgLayout:Nt,controlHeight:Dt,controlHeightLG:At,colorText:Kt,controlHeightSM:Wt,marginXXS:xe,colorTextLightSolid:Vt,colorBgContainer:Ie}=Et,Se=At*1.25;return{colorBgHeader:"#001529",colorBgBody:Nt,colorBgTrigger:"#002140",bodyBg:Nt,headerBg:"#001529",headerHeight:Dt*2,headerPadding:`0 ${Se}px`,headerColor:Kt,footerPadding:`${Wt}px ${Se}px`,footerBg:Nt,siderBg:"#001529",triggerHeight:At+xe*2,triggerBg:"#002140",triggerColor:Vt,zeroTriggerWidth:At,zeroTriggerHeight:At,lightSiderBg:Ie,lightTriggerBg:Ie,lightTriggerColor:Kt}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),re=function(Et,Nt){var Dt={};for(var At in Et)Object.prototype.hasOwnProperty.call(Et,At)&&Nt.indexOf(At)<0&&(Dt[At]=Et[At]);if(Et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Kt=0,At=Object.getOwnPropertySymbols(Et);Kt<At.length;Kt++)Nt.indexOf(At[Kt])<0&&Object.prototype.propertyIsEnumerable.call(Et,At[Kt])&&(Dt[At[Kt]]=Et[At[Kt]]);return Dt};const me=$t.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Ot(Et){let{suffixCls:Nt,tagName:Dt,displayName:At}=Et;return Kt=>$t.forwardRef((xe,Vt)=>$t.createElement(Kt,Object.assign({ref:Vt,suffixCls:Nt,tagName:Dt},xe)))}const et=$t.forwardRef((Et,Nt)=>{const{prefixCls:Dt,suffixCls:At,className:Kt,tagName:Wt}=Et,xe=re(Et,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Vt}=$t.useContext(Ut.E_),Ie=Vt("layout",Dt),[Se,Ye]=Fe(Ie),Le=At?`${Ie}-${At}`:Ie;return Se($t.createElement(Wt,Object.assign({className:oe()(Dt||Le,Kt,Ye),ref:Nt},xe)))}),nt=$t.forwardRef((Et,Nt)=>{const{direction:Dt}=$t.useContext(Ut.E_),[At,Kt]=$t.useState([]),{prefixCls:Wt,className:xe,rootClassName:Vt,children:Ie,hasSider:Se,tagName:Ye,style:Le}=Et,Pe=re(Et,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),We=(0,de.Z)(Pe,["suffixCls"]),{getPrefixCls:Ue,layout:ue}=$t.useContext(Ut.E_),Ht=Ue("layout",Wt),[ke,pn]=Fe(Ht),ln=oe()(Ht,{[`${Ht}-has-sider`]:typeof Se=="boolean"?Se:At.length>0,[`${Ht}-rtl`]:Dt==="rtl"},ue==null?void 0:ue.className,xe,Vt,pn),Ee=$t.useMemo(()=>({siderHook:{addSider:Ke=>{Kt(gn=>[].concat((0,vt.Z)(gn),[Ke]))},removeSider:Ke=>{Kt(gn=>gn.filter(Bn=>Bn!==Ke))}}}),[]);return ke($t.createElement(me.Provider,{value:Ee},$t.createElement(Ye,Object.assign({ref:Nt,className:ln,style:Object.assign(Object.assign({},ue==null?void 0:ue.style),Le)},We),Ie)))}),ht=Ot({tagName:"div",displayName:"Layout"})(nt),at=Ot({suffixCls:"header",tagName:"header",displayName:"Header"})(et),ft=Ot({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(et),mt=Ot({suffixCls:"content",tagName:"main",displayName:"Content"})(et);var wt=ht},73755:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return Ye}});var vt=Pt(19127),It=Pt(92310),oe=Pt.n(It),de=Pt(59301),$t=Pt(50371),Ut=Pt(69507),Jt=Pt(36355),De=Pt(93891),we=Pt(27382),te=Pt(8628),Fe=Pt(58421),re=Pt(71418),me=Pt(92343),Ot=Pt(37028);const et=de.createContext({}),nt=et.Consumer;var ht=function(Le,Pe){var We={};for(var Ue in Le)Object.prototype.hasOwnProperty.call(Le,Ue)&&Pe.indexOf(Ue)<0&&(We[Ue]=Le[Ue]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,Ue=Object.getOwnPropertySymbols(Le);ue<Ue.length;ue++)Pe.indexOf(Ue[ue])<0&&Object.prototype.propertyIsEnumerable.call(Le,Ue[ue])&&(We[Ue[ue]]=Le[Ue[ue]]);return We};const at=Le=>{var{prefixCls:Pe,className:We,avatar:Ue,title:ue,description:Ht}=Le,ke=ht(Le,["prefixCls","className","avatar","title","description"]);const{getPrefixCls:pn}=(0,de.useContext)(Jt.E_),ln=pn("list",Pe),Ee=oe()(`${ln}-item-meta`,We),Ke=de.createElement("div",{className:`${ln}-item-meta-content`},ue&&de.createElement("h4",{className:`${ln}-item-meta-title`},ue),Ht&&de.createElement("div",{className:`${ln}-item-meta-description`},Ht));return de.createElement("div",Object.assign({},ke,{className:Ee}),Ue&&de.createElement("div",{className:`${ln}-item-meta-avatar`},Ue),(ue||Ht)&&Ke)},ft=(Le,Pe)=>{var{prefixCls:We,children:Ue,actions:ue,extra:Ht,className:ke,colStyle:pn}=Le,ln=ht(Le,["prefixCls","children","actions","extra","className","colStyle"]);const{grid:Ee,itemLayout:Ke}=(0,de.useContext)(et),{getPrefixCls:gn}=(0,de.useContext)(Jt.E_),Bn=()=>{let jt;return de.Children.forEach(Ue,Lt=>{typeof Lt=="string"&&(jt=!0)}),jt&&de.Children.count(Ue)>1},dn=()=>Ke==="vertical"?!!Ht:!Bn(),In=gn("list",We),Ce=ue&&ue.length>0&&de.createElement("ul",{className:`${In}-item-action`,key:"actions"},ue.map((jt,Lt)=>de.createElement("li",{key:`${In}-item-action-${Lt}`},jt,Lt!==ue.length-1&&de.createElement("em",{className:`${In}-item-action-split`})))),$n=Ee?"div":"li",Qn=de.createElement($n,Object.assign({},ln,Ee?{}:{ref:Pe},{className:oe()(`${In}-item`,{[`${In}-item-no-flex`]:!dn()},ke)}),Ke==="vertical"&&Ht?[de.createElement("div",{className:`${In}-item-main`,key:"content"},Ue,Ce),de.createElement("div",{className:`${In}-item-extra`,key:"extra"},Ht)]:[Ue,Ce,(0,me.Tm)(Ht,{key:"extra"})]);return Ee?de.createElement(Ot.Z,{ref:Pe,flex:1,style:pn},Qn):Qn},mt=(0,de.forwardRef)(ft);mt.Meta=at;var wt=mt,Et=Pt(17313),Nt=Pt(83116),Dt=Pt(37613);const At=Le=>{const{listBorderedCls:Pe,componentCls:We,paddingLG:Ue,margin:ue,itemPaddingSM:Ht,itemPaddingLG:ke,marginLG:pn,borderRadiusLG:ln}=Le;return{[`${Pe}`]:{border:`${Le.lineWidth}px ${Le.lineType} ${Le.colorBorder}`,borderRadius:ln,[`${We}-header,${We}-footer,${We}-item`]:{paddingInline:Ue},[`${We}-pagination`]:{margin:`${ue}px ${pn}px`}},[`${Pe}${We}-sm`]:{[`${We}-item,${We}-header,${We}-footer`]:{padding:Ht}},[`${Pe}${We}-lg`]:{[`${We}-item,${We}-header,${We}-footer`]:{padding:ke}}}},Kt=Le=>{const{componentCls:Pe,screenSM:We,screenMD:Ue,marginLG:ue,marginSM:Ht,margin:ke}=Le;return{[`@media screen and (max-width:${Ue})`]:{[`${Pe}`]:{[`${Pe}-item`]:{[`${Pe}-item-action`]:{marginInlineStart:ue}}},[`${Pe}-vertical`]:{[`${Pe}-item`]:{[`${Pe}-item-extra`]:{marginInlineStart:ue}}}},[`@media screen and (max-width: ${We})`]:{[`${Pe}`]:{[`${Pe}-item`]:{flexWrap:"wrap",[`${Pe}-action`]:{marginInlineStart:Ht}}},[`${Pe}-vertical`]:{[`${Pe}-item`]:{flexWrap:"wrap-reverse",[`${Pe}-item-main`]:{minWidth:Le.contentWidth},[`${Pe}-item-extra`]:{margin:`auto auto ${ke}px`}}}}}},Wt=Le=>{const{componentCls:Pe,antCls:We,controlHeight:Ue,minHeight:ue,paddingSM:Ht,marginLG:ke,padding:pn,itemPadding:ln,colorPrimary:Ee,itemPaddingSM:Ke,itemPaddingLG:gn,paddingXS:Bn,margin:dn,colorText:In,colorTextDescription:Ce,motionDurationSlow:$n,lineWidth:Qn,headerBg:jt,footerBg:Lt,emptyTextPadding:xt,metaMarginBottom:Tt,avatarMarginRight:Ft,titleMarginBottom:yt,descriptionFontSize:ee}=Le,pe={};return["start","center","end"].forEach(qt=>{pe[`&-align-${qt}`]={textAlign:qt}}),{[`${Pe}`]:Object.assign(Object.assign({},(0,Et.Wf)(Le)),{position:"relative","*":{outline:"none"},[`${Pe}-header`]:{background:jt},[`${Pe}-footer`]:{background:Lt},[`${Pe}-header, ${Pe}-footer`]:{paddingBlock:Ht},[`${Pe}-pagination`]:Object.assign(Object.assign({marginBlockStart:ke},pe),{[`${We}-pagination-options`]:{textAlign:"start"}}),[`${Pe}-spin`]:{minHeight:ue,textAlign:"center"},[`${Pe}-items`]:{margin:0,padding:0,listStyle:"none"},[`${Pe}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:ln,color:In,[`${Pe}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${Pe}-item-meta-avatar`]:{marginInlineEnd:Ft},[`${Pe}-item-meta-content`]:{flex:"1 0",width:0,color:In},[`${Pe}-item-meta-title`]:{margin:`0 0 ${Le.marginXXS}px 0`,color:In,fontSize:Le.fontSize,lineHeight:Le.lineHeight,"> a":{color:In,transition:`all ${$n}`,"&:hover":{color:Ee}}},[`${Pe}-item-meta-description`]:{color:Ce,fontSize:ee,lineHeight:Le.lineHeight}},[`${Pe}-item-action`]:{flex:"0 0 auto",marginInlineStart:Le.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${Bn}px`,color:Ce,fontSize:Le.fontSize,lineHeight:Le.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${Pe}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:Qn,height:Math.ceil(Le.fontSize*Le.lineHeight)-Le.marginXXS*2,transform:"translateY(-50%)",backgroundColor:Le.colorSplit}}},[`${Pe}-empty`]:{padding:`${pn}px 0`,color:Ce,fontSize:Le.fontSizeSM,textAlign:"center"},[`${Pe}-empty-text`]:{padding:xt,color:Le.colorTextDisabled,fontSize:Le.fontSize,textAlign:"center"},[`${Pe}-item-no-flex`]:{display:"block"}}),[`${Pe}-grid ${We}-col > ${Pe}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:dn,paddingBlock:0,borderBlockEnd:"none"},[`${Pe}-vertical ${Pe}-item`]:{alignItems:"initial",[`${Pe}-item-main`]:{display:"block",flex:1},[`${Pe}-item-extra`]:{marginInlineStart:ke},[`${Pe}-item-meta`]:{marginBlockEnd:Tt,[`${Pe}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:yt,color:In,fontSize:Le.fontSizeLG,lineHeight:Le.lineHeightLG}},[`${Pe}-item-action`]:{marginBlockStart:pn,marginInlineStart:"auto","> li":{padding:`0 ${pn}px`,"&:first-child":{paddingInlineStart:0}}}},[`${Pe}-split ${Pe}-item`]:{borderBlockEnd:`${Le.lineWidth}px ${Le.lineType} ${Le.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${Pe}-split ${Pe}-header`]:{borderBlockEnd:`${Le.lineWidth}px ${Le.lineType} ${Le.colorSplit}`},[`${Pe}-split${Pe}-empty ${Pe}-footer`]:{borderTop:`${Le.lineWidth}px ${Le.lineType} ${Le.colorSplit}`},[`${Pe}-loading ${Pe}-spin-nested-loading`]:{minHeight:Ue},[`${Pe}-split${Pe}-something-after-last-item ${We}-spin-container > ${Pe}-items > ${Pe}-item:last-child`]:{borderBlockEnd:`${Le.lineWidth}px ${Le.lineType} ${Le.colorSplit}`},[`${Pe}-lg ${Pe}-item`]:{padding:gn},[`${Pe}-sm ${Pe}-item`]:{padding:Ke},[`${Pe}:not(${Pe}-vertical)`]:{[`${Pe}-item-no-flex`]:{[`${Pe}-item-action`]:{float:"right"}}}}};var xe=(0,Nt.Z)("List",Le=>{const Pe=(0,Dt.TS)(Le,{listBorderedCls:`${Le.componentCls}-bordered`,minHeight:Le.controlHeightLG});return[Wt(Pe),At(Pe),Kt(Pe)]},Le=>({contentWidth:220,itemPadding:`${Le.paddingContentVertical}px 0`,itemPaddingSM:`${Le.paddingContentVerticalSM}px ${Le.paddingContentHorizontal}px`,itemPaddingLG:`${Le.paddingContentVerticalLG}px ${Le.paddingContentHorizontalLG}px`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:Le.padding,metaMarginBottom:Le.padding,avatarMarginRight:Le.padding,titleMarginBottom:Le.paddingSM,descriptionFontSize:Le.fontSize})),Vt=Pt(19716),Ie=function(Le,Pe){var We={};for(var Ue in Le)Object.prototype.hasOwnProperty.call(Le,Ue)&&Pe.indexOf(Ue)<0&&(We[Ue]=Le[Ue]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,Ue=Object.getOwnPropertySymbols(Le);ue<Ue.length;ue++)Pe.indexOf(Ue[ue])<0&&Object.prototype.propertyIsEnumerable.call(Le,Ue[ue])&&(We[Ue[ue]]=Le[Ue[ue]]);return We};function Se(Le){var Pe,{pagination:We=!1,prefixCls:Ue,bordered:ue=!1,split:Ht=!0,className:ke,rootClassName:pn,style:ln,children:Ee,itemLayout:Ke,loadMore:gn,grid:Bn,dataSource:dn=[],size:In,header:Ce,footer:$n,loading:Qn=!1,rowKey:jt,renderItem:Lt,locale:xt}=Le,Tt=Ie(Le,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]);const Ft=We&&typeof We=="object"?We:{},[yt,ee]=de.useState(Ft.defaultCurrent||1),[pe,qt]=de.useState(Ft.defaultPageSize||10),{getPrefixCls:Zt,renderEmpty:fe,direction:ce,list:ne}=de.useContext(Jt.E_),Ne={current:1,total:0},hn=Ii=>(Wi,ki)=>{var Bo;ee(Wi),qt(ki),We&&We[Ii]&&((Bo=We==null?void 0:We[Ii])===null||Bo===void 0||Bo.call(We,Wi,ki))},an=hn("onChange"),_e=hn("onShowSizeChange"),En=(Ii,Wi)=>{if(!Lt)return null;let ki;return typeof jt=="function"?ki=jt(Ii):jt?ki=Ii[jt]:ki=Ii.key,ki||(ki=`list-item-${Wi}`),de.createElement(de.Fragment,{key:ki},Lt(Ii,Wi))},Ln=()=>!!(gn||We||$n),ye=Zt("list",Ue),[on,Pn]=xe(ye);let Cn=Qn;typeof Cn=="boolean"&&(Cn={spinning:Cn});const An=Cn&&Cn.spinning,Jn=(0,Vt.Z)(In);let ui="";switch(Jn){case"large":ui="lg";break;case"small":ui="sm";break;default:break}const ni=oe()(ye,{[`${ye}-vertical`]:Ke==="vertical",[`${ye}-${ui}`]:ui,[`${ye}-split`]:Ht,[`${ye}-bordered`]:ue,[`${ye}-loading`]:An,[`${ye}-grid`]:!!Bn,[`${ye}-something-after-last-item`]:Ln(),[`${ye}-rtl`]:ce==="rtl"},ne==null?void 0:ne.className,ke,pn,Pn),fi=(0,$t.Z)(Ne,{total:dn.length,current:yt,pageSize:pe},We||{}),Bi=Math.ceil(fi.total/fi.pageSize);fi.current>Bi&&(fi.current=Bi);const Ti=We?de.createElement("div",{className:oe()(`${ye}-pagination`,`${ye}-pagination-align-${(Pe=fi==null?void 0:fi.align)!==null&&Pe!==void 0?Pe:"end"}`)},de.createElement(Fe.Z,Object.assign({},fi,{onChange:an,onShowSizeChange:_e}))):null;let Di=(0,vt.Z)(dn);We&&dn.length>(fi.current-1)*fi.pageSize&&(Di=(0,vt.Z)(dn).splice((fi.current-1)*fi.pageSize,fi.pageSize));const io=Object.keys(Bn||{}).some(Ii=>["xs","sm","md","lg","xl","xxl"].includes(Ii)),to=(0,te.Z)(io),Ri=de.useMemo(()=>{for(let Ii=0;Ii<Ut.c4.length;Ii+=1){const Wi=Ut.c4[Ii];if(to[Wi])return Wi}},[to]),Qi=de.useMemo(()=>{if(!Bn)return;const Ii=Ri&&Bn[Ri]?Bn[Ri]:Bn.column;if(Ii)return{width:`${100/Ii}%`,maxWidth:`${100/Ii}%`}},[Bn==null?void 0:Bn.column,Ri]);let Zn=An&&de.createElement("div",{style:{minHeight:53}});if(Di.length>0){const Ii=Di.map((Wi,ki)=>En(Wi,ki));Zn=Bn?de.createElement(we.Z,{gutter:Bn.gutter},de.Children.map(Ii,Wi=>de.createElement("div",{key:Wi==null?void 0:Wi.key,style:Qi},Wi))):de.createElement("ul",{className:`${ye}-items`},Ii)}else!Ee&&!An&&(Zn=de.createElement("div",{className:`${ye}-empty-text`},xt&&xt.emptyText||(fe==null?void 0:fe("List"))||de.createElement(De.Z,{componentName:"List"})));const Mt=fi.position||"bottom",so=de.useMemo(()=>({grid:Bn,itemLayout:Ke}),[JSON.stringify(Bn),Ke]);return on(de.createElement(et.Provider,{value:so},de.createElement("div",Object.assign({style:Object.assign(Object.assign({},ne==null?void 0:ne.style),ln),className:ni},Tt),(Mt==="top"||Mt==="both")&&Ti,Ce&&de.createElement("div",{className:`${ye}-header`},Ce),de.createElement(re.Z,Object.assign({},Cn),Zn,Ee),$n&&de.createElement("div",{className:`${ye}-footer`},$n),gn||(Mt==="bottom"||Mt==="both")&&Ti)))}Se.Item=wt;var Ye=Se},40875:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{J:function(){return Ut}});var vt=Pt(59301),It=Pt(33234),oe=Pt(70425),de=function(Jt,De){var we={};for(var te in Jt)Object.prototype.hasOwnProperty.call(Jt,te)&&De.indexOf(te)<0&&(we[te]=Jt[te]);if(Jt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,te=Object.getOwnPropertySymbols(Jt);Fe<te.length;Fe++)De.indexOf(te[Fe])<0&&Object.prototype.propertyIsEnumerable.call(Jt,te[Fe])&&(we[te[Fe]]=Jt[te[Fe]]);return we};const $t=vt.createContext(null),Ut=vt.forwardRef((Jt,De)=>{const{children:we}=Jt,te=de(Jt,["children"]),Fe=vt.useContext($t),re=vt.useMemo(()=>Object.assign(Object.assign({},Fe),te),[Fe,te.prefixCls,te.mode,te.selectable]);return vt.createElement($t.Provider,{value:re},vt.createElement(It.BR,null,(0,oe.supportNodeRef)(we)?vt.cloneElement(we,{ref:De}):we))});Ve.Z=$t},20834:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{default:function(){return Lt}});var vt=Pt(15285),It=Pt(59301),oe=Pt(45818),de=Pt(92310),$t=Pt.n(de),Ut=Pt(36355),Jt=function(xt,Tt){var Ft={};for(var yt in xt)Object.prototype.hasOwnProperty.call(xt,yt)&&Tt.indexOf(yt)<0&&(Ft[yt]=xt[yt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,yt=Object.getOwnPropertySymbols(xt);ee<yt.length;ee++)Tt.indexOf(yt[ee])<0&&Object.prototype.propertyIsEnumerable.call(xt,yt[ee])&&(Ft[yt[ee]]=xt[yt[ee]]);return Ft},we=xt=>{const{prefixCls:Tt,className:Ft,dashed:yt}=xt,ee=Jt(xt,["prefixCls","className","dashed"]),{getPrefixCls:pe}=It.useContext(Ut.E_),qt=pe("menu",Tt),Zt=$t()({[`${qt}-item-divider-dashed`]:!!yt},Ft);return It.createElement(vt.iz,Object.assign({className:Zt},ee))},te=Pt(11592),Fe=Pt(2738),re=Pt(6848),me=Pt(92343),et=(0,It.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ht=xt=>{var Tt;const{className:Ft,children:yt,icon:ee,title:pe,danger:qt}=xt,{prefixCls:Zt,firstLevel:fe,direction:ce,disableMenuItemTitleTooltip:ne,inlineCollapsed:Ne}=It.useContext(et),hn=on=>{const Pn=It.createElement("span",{className:`${Zt}-title-content`},yt);return(!ee||(0,me.l$)(yt)&&yt.type==="span")&&yt&&on&&fe&&typeof yt=="string"?It.createElement("div",{className:`${Zt}-inline-collapsed-noicon`},yt.charAt(0)):Pn},{siderCollapsed:an}=It.useContext(oe.D);let _e=pe;typeof pe=="undefined"?_e=fe?yt:"":pe===!1&&(_e="");const En={title:_e};!an&&!Ne&&(En.title=null,En.open=!1);const Ln=(0,te.Z)(yt).length;let ye=It.createElement(vt.ck,Object.assign({},(0,Fe.Z)(xt,["title","icon","danger"]),{className:$t()({[`${Zt}-item-danger`]:qt,[`${Zt}-item-only-child`]:(ee?Ln+1:Ln)===1},Ft),title:typeof pe=="string"?pe:void 0}),(0,me.Tm)(ee,{className:$t()((0,me.l$)(ee)?(Tt=ee.props)===null||Tt===void 0?void 0:Tt.className:"",`${Zt}-item-icon`)}),hn(Ne));return ne||(ye=It.createElement(re.Z,Object.assign({},En,{placement:ce==="rtl"?"left":"right",overlayClassName:`${Zt}-inline-collapsed-tooltip`}),ye)),ye},ft=xt=>{var Tt;const{popupClassName:Ft,icon:yt,title:ee,theme:pe}=xt,qt=It.useContext(et),{prefixCls:Zt,inlineCollapsed:fe,theme:ce}=qt,ne=(0,vt.Xl)();let Ne;if(!yt)Ne=fe&&!ne.length&&ee&&typeof ee=="string"?It.createElement("div",{className:`${Zt}-inline-collapsed-noicon`},ee.charAt(0)):It.createElement("span",{className:`${Zt}-title-content`},ee);else{const an=(0,me.l$)(ee)&&ee.type==="span";Ne=It.createElement(It.Fragment,null,(0,me.Tm)(yt,{className:$t()((0,me.l$)(yt)?(Tt=yt.props)===null||Tt===void 0?void 0:Tt.className:"",`${Zt}-item-icon`)}),an?ee:It.createElement("span",{className:`${Zt}-title-content`},ee))}const hn=It.useMemo(()=>Object.assign(Object.assign({},qt),{firstLevel:!1}),[qt]);return It.createElement(et.Provider,{value:hn},It.createElement(vt.Wd,Object.assign({},(0,Fe.Z)(xt,["icon"]),{title:Ne,popupClassName:$t()(Zt,Ft,`${Zt}-${pe||ce}`)})))},mt=Pt(18785),wt=Pt(70425),Et=Pt(62892),Nt=Pt(40875),Dt=function(xt,Tt){var Ft={};for(var yt in xt)Object.prototype.hasOwnProperty.call(xt,yt)&&Tt.indexOf(yt)<0&&(Ft[yt]=xt[yt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,yt=Object.getOwnPropertySymbols(xt);ee<yt.length;ee++)Tt.indexOf(yt[ee])<0&&Object.prototype.propertyIsEnumerable.call(xt,yt[ee])&&(Ft[yt[ee]]=xt[yt[ee]]);return Ft};function At(xt){return(xt||[]).map((Tt,Ft)=>{if(Tt&&typeof Tt=="object"){const yt=Tt,{label:ee,children:pe,key:qt,type:Zt}=yt,fe=Dt(yt,["label","children","key","type"]),ce=qt!=null?qt:`tmp-${Ft}`;return pe||Zt==="group"?Zt==="group"?It.createElement(vt.BW,Object.assign({key:ce},fe,{title:ee}),At(pe)):It.createElement(ft,Object.assign({key:ce},fe,{title:ee}),At(pe)):Zt==="divider"?It.createElement(we,Object.assign({key:ce},fe)):It.createElement(ht,Object.assign({key:ce},fe),ee)}return null}).filter(Tt=>Tt)}function Kt(xt){return It.useMemo(()=>xt&&At(xt),[xt])}var Wt=Pt(64993),xe=Pt(17313),Vt=Pt(8378),Ie=Pt(13826),Se=Pt(29878),Ye=Pt(83116),Le=Pt(37613),We=xt=>{const{componentCls:Tt,motionDurationSlow:Ft,horizontalLineHeight:yt,colorSplit:ee,lineWidth:pe,lineType:qt,itemPaddingInline:Zt}=xt;return{[`${Tt}-horizontal`]:{lineHeight:yt,border:0,borderBottom:`${pe}px ${qt} ${ee}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Tt}-item, ${Tt}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Zt},[`> ${Tt}-item:hover,
|
|
|
> ${Tt}-item-active,
|
|
|
> ${Tt}-submenu ${Tt}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Tt}-item, ${Tt}-submenu-title`]:{transition:[`border-color ${Ft}`,`background ${Ft}`].join(",")},[`${Tt}-submenu-arrow`]:{display:"none"}}}},ue=xt=>{let{componentCls:Tt,menuArrowOffset:Ft}=xt;return{[`${Tt}-rtl`]:{direction:"rtl"},[`${Tt}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Tt}-rtl${Tt}-vertical,
|
|
|
${Tt}-submenu-rtl ${Tt}-vertical`]:{[`${Tt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${Ft})`},"&::after":{transform:`rotate(45deg) translateY(${Ft})`}}}}};const Ht=xt=>Object.assign({},(0,xe.oN)(xt));var pn=(xt,Tt)=>{const{componentCls:Ft,itemColor:yt,itemSelectedColor:ee,groupTitleColor:pe,itemBg:qt,subMenuItemBg:Zt,itemSelectedBg:fe,activeBarHeight:ce,activeBarWidth:ne,activeBarBorderWidth:Ne,motionDurationSlow:hn,motionEaseInOut:an,motionEaseOut:_e,itemPaddingInline:En,motionDurationMid:Ln,itemHoverColor:ye,lineType:on,colorSplit:Pn,itemDisabledColor:Cn,dangerItemColor:An,dangerItemHoverColor:Jn,dangerItemSelectedColor:ui,dangerItemActiveBg:ni,dangerItemSelectedBg:fi,itemHoverBg:Bi,itemActiveBg:Ti,menuSubMenuBg:Di,horizontalItemSelectedColor:io,horizontalItemSelectedBg:to,horizontalItemBorderRadius:Ri,horizontalItemHoverBg:Qi,popupBg:Zn}=xt;return{[`${Ft}-${Tt}, ${Ft}-${Tt} > ${Ft}`]:{color:yt,background:qt,[`&${Ft}-root:focus-visible`]:Object.assign({},Ht(xt)),[`${Ft}-item-group-title`]:{color:pe},[`${Ft}-submenu-selected`]:{[`> ${Ft}-submenu-title`]:{color:ee}},[`${Ft}-item-disabled, ${Ft}-submenu-disabled`]:{color:`${Cn} !important`},[`${Ft}-item:not(${Ft}-item-selected):not(${Ft}-submenu-selected)`]:{[`&:hover, > ${Ft}-submenu-title:hover`]:{color:ye}},[`&:not(${Ft}-horizontal)`]:{[`${Ft}-item:not(${Ft}-item-selected)`]:{"&:hover":{backgroundColor:Bi},"&:active":{backgroundColor:Ti}},[`${Ft}-submenu-title`]:{"&:hover":{backgroundColor:Bi},"&:active":{backgroundColor:Ti}}},[`${Ft}-item-danger`]:{color:An,[`&${Ft}-item:hover`]:{[`&:not(${Ft}-item-selected):not(${Ft}-submenu-selected)`]:{color:Jn}},[`&${Ft}-item:active`]:{background:ni}},[`${Ft}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Ft}-item-selected`]:{color:ee,[`&${Ft}-item-danger`]:{color:ui},"a, a:hover":{color:"inherit"}},[`& ${Ft}-item-selected`]:{backgroundColor:fe,[`&${Ft}-item-danger`]:{backgroundColor:fi}},[`${Ft}-item, ${Ft}-submenu-title`]:{[`&:not(${Ft}-item-disabled):focus-visible`]:Object.assign({},Ht(xt))},[`&${Ft}-submenu > ${Ft}`]:{backgroundColor:Di},[`&${Ft}-popup > ${Ft}`]:{backgroundColor:Zn},[`&${Ft}-horizontal`]:Object.assign(Object.assign({},Tt==="dark"?{borderBottom:0}:{}),{[`> ${Ft}-item, > ${Ft}-submenu`]:{top:Ne,marginTop:-Ne,marginBottom:0,borderRadius:Ri,"&::after":{position:"absolute",insetInline:En,bottom:0,borderBottom:`${ce}px solid transparent`,transition:`border-color ${hn} ${an}`,content:'""'},"&:hover, &-active, &-open":{background:Qi,"&::after":{borderBottomWidth:ce,borderBottomColor:io}},"&-selected":{color:io,backgroundColor:to,"&:hover":{backgroundColor:to},"&::after":{borderBottomWidth:ce,borderBottomColor:io}}}}),[`&${Ft}-root`]:{[`&${Ft}-inline, &${Ft}-vertical`]:{borderInlineEnd:`${Ne}px ${on} ${Pn}`}},[`&${Ft}-inline`]:{[`${Ft}-sub${Ft}-inline`]:{background:Zt},[`${Ft}-item, ${Ft}-submenu-title`]:Ne&&ne?{width:`calc(100% + ${Ne}px)`}:{},[`${Ft}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ne}px solid ${ee}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Ln} ${_e}`,`opacity ${Ln} ${_e}`].join(","),content:'""'},[`&${Ft}-item-danger`]:{"&::after":{borderInlineEndColor:ui}}},[`${Ft}-selected, ${Ft}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Ln} ${an}`,`opacity ${Ln} ${an}`].join(",")}}}}}};const ln=xt=>{const{componentCls:Tt,itemHeight:Ft,itemMarginInline:yt,padding:ee,menuArrowSize:pe,marginXS:qt,itemMarginBlock:Zt}=xt,fe=ee+pe+qt;return{[`${Tt}-item`]:{position:"relative",overflow:"hidden"},[`${Tt}-item, ${Tt}-submenu-title`]:{height:Ft,lineHeight:`${Ft}px`,paddingInline:ee,overflow:"hidden",textOverflow:"ellipsis",marginInline:yt,marginBlock:Zt,width:`calc(100% - ${yt*2}px)`},[`> ${Tt}-item,
|
|
|
> ${Tt}-submenu > ${Tt}-submenu-title`]:{height:Ft,lineHeight:`${Ft}px`},[`${Tt}-item-group-list ${Tt}-submenu-title,
|
|
|
${Tt}-submenu-title`]:{paddingInlineEnd:fe}}};var Ke=xt=>{const{componentCls:Tt,iconCls:Ft,itemHeight:yt,colorTextLightSolid:ee,dropdownWidth:pe,controlHeightLG:qt,motionDurationMid:Zt,motionEaseOut:fe,paddingXL:ce,itemMarginInline:ne,fontSizeLG:Ne,motionDurationSlow:hn,paddingXS:an,boxShadowSecondary:_e,collapsedWidth:En,collapsedIconSize:Ln}=xt,ye={height:yt,lineHeight:`${yt}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Tt]:{"&-inline, &-vertical":Object.assign({[`&${Tt}-root`]:{boxShadow:"none"}},ln(xt))},[`${Tt}-submenu-popup`]:{[`${Tt}-vertical`]:Object.assign(Object.assign({},ln(xt)),{boxShadow:_e})}},{[`${Tt}-submenu-popup ${Tt}-vertical${Tt}-sub`]:{minWidth:pe,maxHeight:`calc(100vh - ${qt*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Tt}-inline`]:{width:"100%",[`&${Tt}-root`]:{[`${Tt}-item, ${Tt}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${hn}`,`background ${hn}`,`padding ${Zt} ${fe}`].join(","),[`> ${Tt}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Tt}-sub${Tt}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Tt}-submenu > ${Tt}-submenu-title`]:ye,[`& ${Tt}-item-group-title`]:{paddingInlineStart:ce}},[`${Tt}-item`]:ye}},{[`${Tt}-inline-collapsed`]:{width:En,[`&${Tt}-root`]:{[`${Tt}-item, ${Tt}-submenu ${Tt}-submenu-title`]:{[`> ${Tt}-inline-collapsed-noicon`]:{fontSize:Ne,textAlign:"center"}}},[`> ${Tt}-item,
|
|
|
> ${Tt}-item-group > ${Tt}-item-group-list > ${Tt}-item,
|
|
|
> ${Tt}-item-group > ${Tt}-item-group-list > ${Tt}-submenu > ${Tt}-submenu-title,
|
|
|
> ${Tt}-submenu > ${Tt}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Ne/2}px - ${ne}px)`,textOverflow:"clip",[`
|
|
|
${Tt}-submenu-arrow,
|
|
|
${Tt}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Tt}-item-icon, ${Ft}`]:{margin:0,fontSize:Ln,lineHeight:`${yt}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Tt}-item-icon, ${Ft}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Tt}-item-icon, ${Ft}`]:{display:"none"},"a, a:hover":{color:ee}},[`${Tt}-item-group-title`]:Object.assign(Object.assign({},xe.vS),{paddingInline:an})}}]};const gn=xt=>{const{componentCls:Tt,motionDurationSlow:Ft,motionDurationMid:yt,motionEaseInOut:ee,motionEaseOut:pe,iconCls:qt,iconSize:Zt,iconMarginInlineEnd:fe}=xt;return{[`${Tt}-item, ${Tt}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Ft}`,`background ${Ft}`,`padding ${Ft} ${ee}`].join(","),[`${Tt}-item-icon, ${qt}`]:{minWidth:Zt,fontSize:Zt,transition:[`font-size ${yt} ${pe}`,`margin ${Ft} ${ee}`,`color ${Ft}`].join(","),"+ span":{marginInlineStart:fe,opacity:1,transition:[`opacity ${Ft} ${ee}`,`margin ${Ft}`,`color ${Ft}`].join(",")}},[`${Tt}-item-icon`]:Object.assign({},(0,xe.Ro)()),[`&${Tt}-item-only-child`]:{[`> ${qt}, > ${Tt}-item-icon`]:{marginInlineEnd:0}}},[`${Tt}-item-disabled, ${Tt}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Tt}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Bn=xt=>{const{componentCls:Tt,motionDurationSlow:Ft,motionEaseInOut:yt,borderRadius:ee,menuArrowSize:pe,menuArrowOffset:qt}=xt;return{[`${Tt}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:xt.margin,width:pe,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Ft} ${yt}, opacity ${Ft}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:pe*.6,height:pe*.15,backgroundColor:"currentcolor",borderRadius:ee,transition:[`background ${Ft} ${yt}`,`transform ${Ft} ${yt}`,`top ${Ft} ${yt}`,`color ${Ft} ${yt}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${qt})`},"&::after":{transform:`rotate(-45deg) translateY(${qt})`}}}}},dn=xt=>{const{antCls:Tt,componentCls:Ft,fontSize:yt,motionDurationSlow:ee,motionDurationMid:pe,motionEaseInOut:qt,paddingXS:Zt,padding:fe,colorSplit:ce,lineWidth:ne,zIndexPopup:Ne,borderRadiusLG:hn,subMenuItemBorderRadius:an,menuArrowSize:_e,menuArrowOffset:En,lineType:Ln,menuPanelMaskInset:ye,groupTitleLineHeight:on,groupTitleFontSize:Pn}=xt;return[{"":{[`${Ft}`]:Object.assign(Object.assign({},(0,xe.dF)()),{"&-hidden":{display:"none"}})},[`${Ft}-submenu-hidden`]:{display:"none"}},{[Ft]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,xe.Wf)(xt)),(0,xe.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:yt,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${ee} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${Ft}-item`]:{flex:"none"}},[`${Ft}-item, ${Ft}-submenu, ${Ft}-submenu-title`]:{borderRadius:xt.itemBorderRadius},[`${Ft}-item-group-title`]:{padding:`${Zt}px ${fe}px`,fontSize:Pn,lineHeight:on,transition:`all ${ee}`},[`&-horizontal ${Ft}-submenu`]:{transition:[`border-color ${ee} ${qt}`,`background ${ee} ${qt}`].join(",")},[`${Ft}-submenu, ${Ft}-submenu-inline`]:{transition:[`border-color ${ee} ${qt}`,`background ${ee} ${qt}`,`padding ${pe} ${qt}`].join(",")},[`${Ft}-submenu ${Ft}-sub`]:{cursor:"initial",transition:[`background ${ee} ${qt}`,`padding ${ee} ${qt}`].join(",")},[`${Ft}-title-content`]:{transition:`color ${ee}`},[`${Ft}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Ft}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:ce,borderStyle:Ln,borderWidth:0,borderTopWidth:ne,marginBlock:ne,padding:0,"&-dashed":{borderStyle:"dashed"}}}),gn(xt)),{[`${Ft}-item-group`]:{[`${Ft}-item-group-list`]:{margin:0,padding:0,[`${Ft}-item, ${Ft}-submenu-title`]:{paddingInline:`${yt*2}px ${fe}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Ne,borderRadius:hn,boxShadow:"none",transformOrigin:"0 0",[`&${Ft}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${ye}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:ye},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:xt.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:xt.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:xt.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:xt.paddingXS},[`> ${Ft}`]:Object.assign(Object.assign(Object.assign({borderRadius:hn},gn(xt)),Bn(xt)),{[`${Ft}-item, ${Ft}-submenu > ${Ft}-submenu-title`]:{borderRadius:an},[`${Ft}-submenu-title::after`]:{transition:`transform ${ee} ${qt}`}})}}),Bn(xt)),{[`&-inline-collapsed ${Ft}-submenu-arrow,
|
|
|
&-inline ${Ft}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${En})`},"&::after":{transform:`rotate(45deg) translateX(-${En})`}},[`${Ft}-submenu-open${Ft}-submenu-inline > ${Ft}-submenu-title > ${Ft}-submenu-arrow`]:{transform:`translateY(-${_e*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${En})`},"&::before":{transform:`rotate(45deg) translateX(${En})`}}})},{[`${Tt}-layout-header`]:{[Ft]:{lineHeight:"inherit"}}}]};var In=(xt,Tt)=>(0,Ye.Z)("Menu",yt=>{if(Tt===!1)return[];const{colorBgElevated:ee,colorPrimary:pe,colorTextLightSolid:qt,controlHeightLG:Zt,fontSize:fe,darkItemColor:ce,darkDangerItemColor:ne,darkItemBg:Ne,darkSubMenuItemBg:hn,darkItemSelectedColor:an,darkItemSelectedBg:_e,darkDangerItemSelectedBg:En,darkItemHoverBg:Ln,darkGroupTitleColor:ye,darkItemHoverColor:on,darkItemDisabledColor:Pn,darkDangerItemHoverColor:Cn,darkDangerItemSelectedColor:An,darkDangerItemActiveBg:Jn}=yt,ui=fe/7*5,ni=(0,Le.TS)(yt,{menuArrowSize:ui,menuHorizontalHeight:Zt*1.15,menuArrowOffset:`${ui*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:ee}),fi=(0,Le.TS)(ni,{itemColor:ce,itemHoverColor:on,groupTitleColor:ye,itemSelectedColor:an,itemBg:Ne,popupBg:Ne,subMenuItemBg:hn,itemActiveBg:"transparent",itemSelectedBg:_e,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Ln,itemDisabledColor:Pn,dangerItemColor:ne,dangerItemHoverColor:Cn,dangerItemSelectedColor:An,dangerItemActiveBg:Jn,dangerItemSelectedBg:En,menuSubMenuBg:hn,horizontalItemSelectedColor:qt,horizontalItemSelectedBg:pe});return[dn(ni),We(ni),Ke(ni),pn(ni,"light"),pn(fi,"dark"),ue(ni),(0,Vt.Z)(ni),(0,Ie.oN)(ni,"slide-up"),(0,Ie.oN)(ni,"slide-down"),(0,Se._y)(ni,"zoom-big")]},yt=>{const{colorPrimary:ee,colorError:pe,colorTextDisabled:qt,colorErrorBg:Zt,colorText:fe,colorTextDescription:ce,colorBgContainer:ne,colorFillAlter:Ne,colorFillContent:hn,lineWidth:an,lineWidthBold:_e,controlItemBgActive:En,colorBgTextHover:Ln,controlHeightLG:ye,lineHeight:on,colorBgElevated:Pn,marginXXS:Cn,padding:An,fontSize:Jn,controlHeightSM:ui,fontSizeLG:ni,colorTextLightSolid:fi,colorErrorHover:Bi}=yt,Ti=new Wt.C(fi).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:yt.zIndexPopupBase+50,radiusItem:yt.borderRadiusLG,itemBorderRadius:yt.borderRadiusLG,radiusSubMenuItem:yt.borderRadiusSM,subMenuItemBorderRadius:yt.borderRadiusSM,colorItemText:fe,itemColor:fe,colorItemTextHover:fe,itemHoverColor:fe,colorItemTextHoverHorizontal:ee,horizontalItemHoverColor:ee,colorGroupTitle:ce,groupTitleColor:ce,colorItemTextSelected:ee,itemSelectedColor:ee,colorItemTextSelectedHorizontal:ee,horizontalItemSelectedColor:ee,colorItemBg:ne,itemBg:ne,colorItemBgHover:Ln,itemHoverBg:Ln,colorItemBgActive:hn,itemActiveBg:En,colorSubItemBg:Ne,subMenuItemBg:Ne,colorItemBgSelected:En,itemSelectedBg:En,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:_e,activeBarHeight:_e,colorActiveBarBorderSize:an,activeBarBorderWidth:an,colorItemTextDisabled:qt,itemDisabledColor:qt,colorDangerItemText:pe,dangerItemColor:pe,colorDangerItemTextHover:pe,dangerItemHoverColor:pe,colorDangerItemTextSelected:pe,dangerItemSelectedColor:pe,colorDangerItemBgActive:Zt,dangerItemActiveBg:Zt,colorDangerItemBgSelected:Zt,dangerItemSelectedBg:Zt,itemMarginInline:yt.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:ye,groupTitleLineHeight:on,collapsedWidth:ye*2,popupBg:Pn,itemMarginBlock:Cn,itemPaddingInline:An,horizontalLineHeight:`${ye*1.15}px`,iconSize:Jn,iconMarginInlineEnd:ui-Jn,collapsedIconSize:ni,groupTitleFontSize:Jn,darkItemDisabledColor:new Wt.C(fi).setAlpha(.25).toRgbString(),darkItemColor:Ti,darkDangerItemColor:pe,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:fi,darkItemSelectedBg:ee,darkDangerItemSelectedBg:pe,darkItemHoverBg:"transparent",darkGroupTitleColor:Ti,darkItemHoverColor:fi,darkDangerItemHoverColor:Bi,darkDangerItemSelectedColor:fi,darkDangerItemActiveBg:pe}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(xt),Ce=function(xt,Tt){var Ft={};for(var yt in xt)Object.prototype.hasOwnProperty.call(xt,yt)&&Tt.indexOf(yt)<0&&(Ft[yt]=xt[yt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,yt=Object.getOwnPropertySymbols(xt);ee<yt.length;ee++)Tt.indexOf(yt[ee])<0&&Object.prototype.propertyIsEnumerable.call(xt,yt[ee])&&(Ft[yt[ee]]=xt[yt[ee]]);return Ft},Qn=(0,It.forwardRef)((xt,Tt)=>{var Ft,yt;const ee=It.useContext(Nt.Z),pe=ee||{},{getPrefixCls:qt,getPopupContainer:Zt,direction:fe,menu:ce}=It.useContext(Ut.E_),ne=qt(),{prefixCls:Ne,className:hn,style:an,theme:_e="light",expandIcon:En,_internalDisableMenuItemTitleTooltip:Ln,inlineCollapsed:ye,siderCollapsed:on,items:Pn,children:Cn,rootClassName:An,mode:Jn,selectable:ui,onClick:ni,overflowedIndicatorPopupClassName:fi}=xt,Bi=Ce(xt,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Ti=(0,Fe.Z)(Bi,["collapsedWidth"]),Di=Kt(Pn)||Cn;(Ft=pe.validator)===null||Ft===void 0||Ft.call(pe,{mode:Jn});const io=(0,wt.useEvent)(function(){var Mo;ni==null||ni.apply(void 0,arguments),(Mo=pe.onClick)===null||Mo===void 0||Mo.call(pe)}),to=pe.mode||Jn,Ri=ui!=null?ui:pe.selectable,Qi=It.useMemo(()=>on!==void 0?on:ye,[ye,on]),Zn={horizontal:{motionName:`${ne}-slide-up`},inline:(0,Et.Z)(ne),other:{motionName:`${ne}-zoom-big`}},Mt=qt("menu",Ne||pe.prefixCls),[so,Ii]=In(Mt,!ee),Wi=$t()(`${Mt}-${_e}`,ce==null?void 0:ce.className,hn);let ki;if(typeof En=="function")ki=En;else if(En===null||En===!1)ki=null;else if(pe.expandIcon===null||pe.expandIcon===!1)ki=null;else{const Mo=En!=null?En:pe.expandIcon;ki=(0,me.Tm)(Mo,{className:$t()(`${Mt}-submenu-expand-icon`,(0,me.l$)(Mo)?(yt=Mo.props)===null||yt===void 0?void 0:yt.className:"")})}const Bo=It.useMemo(()=>({prefixCls:Mt,inlineCollapsed:Qi||!1,direction:fe,firstLevel:!0,theme:_e,mode:to,disableMenuItemTitleTooltip:Ln}),[Mt,Qi,fe,Ln,_e]);return so(It.createElement(Nt.Z.Provider,{value:null},It.createElement(et.Provider,{value:Bo},It.createElement(vt.ZP,Object.assign({getPopupContainer:Zt,overflowedIndicator:It.createElement(mt.Z,null),overflowedIndicatorPopupClassName:$t()(Mt,`${Mt}-${_e}`,fi),mode:to,selectable:Ri,onClick:io},Ti,{inlineCollapsed:Qi,style:Object.assign(Object.assign({},ce==null?void 0:ce.style),an),className:Wi,prefixCls:Mt,direction:fe,defaultMotions:Zn,expandIcon:ki,ref:Tt,rootClassName:$t()(An,Ii)}),Di))))});const jt=(0,It.forwardRef)((xt,Tt)=>{const Ft=(0,It.useRef)(null),yt=It.useContext(oe.D);return(0,It.useImperativeHandle)(Tt,()=>({menu:Ft.current,focus:ee=>{var pe;(pe=Ft.current)===null||pe===void 0||pe.focus(ee)}})),It.createElement(Qn,Object.assign({ref:Ft},xt,yt))});jt.Item=ht,jt.SubMenu=ft,jt.Divider=we,jt.ItemGroup=vt.BW;var Lt=jt},58421:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return pe}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},de=oe,$t=Pt(7657),Ut=function(Zt,fe){return It.createElement($t.Z,(0,vt.Z)({},Zt,{ref:fe,icon:de}))},Jt=It.forwardRef(Ut),De=Jt,we=Pt(49198),te=Pt(33853),Fe=Pt(38819),re=Pt(92310),me=Pt.n(re),Ot=Pt(90493),et=Pt(44127),nt=Pt(52884),ht=Pt(95727),at=Pt(65711),ft=Pt(85745),mt=Pt(26112),wt={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Et=wt,Nt=Pt(91735),Dt=function(qt){(0,at.Z)(fe,qt);var Zt=(0,ft.Z)(fe);function fe(){var ce;(0,nt.Z)(this,fe);for(var ne=arguments.length,Ne=new Array(ne),hn=0;hn<ne;hn++)Ne[hn]=arguments[hn];return ce=Zt.call.apply(Zt,[this].concat(Ne)),ce.state={goInputText:""},ce.getValidValue=function(){var an=ce.state.goInputText;return!an||Number.isNaN(an)?void 0:Number(an)},ce.buildOptionText=function(an){return"".concat(an," ").concat(ce.props.locale.items_per_page)},ce.changeSize=function(an){ce.props.changeSize(Number(an))},ce.handleChange=function(an){ce.setState({goInputText:an.target.value})},ce.handleBlur=function(an){var _e=ce.props,En=_e.goButton,Ln=_e.quickGo,ye=_e.rootPrefixCls,on=ce.state.goInputText;En||on===""||(ce.setState({goInputText:""}),!(an.relatedTarget&&(an.relatedTarget.className.indexOf("".concat(ye,"-item-link"))>=0||an.relatedTarget.className.indexOf("".concat(ye,"-item"))>=0))&&Ln(ce.getValidValue()))},ce.go=function(an){var _e=ce.state.goInputText;_e!==""&&(an.keyCode===Et.ENTER||an.type==="click")&&(ce.setState({goInputText:""}),ce.props.quickGo(ce.getValidValue()))},ce}return(0,ht.Z)(fe,[{key:"getPageSizeOptions",value:function(){var ne=this.props,Ne=ne.pageSize,hn=ne.pageSizeOptions;return hn.some(function(an){return an.toString()===Ne.toString()})?hn:hn.concat([Ne.toString()]).sort(function(an,_e){var En=Number.isNaN(Number(an))?0:Number(an),Ln=Number.isNaN(Number(_e))?0:Number(_e);return En-Ln})}},{key:"render",value:function(){var ne=this,Ne=this.props,hn=Ne.pageSize,an=Ne.locale,_e=Ne.rootPrefixCls,En=Ne.changeSize,Ln=Ne.quickGo,ye=Ne.goButton,on=Ne.selectComponentClass,Pn=Ne.buildOptionText,Cn=Ne.selectPrefixCls,An=Ne.disabled,Jn=this.state.goInputText,ui="".concat(_e,"-options"),ni=on,fi=null,Bi=null,Ti=null;if(!En&&!Ln)return null;var Di=this.getPageSizeOptions();if(En&&ni){var io=Di.map(function(to,Ri){return It.createElement(ni.Option,{key:Ri,value:to.toString()},(Pn||ne.buildOptionText)(to))});fi=It.createElement(ni,{disabled:An,prefixCls:Cn,showSearch:!1,className:"".concat(ui,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(hn||Di[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Ri){return Ri.parentNode},"aria-label":an.page_size,defaultOpen:!1},io)}return Ln&&(ye&&(Ti=typeof ye=="boolean"?It.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:An,className:"".concat(ui,"-quick-jumper-button")},an.jump_to_confirm):It.createElement("span",{onClick:this.go,onKeyUp:this.go},ye)),Bi=It.createElement("div",{className:"".concat(ui,"-quick-jumper")},an.jump_to,It.createElement("input",{disabled:An,type:"text",value:Jn,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":an.page}),an.page,Ti)),It.createElement("li",{className:"".concat(ui)},fi,Bi)}}]),fe}(It.Component);Dt.defaultProps={pageSizeOptions:["10","20","50","100"]};var At=Dt,Kt=function(Zt){var fe,ce=Zt.rootPrefixCls,ne=Zt.page,Ne=Zt.active,hn=Zt.className,an=Zt.showTitle,_e=Zt.onClick,En=Zt.onKeyPress,Ln=Zt.itemRender,ye="".concat(ce,"-item"),on=me()(ye,"".concat(ye,"-").concat(ne),(fe={},(0,Ot.Z)(fe,"".concat(ye,"-active"),Ne),(0,Ot.Z)(fe,"".concat(ye,"-disabled"),!ne),(0,Ot.Z)(fe,Zt.className,hn),fe)),Pn=function(){_e(ne)},Cn=function(ui){En(ui,_e,ne)},An=Ln(ne,"page",It.createElement("a",{rel:"nofollow"},ne));return An?It.createElement("li",{title:an?ne.toString():null,className:on,onClick:Pn,onKeyPress:Cn,tabIndex:0},An):null},Wt=Kt;function xe(){}function Vt(qt){var Zt=Number(qt);return typeof Zt=="number"&&!Number.isNaN(Zt)&&isFinite(Zt)&&Math.floor(Zt)===Zt}var Ie=function(Zt,fe,ce){return ce};function Se(qt,Zt,fe){var ce=typeof qt=="undefined"?Zt.pageSize:qt;return Math.floor((fe.total-1)/ce)+1}var Ye=function(qt){(0,at.Z)(fe,qt);var Zt=(0,ft.Z)(fe);function fe(ce){var ne;(0,nt.Z)(this,fe),ne=Zt.call(this,ce),ne.paginationNode=It.createRef(),ne.getJumpPrevPage=function(){return Math.max(1,ne.state.current-(ne.props.showLessItems?3:5))},ne.getJumpNextPage=function(){return Math.min(Se(void 0,ne.state,ne.props),ne.state.current+(ne.props.showLessItems?3:5))},ne.getItemIcon=function(En,Ln){var ye=ne.props.prefixCls,on=En||It.createElement("button",{type:"button","aria-label":Ln,className:"".concat(ye,"-item-link")});return typeof En=="function"&&(on=It.createElement(En,(0,et.Z)({},ne.props))),on},ne.isValid=function(En){var Ln=ne.props.total;return Vt(En)&&En!==ne.state.current&&Vt(Ln)&&Ln>0},ne.shouldDisplayQuickJumper=function(){var En=ne.props,Ln=En.showQuickJumper,ye=En.total,on=ne.state.pageSize;return ye<=on?!1:Ln},ne.handleKeyDown=function(En){(En.keyCode===Et.ARROW_UP||En.keyCode===Et.ARROW_DOWN)&&En.preventDefault()},ne.handleKeyUp=function(En){var Ln=ne.getValidValue(En),ye=ne.state.currentInputValue;Ln!==ye&&ne.setState({currentInputValue:Ln}),En.keyCode===Et.ENTER?ne.handleChange(Ln):En.keyCode===Et.ARROW_UP?ne.handleChange(Ln-1):En.keyCode===Et.ARROW_DOWN&&ne.handleChange(Ln+1)},ne.handleBlur=function(En){var Ln=ne.getValidValue(En);ne.handleChange(Ln)},ne.changePageSize=function(En){var Ln=ne.state.current,ye=Se(En,ne.state,ne.props);Ln=Ln>ye?ye:Ln,ye===0&&(Ln=ne.state.current),typeof En=="number"&&("pageSize"in ne.props||ne.setState({pageSize:En}),"current"in ne.props||ne.setState({current:Ln,currentInputValue:Ln})),ne.props.onShowSizeChange(Ln,En),"onChange"in ne.props&&ne.props.onChange&&ne.props.onChange(Ln,En)},ne.handleChange=function(En){var Ln=ne.props,ye=Ln.disabled,on=Ln.onChange,Pn=ne.state,Cn=Pn.pageSize,An=Pn.current,Jn=Pn.currentInputValue;if(ne.isValid(En)&&!ye){var ui=Se(void 0,ne.state,ne.props),ni=En;return En>ui?ni=ui:En<1&&(ni=1),"current"in ne.props||ne.setState({current:ni}),ni!==Jn&&ne.setState({currentInputValue:ni}),on(ni,Cn),ni}return An},ne.prev=function(){ne.hasPrev()&&ne.handleChange(ne.state.current-1)},ne.next=function(){ne.hasNext()&&ne.handleChange(ne.state.current+1)},ne.jumpPrev=function(){ne.handleChange(ne.getJumpPrevPage())},ne.jumpNext=function(){ne.handleChange(ne.getJumpNextPage())},ne.hasPrev=function(){return ne.state.current>1},ne.hasNext=function(){return ne.state.current<Se(void 0,ne.state,ne.props)},ne.runIfEnter=function(En,Ln){if(En.key==="Enter"||En.charCode===13){for(var ye=arguments.length,on=new Array(ye>2?ye-2:0),Pn=2;Pn<ye;Pn++)on[Pn-2]=arguments[Pn];Ln.apply(void 0,on)}},ne.runIfEnterPrev=function(En){ne.runIfEnter(En,ne.prev)},ne.runIfEnterNext=function(En){ne.runIfEnter(En,ne.next)},ne.runIfEnterJumpPrev=function(En){ne.runIfEnter(En,ne.jumpPrev)},ne.runIfEnterJumpNext=function(En){ne.runIfEnter(En,ne.jumpNext)},ne.handleGoTO=function(En){(En.keyCode===Et.ENTER||En.type==="click")&&ne.handleChange(ne.state.currentInputValue)},ne.renderPrev=function(En){var Ln=ne.props,ye=Ln.prevIcon,on=Ln.itemRender,Pn=on(En,"prev",ne.getItemIcon(ye,"prev page")),Cn=!ne.hasPrev();return(0,It.isValidElement)(Pn)?(0,It.cloneElement)(Pn,{disabled:Cn}):Pn},ne.renderNext=function(En){var Ln=ne.props,ye=Ln.nextIcon,on=Ln.itemRender,Pn=on(En,"next",ne.getItemIcon(ye,"next page")),Cn=!ne.hasNext();return(0,It.isValidElement)(Pn)?(0,It.cloneElement)(Pn,{disabled:Cn}):Pn};var Ne=ce.onChange!==xe,hn="current"in ce;hn&&!Ne&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var an=ce.defaultCurrent;"current"in ce&&(an=ce.current);var _e=ce.defaultPageSize;return"pageSize"in ce&&(_e=ce.pageSize),an=Math.min(an,Se(_e,void 0,ce)),ne.state={current:an,currentInputValue:an,pageSize:_e},ne}return(0,ht.Z)(fe,[{key:"componentDidUpdate",value:function(ne,Ne){var hn=this.props.prefixCls;if(Ne.current!==this.state.current&&this.paginationNode.current){var an=this.paginationNode.current.querySelector(".".concat(hn,"-item-").concat(Ne.current));if(an&&document.activeElement===an){var _e;an==null||(_e=an.blur)===null||_e===void 0||_e.call(an)}}}},{key:"getValidValue",value:function(ne){var Ne=ne.target.value,hn=Se(void 0,this.state,this.props),an=this.state.currentInputValue,_e;return Ne===""?_e=Ne:Number.isNaN(Number(Ne))?_e=an:Ne>=hn?_e=hn:_e=Number(Ne),_e}},{key:"getShowSizeChanger",value:function(){var ne=this.props,Ne=ne.showSizeChanger,hn=ne.total,an=ne.totalBoundaryShowSizeChanger;return typeof Ne!="undefined"?Ne:hn>an}},{key:"render",value:function(){var ne=this.props,Ne=ne.prefixCls,hn=ne.className,an=ne.style,_e=ne.disabled,En=ne.hideOnSinglePage,Ln=ne.total,ye=ne.locale,on=ne.showQuickJumper,Pn=ne.showLessItems,Cn=ne.showTitle,An=ne.showTotal,Jn=ne.simple,ui=ne.itemRender,ni=ne.showPrevNextJumpers,fi=ne.jumpPrevIcon,Bi=ne.jumpNextIcon,Ti=ne.selectComponentClass,Di=ne.selectPrefixCls,io=ne.pageSizeOptions,to=this.state,Ri=to.current,Qi=to.pageSize,Zn=to.currentInputValue;if(En===!0&&Ln<=Qi)return null;var Mt=Se(void 0,this.state,this.props),so=[],Ii=null,Wi=null,ki=null,Bo=null,Mo=null,ai=on&&on.goButton,di=Pn?1:2,Ae=Ri-1>0?Ri-1:0,Be=Ri+1<Mt?Ri+1:Mt,_t=(0,mt.Z)(this.props,{aria:!0,data:!0}),Je=An&&It.createElement("li",{className:"".concat(Ne,"-total-text")},An(Ln,[Ln===0?0:(Ri-1)*Qi+1,Ri*Qi>Ln?Ln:Ri*Qi]));if(Jn){ai&&(typeof ai=="boolean"?Mo=It.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ye.jump_to_confirm):Mo=It.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ai),Mo=It.createElement("li",{title:Cn?"".concat(ye.jump_to).concat(Ri,"/").concat(Mt):null,className:"".concat(Ne,"-simple-pager")},Mo));var cn=this.renderPrev(Ae);return It.createElement("ul",(0,vt.Z)({className:me()(Ne,"".concat(Ne,"-simple"),(0,Ot.Z)({},"".concat(Ne,"-disabled"),_e),hn),style:an,ref:this.paginationNode},_t),Je,cn?It.createElement("li",{title:Cn?ye.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:me()("".concat(Ne,"-prev"),(0,Ot.Z)({},"".concat(Ne,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},cn):null,It.createElement("li",{title:Cn?"".concat(Ri,"/").concat(Mt):null,className:"".concat(Ne,"-simple-pager")},It.createElement("input",{type:"text",value:Zn,disabled:_e,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),It.createElement("span",{className:"".concat(Ne,"-slash")},"/"),Mt),It.createElement("li",{title:Cn?ye.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:me()("".concat(Ne,"-next"),(0,Ot.Z)({},"".concat(Ne,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Be)),Mo)}if(Mt<=3+di*2){var ve={locale:ye,rootPrefixCls:Ne,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Cn,itemRender:ui};Mt||so.push(It.createElement(Wt,(0,vt.Z)({},ve,{key:"noPager",page:1,className:"".concat(Ne,"-item-disabled")})));for(var ie=1;ie<=Mt;ie+=1){var Qe=Ri===ie;so.push(It.createElement(Wt,(0,vt.Z)({},ve,{key:ie,page:ie,active:Qe})))}}else{var yn=Pn?ye.prev_3:ye.prev_5,Nn=Pn?ye.next_3:ye.next_5,_n=ui(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(fi,"prev page")),le=ui(this.getJumpNextPage(),"jump-next",this.getItemIcon(Bi,"next page"));ni&&(Ii=_n?It.createElement("li",{title:Cn?yn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:me()("".concat(Ne,"-jump-prev"),(0,Ot.Z)({},"".concat(Ne,"-jump-prev-custom-icon"),!!fi))},_n):null,Wi=le?It.createElement("li",{title:Cn?Nn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:me()("".concat(Ne,"-jump-next"),(0,Ot.Z)({},"".concat(Ne,"-jump-next-custom-icon"),!!Bi))},le):null),Bo=It.createElement(Wt,{locale:ye,last:!0,rootPrefixCls:Ne,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Mt,page:Mt,active:!1,showTitle:Cn,itemRender:ui}),ki=It.createElement(Wt,{locale:ye,rootPrefixCls:Ne,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Cn,itemRender:ui});var mn=Math.max(1,Ri-di),Gn=Math.min(Ri+di,Mt);Ri-1<=di&&(Gn=1+di*2),Mt-Ri<=di&&(mn=Mt-di*2);for(var si=mn;si<=Gn;si+=1){var Re=Ri===si;so.push(It.createElement(Wt,{locale:ye,rootPrefixCls:Ne,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:si,page:si,active:Re,showTitle:Cn,itemRender:ui}))}Ri-1>=di*2&&Ri!==3&&(so[0]=(0,It.cloneElement)(so[0],{className:"".concat(Ne,"-item-after-jump-prev")}),so.unshift(Ii)),Mt-Ri>=di*2&&Ri!==Mt-2&&(so[so.length-1]=(0,It.cloneElement)(so[so.length-1],{className:"".concat(Ne,"-item-before-jump-next")}),so.push(Wi)),mn!==1&&so.unshift(ki),Gn!==Mt&&so.push(Bo)}var fn=!this.hasPrev()||!Mt,He=!this.hasNext()||!Mt,je=this.renderPrev(Ae),vn=this.renderNext(Be);return It.createElement("ul",(0,vt.Z)({className:me()(Ne,hn,(0,Ot.Z)({},"".concat(Ne,"-disabled"),_e)),style:an,ref:this.paginationNode},_t),Je,je?It.createElement("li",{title:Cn?ye.prev_page:null,onClick:this.prev,tabIndex:fn?null:0,onKeyPress:this.runIfEnterPrev,className:me()("".concat(Ne,"-prev"),(0,Ot.Z)({},"".concat(Ne,"-disabled"),fn)),"aria-disabled":fn},je):null,so,vn?It.createElement("li",{title:Cn?ye.next_page:null,onClick:this.next,tabIndex:He?null:0,onKeyPress:this.runIfEnterNext,className:me()("".concat(Ne,"-next"),(0,Ot.Z)({},"".concat(Ne,"-disabled"),He)),"aria-disabled":He},vn):null,It.createElement(At,{disabled:_e,locale:ye,rootPrefixCls:Ne,selectComponentClass:Ti,selectPrefixCls:Di,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ri,pageSize:Qi,pageSizeOptions:io,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ai}))}}],[{key:"getDerivedStateFromProps",value:function(ne,Ne){var hn={};if("current"in ne&&(hn.current=ne.current,ne.current!==Ne.current&&(hn.currentInputValue=hn.current)),"pageSize"in ne&&ne.pageSize!==Ne.pageSize){var an=Ne.current,_e=Se(ne.pageSize,Ne,ne);an=an>_e?_e:an,"current"in ne||(hn.current=an,hn.currentInputValue=an),hn.pageSize=ne.pageSize}return hn}}]),fe}(It.Component);Ye.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:xe,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:xe,locale:Nt.Z,style:{},itemRender:Ie,totalBoundaryShowSizeChanger:50};var Le=Ye,Pe=Pt(22075),We=Pt(36355),Ue=Pt(19716),ue=Pt(8628),Ht=Pt(9763),ke=Pt(57809);const pn=qt=>It.createElement(ke.default,Object.assign({},qt,{showSearch:!0,size:"small"})),ln=qt=>It.createElement(ke.default,Object.assign({},qt,{showSearch:!0,size:"middle"}));pn.Option=ke.default.Option,ln.Option=ke.default.Option;var Ee=Pt(9937),Ke=Pt(17313),gn=Pt(83116),Bn=Pt(37613);const dn=qt=>{const{componentCls:Zt}=qt;return{[`${Zt}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Zt}-item-link`]:{color:qt.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Zt}-item-link`]:{color:qt.colorTextDisabled,cursor:"not-allowed"}}},[`&${Zt}-disabled`]:{cursor:"not-allowed",[`${Zt}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:qt.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:qt.colorBorder,backgroundColor:qt.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:qt.itemActiveBgDisabled},a:{color:qt.itemActiveColorDisabled}}},[`${Zt}-item-link`]:{color:qt.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Zt}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Zt}-simple-pager`]:{color:qt.colorTextDisabled},[`${Zt}-jump-prev, ${Zt}-jump-next`]:{[`${Zt}-item-link-icon`]:{opacity:0},[`${Zt}-item-ellipsis`]:{opacity:1}}},[`&${Zt}-simple`]:{[`${Zt}-prev, ${Zt}-next`]:{[`&${Zt}-disabled ${Zt}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},In=qt=>{const{componentCls:Zt}=qt;return{[`&${Zt}-mini ${Zt}-total-text, &${Zt}-mini ${Zt}-simple-pager`]:{height:qt.itemSizeSM,lineHeight:`${qt.itemSizeSM}px`},[`&${Zt}-mini ${Zt}-item`]:{minWidth:qt.itemSizeSM,height:qt.itemSizeSM,margin:0,lineHeight:`${qt.itemSizeSM-2}px`},[`&${Zt}-mini:not(${Zt}-disabled) ${Zt}-item:not(${Zt}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:qt.colorBgTextHover},"&:active":{backgroundColor:qt.colorBgTextActive}},[`&${Zt}-mini ${Zt}-prev, &${Zt}-mini ${Zt}-next`]:{minWidth:qt.itemSizeSM,height:qt.itemSizeSM,margin:0,lineHeight:`${qt.itemSizeSM}px`},[`&${Zt}-mini:not(${Zt}-disabled)`]:{[`${Zt}-prev, ${Zt}-next`]:{[`&:hover ${Zt}-item-link`]:{backgroundColor:qt.colorBgTextHover},[`&:active ${Zt}-item-link`]:{backgroundColor:qt.colorBgTextActive},[`&${Zt}-disabled:hover ${Zt}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${Zt}-mini ${Zt}-prev ${Zt}-item-link,
|
|
|
&${Zt}-mini ${Zt}-next ${Zt}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:qt.itemSizeSM,lineHeight:`${qt.itemSizeSM}px`}},[`&${Zt}-mini ${Zt}-jump-prev, &${Zt}-mini ${Zt}-jump-next`]:{height:qt.itemSizeSM,marginInlineEnd:0,lineHeight:`${qt.itemSizeSM}px`},[`&${Zt}-mini ${Zt}-options`]:{marginInlineStart:qt.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:qt.miniOptionsSizeChangerTop},"&-quick-jumper":{height:qt.itemSizeSM,lineHeight:`${qt.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Ee.x0)(qt)),{width:qt.paginationMiniQuickJumperInputWidth,height:qt.controlHeightSM})}}}},Ce=qt=>{const{componentCls:Zt}=qt;return{[`
|
|
|
&${Zt}-simple ${Zt}-prev,
|
|
|
&${Zt}-simple ${Zt}-next
|
|
|
`]:{height:qt.itemSizeSM,lineHeight:`${qt.itemSizeSM}px`,verticalAlign:"top",[`${Zt}-item-link`]:{height:qt.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:qt.colorBgTextHover},"&:active":{backgroundColor:qt.colorBgTextActive},"&::after":{height:qt.itemSizeSM,lineHeight:`${qt.itemSizeSM}px`}}},[`&${Zt}-simple ${Zt}-simple-pager`]:{display:"inline-block",height:qt.itemSizeSM,marginInlineEnd:qt.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:qt.marginXS,padding:`0 ${qt.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:qt.itemInputBg,border:`${qt.lineWidth}px ${qt.lineType} ${qt.colorBorder}`,borderRadius:qt.borderRadius,outline:"none",transition:`border-color ${qt.motionDurationMid}`,color:"inherit","&:hover":{borderColor:qt.colorPrimary},"&:focus":{borderColor:qt.colorPrimaryHover,boxShadow:`${qt.inputOutlineOffset}px 0 ${qt.controlOutlineWidth}px ${qt.controlOutline}`},"&[disabled]":{color:qt.colorTextDisabled,backgroundColor:qt.colorBgContainerDisabled,borderColor:qt.colorBorder,cursor:"not-allowed"}}}}},$n=qt=>{const{componentCls:Zt}=qt;return{[`${Zt}-jump-prev, ${Zt}-jump-next`]:{outline:0,[`${Zt}-item-container`]:{position:"relative",[`${Zt}-item-link-icon`]:{color:qt.colorPrimary,fontSize:qt.fontSizeSM,opacity:0,transition:`all ${qt.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Zt}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:qt.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:qt.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:qt.paginationEllipsisTextIndent,opacity:1,transition:`all ${qt.motionDurationMid}`}},"&:hover":{[`${Zt}-item-link-icon`]:{opacity:1},[`${Zt}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${Zt}-prev,
|
|
|
${Zt}-jump-prev,
|
|
|
${Zt}-jump-next
|
|
|
`]:{marginInlineEnd:qt.marginXS},[`
|
|
|
${Zt}-prev,
|
|
|
${Zt}-next,
|
|
|
${Zt}-jump-prev,
|
|
|
${Zt}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:qt.itemSize,height:qt.itemSize,color:qt.colorText,fontFamily:qt.fontFamily,lineHeight:`${qt.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:qt.borderRadius,cursor:"pointer",transition:`all ${qt.motionDurationMid}`},[`${Zt}-prev, ${Zt}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:qt.colorText,cursor:"pointer",userSelect:"none"},[`${Zt}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:qt.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${qt.lineWidth}px ${qt.lineType} transparent`,borderRadius:qt.borderRadius,outline:"none",transition:`all ${qt.motionDurationMid}`},[`&:hover ${Zt}-item-link`]:{backgroundColor:qt.colorBgTextHover},[`&:active ${Zt}-item-link`]:{backgroundColor:qt.colorBgTextActive},[`&${Zt}-disabled:hover`]:{[`${Zt}-item-link`]:{backgroundColor:"transparent"}}},[`${Zt}-slash`]:{marginInlineEnd:qt.paginationSlashMarginInlineEnd,marginInlineStart:qt.paginationSlashMarginInlineStart},[`${Zt}-options`]:{display:"inline-block",marginInlineStart:qt.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:qt.controlHeight,marginInlineStart:qt.marginXS,lineHeight:`${qt.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Ee.ik)(qt)),{width:qt.controlHeightLG*1.25,height:qt.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:qt.marginXS,marginInlineEnd:qt.marginXS})}}}},Qn=qt=>{const{componentCls:Zt}=qt;return{[`${Zt}-item`]:{display:"inline-block",minWidth:qt.itemSize,height:qt.itemSize,marginInlineEnd:qt.marginXS,fontFamily:qt.fontFamily,lineHeight:`${qt.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${qt.lineWidth}px ${qt.lineType} transparent`,borderRadius:qt.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${qt.paginationItemPaddingInline}px`,color:qt.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Zt}-item-active)`]:{"&:hover":{transition:`all ${qt.motionDurationMid}`,backgroundColor:qt.colorBgTextHover},"&:active":{backgroundColor:qt.colorBgTextActive}},"&-active":{fontWeight:qt.fontWeightStrong,backgroundColor:qt.itemActiveBg,borderColor:qt.colorPrimary,a:{color:qt.colorPrimary},"&:hover":{borderColor:qt.colorPrimaryHover},"&:hover a":{color:qt.colorPrimaryHover}}}}},jt=qt=>{const{componentCls:Zt}=qt;return{[Zt]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ke.Wf)(qt)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Zt}-total-text`]:{display:"inline-block",height:qt.itemSize,marginInlineEnd:qt.marginXS,lineHeight:`${qt.itemSize-2}px`,verticalAlign:"middle"}}),Qn(qt)),$n(qt)),Ce(qt)),In(qt)),dn(qt)),{[`@media only screen and (max-width: ${qt.screenLG}px)`]:{[`${Zt}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${qt.screenSM}px)`]:{[`${Zt}-options`]:{display:"none"}}}),[`&${qt.componentCls}-rtl`]:{direction:"rtl"}}},Lt=qt=>{const{componentCls:Zt}=qt;return{[`${Zt}${Zt}-disabled:not(${Zt}-mini)`]:{"&, &:hover":{[`${Zt}-item-link`]:{borderColor:qt.colorBorder}},"&:focus-visible":{[`${Zt}-item-link`]:{borderColor:qt.colorBorder}},[`${Zt}-item, ${Zt}-item-link`]:{backgroundColor:qt.colorBgContainerDisabled,borderColor:qt.colorBorder,[`&:hover:not(${Zt}-item-active)`]:{backgroundColor:qt.colorBgContainerDisabled,borderColor:qt.colorBorder,a:{color:qt.colorTextDisabled}},[`&${Zt}-item-active`]:{backgroundColor:qt.itemActiveBgDisabled}},[`${Zt}-prev, ${Zt}-next`]:{"&:hover button":{backgroundColor:qt.colorBgContainerDisabled,borderColor:qt.colorBorder,color:qt.colorTextDisabled},[`${Zt}-item-link`]:{backgroundColor:qt.colorBgContainerDisabled,borderColor:qt.colorBorder}}},[`${Zt}:not(${Zt}-mini)`]:{[`${Zt}-prev, ${Zt}-next`]:{"&:hover button":{borderColor:qt.colorPrimaryHover,backgroundColor:qt.itemBg},[`${Zt}-item-link`]:{backgroundColor:qt.itemLinkBg,borderColor:qt.colorBorder},[`&:hover ${Zt}-item-link`]:{borderColor:qt.colorPrimary,backgroundColor:qt.itemBg,color:qt.colorPrimary},[`&${Zt}-disabled`]:{[`${Zt}-item-link`]:{borderColor:qt.colorBorder,color:qt.colorTextDisabled}}},[`${Zt}-item`]:{backgroundColor:qt.itemBg,border:`${qt.lineWidth}px ${qt.lineType} ${qt.colorBorder}`,[`&:hover:not(${Zt}-item-active)`]:{borderColor:qt.colorPrimary,backgroundColor:qt.itemBg,a:{color:qt.colorPrimary}},"&-active":{borderColor:qt.colorPrimary}}}}},xt=qt=>{const{componentCls:Zt}=qt;return{[`${Zt}:not(${Zt}-disabled)`]:{[`${Zt}-item`]:Object.assign({},(0,Ke.Qy)(qt)),[`${Zt}-jump-prev, ${Zt}-jump-next`]:{"&:focus-visible":Object.assign({[`${Zt}-item-link-icon`]:{opacity:1},[`${Zt}-item-ellipsis`]:{opacity:0}},(0,Ke.oN)(qt))},[`${Zt}-prev, ${Zt}-next`]:{[`&:focus-visible ${Zt}-item-link`]:Object.assign({},(0,Ke.oN)(qt))}}}};var Tt=(0,gn.Z)("Pagination",qt=>{const Zt=(0,Bn.TS)(qt,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:qt.marginXXS/2,paginationMiniQuickJumperInputWidth:qt.controlHeightLG*1.1,paginationItemPaddingInline:qt.marginXXS*1.5,paginationEllipsisLetterSpacing:qt.marginXXS/2,paginationSlashMarginInlineStart:qt.marginXXS,paginationSlashMarginInlineEnd:qt.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Ee.e5)(qt),(0,Ee.TM)(qt));return[jt(Zt),xt(Zt),qt.wireframe&&Lt(Zt)]},qt=>({itemBg:qt.colorBgContainer,itemSize:qt.controlHeight,itemSizeSM:qt.controlHeightSM,itemActiveBg:qt.colorBgContainer,itemLinkBg:qt.colorBgContainer,itemActiveColorDisabled:qt.colorTextDisabled,itemActiveBgDisabled:qt.controlItemBgActiveDisabled,itemInputBg:qt.colorBgContainer,miniOptionsSizeChangerTop:0})),Ft=function(qt,Zt){var fe={};for(var ce in qt)Object.prototype.hasOwnProperty.call(qt,ce)&&Zt.indexOf(ce)<0&&(fe[ce]=qt[ce]);if(qt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ne=0,ce=Object.getOwnPropertySymbols(qt);ne<ce.length;ne++)Zt.indexOf(ce[ne])<0&&Object.prototype.propertyIsEnumerable.call(qt,ce[ne])&&(fe[ce[ne]]=qt[ce[ne]]);return fe},ee=qt=>{const{prefixCls:Zt,selectPrefixCls:fe,className:ce,rootClassName:ne,style:Ne,size:hn,locale:an,selectComponentClass:_e,responsive:En,showSizeChanger:Ln}=qt,ye=Ft(qt,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:on}=(0,ue.Z)(En),{getPrefixCls:Pn,direction:Cn,pagination:An={}}=It.useContext(We.E_),Jn=Pn("pagination",Zt),[ui,ni]=Tt(Jn),fi=Ln!=null?Ln:An.showSizeChanger,Bi=It.useMemo(()=>{const Mt=It.createElement("span",{className:`${Jn}-item-ellipsis`},"\u2022\u2022\u2022"),so=It.createElement("button",{className:`${Jn}-item-link`,type:"button",tabIndex:-1},Cn==="rtl"?It.createElement(Fe.Z,null):It.createElement(te.Z,null)),Ii=It.createElement("button",{className:`${Jn}-item-link`,type:"button",tabIndex:-1},Cn==="rtl"?It.createElement(te.Z,null):It.createElement(Fe.Z,null)),Wi=It.createElement("a",{className:`${Jn}-item-link`},It.createElement("div",{className:`${Jn}-item-container`},Cn==="rtl"?It.createElement(we.Z,{className:`${Jn}-item-link-icon`}):It.createElement(De,{className:`${Jn}-item-link-icon`}),Mt)),ki=It.createElement("a",{className:`${Jn}-item-link`},It.createElement("div",{className:`${Jn}-item-container`},Cn==="rtl"?It.createElement(De,{className:`${Jn}-item-link-icon`}):It.createElement(we.Z,{className:`${Jn}-item-link-icon`}),Mt));return{prevIcon:so,nextIcon:Ii,jumpPrevIcon:Wi,jumpNextIcon:ki}},[Cn,Jn]),[Ti]=(0,Ht.Z)("Pagination",Pe.Z),Di=Object.assign(Object.assign({},Ti),an),io=(0,Ue.Z)(hn),to=io==="small"||!!(on&&!io&&En),Ri=Pn("select",fe),Qi=me()({[`${Jn}-mini`]:to,[`${Jn}-rtl`]:Cn==="rtl"},An==null?void 0:An.className,ce,ne,ni),Zn=Object.assign(Object.assign({},An==null?void 0:An.style),Ne);return ui(It.createElement(Le,Object.assign({},Bi,ye,{style:Zn,prefixCls:Jn,selectPrefixCls:Ri,className:Qi,selectComponentClass:_e||(to?pn:ln),locale:Di,showSizeChanger:fi})))},pe=ee},39722:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{t5:function(){return te}});var vt=Pt(92310),It=Pt.n(vt),oe=Pt(55477),de=Pt(59301),$t=Pt(36355),Ut=Pt(77578),Jt=Pt(17356),De=function(re,me){var Ot={};for(var et in re)Object.prototype.hasOwnProperty.call(re,et)&&me.indexOf(et)<0&&(Ot[et]=re[et]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,et=Object.getOwnPropertySymbols(re);nt<et.length;nt++)me.indexOf(et[nt])<0&&Object.prototype.propertyIsEnumerable.call(re,et[nt])&&(Ot[et[nt]]=re[et[nt]]);return Ot};const we=(re,me,Ot)=>{if(!(!me&&!Ot))return de.createElement(de.Fragment,null,me&&de.createElement("div",{className:`${re}-title`},(0,Ut.Z)(me)),de.createElement("div",{className:`${re}-inner-content`},(0,Ut.Z)(Ot)))},te=re=>{const{hashId:me,prefixCls:Ot,className:et,style:nt,placement:ht="top",title:at,content:ft,children:mt}=re;return de.createElement("div",{className:It()(me,Ot,`${Ot}-pure`,`${Ot}-placement-${ht}`,et),style:nt},de.createElement("div",{className:`${Ot}-arrow`}),de.createElement(oe.G,Object.assign({},re,{className:me,prefixCls:Ot}),mt||we(Ot,at,ft)))},Fe=re=>{const{prefixCls:me}=re,Ot=De(re,["prefixCls"]),{getPrefixCls:et}=de.useContext($t.E_),nt=et("popover",me),[ht,at]=(0,Jt.Z)(nt);return ht(de.createElement(te,Object.assign({},Ot,{prefixCls:nt,hashId:at})))};Ve.ZP=Fe},60324:function(Sn,Ve,Pt){"use strict";var vt=Pt(92310),It=Pt.n(vt),oe=Pt(59301),de=Pt(77578),$t=Pt(62892),Ut=Pt(36355),Jt=Pt(6848),De=Pt(39722),we=Pt(17356),te=function(me,Ot){var et={};for(var nt in me)Object.prototype.hasOwnProperty.call(me,nt)&&Ot.indexOf(nt)<0&&(et[nt]=me[nt]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,nt=Object.getOwnPropertySymbols(me);ht<nt.length;ht++)Ot.indexOf(nt[ht])<0&&Object.prototype.propertyIsEnumerable.call(me,nt[ht])&&(et[nt[ht]]=me[nt[ht]]);return et};const Fe=me=>{let{title:Ot,content:et,prefixCls:nt}=me;return oe.createElement(oe.Fragment,null,Ot&&oe.createElement("div",{className:`${nt}-title`},(0,de.Z)(Ot)),oe.createElement("div",{className:`${nt}-inner-content`},(0,de.Z)(et)))},re=oe.forwardRef((me,Ot)=>{const{prefixCls:et,title:nt,content:ht,overlayClassName:at,placement:ft="top",trigger:mt="hover",mouseEnterDelay:wt=.1,mouseLeaveDelay:Et=.1,overlayStyle:Nt={}}=me,Dt=te(me,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:At}=oe.useContext(Ut.E_),Kt=At("popover",et),[Wt,xe]=(0,we.Z)(Kt),Vt=At(),Ie=It()(at,xe);return Wt(oe.createElement(Jt.Z,Object.assign({placement:ft,trigger:mt,mouseEnterDelay:wt,mouseLeaveDelay:Et,overlayStyle:Nt},Dt,{prefixCls:Kt,overlayClassName:Ie,ref:Ot,overlay:nt||ht?oe.createElement(Fe,{prefixCls:Kt,title:nt,content:ht}):null,transitionName:(0,$t.m)(Vt,"zoom-big",Dt.transitionName),"data-popover-inject":!0})))});re._InternalPanelDoNotUseOrYouWillBeFired=De.ZP,Ve.Z=re},17356:function(Sn,Ve,Pt){"use strict";var vt=Pt(17313),It=Pt(29878),oe=Pt(19447),de=Pt(33166),$t=Pt(83116),Ut=Pt(37613);const Jt=te=>{const{componentCls:Fe,popoverColor:re,minWidth:me,fontWeightStrong:Ot,popoverPadding:et,boxShadowSecondary:nt,colorTextHeading:ht,borderRadiusLG:at,zIndexPopup:ft,marginXS:mt,colorBgElevated:wt,popoverBg:Et}=te;return[{[Fe]:Object.assign(Object.assign({},(0,vt.Wf)(te)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:ft,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":wt,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${Fe}-content`]:{position:"relative"},[`${Fe}-inner`]:{backgroundColor:Et,backgroundClip:"padding-box",borderRadius:at,boxShadow:nt,padding:et},[`${Fe}-title`]:{minWidth:me,marginBottom:mt,color:ht,fontWeight:Ot},[`${Fe}-inner-content`]:{color:re}})},(0,oe.ZP)(te,{colorBg:"var(--antd-arrow-background-color)"}),{[`${Fe}-pure`]:{position:"relative",maxWidth:"none",margin:te.sizePopupArrow,display:"inline-block",[`${Fe}-content`]:{display:"inline-block"}}}]},De=te=>{const{componentCls:Fe}=te;return{[Fe]:de.i.map(re=>{const me=te[`${re}6`];return{[`&${Fe}-${re}`]:{"--antd-arrow-background-color":me,[`${Fe}-inner`]:{backgroundColor:me},[`${Fe}-arrow`]:{background:"transparent"}}}})}},we=te=>{const{componentCls:Fe,lineWidth:re,lineType:me,colorSplit:Ot,paddingSM:et,controlHeight:nt,fontSize:ht,lineHeight:at,padding:ft}=te,mt=nt-Math.round(ht*at),wt=mt/2,Et=mt/2-re,Nt=ft;return{[Fe]:{[`${Fe}-inner`]:{padding:0},[`${Fe}-title`]:{margin:0,padding:`${wt}px ${Nt}px ${Et}px`,borderBottom:`${re}px ${me} ${Ot}`},[`${Fe}-inner-content`]:{padding:`${et}px ${Nt}px`}}}};Ve.Z=(0,$t.Z)("Popover",te=>{const{colorBgElevated:Fe,colorText:re,wireframe:me}=te,Ot=(0,Ut.TS)(te,{popoverPadding:12,popoverBg:Fe,popoverColor:re});return[Jt(Ot),De(Ot),me&&we(Ot),(0,It._y)(Ot,"zoom-big")]},te=>({width:177,minWidth:177,zIndexPopup:te.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},93948:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return Ln}});var vt=Pt(59301),It=Pt(29679),oe=Pt(40001),de=Pt(19248),$t=Pt(99267),Ut=Pt(92310),Jt=Pt.n(Ut),De=Pt(2738),we=Pt(36355),te=Pt(96663),Fe=Pt(44127),re=Pt(6620),me={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ot=function(){var on=(0,vt.useRef)([]),Pn=(0,vt.useRef)(null);return(0,vt.useEffect)(function(){var Cn=Date.now(),An=!1;on.current.forEach(function(Jn){if(Jn){An=!0;var ui=Jn.style;ui.transitionDuration=".3s, .3s, .3s, .06s",Pn.current&&Cn-Pn.current<100&&(ui.transitionDuration="0s, 0s")}}),An&&(Pn.current=Date.now())}),on.current},et=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],nt=function(on){var Pn=(0,Fe.Z)((0,Fe.Z)({},me),on),Cn=Pn.className,An=Pn.percent,Jn=Pn.prefixCls,ui=Pn.strokeColor,ni=Pn.strokeLinecap,fi=Pn.strokeWidth,Bi=Pn.style,Ti=Pn.trailColor,Di=Pn.trailWidth,io=Pn.transition,to=(0,re.Z)(Pn,et);delete to.gapPosition;var Ri=Array.isArray(An)?An:[An],Qi=Array.isArray(ui)?ui:[ui],Zn=Ot(),Mt=fi/2,so=100-fi/2,Ii="M ".concat(ni==="round"?Mt:0,",").concat(Mt,`
|
|
|
L `).concat(ni==="round"?so:100,",").concat(Mt),Wi="0 0 100 ".concat(fi),ki=0;return vt.createElement("svg",(0,te.Z)({className:Jt()("".concat(Jn,"-line"),Cn),viewBox:Wi,preserveAspectRatio:"none",style:Bi},to),vt.createElement("path",{className:"".concat(Jn,"-line-trail"),d:Ii,strokeLinecap:ni,stroke:Ti,strokeWidth:Di||fi,fillOpacity:"0"}),Ri.map(function(Bo,Mo){var ai=1;switch(ni){case"round":ai=1-fi/100;break;case"square":ai=1-fi/2/100;break;default:ai=1;break}var di={strokeDasharray:"".concat(Bo*ai,"px, 100px"),strokeDashoffset:"-".concat(ki,"px"),transition:io||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ae=Qi[Mo]||Qi[Qi.length-1];return ki+=Bo,vt.createElement("path",{key:Mo,className:"".concat(Jn,"-line-path"),d:Ii,strokeLinecap:ni,stroke:Ae,strokeWidth:fi,fillOpacity:"0",ref:function(_t){Zn[Mo]=_t},style:di})}))},ht=nt,at=Pt(20135),ft=Pt(72071),mt=Pt(47273),wt=0,Et=(0,mt.Z)();function Nt(){var ye;return Et?(ye=wt,wt+=1):ye="TEST_OR_SSR",ye}var Dt=function(ye){var on=vt.useState(),Pn=(0,ft.Z)(on,2),Cn=Pn[0],An=Pn[1];return vt.useEffect(function(){An("rc_progress_".concat(Nt()))},[]),ye||Cn},At=function(on){var Pn=on.bg,Cn=on.children;return vt.createElement("div",{style:{width:"100%",height:"100%",background:Pn}},Cn)};function Kt(ye,on){return Object.keys(ye).map(function(Pn){var Cn=parseFloat(Pn),An="".concat(Math.floor(Cn*on),"%");return"".concat(ye[Pn]," ").concat(An)})}var Wt=vt.forwardRef(function(ye,on){var Pn=ye.prefixCls,Cn=ye.color,An=ye.gradientId,Jn=ye.radius,ui=ye.style,ni=ye.ptg,fi=ye.strokeLinecap,Bi=ye.strokeWidth,Ti=ye.size,Di=ye.gapDegree,io=Cn&&(0,at.Z)(Cn)==="object",to=io?"#FFF":void 0,Ri=Ti/2,Qi=vt.createElement("circle",{className:"".concat(Pn,"-circle-path"),r:Jn,cx:Ri,cy:Ri,stroke:to,strokeLinecap:fi,strokeWidth:Bi,opacity:ni===0?0:1,style:ui,ref:on});if(!io)return Qi;var Zn="".concat(An,"-conic"),Mt=Di?"".concat(180+Di/2,"deg"):"0deg",so=Kt(Cn,(360-Di)/360),Ii=Kt(Cn,1),Wi="conic-gradient(from ".concat(Mt,", ").concat(so.join(", "),")"),ki="linear-gradient(to ".concat(Di?"bottom":"top",", ").concat(Ii.join(", "),")");return vt.createElement(vt.Fragment,null,vt.createElement("mask",{id:Zn},Qi),vt.createElement("foreignObject",{x:0,y:0,width:Ti,height:Ti,mask:"url(#".concat(Zn,")")},vt.createElement(At,{bg:ki},vt.createElement(At,{bg:Wi}))))}),xe=Wt,Vt=100,Ie=function(on,Pn,Cn,An,Jn,ui,ni,fi,Bi,Ti){var Di=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,io=Cn/100*360*((360-ui)/360),to=ui===0?0:{bottom:0,top:180,left:90,right:-90}[ni],Ri=(100-An)/100*Pn;Bi==="round"&&An!==100&&(Ri+=Ti/2,Ri>=Pn&&(Ri=Pn-.01));var Qi=Vt/2;return{stroke:typeof fi=="string"?fi:void 0,strokeDasharray:"".concat(Pn,"px ").concat(on),strokeDashoffset:Ri+Di,transform:"rotate(".concat(Jn+io+to,"deg)"),transformOrigin:"".concat(Qi,"px ").concat(Qi,"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}},Se=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ye(ye){var on=ye!=null?ye:[];return Array.isArray(on)?on:[on]}var Le=function(on){var Pn=(0,Fe.Z)((0,Fe.Z)({},me),on),Cn=Pn.id,An=Pn.prefixCls,Jn=Pn.steps,ui=Pn.strokeWidth,ni=Pn.trailWidth,fi=Pn.gapDegree,Bi=fi===void 0?0:fi,Ti=Pn.gapPosition,Di=Pn.trailColor,io=Pn.strokeLinecap,to=Pn.style,Ri=Pn.className,Qi=Pn.strokeColor,Zn=Pn.percent,Mt=(0,re.Z)(Pn,Se),so=Vt/2,Ii=Dt(Cn),Wi="".concat(Ii,"-gradient"),ki=so-ui/2,Bo=Math.PI*2*ki,Mo=Bi>0?90+Bi/2:-90,ai=Bo*((360-Bi)/360),di=(0,at.Z)(Jn)==="object"?Jn:{count:Jn,space:2},Ae=di.count,Be=di.space,_t=Ye(Zn),Je=Ye(Qi),cn=Je.find(function(le){return le&&(0,at.Z)(le)==="object"}),ve=cn&&(0,at.Z)(cn)==="object",ie=ve?"butt":io,Qe=Ie(Bo,ai,0,100,Mo,Bi,Ti,Di,ie,ui),yn=Ot(),Nn=function(){var mn=0;return _t.map(function(Gn,si){var Re=Je[si]||Je[Je.length-1],fn=Ie(Bo,ai,mn,Gn,Mo,Bi,Ti,Re,ie,ui);return mn+=Gn,vt.createElement(xe,{key:si,color:Re,ptg:Gn,radius:ki,prefixCls:An,gradientId:Wi,style:fn,strokeLinecap:ie,strokeWidth:ui,gapDegree:Bi,ref:function(je){yn[si]=je},size:Vt})}).reverse()},_n=function(){var mn=Math.round(Ae*(_t[0]/100)),Gn=100/Ae,si=0;return new Array(Ae).fill(null).map(function(Re,fn){var He=fn<=mn-1?Je[0]:Di,je=He&&(0,at.Z)(He)==="object"?"url(#".concat(Wi,")"):void 0,vn=Ie(Bo,ai,si,Gn,Mo,Bi,Ti,He,"butt",ui,Be);return si+=(ai-vn.strokeDashoffset+Be)*100/ai,vt.createElement("circle",{key:fn,className:"".concat(An,"-circle-path"),r:ki,cx:so,cy:so,stroke:je,strokeWidth:ui,opacity:1,style:vn,ref:function(bn){yn[fn]=bn}})})};return vt.createElement("svg",(0,te.Z)({className:Jt()("".concat(An,"-circle"),Ri),viewBox:"0 0 ".concat(Vt," ").concat(Vt),style:to,id:Cn,role:"presentation"},Mt),!Ae&&vt.createElement("circle",{className:"".concat(An,"-circle-trail"),r:ki,cx:so,cy:so,stroke:Di,strokeLinecap:ie,strokeWidth:ni||ui,style:Qe}),Ae?_n():Nn())},Pe=Le,We={Line:ht,Circle:Pe},Ue=Pt(6848),ue=Pt(93398);function Ht(ye){return!ye||ye<0?0:ye>100?100:ye}function ke(ye){let{success:on,successPercent:Pn}=ye,Cn=Pn;return on&&"progress"in on&&(Cn=on.progress),on&&"percent"in on&&(Cn=on.percent),Cn}const pn=ye=>{let{percent:on,success:Pn,successPercent:Cn}=ye;const An=Ht(ke({success:Pn,successPercent:Cn}));return[An,Ht(Ht(on)-An)]},ln=ye=>{let{success:on={},strokeColor:Pn}=ye;const{strokeColor:Cn}=on;return[Cn||ue.presetPrimaryColors.green,Pn||null]},Ee=(ye,on,Pn)=>{var Cn,An,Jn,ui;let ni=-1,fi=-1;if(on==="step"){const Bi=Pn.steps,Ti=Pn.strokeWidth;typeof ye=="string"||typeof ye=="undefined"?(ni=ye==="small"?2:14,fi=Ti!=null?Ti:8):typeof ye=="number"?[ni,fi]=[ye,ye]:[ni=14,fi=8]=ye,ni*=Bi}else if(on==="line"){const Bi=Pn==null?void 0:Pn.strokeWidth;typeof ye=="string"||typeof ye=="undefined"?fi=Bi||(ye==="small"?6:8):typeof ye=="number"?[ni,fi]=[ye,ye]:[ni=-1,fi=8]=ye}else(on==="circle"||on==="dashboard")&&(typeof ye=="string"||typeof ye=="undefined"?[ni,fi]=ye==="small"?[60,60]:[120,120]:typeof ye=="number"?[ni,fi]=[ye,ye]:(ni=(An=(Cn=ye[0])!==null&&Cn!==void 0?Cn:ye[1])!==null&&An!==void 0?An:120,fi=(ui=(Jn=ye[0])!==null&&Jn!==void 0?Jn:ye[1])!==null&&ui!==void 0?ui:120));return[ni,fi]},Ke=3,gn=ye=>Ke/ye*100;var dn=ye=>{const{prefixCls:on,trailColor:Pn=null,strokeLinecap:Cn="round",gapPosition:An,gapDegree:Jn,width:ui=120,type:ni,children:fi,success:Bi,size:Ti=ui}=ye,[Di,io]=Ee(Ti,"circle");let{strokeWidth:to}=ye;to===void 0&&(to=Math.max(gn(Di),6));const Ri={width:Di,height:io,fontSize:Di*.15+6},Qi=vt.useMemo(()=>{if(Jn||Jn===0)return Jn;if(ni==="dashboard")return 75},[Jn,ni]),Zn=An||ni==="dashboard"&&"bottom"||void 0,Mt=Object.prototype.toString.call(ye.strokeColor)==="[object Object]",so=ln({success:Bi,strokeColor:ye.strokeColor}),Ii=Jt()(`${on}-inner`,{[`${on}-circle-gradient`]:Mt}),Wi=vt.createElement(Pe,{percent:pn(ye),strokeWidth:to,trailWidth:to,strokeColor:so,strokeLinecap:Cn,trailColor:Pn,prefixCls:on,gapDegree:Qi,gapPosition:Zn});return vt.createElement("div",{className:Ii,style:Ri},Di<=20?vt.createElement(Ue.Z,{title:fi},vt.createElement("span",null,Wi)):vt.createElement(vt.Fragment,null,Wi,fi))},In=function(ye,on){var Pn={};for(var Cn in ye)Object.prototype.hasOwnProperty.call(ye,Cn)&&on.indexOf(Cn)<0&&(Pn[Cn]=ye[Cn]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var An=0,Cn=Object.getOwnPropertySymbols(ye);An<Cn.length;An++)on.indexOf(Cn[An])<0&&Object.prototype.propertyIsEnumerable.call(ye,Cn[An])&&(Pn[Cn[An]]=ye[Cn[An]]);return Pn};const Ce=ye=>{let on=[];return Object.keys(ye).forEach(Pn=>{const Cn=parseFloat(Pn.replace(/%/g,""));isNaN(Cn)||on.push({key:Cn,value:ye[Pn]})}),on=on.sort((Pn,Cn)=>Pn.key-Cn.key),on.map(Pn=>{let{key:Cn,value:An}=Pn;return`${An} ${Cn}%`}).join(", ")},$n=(ye,on)=>{const{from:Pn=ue.presetPrimaryColors.blue,to:Cn=ue.presetPrimaryColors.blue,direction:An=on==="rtl"?"to left":"to right"}=ye,Jn=In(ye,["from","to","direction"]);if(Object.keys(Jn).length!==0){const ui=Ce(Jn);return{backgroundImage:`linear-gradient(${An}, ${ui})`}}return{backgroundImage:`linear-gradient(${An}, ${Pn}, ${Cn})`}};var jt=ye=>{const{prefixCls:on,direction:Pn,percent:Cn,size:An,strokeWidth:Jn,strokeColor:ui,strokeLinecap:ni="round",children:fi,trailColor:Bi=null,success:Ti}=ye,Di=ui&&typeof ui!="string"?$n(ui,Pn):{backgroundColor:ui},io=ni==="square"||ni==="butt"?0:void 0,to={backgroundColor:Bi||void 0,borderRadius:io},Ri=An!=null?An:[-1,Jn||(An==="small"?6:8)],[Qi,Zn]=Ee(Ri,"line",{strokeWidth:Jn}),Mt=Object.assign({width:`${Ht(Cn)}%`,height:Zn,borderRadius:io},Di),so=ke(ye),Ii={width:`${Ht(so)}%`,height:Zn,borderRadius:io,backgroundColor:Ti==null?void 0:Ti.strokeColor},Wi={width:Qi<0?"100%":Qi,height:Zn};return vt.createElement(vt.Fragment,null,vt.createElement("div",{className:`${on}-outer`,style:Wi},vt.createElement("div",{className:`${on}-inner`,style:to},vt.createElement("div",{className:`${on}-bg`,style:Mt}),so!==void 0?vt.createElement("div",{className:`${on}-success-bg`,style:Ii}):null)),fi)},xt=ye=>{const{size:on,steps:Pn,percent:Cn=0,strokeWidth:An=8,strokeColor:Jn,trailColor:ui=null,prefixCls:ni,children:fi}=ye,Bi=Math.round(Pn*(Cn/100)),Ti=on==="small"?2:14,Di=on!=null?on:[Ti,An],[io,to]=Ee(Di,"step",{steps:Pn,strokeWidth:An}),Ri=io/Pn,Qi=new Array(Pn);for(let Zn=0;Zn<Pn;Zn++){const Mt=Array.isArray(Jn)?Jn[Zn]:Jn;Qi[Zn]=vt.createElement("div",{key:Zn,className:Jt()(`${ni}-steps-item`,{[`${ni}-steps-item-active`]:Zn<=Bi-1}),style:{backgroundColor:Zn<=Bi-1?Mt:ui,width:Ri,height:to}})}return vt.createElement("div",{className:`${ni}-steps-outer`},Qi,fi)},Tt=Pt(93083),Ft=Pt(17313),yt=Pt(83116),ee=Pt(37613);const pe=ye=>{const on=ye?"100%":"-100%";return new Tt.Keyframes(`antProgress${ye?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${on}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${on}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},qt=ye=>{const{componentCls:on,iconCls:Pn}=ye;return{[on]:Object.assign(Object.assign({},(0,Ft.Wf)(ye)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:ye.fontSize,marginInlineEnd:ye.marginXS,marginBottom:ye.marginXS},[`${on}-outer`]:{display:"inline-block",width:"100%"},[`&${on}-show-info`]:{[`${on}-outer`]:{marginInlineEnd:`calc(-2em - ${ye.marginXS}px)`,paddingInlineEnd:`calc(2em + ${ye.paddingXS}px)`}},[`${on}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:ye.remainingColor,borderRadius:ye.lineBorderRadius},[`${on}-inner:not(${on}-circle-gradient)`]:{[`${on}-circle-path`]:{stroke:ye.defaultColor}},[`${on}-success-bg, ${on}-bg`]:{position:"relative",backgroundColor:ye.defaultColor,borderRadius:ye.lineBorderRadius,transition:`all ${ye.motionDurationSlow} ${ye.motionEaseInOutCirc}`},[`${on}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:ye.colorSuccess},[`${on}-text`]:{display:"inline-block",width:"2em",marginInlineStart:ye.marginXS,color:ye.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[Pn]:{fontSize:ye.fontSize}},[`&${on}-status-active`]:{[`${on}-bg::before`]:{position:"absolute",inset:0,backgroundColor:ye.colorBgContainer,borderRadius:ye.lineBorderRadius,opacity:0,animationName:pe(),animationDuration:ye.progressActiveMotionDuration,animationTimingFunction:ye.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${on}-rtl${on}-status-active`]:{[`${on}-bg::before`]:{animationName:pe(!0)}},[`&${on}-status-exception`]:{[`${on}-bg`]:{backgroundColor:ye.colorError},[`${on}-text`]:{color:ye.colorError}},[`&${on}-status-exception ${on}-inner:not(${on}-circle-gradient)`]:{[`${on}-circle-path`]:{stroke:ye.colorError}},[`&${on}-status-success`]:{[`${on}-bg`]:{backgroundColor:ye.colorSuccess},[`${on}-text`]:{color:ye.colorSuccess}},[`&${on}-status-success ${on}-inner:not(${on}-circle-gradient)`]:{[`${on}-circle-path`]:{stroke:ye.colorSuccess}}})}},Zt=ye=>{const{componentCls:on,iconCls:Pn}=ye;return{[on]:{[`${on}-circle-trail`]:{stroke:ye.remainingColor},[`&${on}-circle ${on}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${on}-circle ${on}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:ye.circleTextColor,fontSize:ye.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[Pn]:{fontSize:`${ye.fontSize/ye.fontSizeSM}em`}},[`${on}-circle&-status-exception`]:{[`${on}-text`]:{color:ye.colorError}},[`${on}-circle&-status-success`]:{[`${on}-text`]:{color:ye.colorSuccess}}},[`${on}-inline-circle`]:{lineHeight:1,[`${on}-inner`]:{verticalAlign:"bottom"}}}},fe=ye=>{const{componentCls:on}=ye;return{[on]:{[`${on}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:ye.progressStepMinWidth,marginInlineEnd:ye.progressStepMarginInlineEnd,backgroundColor:ye.remainingColor,transition:`all ${ye.motionDurationSlow}`,"&-active":{backgroundColor:ye.defaultColor}}}}}},ce=ye=>{const{componentCls:on,iconCls:Pn}=ye;return{[on]:{[`${on}-small&-line, ${on}-small&-line ${on}-text ${Pn}`]:{fontSize:ye.fontSizeSM}}}};var ne=(0,yt.Z)("Progress",ye=>{const on=ye.marginXXS/2,Pn=(0,ee.TS)(ye,{progressStepMarginInlineEnd:on,progressStepMinWidth:on,progressActiveMotionDuration:"2.4s"});return[qt(Pn),Zt(Pn),fe(Pn),ce(Pn)]},ye=>({circleTextColor:ye.colorText,defaultColor:ye.colorInfo,remainingColor:ye.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),Ne=function(ye,on){var Pn={};for(var Cn in ye)Object.prototype.hasOwnProperty.call(ye,Cn)&&on.indexOf(Cn)<0&&(Pn[Cn]=ye[Cn]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var An=0,Cn=Object.getOwnPropertySymbols(ye);An<Cn.length;An++)on.indexOf(Cn[An])<0&&Object.prototype.propertyIsEnumerable.call(ye,Cn[An])&&(Pn[Cn[An]]=ye[Cn[An]]);return Pn};const hn=null,an=["normal","exception","active","success"];var En=vt.forwardRef((ye,on)=>{const{prefixCls:Pn,className:Cn,rootClassName:An,steps:Jn,strokeColor:ui,percent:ni=0,size:fi="default",showInfo:Bi=!0,type:Ti="line",status:Di,format:io,style:to}=ye,Ri=Ne(ye,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),Qi=vt.useMemo(()=>{var _t,Je;const cn=ke(ye);return parseInt(cn!==void 0?(_t=cn!=null?cn:0)===null||_t===void 0?void 0:_t.toString():(Je=ni!=null?ni:0)===null||Je===void 0?void 0:Je.toString(),10)},[ni,ye.success,ye.successPercent]),Zn=vt.useMemo(()=>!an.includes(Di)&&Qi>=100?"success":Di||"normal",[Di,Qi]),{getPrefixCls:Mt,direction:so,progress:Ii}=vt.useContext(we.E_),Wi=Mt("progress",Pn),[ki,Bo]=ne(Wi),Mo=vt.useMemo(()=>{if(!Bi)return null;const _t=ke(ye);let Je;const cn=io||(ie=>`${ie}%`),ve=Ti==="line";return io||Zn!=="exception"&&Zn!=="success"?Je=cn(Ht(ni),Ht(_t)):Zn==="exception"?Je=ve?vt.createElement(de.Z,null):vt.createElement($t.Z,null):Zn==="success"&&(Je=ve?vt.createElement(It.Z,null):vt.createElement(oe.Z,null)),vt.createElement("span",{className:`${Wi}-text`,title:typeof Je=="string"?Je:void 0},Je)},[Bi,ni,Qi,Zn,Ti,Wi,io]),ai=Array.isArray(ui)?ui[0]:ui,di=typeof ui=="string"||Array.isArray(ui)?ui:void 0;let Ae;Ti==="line"?Ae=Jn?vt.createElement(xt,Object.assign({},ye,{strokeColor:di,prefixCls:Wi,steps:Jn}),Mo):vt.createElement(jt,Object.assign({},ye,{strokeColor:ai,prefixCls:Wi,direction:so}),Mo):(Ti==="circle"||Ti==="dashboard")&&(Ae=vt.createElement(dn,Object.assign({},ye,{strokeColor:ai,prefixCls:Wi,progressStatus:Zn}),Mo));const Be=Jt()(Wi,`${Wi}-status-${Zn}`,`${Wi}-${Ti==="dashboard"&&"circle"||Jn&&"steps"||Ti}`,{[`${Wi}-inline-circle`]:Ti==="circle"&&Ee(fi,"circle")[0]<=20,[`${Wi}-show-info`]:Bi,[`${Wi}-${fi}`]:typeof fi=="string",[`${Wi}-rtl`]:so==="rtl"},Ii==null?void 0:Ii.className,Cn,An,Bo);return ki(vt.createElement("div",Object.assign({ref:on,style:Object.assign(Object.assign({},Ii==null?void 0:Ii.style),to),className:Be,role:"progressbar","aria-valuenow":Qi},(0,De.Z)(Ri,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Ae))}),Ln=En},13570:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return Ht}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},de=oe,$t=Pt(7657),Ut=function(pn,ln){return It.createElement($t.Z,(0,vt.Z)({},pn,{ref:ln,icon:de}))},Jt=It.forwardRef(Ut),De=Jt,we=Pt(92310),te=Pt.n(we),Fe=Pt(90493),re=Pt(72071),me=Pt(6620),Ot=Pt(18929),et=Pt(10228),nt=Pt(26112);function ht(ke,pn){var ln=ke.disabled,Ee=ke.prefixCls,Ke=ke.character,gn=ke.characterRender,Bn=ke.index,dn=ke.count,In=ke.value,Ce=ke.allowHalf,$n=ke.focused,Qn=ke.onHover,jt=ke.onClick,Lt=function(Zt){Qn(Zt,Bn)},xt=function(Zt){jt(Zt,Bn)},Tt=function(Zt){Zt.keyCode===et.Z.ENTER&&jt(Zt,Bn)},Ft=Bn+1,yt=new Set([Ee]);In===0&&Bn===0&&$n?yt.add("".concat(Ee,"-focused")):Ce&&In+.5>=Ft&&In<Ft?(yt.add("".concat(Ee,"-half")),yt.add("".concat(Ee,"-active")),$n&&yt.add("".concat(Ee,"-focused"))):(Ft<=In?yt.add("".concat(Ee,"-full")):yt.add("".concat(Ee,"-zero")),Ft===In&&$n&&yt.add("".concat(Ee,"-focused")));var ee=typeof Ke=="function"?Ke(ke):Ke,pe=It.createElement("li",{className:te()(Array.from(yt)),ref:pn},It.createElement("div",{onClick:ln?null:xt,onKeyDown:ln?null:Tt,onMouseMove:ln?null:Lt,role:"radio","aria-checked":In>Bn?"true":"false","aria-posinset":Bn+1,"aria-setsize":dn,tabIndex:ln?-1:0},It.createElement("div",{className:"".concat(Ee,"-first")},ee),It.createElement("div",{className:"".concat(Ee,"-second")},ee)));return gn&&(pe=gn(pe,ke)),pe}var at=It.forwardRef(ht);function ft(){var ke=It.useRef({});function pn(Ee){return ke.current[Ee]}function ln(Ee){return function(Ke){ke.current[Ee]=Ke}}return[pn,ln]}function mt(ke){var pn=ke.pageXOffset,ln="scrollLeft";if(typeof pn!="number"){var Ee=ke.document;pn=Ee.documentElement[ln],typeof pn!="number"&&(pn=Ee.body[ln])}return pn}function wt(ke){var pn,ln,Ee=ke.ownerDocument,Ke=Ee.body,gn=Ee&&Ee.documentElement,Bn=ke.getBoundingClientRect();return pn=Bn.left,ln=Bn.top,pn-=gn.clientLeft||Ke.clientLeft||0,ln-=gn.clientTop||Ke.clientTop||0,{left:pn,top:ln}}function Et(ke){var pn=wt(ke),ln=ke.ownerDocument,Ee=ln.defaultView||ln.parentWindow;return pn.left+=mt(Ee),pn.left}var Nt=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function Dt(ke,pn){var ln,Ee=ke.prefixCls,Ke=Ee===void 0?"rc-rate":Ee,gn=ke.className,Bn=ke.defaultValue,dn=ke.value,In=ke.count,Ce=In===void 0?5:In,$n=ke.allowHalf,Qn=$n===void 0?!1:$n,jt=ke.allowClear,Lt=jt===void 0?!0:jt,xt=ke.character,Tt=xt===void 0?"\u2605":xt,Ft=ke.characterRender,yt=ke.disabled,ee=ke.direction,pe=ee===void 0?"ltr":ee,qt=ke.tabIndex,Zt=qt===void 0?0:qt,fe=ke.autoFocus,ce=ke.onHoverChange,ne=ke.onChange,Ne=ke.onFocus,hn=ke.onBlur,an=ke.onKeyDown,_e=ke.onMouseLeave,En=(0,me.Z)(ke,Nt),Ln=ft(),ye=(0,re.Z)(Ln,2),on=ye[0],Pn=ye[1],Cn=It.useRef(null),An=function(){if(!yt){var ie;(ie=Cn.current)===null||ie===void 0||ie.focus()}};It.useImperativeHandle(pn,function(){return{focus:An,blur:function(){if(!yt){var ie;(ie=Cn.current)===null||ie===void 0||ie.blur()}}}});var Jn=(0,Ot.Z)(Bn||0,{value:dn}),ui=(0,re.Z)(Jn,2),ni=ui[0],fi=ui[1],Bi=(0,Ot.Z)(null),Ti=(0,re.Z)(Bi,2),Di=Ti[0],io=Ti[1],to=function(ie,Qe){var yn=pe==="rtl",Nn=ie+1;if(Qn){var _n=on(ie),le=Et(_n),mn=_n.clientWidth;(yn&&Qe-le>mn/2||!yn&&Qe-le<mn/2)&&(Nn-=.5)}return Nn},Ri=function(ie){fi(ie),ne==null||ne(ie)},Qi=It.useState(!1),Zn=(0,re.Z)(Qi,2),Mt=Zn[0],so=Zn[1],Ii=function(){so(!0),Ne==null||Ne()},Wi=function(){so(!1),hn==null||hn()},ki=It.useState(null),Bo=(0,re.Z)(ki,2),Mo=Bo[0],ai=Bo[1],di=function(ie,Qe){var yn=to(Qe,ie.pageX);yn!==Di&&(ai(yn),io(null)),ce==null||ce(yn)},Ae=function(ie){yt||(ai(null),io(null),ce==null||ce(void 0)),ie&&(_e==null||_e(ie))},Be=function(ie,Qe){var yn=to(Qe,ie.pageX),Nn=!1;Lt&&(Nn=yn===ni),Ae(),Ri(Nn?0:yn),io(Nn?yn:null)},_t=function(ie){var Qe=ie.keyCode,yn=pe==="rtl",Nn=ni;Qe===et.Z.RIGHT&&Nn<Ce&&!yn?(Qn?Nn+=.5:Nn+=1,Ri(Nn),ie.preventDefault()):Qe===et.Z.LEFT&&Nn>0&&!yn||Qe===et.Z.RIGHT&&Nn>0&&yn?(Qn?Nn-=.5:Nn-=1,Ri(Nn),ie.preventDefault()):Qe===et.Z.LEFT&&Nn<Ce&&yn&&(Qn?Nn+=.5:Nn+=1,Ri(Nn),ie.preventDefault()),an==null||an(ie)};It.useEffect(function(){fe&&!yt&&An()},[]);var Je=new Array(Ce).fill(0).map(function(ve,ie){return It.createElement(at,{ref:Pn(ie),index:ie,count:Ce,disabled:yt,prefixCls:"".concat(Ke,"-star"),allowHalf:Qn,value:Mo===null?ni:Mo,onClick:Be,onHover:di,key:ve||ie,character:Tt,characterRender:Ft,focused:Mt})}),cn=te()(Ke,gn,(ln={},(0,Fe.Z)(ln,"".concat(Ke,"-disabled"),yt),(0,Fe.Z)(ln,"".concat(Ke,"-rtl"),pe==="rtl"),ln));return It.createElement("ul",(0,vt.Z)({className:cn,onMouseLeave:Ae,tabIndex:yt?-1:Zt,onFocus:yt?null:Ii,onBlur:yt?null:Wi,onKeyDown:yt?null:_t,ref:Cn,role:"radiogroup"},(0,nt.Z)(En,{aria:!0,data:!0,attr:!0})),Je)}var At=It.forwardRef(Dt),Kt=At,Wt=Pt(36355),xe=Pt(6848),Vt=Pt(17313),Ie=Pt(83116),Se=Pt(37613);const Ye=ke=>{const{componentCls:pn}=ke;return{[`${pn}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:ke.marginXS},"> div":{transition:`all ${ke.motionDurationMid}, outline 0s`,"&:hover":{transform:ke.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${ke.lineWidth}px dashed ${ke.starColor}`,transform:ke.starHoverScale}},"&-first, &-second":{color:ke.starBg,transition:`all ${ke.motionDurationMid}`,userSelect:"none",[ke.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${pn}-star-first, &-half ${pn}-star-second`]:{opacity:1},[`&-half ${pn}-star-first, &-full ${pn}-star-second`]:{color:"inherit"}}}},Le=ke=>({[`&-rtl${ke.componentCls}`]:{direction:"rtl"}}),Pe=ke=>{const{componentCls:pn}=ke;return{[pn]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Vt.Wf)(ke)),{display:"inline-block",margin:0,padding:0,color:ke.starColor,fontSize:ke.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${pn} ${pn}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Ye(ke)),{[`+ ${pn}-text`]:{display:"inline-block",marginInlineStart:ke.marginXS,fontSize:ke.fontSize}}),Le(ke))}};var We=(0,Ie.Z)("Rate",ke=>{const pn=(0,Se.TS)(ke,{});return[Pe(pn)]},ke=>({starColor:ke.yellow6,starSize:ke.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:ke.colorFillContent})),Ue=function(ke,pn){var ln={};for(var Ee in ke)Object.prototype.hasOwnProperty.call(ke,Ee)&&pn.indexOf(Ee)<0&&(ln[Ee]=ke[Ee]);if(ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ke=0,Ee=Object.getOwnPropertySymbols(ke);Ke<Ee.length;Ke++)pn.indexOf(Ee[Ke])<0&&Object.prototype.propertyIsEnumerable.call(ke,Ee[Ke])&&(ln[Ee[Ke]]=ke[Ee[Ke]]);return ln},Ht=It.forwardRef((ke,pn)=>{const{prefixCls:ln,className:Ee,rootClassName:Ke,style:gn,tooltips:Bn,character:dn=It.createElement(De,null)}=ke,In=Ue(ke,["prefixCls","className","rootClassName","style","tooltips","character"]),Ce=(yt,ee)=>{let{index:pe}=ee;return Bn?It.createElement(xe.Z,{title:Bn[pe]},yt):yt},{getPrefixCls:$n,direction:Qn,rate:jt}=It.useContext(Wt.E_),Lt=$n("rate",ln),[xt,Tt]=We(Lt),Ft=Object.assign(Object.assign({},jt==null?void 0:jt.style),gn);return xt(It.createElement(Kt,Object.assign({ref:pn,character:dn,characterRender:Ce},In,{className:te()(Ee,Ke,Tt,jt==null?void 0:jt.className),style:Ft,prefixCls:Lt,direction:Qn})))})},57809:function(Sn,Ve,Pt){"use strict";var vt=Pt(92310),It=Pt.n(vt),oe=Pt(77861),de=Pt(2738),$t=Pt(59301),Ut=Pt(53487),Jt=Pt(62892),De=Pt(19080),we=Pt(36355),te=Pt(1684),Fe=Pt(93891),re=Pt(19716),me=Pt(32441),Ot=Pt(33234),et=Pt(14154),nt=Pt(58582),ht=Pt(84443),at=Pt(66339),ft=function(Dt,At){var Kt={};for(var Wt in Dt)Object.prototype.hasOwnProperty.call(Dt,Wt)&&At.indexOf(Wt)<0&&(Kt[Wt]=Dt[Wt]);if(Dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xe=0,Wt=Object.getOwnPropertySymbols(Dt);xe<Wt.length;xe++)At.indexOf(Wt[xe])<0&&Object.prototype.propertyIsEnumerable.call(Dt,Wt[xe])&&(Kt[Wt[xe]]=Dt[Wt[xe]]);return Kt};const mt="SECRET_COMBOBOX_MODE_DO_NOT_USE",wt=(Dt,At)=>{var Kt,{prefixCls:Wt,bordered:xe=!0,className:Vt,rootClassName:Ie,getPopupContainer:Se,popupClassName:Ye,dropdownClassName:Le,listHeight:Pe=256,placement:We,listItemHeight:Ue=24,size:ue,disabled:Ht,notFoundContent:ke,status:pn,builtinPlacements:ln,dropdownMatchSelectWidth:Ee,popupMatchSelectWidth:Ke,direction:gn,style:Bn,allowClear:dn}=Dt,In=ft(Dt,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ce,getPrefixCls:$n,renderEmpty:Qn,direction:jt,virtual:Lt,popupMatchSelectWidth:xt,popupOverflow:Tt,select:Ft}=$t.useContext(we.E_),yt=$n("select",Wt),ee=$n(),pe=gn!=null?gn:jt,{compactSize:qt,compactItemClassnames:Zt}=(0,Ot.ri)(yt,pe),[fe,ce]=(0,et.Z)(yt),ne=$t.useMemo(()=>{const{mode:Zn}=In;if(Zn!=="combobox")return Zn===mt?"combobox":Zn},[In.mode]),Ne=ne==="multiple"||ne==="tags",hn=(0,ht.Z)(In.suffixIcon,In.showArrow),an=(Kt=Ke!=null?Ke:Ee)!==null&&Kt!==void 0?Kt:xt,{status:_e,hasFeedback:En,isFormItemInput:Ln,feedbackIcon:ye}=$t.useContext(me.aM),on=(0,De.F)(_e,pn);let Pn;ke!==void 0?Pn=ke:ne==="combobox"?Pn=null:Pn=(Qn==null?void 0:Qn("Select"))||$t.createElement(Fe.Z,{componentName:"Select"});const{suffixIcon:Cn,itemIcon:An,removeIcon:Jn,clearIcon:ui}=(0,at.Z)(Object.assign(Object.assign({},In),{multiple:Ne,hasFeedback:En,feedbackIcon:ye,showSuffixIcon:hn,prefixCls:yt,showArrow:In.showArrow,componentName:"Select"})),ni=dn===!0?{clearIcon:ui}:dn,fi=(0,de.Z)(In,["suffixIcon","itemIcon"]),Bi=It()(Ye||Le,{[`${yt}-dropdown-${pe}`]:pe==="rtl"},Ie,ce),Ti=(0,re.Z)(Zn=>{var Mt;return(Mt=ue!=null?ue:qt)!==null&&Mt!==void 0?Mt:Zn}),Di=$t.useContext(te.Z),io=Ht!=null?Ht:Di,to=It()({[`${yt}-lg`]:Ti==="large",[`${yt}-sm`]:Ti==="small",[`${yt}-rtl`]:pe==="rtl",[`${yt}-borderless`]:!xe,[`${yt}-in-form-item`]:Ln},(0,De.Z)(yt,on,En),Zt,Ft==null?void 0:Ft.className,Vt,Ie,ce),Ri=$t.useMemo(()=>We!==void 0?We:pe==="rtl"?"bottomRight":"bottomLeft",[We,pe]),Qi=(0,nt.Z)(ln,Tt);return fe($t.createElement(oe.ZP,Object.assign({ref:At,virtual:Lt,showSearch:Ft==null?void 0:Ft.showSearch},fi,{style:Object.assign(Object.assign({},Ft==null?void 0:Ft.style),Bn),dropdownMatchSelectWidth:an,builtinPlacements:Qi,transitionName:(0,Jt.m)(ee,"slide-up",In.transitionName),listHeight:Pe,listItemHeight:Ue,mode:ne,prefixCls:yt,placement:Ri,direction:pe,suffixIcon:Cn,menuItemSelectedIcon:An,removeIcon:Jn,allowClear:ni,notFoundContent:Pn,className:to,getPopupContainer:Se||Ce,dropdownClassName:Bi,disabled:io})))},Et=$t.forwardRef(wt),Nt=(0,Ut.Z)(Et);Et.SECRET_COMBOBOX_MODE_DO_NOT_USE=mt,Et.Option=oe.Wx,Et.OptGroup=oe.Xo,Et._InternalPanelDoNotUseOrYouWillBeFired=Nt,Ve.default=Et},14154:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return Et}});var vt=Pt(17313),It=Pt(74207),oe=Pt(37613),de=Pt(83116),$t=Pt(13826),Ut=Pt(92899);const Jt=Nt=>{const{optionHeight:Dt,optionFontSize:At,optionLineHeight:Kt,optionPadding:Wt}=Nt;return{position:"relative",display:"block",minHeight:Dt,padding:Wt,color:Nt.colorText,fontWeight:"normal",fontSize:At,lineHeight:Kt,boxSizing:"border-box"}};var we=Nt=>{const{antCls:Dt,componentCls:At}=Nt,Kt=`${At}-item`,Wt=`&${Dt}-slide-up-enter${Dt}-slide-up-enter-active`,xe=`&${Dt}-slide-up-appear${Dt}-slide-up-appear-active`,Vt=`&${Dt}-slide-up-leave${Dt}-slide-up-leave-active`,Ie=`${At}-dropdown-placement-`;return[{[`${At}-dropdown`]:Object.assign(Object.assign({},(0,vt.Wf)(Nt)),{position:"absolute",top:-9999,zIndex:Nt.zIndexPopup,boxSizing:"border-box",padding:Nt.paddingXXS,overflow:"hidden",fontSize:Nt.fontSize,fontVariant:"initial",backgroundColor:Nt.colorBgElevated,borderRadius:Nt.borderRadiusLG,outline:"none",boxShadow:Nt.boxShadowSecondary,[`
|
|
|
${Wt}${Ie}bottomLeft,
|
|
|
${xe}${Ie}bottomLeft
|
|
|
`]:{animationName:$t.fJ},[`
|
|
|
${Wt}${Ie}topLeft,
|
|
|
${xe}${Ie}topLeft,
|
|
|
${Wt}${Ie}topRight,
|
|
|
${xe}${Ie}topRight
|
|
|
`]:{animationName:$t.Qt},[`${Vt}${Ie}bottomLeft`]:{animationName:$t.Uw},[`
|
|
|
${Vt}${Ie}topLeft,
|
|
|
${Vt}${Ie}topRight
|
|
|
`]:{animationName:$t.ly},"&-hidden":{display:"none"},[`${Kt}`]:Object.assign(Object.assign({},Jt(Nt)),{cursor:"pointer",transition:`background ${Nt.motionDurationSlow} ease`,borderRadius:Nt.borderRadiusSM,"&-group":{color:Nt.colorTextDescription,fontSize:Nt.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},vt.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Kt}-option-disabled)`]:{backgroundColor:Nt.optionActiveBg},[`&-selected:not(${Kt}-option-disabled)`]:{color:Nt.optionSelectedColor,fontWeight:Nt.optionSelectedFontWeight,backgroundColor:Nt.optionSelectedBg,[`${Kt}-option-state`]:{color:Nt.colorPrimary}},"&-disabled":{[`&${Kt}-option-selected`]:{backgroundColor:Nt.colorBgContainerDisabled},color:Nt.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Nt.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,$t.oN)(Nt,"slide-up"),(0,$t.oN)(Nt,"slide-down"),(0,Ut.Fm)(Nt,"move-up"),(0,Ut.Fm)(Nt,"move-down")]};const te=2,Fe=Nt=>{let{controlHeightSM:Dt,controlHeight:At,lineWidth:Kt}=Nt;const Wt=(At-Dt)/2-Kt,xe=Math.ceil(Wt/2);return[Wt,xe]};function re(Nt,Dt){const{componentCls:At,iconCls:Kt}=Nt,Wt=`${At}-selection-overflow`,xe=Nt.multipleSelectItemHeight,[Vt]=Fe(Nt),Ie=Dt?`${At}-${Dt}`:"";return{[`${At}-multiple${Ie}`]:{fontSize:Nt.fontSize,[Wt]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${At}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Vt-te}px ${te*2}px`,borderRadius:Nt.borderRadius,[`${At}-show-search&`]:{cursor:"text"},[`${At}-disabled&`]:{background:Nt.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${te}px 0`,lineHeight:`${xe}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${At}-show-arrow ${At}-selector,
|
|
|
&${At}-allow-clear ${At}-selector
|
|
|
`]:{paddingInlineEnd:Nt.fontSizeIcon+Nt.controlPaddingHorizontal},[`${At}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:xe,marginTop:te,marginBottom:te,lineHeight:`${xe-Nt.lineWidth*2}px`,background:Nt.multipleItemBg,border:`${Nt.lineWidth}px ${Nt.lineType} ${Nt.multipleItemBorderColor}`,borderRadius:Nt.borderRadiusSM,cursor:"default",transition:`font-size ${Nt.motionDurationSlow}, line-height ${Nt.motionDurationSlow}, height ${Nt.motionDurationSlow}`,userSelect:"none",marginInlineEnd:te*2,paddingInlineStart:Nt.paddingXS,paddingInlineEnd:Nt.paddingXS/2,[`${At}-disabled&`]:{color:Nt.multipleItemColorDisabled,borderColor:Nt.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Nt.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,vt.Ro)()),{display:"inline-flex",alignItems:"center",color:Nt.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Kt}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Nt.colorIconHover}})},[`${Wt}-item + ${Wt}-item`]:{[`${At}-selection-search`]:{marginInlineStart:0}},[`${At}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Nt.inputPaddingHorizontalBase-Vt,"\n &-input,\n &-mirror\n ":{height:xe,fontFamily:Nt.fontFamily,lineHeight:`${xe}px`,transition:`all ${Nt.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${At}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Nt.inputPaddingHorizontalBase,insetInlineEnd:Nt.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Nt.motionDurationSlow}`}}}}var Ot=Nt=>{const{componentCls:Dt}=Nt,At=(0,oe.TS)(Nt,{controlHeight:Nt.controlHeightSM,multipleSelectItemHeight:Nt.controlHeightXS,borderRadius:Nt.borderRadiusSM,borderRadiusSM:Nt.borderRadiusXS}),Kt=(0,oe.TS)(Nt,{fontSize:Nt.fontSizeLG,controlHeight:Nt.controlHeightLG,multipleSelectItemHeight:Nt.multipleItemHeightLG,borderRadius:Nt.borderRadiusLG,borderRadiusSM:Nt.borderRadius}),[,Wt]=Fe(Nt);return[re(Nt),re(At,"sm"),{[`${Dt}-multiple${Dt}-sm`]:{[`${Dt}-selection-placeholder`]:{insetInline:Nt.controlPaddingHorizontalSM-Nt.lineWidth},[`${Dt}-selection-search`]:{marginInlineStart:Wt}}},re(Kt,"lg")]};function et(Nt,Dt){const{componentCls:At,inputPaddingHorizontalBase:Kt,borderRadius:Wt}=Nt,xe=Nt.controlHeight-Nt.lineWidth*2,Vt=Math.ceil(Nt.fontSize*1.25),Ie=Dt?`${At}-${Dt}`:"";return{[`${At}-single${Ie}`]:{fontSize:Nt.fontSize,[`${At}-selector`]:Object.assign(Object.assign({},(0,vt.Wf)(Nt)),{display:"flex",borderRadius:Wt,[`${At}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Kt,insetInlineEnd:Kt,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${At}-selection-item,
|
|
|
${At}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${xe}px`,transition:`all ${Nt.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${xe}px`}},[`${At}-selection-item`]:{position:"relative",userSelect:"none"},[`${At}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${At}-selection-item:after`,`${At}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${At}-show-arrow ${At}-selection-item,
|
|
|
&${At}-show-arrow ${At}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Vt},[`&${At}-open ${At}-selection-item`]:{color:Nt.colorTextPlaceholder},[`&:not(${At}-customize-input)`]:{[`${At}-selector`]:{width:"100%",height:Nt.controlHeight,padding:`0 ${Kt}px`,[`${At}-selection-search-input`]:{height:xe},"&:after":{lineHeight:`${xe}px`}}},[`&${At}-customize-input`]:{[`${At}-selector`]:{"&:after":{display:"none"},[`${At}-selection-search`]:{position:"static",width:"100%"},[`${At}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Kt}px`,"&:after":{display:"none"}}}}}}}function nt(Nt){const{componentCls:Dt}=Nt,At=Nt.controlPaddingHorizontalSM-Nt.lineWidth;return[et(Nt),et((0,oe.TS)(Nt,{controlHeight:Nt.controlHeightSM,borderRadius:Nt.borderRadiusSM}),"sm"),{[`${Dt}-single${Dt}-sm`]:{[`&:not(${Dt}-customize-input)`]:{[`${Dt}-selection-search`]:{insetInlineStart:At,insetInlineEnd:At},[`${Dt}-selector`]:{padding:`0 ${At}px`},[`&${Dt}-show-arrow ${Dt}-selection-search`]:{insetInlineEnd:At+Nt.fontSize*1.5},[`
|
|
|
&${Dt}-show-arrow ${Dt}-selection-item,
|
|
|
&${Dt}-show-arrow ${Dt}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Nt.fontSize*1.5}}}},et((0,oe.TS)(Nt,{controlHeight:Nt.singleItemHeightLG,fontSize:Nt.fontSizeLG,borderRadius:Nt.borderRadiusLG}),"lg")]}const ht=Nt=>{const{componentCls:Dt,selectorBg:At}=Nt;return{position:"relative",backgroundColor:At,border:`${Nt.lineWidth}px ${Nt.lineType} ${Nt.colorBorder}`,transition:`all ${Nt.motionDurationMid} ${Nt.motionEaseInOut}`,input:{cursor:"pointer"},[`${Dt}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Dt}-disabled&`]:{color:Nt.colorTextDisabled,background:Nt.colorBgContainerDisabled,cursor:"not-allowed",[`${Dt}-multiple&`]:{background:Nt.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},at=function(Nt,Dt){let At=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Kt,borderHoverColor:Wt,outlineColor:xe,antCls:Vt}=Dt,Ie=At?{[`${Kt}-selector`]:{borderColor:Wt}}:{};return{[Nt]:{[`&:not(${Kt}-disabled):not(${Kt}-customize-input):not(${Vt}-pagination-size-changer)`]:Object.assign(Object.assign({},Ie),{[`${Kt}-focused& ${Kt}-selector`]:{borderColor:Wt,boxShadow:`0 0 0 ${Dt.controlOutlineWidth}px ${xe}`,outline:0},[`&:hover ${Kt}-selector`]:{borderColor:Wt}})}}},ft=Nt=>{const{componentCls:Dt}=Nt;return{[`${Dt}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},mt=Nt=>{const{componentCls:Dt,inputPaddingHorizontalBase:At,iconCls:Kt}=Nt;return{[Dt]:Object.assign(Object.assign({},(0,vt.Wf)(Nt)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Dt}-customize-input) ${Dt}-selector`]:Object.assign(Object.assign({},ht(Nt)),ft(Nt)),[`${Dt}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},vt.vS),[`${Dt}-selection-placeholder`]:Object.assign(Object.assign({},vt.vS),{flex:1,color:Nt.colorTextPlaceholder,pointerEvents:"none"}),[`${Dt}-arrow`]:Object.assign(Object.assign({},(0,vt.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:At,height:Nt.fontSizeIcon,marginTop:-Nt.fontSizeIcon/2,color:Nt.colorTextQuaternary,fontSize:Nt.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Kt]:{verticalAlign:"top",transition:`transform ${Nt.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Dt}-suffix)`]:{pointerEvents:"auto"}},[`${Dt}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Dt}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:At,zIndex:1,display:"inline-block",width:Nt.fontSizeIcon,height:Nt.fontSizeIcon,marginTop:-Nt.fontSizeIcon/2,color:Nt.colorTextQuaternary,fontSize:Nt.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Nt.clearBg,cursor:"pointer",opacity:0,transition:`color ${Nt.motionDurationMid} ease, opacity ${Nt.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Nt.colorTextTertiary}},"&:hover":{[`${Dt}-clear`]:{opacity:1}}}),[`${Dt}-has-feedback`]:{[`${Dt}-clear`]:{insetInlineEnd:At+Nt.fontSize+Nt.paddingXS}}}},wt=Nt=>{const{componentCls:Dt}=Nt;return[{[Dt]:{[`&-borderless ${Dt}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Dt}-in-form-item`]:{width:"100%"}}},mt(Nt),nt(Nt),Ot(Nt),we(Nt),{[`${Dt}-rtl`]:{direction:"rtl"}},at(Dt,(0,oe.TS)(Nt,{borderHoverColor:Nt.colorPrimaryHover,outlineColor:Nt.controlOutline})),at(`${Dt}-status-error`,(0,oe.TS)(Nt,{borderHoverColor:Nt.colorErrorHover,outlineColor:Nt.colorErrorOutline}),!0),at(`${Dt}-status-warning`,(0,oe.TS)(Nt,{borderHoverColor:Nt.colorWarningHover,outlineColor:Nt.colorWarningOutline}),!0),(0,It.c)(Nt,{borderElCls:`${Dt}-selector`,focusElCls:`${Dt}-focused`})]};var Et=(0,de.Z)("Select",(Nt,Dt)=>{let{rootPrefixCls:At}=Dt;const Kt=(0,oe.TS)(Nt,{rootPrefixCls:At,inputPaddingHorizontalBase:Nt.paddingSM-1,multipleSelectItemHeight:Nt.multipleItemHeight});return[wt(Kt)]},Nt=>{const{fontSize:Dt,lineHeight:At,controlHeight:Kt,controlPaddingHorizontal:Wt,zIndexPopupBase:xe,colorText:Vt,fontWeightStrong:Ie,controlItemBgActive:Se,controlItemBgHover:Ye,colorBgContainer:Le,colorFillSecondary:Pe,controlHeightLG:We,controlHeightSM:Ue,colorBgContainerDisabled:ue,colorTextDisabled:Ht}=Nt;return{zIndexPopup:xe+50,optionSelectedColor:Vt,optionSelectedFontWeight:Ie,optionSelectedBg:Se,optionActiveBg:Ye,optionPadding:`${(Kt-Dt*At)/2}px ${Wt}px`,optionFontSize:Dt,optionLineHeight:At,optionHeight:Kt,selectorBg:Le,clearBg:Le,singleItemHeightLG:We,multipleItemBg:Pe,multipleItemBorderColor:"transparent",multipleItemHeight:Ue,multipleItemHeightLG:Kt,multipleSelectorBgDisabled:ue,multipleItemColorDisabled:Ht,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return It}});const vt=oe=>{const $t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:oe==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},$t),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},$t),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},$t),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},$t),{points:["br","tr"],offset:[0,-4]})}};function It(oe,de){return oe||vt(de)}},84443:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return vt}});function vt(It,oe){return oe!==void 0?oe:It!==null}},66339:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});var vt=Pt(40001),It=Pt(19248),oe=Pt(99267),de=Pt(84105),$t=Pt(58617),Ut=Pt(47472),Jt=Pt(59301);function De(we){let{suffixIcon:te,clearIcon:Fe,menuItemSelectedIcon:re,removeIcon:me,loading:Ot,multiple:et,hasFeedback:nt,prefixCls:ht,showSuffixIcon:at,feedbackIcon:ft,showArrow:mt,componentName:wt}=we;const Et=Fe!=null?Fe:Jt.createElement(It.Z,null),Nt=Wt=>te===null&&!nt&&!mt?null:Jt.createElement(Jt.Fragment,null,at!==!1&&Wt,nt&&ft);let Dt=null;if(te!==void 0)Dt=Nt(te);else if(Ot)Dt=Nt(Jt.createElement($t.Z,{spin:!0}));else{const Wt=`${ht}-suffix`;Dt=xe=>{let{open:Vt,showSearch:Ie}=xe;return Nt(Vt&&Ie?Jt.createElement(Ut.Z,{className:Wt}):Jt.createElement(de.Z,{className:Wt}))}}let At=null;re!==void 0?At=re:et?At=Jt.createElement(vt.Z,null):At=null;let Kt=null;return me!==void 0?Kt=me:Kt=Jt.createElement(oe.Z,null),{clearIcon:Et,suffixIcon:Dt,itemIcon:At,removeIcon:Kt}}},61621:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return Tt}});var vt=Pt(92310),It=Pt.n(vt),oe=Pt(59301),de=Pt(36355),$t=Pt(2738),Jt=Ft=>{const{prefixCls:yt,className:ee,style:pe,size:qt,shape:Zt}=Ft,fe=It()({[`${yt}-lg`]:qt==="large",[`${yt}-sm`]:qt==="small"}),ce=It()({[`${yt}-circle`]:Zt==="circle",[`${yt}-square`]:Zt==="square",[`${yt}-round`]:Zt==="round"}),ne=oe.useMemo(()=>typeof qt=="number"?{width:qt,height:qt,lineHeight:`${qt}px`}:{},[qt]);return oe.createElement("span",{className:It()(yt,fe,ce,ee),style:Object.assign(Object.assign({},ne),pe)})},De=Pt(93083),we=Pt(83116),te=Pt(37613);const Fe=new De.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),re=Ft=>({height:Ft,lineHeight:`${Ft}px`}),me=Ft=>Object.assign({width:Ft},re(Ft)),Ot=Ft=>({background:Ft.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Fe,animationDuration:Ft.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),et=Ft=>Object.assign({width:Ft*5,minWidth:Ft*5},re(Ft)),nt=Ft=>{const{skeletonAvatarCls:yt,gradientFromColor:ee,controlHeight:pe,controlHeightLG:qt,controlHeightSM:Zt}=Ft;return{[`${yt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:ee},me(pe)),[`${yt}${yt}-circle`]:{borderRadius:"50%"},[`${yt}${yt}-lg`]:Object.assign({},me(qt)),[`${yt}${yt}-sm`]:Object.assign({},me(Zt))}},ht=Ft=>{const{controlHeight:yt,borderRadiusSM:ee,skeletonInputCls:pe,controlHeightLG:qt,controlHeightSM:Zt,gradientFromColor:fe}=Ft;return{[`${pe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:fe,borderRadius:ee},et(yt)),[`${pe}-lg`]:Object.assign({},et(qt)),[`${pe}-sm`]:Object.assign({},et(Zt))}},at=Ft=>Object.assign({width:Ft},re(Ft)),ft=Ft=>{const{skeletonImageCls:yt,imageSizeBase:ee,gradientFromColor:pe,borderRadiusSM:qt}=Ft;return{[`${yt}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:pe,borderRadius:qt},at(ee*2)),{[`${yt}-path`]:{fill:"#bfbfbf"},[`${yt}-svg`]:Object.assign(Object.assign({},at(ee)),{maxWidth:ee*4,maxHeight:ee*4}),[`${yt}-svg${yt}-svg-circle`]:{borderRadius:"50%"}}),[`${yt}${yt}-circle`]:{borderRadius:"50%"}}},mt=(Ft,yt,ee)=>{const{skeletonButtonCls:pe}=Ft;return{[`${ee}${pe}-circle`]:{width:yt,minWidth:yt,borderRadius:"50%"},[`${ee}${pe}-round`]:{borderRadius:yt}}},wt=Ft=>Object.assign({width:Ft*2,minWidth:Ft*2},re(Ft)),Et=Ft=>{const{borderRadiusSM:yt,skeletonButtonCls:ee,controlHeight:pe,controlHeightLG:qt,controlHeightSM:Zt,gradientFromColor:fe}=Ft;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${ee}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:fe,borderRadius:yt,width:pe*2,minWidth:pe*2},wt(pe))},mt(Ft,pe,ee)),{[`${ee}-lg`]:Object.assign({},wt(qt))}),mt(Ft,qt,`${ee}-lg`)),{[`${ee}-sm`]:Object.assign({},wt(Zt))}),mt(Ft,Zt,`${ee}-sm`))},Nt=Ft=>{const{componentCls:yt,skeletonAvatarCls:ee,skeletonTitleCls:pe,skeletonParagraphCls:qt,skeletonButtonCls:Zt,skeletonInputCls:fe,skeletonImageCls:ce,controlHeight:ne,controlHeightLG:Ne,controlHeightSM:hn,gradientFromColor:an,padding:_e,marginSM:En,borderRadius:Ln,titleHeight:ye,blockRadius:on,paragraphLiHeight:Pn,controlHeightXS:Cn,paragraphMarginTop:An}=Ft;return{[`${yt}`]:{display:"table",width:"100%",[`${yt}-header`]:{display:"table-cell",paddingInlineEnd:_e,verticalAlign:"top",[`${ee}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:an},me(ne)),[`${ee}-circle`]:{borderRadius:"50%"},[`${ee}-lg`]:Object.assign({},me(Ne)),[`${ee}-sm`]:Object.assign({},me(hn))},[`${yt}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${pe}`]:{width:"100%",height:ye,background:an,borderRadius:on,[`+ ${qt}`]:{marginBlockStart:hn}},[`${qt}`]:{padding:0,"> li":{width:"100%",height:Pn,listStyle:"none",background:an,borderRadius:on,"+ li":{marginBlockStart:Cn}}},[`${qt}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${yt}-content`]:{[`${pe}, ${qt} > li`]:{borderRadius:Ln}}},[`${yt}-with-avatar ${yt}-content`]:{[`${pe}`]:{marginBlockStart:En,[`+ ${qt}`]:{marginBlockStart:An}}},[`${yt}${yt}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Et(Ft)),nt(Ft)),ht(Ft)),ft(Ft)),[`${yt}${yt}-block`]:{width:"100%",[`${Zt}`]:{width:"100%"},[`${fe}`]:{width:"100%"}},[`${yt}${yt}-active`]:{[`
|
|
|
${pe},
|
|
|
${qt} > li,
|
|
|
${ee},
|
|
|
${Zt},
|
|
|
${fe},
|
|
|
${ce}
|
|
|
`]:Object.assign({},Ot(Ft))}}};var Dt=(0,we.Z)("Skeleton",Ft=>{const{componentCls:yt}=Ft,ee=(0,te.TS)(Ft,{skeletonAvatarCls:`${yt}-avatar`,skeletonTitleCls:`${yt}-title`,skeletonParagraphCls:`${yt}-paragraph`,skeletonButtonCls:`${yt}-button`,skeletonInputCls:`${yt}-input`,skeletonImageCls:`${yt}-image`,imageSizeBase:Ft.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Ft.gradientFromColor} 25%, ${Ft.gradientToColor} 37%, ${Ft.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Nt(ee)]},Ft=>{const{colorFillContent:yt,colorFill:ee}=Ft,pe=yt,qt=ee;return{color:pe,colorGradientEnd:qt,gradientFromColor:pe,gradientToColor:qt,titleHeight:Ft.controlHeight/2,blockRadius:Ft.borderRadiusSM,paragraphMarginTop:Ft.marginLG+Ft.marginXXS,paragraphLiHeight:Ft.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Kt=Ft=>{const{prefixCls:yt,className:ee,rootClassName:pe,active:qt,shape:Zt="circle",size:fe="default"}=Ft,{getPrefixCls:ce}=oe.useContext(de.E_),ne=ce("skeleton",yt),[Ne,hn]=Dt(ne),an=(0,$t.Z)(Ft,["prefixCls","className"]),_e=It()(ne,`${ne}-element`,{[`${ne}-active`]:qt},ee,pe,hn);return Ne(oe.createElement("div",{className:_e},oe.createElement(Jt,Object.assign({prefixCls:`${ne}-avatar`,shape:Zt,size:fe},an))))},xe=Ft=>{const{prefixCls:yt,className:ee,rootClassName:pe,active:qt,block:Zt=!1,size:fe="default"}=Ft,{getPrefixCls:ce}=oe.useContext(de.E_),ne=ce("skeleton",yt),[Ne,hn]=Dt(ne),an=(0,$t.Z)(Ft,["prefixCls"]),_e=It()(ne,`${ne}-element`,{[`${ne}-active`]:qt,[`${ne}-block`]:Zt},ee,pe,hn);return Ne(oe.createElement("div",{className:_e},oe.createElement(Jt,Object.assign({prefixCls:`${ne}-button`,size:fe},an))))};const Vt="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var Se=Ft=>{const{prefixCls:yt,className:ee,rootClassName:pe,style:qt,active:Zt}=Ft,{getPrefixCls:fe}=oe.useContext(de.E_),ce=fe("skeleton",yt),[ne,Ne]=Dt(ce),hn=It()(ce,`${ce}-element`,{[`${ce}-active`]:Zt},ee,pe,Ne);return ne(oe.createElement("div",{className:hn},oe.createElement("div",{className:It()(`${ce}-image`,ee),style:qt},oe.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${ce}-image-svg`},oe.createElement("path",{d:Vt,className:`${ce}-image-path`})))))},Le=Ft=>{const{prefixCls:yt,className:ee,rootClassName:pe,active:qt,block:Zt,size:fe="default"}=Ft,{getPrefixCls:ce}=oe.useContext(de.E_),ne=ce("skeleton",yt),[Ne,hn]=Dt(ne),an=(0,$t.Z)(Ft,["prefixCls"]),_e=It()(ne,`${ne}-element`,{[`${ne}-active`]:qt,[`${ne}-block`]:Zt},ee,pe,hn);return Ne(oe.createElement("div",{className:_e},oe.createElement(Jt,Object.assign({prefixCls:`${ne}-input`,size:fe},an))))},Pe=Pt(96663),We={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},Ue=We,ue=Pt(7657),Ht=function(yt,ee){return oe.createElement(ue.Z,(0,Pe.Z)({},yt,{ref:ee,icon:Ue}))},ke=oe.forwardRef(Ht),pn=ke,Ee=Ft=>{const{prefixCls:yt,className:ee,rootClassName:pe,style:qt,active:Zt,children:fe}=Ft,{getPrefixCls:ce}=oe.useContext(de.E_),ne=ce("skeleton",yt),[Ne,hn]=Dt(ne),an=It()(ne,`${ne}-element`,{[`${ne}-active`]:Zt},hn,ee,pe),_e=fe!=null?fe:oe.createElement(pn,null);return Ne(oe.createElement("div",{className:an},oe.createElement("div",{className:It()(`${ne}-image`,ee),style:qt},_e)))},Ke=Pt(19127),Bn=Ft=>{const yt=ce=>{const{width:ne,rows:Ne=2}=Ft;if(Array.isArray(ne))return ne[ce];if(Ne-1===ce)return ne},{prefixCls:ee,className:pe,style:qt,rows:Zt}=Ft,fe=(0,Ke.Z)(Array(Zt)).map((ce,ne)=>oe.createElement("li",{key:ne,style:{width:yt(ne)}}));return oe.createElement("ul",{className:It()(ee,pe),style:qt},fe)},In=Ft=>{let{prefixCls:yt,className:ee,width:pe,style:qt}=Ft;return oe.createElement("h3",{className:It()(yt,ee),style:Object.assign({width:pe},qt)})};function Ce(Ft){return Ft&&typeof Ft=="object"?Ft:{}}function $n(Ft,yt){return Ft&&!yt?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Qn(Ft,yt){return!Ft&&yt?{width:"38%"}:Ft&&yt?{width:"50%"}:{}}function jt(Ft,yt){const ee={};return(!Ft||!yt)&&(ee.width="61%"),!Ft&&yt?ee.rows=3:ee.rows=2,ee}const Lt=Ft=>{const{prefixCls:yt,loading:ee,className:pe,rootClassName:qt,style:Zt,children:fe,avatar:ce=!1,title:ne=!0,paragraph:Ne=!0,active:hn,round:an}=Ft,{getPrefixCls:_e,direction:En,skeleton:Ln}=oe.useContext(de.E_),ye=_e("skeleton",yt),[on,Pn]=Dt(ye);if(ee||!("loading"in Ft)){const Cn=!!ce,An=!!ne,Jn=!!Ne;let ui;if(Cn){const Bi=Object.assign(Object.assign({prefixCls:`${ye}-avatar`},$n(An,Jn)),Ce(ce));ui=oe.createElement("div",{className:`${ye}-header`},oe.createElement(Jt,Object.assign({},Bi)))}let ni;if(An||Jn){let Bi;if(An){const Di=Object.assign(Object.assign({prefixCls:`${ye}-title`},Qn(Cn,Jn)),Ce(ne));Bi=oe.createElement(In,Object.assign({},Di))}let Ti;if(Jn){const Di=Object.assign(Object.assign({prefixCls:`${ye}-paragraph`},jt(Cn,An)),Ce(Ne));Ti=oe.createElement(Bn,Object.assign({},Di))}ni=oe.createElement("div",{className:`${ye}-content`},Bi,Ti)}const fi=It()(ye,{[`${ye}-with-avatar`]:Cn,[`${ye}-active`]:hn,[`${ye}-rtl`]:En==="rtl",[`${ye}-round`]:an},Ln==null?void 0:Ln.className,pe,qt,Pn);return on(oe.createElement("div",{className:fi,style:Object.assign(Object.assign({},Ln==null?void 0:Ln.style),Zt)},ui,ni))}return typeof fe!="undefined"?fe:null};Lt.Button=xe,Lt.Avatar=Kt,Lt.Input=Le,Lt.Image=Se,Lt.Node=Ee;var xt=Lt,Tt=xt},81327:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return ht}});var vt=Pt(59301),It=Pt(92310),oe=Pt.n(It),de=Pt(11592),$t=Pt(36355),Ut=Pt(33234);const Jt=vt.createContext({latestIndex:0}),De=Jt.Provider;var te=at=>{let{className:ft,index:mt,children:wt,split:Et,style:Nt}=at;const{latestIndex:Dt}=vt.useContext(Jt);return wt==null?null:vt.createElement(vt.Fragment,null,vt.createElement("div",{className:ft,style:Nt},wt),mt<Dt&&Et&&vt.createElement("span",{className:`${ft}-split`},Et))},Fe=Pt(2856);function re(at){return["small","middle","large"].includes(at)}function me(at){return at?typeof at=="number"&&!Number.isNaN(at):!1}var Ot=function(at,ft){var mt={};for(var wt in at)Object.prototype.hasOwnProperty.call(at,wt)&&ft.indexOf(wt)<0&&(mt[wt]=at[wt]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,wt=Object.getOwnPropertySymbols(at);Et<wt.length;Et++)ft.indexOf(wt[Et])<0&&Object.prototype.propertyIsEnumerable.call(at,wt[Et])&&(mt[wt[Et]]=at[wt[Et]]);return mt};const nt=vt.forwardRef((at,ft)=>{var mt,wt;const{getPrefixCls:Et,space:Nt,direction:Dt}=vt.useContext($t.E_),{size:At=(Nt==null?void 0:Nt.size)||"small",align:Kt,className:Wt,rootClassName:xe,children:Vt,direction:Ie="horizontal",prefixCls:Se,split:Ye,style:Le,wrap:Pe=!1,classNames:We,styles:Ue}=at,ue=Ot(at,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ht,ke]=Array.isArray(At)?At:[At,At],pn=re(ke),ln=re(Ht),Ee=me(ke),Ke=me(Ht),gn=(0,de.Z)(Vt,{keepEmpty:!0}),Bn=Kt===void 0&&Ie==="horizontal"?"center":Kt,dn=Et("space",Se),[In,Ce]=(0,Fe.Z)(dn),$n=oe()(dn,Nt==null?void 0:Nt.className,Ce,`${dn}-${Ie}`,{[`${dn}-rtl`]:Dt==="rtl",[`${dn}-align-${Bn}`]:Bn,[`${dn}-gap-row-${ke}`]:pn,[`${dn}-gap-col-${Ht}`]:ln},Wt,xe),Qn=oe()(`${dn}-item`,(mt=We==null?void 0:We.item)!==null&&mt!==void 0?mt:(wt=Nt==null?void 0:Nt.classNames)===null||wt===void 0?void 0:wt.item);let jt=0;const Lt=gn.map((Ft,yt)=>{var ee,pe;Ft!=null&&(jt=yt);const qt=Ft&&Ft.key||`${Qn}-${yt}`;return vt.createElement(te,{className:Qn,key:qt,index:yt,split:Ye,style:(ee=Ue==null?void 0:Ue.item)!==null&&ee!==void 0?ee:(pe=Nt==null?void 0:Nt.styles)===null||pe===void 0?void 0:pe.item},Ft)}),xt=vt.useMemo(()=>({latestIndex:jt}),[jt]);if(gn.length===0)return null;const Tt={};return Pe&&(Tt.flexWrap="wrap"),!ln&&Ke&&(Tt.columnGap=Ht),!pn&&Ee&&(Tt.rowGap=ke),In(vt.createElement("div",Object.assign({ref:ft,className:$n,style:Object.assign(Object.assign(Object.assign({},Tt),Nt==null?void 0:Nt.style),Le)},ue),vt.createElement(De,{value:xt},Lt)))});nt.Compact=Ut.ZP;var ht=nt},31797:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{default:function(){return Dt}});var vt=Pt(59301),It=Pt(56762),oe=Pt(92343),de=Pt(92310),$t=Pt.n(de),Ut=Pt(36355),Jt=Pt(61621),we=At=>{const{value:Kt,formatter:Wt,precision:xe,decimalSeparator:Vt,groupSeparator:Ie="",prefixCls:Se}=At;let Ye;if(typeof Wt=="function")Ye=Wt(Kt);else{const Le=String(Kt),Pe=Le.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Pe||Le==="-")Ye=Le;else{const We=Pe[1];let Ue=Pe[2]||"0",ue=Pe[4]||"";Ue=Ue.replace(/\B(?=(\d{3})+(?!\d))/g,Ie),typeof xe=="number"&&(ue=ue.padEnd(xe,"0").slice(0,xe>0?xe:0)),ue&&(ue=`${Vt}${ue}`),Ye=[vt.createElement("span",{key:"int",className:`${Se}-content-value-int`},We,Ue),ue&&vt.createElement("span",{key:"decimal",className:`${Se}-content-value-decimal`},ue)]}}return vt.createElement("span",{className:`${Se}-content-value`},Ye)},te=Pt(17313),Fe=Pt(83116),re=Pt(37613);const me=At=>{const{componentCls:Kt,marginXXS:Wt,padding:xe,colorTextDescription:Vt,titleFontSize:Ie,colorTextHeading:Se,contentFontSize:Ye,fontFamily:Le}=At;return{[`${Kt}`]:Object.assign(Object.assign({},(0,te.Wf)(At)),{[`${Kt}-title`]:{marginBottom:Wt,color:Vt,fontSize:Ie},[`${Kt}-skeleton`]:{paddingTop:xe},[`${Kt}-content`]:{color:Se,fontSize:Ye,fontFamily:Le,[`${Kt}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Kt}-content-prefix, ${Kt}-content-suffix`]:{display:"inline-block"},[`${Kt}-content-prefix`]:{marginInlineEnd:Wt},[`${Kt}-content-suffix`]:{marginInlineStart:Wt}}})}};var Ot=(0,Fe.Z)("Statistic",At=>{const Kt=(0,re.TS)(At,{});return[me(Kt)]},At=>{const{fontSizeHeading3:Kt,fontSize:Wt}=At;return{titleFontSize:Wt,contentFontSize:Kt}}),nt=At=>{const{prefixCls:Kt,className:Wt,rootClassName:xe,style:Vt,valueStyle:Ie,value:Se=0,title:Ye,valueRender:Le,prefix:Pe,suffix:We,loading:Ue=!1,onMouseEnter:ue,onMouseLeave:Ht,decimalSeparator:ke=".",groupSeparator:pn=","}=At,{getPrefixCls:ln,direction:Ee,statistic:Ke}=vt.useContext(Ut.E_),gn=ln("statistic",Kt),[Bn,dn]=Ot(gn),In=vt.createElement(we,Object.assign({decimalSeparator:ke,groupSeparator:pn,prefixCls:gn},At,{value:Se})),Ce=$t()(gn,{[`${gn}-rtl`]:Ee==="rtl"},Ke==null?void 0:Ke.className,Wt,xe,dn);return Bn(vt.createElement("div",{className:Ce,style:Object.assign(Object.assign({},Ke==null?void 0:Ke.style),Vt),onMouseEnter:ue,onMouseLeave:Ht},Ye&&vt.createElement("div",{className:`${gn}-title`},Ye),vt.createElement(Jt.Z,{paragraph:!1,loading:Ue,className:`${gn}-skeleton`},vt.createElement("div",{style:Ie,className:`${gn}-content`},Pe&&vt.createElement("span",{className:`${gn}-content-prefix`},Pe),Le?Le(In):In,We&&vt.createElement("span",{className:`${gn}-content-suffix`},We)))))};const ht=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function at(At,Kt){let Wt=At;const xe=/\[[^\]]*]/g,Vt=(Kt.match(xe)||[]).map(Le=>Le.slice(1,-1)),Ie=Kt.replace(xe,"[]"),Se=ht.reduce((Le,Pe)=>{let[We,Ue]=Pe;if(Le.includes(We)){const ue=Math.floor(Wt/Ue);return Wt-=ue*Ue,Le.replace(new RegExp(`${We}+`,"g"),Ht=>{const ke=Ht.length;return ue.toString().padStart(ke,"0")})}return Le},Ie);let Ye=0;return Se.replace(xe,()=>{const Le=Vt[Ye];return Ye+=1,Le})}function ft(At,Kt){const{format:Wt=""}=Kt,xe=new Date(At).getTime(),Vt=Date.now(),Ie=Math.max(xe-Vt,0);return at(Ie,Wt)}const mt=1e3/30;function wt(At){return new Date(At).getTime()}const Et=At=>{const{value:Kt,format:Wt="HH:mm:ss",onChange:xe,onFinish:Vt}=At,Ie=(0,It.Z)(),Se=vt.useRef(null),Ye=()=>{Vt==null||Vt(),Se.current&&(clearInterval(Se.current),Se.current=null)},Le=()=>{const Ue=wt(Kt);Ue>=Date.now()&&(Se.current=setInterval(()=>{Ie(),xe==null||xe(Ue-Date.now()),Ue<Date.now()&&Ye()},mt))};vt.useEffect(()=>(Le(),()=>{Se.current&&(clearInterval(Se.current),Se.current=null)}),[Kt]);const Pe=(Ue,ue)=>ft(Ue,Object.assign(Object.assign({},ue),{format:Wt})),We=Ue=>(0,oe.Tm)(Ue,{title:void 0});return vt.createElement(nt,Object.assign({},At,{valueRender:We,formatter:Pe}))};var Nt=vt.memo(Et);nt.Countdown=Nt;var Dt=nt},78673:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return Ie}});var vt=Pt(58617),It=Pt(92310),oe=Pt.n(It),de=Pt(96663),$t=Pt(90493),Ut=Pt(72071),Jt=Pt(6620),De=Pt(59301),we=Pt(18929),te=Pt(10228),Fe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],re=De.forwardRef(function(Se,Ye){var Le,Pe=Se.prefixCls,We=Pe===void 0?"rc-switch":Pe,Ue=Se.className,ue=Se.checked,Ht=Se.defaultChecked,ke=Se.disabled,pn=Se.loadingIcon,ln=Se.checkedChildren,Ee=Se.unCheckedChildren,Ke=Se.onClick,gn=Se.onChange,Bn=Se.onKeyDown,dn=(0,Jt.Z)(Se,Fe),In=(0,we.Z)(!1,{value:ue,defaultValue:Ht}),Ce=(0,Ut.Z)(In,2),$n=Ce[0],Qn=Ce[1];function jt(Ft,yt){var ee=$n;return ke||(ee=Ft,Qn(ee),gn==null||gn(ee,yt)),ee}function Lt(Ft){Ft.which===te.Z.LEFT?jt(!1,Ft):Ft.which===te.Z.RIGHT&&jt(!0,Ft),Bn==null||Bn(Ft)}function xt(Ft){var yt=jt(!$n,Ft);Ke==null||Ke(yt,Ft)}var Tt=oe()(We,Ue,(Le={},(0,$t.Z)(Le,"".concat(We,"-checked"),$n),(0,$t.Z)(Le,"".concat(We,"-disabled"),ke),Le));return De.createElement("button",(0,de.Z)({},dn,{type:"button",role:"switch","aria-checked":$n,disabled:ke,className:Tt,ref:Ye,onKeyDown:Lt,onClick:xt}),pn,De.createElement("span",{className:"".concat(We,"-inner")},De.createElement("span",{className:"".concat(We,"-inner-checked")},ln),De.createElement("span",{className:"".concat(We,"-inner-unchecked")},Ee)))});re.displayName="Switch";var me=re,Ot=Pt(14088),et=Pt(36355),nt=Pt(1684),ht=Pt(19716),at=Pt(64993),ft=Pt(17313),mt=Pt(83116),wt=Pt(37613);const Et=Se=>{const{componentCls:Ye,trackHeightSM:Le,trackPadding:Pe,trackMinWidthSM:We,innerMinMarginSM:Ue,innerMaxMarginSM:ue,handleSizeSM:Ht}=Se,ke=`${Ye}-inner`;return{[Ye]:{[`&${Ye}-small`]:{minWidth:We,height:Le,lineHeight:`${Le}px`,[`${Ye}-inner`]:{paddingInlineStart:ue,paddingInlineEnd:Ue,[`${ke}-checked`]:{marginInlineStart:`calc(-100% + ${Ht+Pe*2}px - ${ue*2}px)`,marginInlineEnd:`calc(100% - ${Ht+Pe*2}px + ${ue*2}px)`},[`${ke}-unchecked`]:{marginTop:-Le,marginInlineStart:0,marginInlineEnd:0}},[`${Ye}-handle`]:{width:Ht,height:Ht},[`${Ye}-loading-icon`]:{top:(Ht-Se.switchLoadingIconSize)/2,fontSize:Se.switchLoadingIconSize},[`&${Ye}-checked`]:{[`${Ye}-inner`]:{paddingInlineStart:Ue,paddingInlineEnd:ue,[`${ke}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${ke}-unchecked`]:{marginInlineStart:`calc(100% - ${Ht+Pe*2}px + ${ue*2}px)`,marginInlineEnd:`calc(-100% + ${Ht+Pe*2}px - ${ue*2}px)`}},[`${Ye}-handle`]:{insetInlineStart:`calc(100% - ${Ht+Pe}px)`}},[`&:not(${Ye}-disabled):active`]:{[`&:not(${Ye}-checked) ${ke}`]:{[`${ke}-unchecked`]:{marginInlineStart:Se.marginXXS/2,marginInlineEnd:-Se.marginXXS/2}},[`&${Ye}-checked ${ke}`]:{[`${ke}-checked`]:{marginInlineStart:-Se.marginXXS/2,marginInlineEnd:Se.marginXXS/2}}}}}}},Nt=Se=>{const{componentCls:Ye,handleSize:Le}=Se;return{[Ye]:{[`${Ye}-loading-icon${Se.iconCls}`]:{position:"relative",top:(Le-Se.fontSize)/2,color:Se.switchLoadingIconColor,verticalAlign:"top"},[`&${Ye}-checked ${Ye}-loading-icon`]:{color:Se.switchColor}}}},Dt=Se=>{const{componentCls:Ye,motion:Le,trackPadding:Pe,handleBg:We,handleShadow:Ue,handleSize:ue}=Se,Ht=`${Ye}-handle`;return{[Ye]:{[Ht]:{position:"absolute",top:Pe,insetInlineStart:Pe,width:ue,height:ue,transition:`all ${Se.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:We,borderRadius:ue/2,boxShadow:Ue,transition:`all ${Se.switchDuration} ease-in-out`,content:'""'}},[`&${Ye}-checked ${Ht}`]:{insetInlineStart:`calc(100% - ${ue+Pe}px)`},[`&:not(${Ye}-disabled):active`]:Le?{[`${Ht}::before`]:{insetInlineEnd:Se.switchHandleActiveInset,insetInlineStart:0},[`&${Ye}-checked ${Ht}::before`]:{insetInlineEnd:0,insetInlineStart:Se.switchHandleActiveInset}}:{}}}},At=Se=>{const{componentCls:Ye,trackHeight:Le,trackPadding:Pe,innerMinMargin:We,innerMaxMargin:Ue,handleSize:ue}=Se,Ht=`${Ye}-inner`;return{[Ye]:{[Ht]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Ue,paddingInlineEnd:We,transition:`padding-inline-start ${Se.switchDuration} ease-in-out, padding-inline-end ${Se.switchDuration} ease-in-out`,[`${Ht}-checked, ${Ht}-unchecked`]:{display:"block",color:Se.colorTextLightSolid,fontSize:Se.fontSizeSM,transition:`margin-inline-start ${Se.switchDuration} ease-in-out, margin-inline-end ${Se.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ht}-checked`]:{marginInlineStart:`calc(-100% + ${ue+Pe*2}px - ${Ue*2}px)`,marginInlineEnd:`calc(100% - ${ue+Pe*2}px + ${Ue*2}px)`},[`${Ht}-unchecked`]:{marginTop:-Le,marginInlineStart:0,marginInlineEnd:0}},[`&${Ye}-checked ${Ht}`]:{paddingInlineStart:We,paddingInlineEnd:Ue,[`${Ht}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ht}-unchecked`]:{marginInlineStart:`calc(100% - ${ue+Pe*2}px + ${Ue*2}px)`,marginInlineEnd:`calc(-100% + ${ue+Pe*2}px - ${Ue*2}px)`}},[`&:not(${Ye}-disabled):active`]:{[`&:not(${Ye}-checked) ${Ht}`]:{[`${Ht}-unchecked`]:{marginInlineStart:Pe*2,marginInlineEnd:-Pe*2}},[`&${Ye}-checked ${Ht}`]:{[`${Ht}-checked`]:{marginInlineStart:-Pe*2,marginInlineEnd:Pe*2}}}}}},Kt=Se=>{const{componentCls:Ye,trackHeight:Le,trackMinWidth:Pe}=Se;return{[Ye]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ft.Wf)(Se)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Pe,height:Le,lineHeight:`${Le}px`,verticalAlign:"middle",background:Se.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${Se.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ye}-disabled)`]:{background:Se.colorTextTertiary}}),(0,ft.Qy)(Se)),{[`&${Ye}-checked`]:{background:Se.switchColor,[`&:hover:not(${Ye}-disabled)`]:{background:Se.colorPrimaryHover}},[`&${Ye}-loading, &${Ye}-disabled`]:{cursor:"not-allowed",opacity:Se.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ye}-rtl`]:{direction:"rtl"}})}};var Wt=(0,mt.Z)("Switch",Se=>{const Ye=(0,wt.TS)(Se,{switchDuration:Se.motionDurationMid,switchColor:Se.colorPrimary,switchDisabledOpacity:Se.opacityLoading,switchLoadingIconSize:Se.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${Se.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Kt(Ye),At(Ye),Dt(Ye),Nt(Ye),Et(Ye)]},Se=>{const{fontSize:Ye,lineHeight:Le,controlHeight:Pe,colorWhite:We}=Se,Ue=Ye*Le,ue=Pe/2,Ht=2,ke=Ue-Ht*2,pn=ue-Ht*2;return{trackHeight:Ue,trackHeightSM:ue,trackMinWidth:ke*2+Ht*4,trackMinWidthSM:pn*2+Ht*2,trackPadding:Ht,handleBg:We,handleSize:ke,handleSizeSM:pn,handleShadow:`0 2px 4px 0 ${new at.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:ke/2,innerMaxMargin:ke+Ht+Ht*2,innerMinMarginSM:pn/2,innerMaxMarginSM:pn+Ht+Ht*2}}),xe=function(Se,Ye){var Le={};for(var Pe in Se)Object.prototype.hasOwnProperty.call(Se,Pe)&&Ye.indexOf(Pe)<0&&(Le[Pe]=Se[Pe]);if(Se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,Pe=Object.getOwnPropertySymbols(Se);We<Pe.length;We++)Ye.indexOf(Pe[We])<0&&Object.prototype.propertyIsEnumerable.call(Se,Pe[We])&&(Le[Pe[We]]=Se[Pe[We]]);return Le};const Vt=De.forwardRef((Se,Ye)=>{const{prefixCls:Le,size:Pe,disabled:We,loading:Ue,className:ue,rootClassName:Ht,style:ke}=Se,pn=xe(Se,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:ln,direction:Ee,switch:Ke}=De.useContext(et.E_),gn=De.useContext(nt.Z),Bn=(We!=null?We:gn)||Ue,dn=ln("switch",Le),In=De.createElement("div",{className:`${dn}-handle`},Ue&&De.createElement(vt.Z,{className:`${dn}-loading-icon`})),[Ce,$n]=Wt(dn),Qn=(0,ht.Z)(Pe),jt=oe()(Ke==null?void 0:Ke.className,{[`${dn}-small`]:Qn==="small",[`${dn}-loading`]:Ue,[`${dn}-rtl`]:Ee==="rtl"},ue,Ht,$n),Lt=Object.assign(Object.assign({},Ke==null?void 0:Ke.style),ke);return Ce(De.createElement(Ot.Z,{component:"Switch"},De.createElement(me,Object.assign({},pn,{prefixCls:dn,className:jt,style:Lt,disabled:Bn,ref:Ye,loadingIcon:In}))))});Vt.__ANT_SWITCH=!0;var Ie=Vt},17574:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{default:function(){return ue}});var vt=Pt(43858),It=Pt(19127),oe=Pt(52671),de=Pt(8657),$t=Pt(96663),Ut=Pt(59301),Jt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},De=Jt,we=Pt(7657),te=function(ke,pn){return Ut.createElement(we.Z,(0,$t.Z)({},ke,{ref:pn,icon:De}))},Fe=Ut.forwardRef(te),re=Fe,me=Pt(92310),Ot=Pt.n(me),et=Pt(35654),nt=Pt(71430),ht=Pt(36355),at=Pt(56082),ft=Pt(62892),mt=Pt(20648);const wt=4;function Et(Ht){const{dropPosition:ke,dropLevelOffset:pn,prefixCls:ln,indent:Ee,direction:Ke="ltr"}=Ht,gn=Ke==="ltr"?"left":"right",Bn=Ke==="ltr"?"right":"left",dn={[gn]:-pn*Ee+wt,[Bn]:0};switch(ke){case-1:dn.top=-3;break;case 1:dn.bottom=-3;break;default:dn.bottom=-3,dn[gn]=Ee+wt;break}return Ut.createElement("div",{style:dn,className:`${ln}-drop-indicator`})}var Nt=Pt(71997),At=Ut.forwardRef((Ht,ke)=>{const{getPrefixCls:pn,direction:ln,virtual:Ee,tree:Ke}=Ut.useContext(ht.E_),{prefixCls:gn,className:Bn,showIcon:dn=!1,showLine:In,switcherIcon:Ce,blockNode:$n=!1,children:Qn,checkable:jt=!1,selectable:Lt=!0,draggable:xt,motion:Tt,style:Ft}=Ht,yt=pn("tree",gn),ee=pn(),pe=Tt!=null?Tt:Object.assign(Object.assign({},(0,ft.Z)(ee)),{motionAppear:!1}),qt=Object.assign(Object.assign({},Ht),{checkable:jt,selectable:Lt,showIcon:dn,motion:pe,blockNode:$n,showLine:!!In,dropIndicatorRender:Et}),[Zt,fe]=(0,mt.ZP)(yt),ce=Ut.useMemo(()=>{if(!xt)return!1;let Ne={};switch(typeof xt){case"function":Ne.nodeDraggable=xt;break;case"object":Ne=Object.assign({},xt);break;default:break}return Ne.icon!==!1&&(Ne.icon=Ne.icon||Ut.createElement(at.Z,null)),Ne},[xt]),ne=Ne=>Ut.createElement(Nt.Z,{prefixCls:yt,switcherIcon:Ce,treeNodeProps:Ne,showLine:In});return Zt(Ut.createElement(vt.Z,Object.assign({itemHeight:20,ref:ke,virtual:Ee},qt,{style:Object.assign(Object.assign({},Ke==null?void 0:Ke.style),Ft),prefixCls:yt,className:Ot()({[`${yt}-icon-hide`]:!dn,[`${yt}-block-node`]:$n,[`${yt}-unselectable`]:!Lt,[`${yt}-rtl`]:ln==="rtl"},Ke==null?void 0:Ke.className,Bn,fe),direction:ln,checkable:jt&&Ut.createElement("span",{className:`${yt}-checkbox-inner`}),selectable:Lt,switcherIcon:ne,draggable:ce}),Qn))}),Kt;(function(Ht){Ht[Ht.None=0]="None",Ht[Ht.Start=1]="Start",Ht[Ht.End=2]="End"})(Kt||(Kt={}));function Wt(Ht,ke){function pn(ln){const{key:Ee,children:Ke}=ln;ke(Ee,ln)!==!1&&Wt(Ke||[],ke)}Ht.forEach(pn)}function xe(Ht){let{treeData:ke,expandedKeys:pn,startKey:ln,endKey:Ee}=Ht;const Ke=[];let gn=Kt.None;if(ln&&ln===Ee)return[ln];if(!ln||!Ee)return[];function Bn(dn){return dn===ln||dn===Ee}return Wt(ke,dn=>{if(gn===Kt.End)return!1;if(Bn(dn)){if(Ke.push(dn),gn===Kt.None)gn=Kt.Start;else if(gn===Kt.Start)return gn=Kt.End,!1}else gn===Kt.Start&&Ke.push(dn);return pn.includes(dn)}),Ke}function Vt(Ht,ke){const pn=(0,It.Z)(ke),ln=[];return Wt(Ht,(Ee,Ke)=>{const gn=pn.indexOf(Ee);return gn!==-1&&(ln.push(Ke),pn.splice(gn,1)),!!pn.length}),ln}var Ie=function(Ht,ke){var pn={};for(var ln in Ht)Object.prototype.hasOwnProperty.call(Ht,ln)&&ke.indexOf(ln)<0&&(pn[ln]=Ht[ln]);if(Ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,ln=Object.getOwnPropertySymbols(Ht);Ee<ln.length;Ee++)ke.indexOf(ln[Ee])<0&&Object.prototype.propertyIsEnumerable.call(Ht,ln[Ee])&&(pn[ln[Ee]]=Ht[ln[Ee]]);return pn};function Se(Ht){const{isLeaf:ke,expanded:pn}=Ht;return ke?Ut.createElement(oe.Z,null):pn?Ut.createElement(de.Z,null):Ut.createElement(re,null)}function Ye(Ht){let{treeData:ke,children:pn}=Ht;return ke||(0,nt.zn)(pn)}const Le=(Ht,ke)=>{var{defaultExpandAll:pn,defaultExpandParent:ln,defaultExpandedKeys:Ee}=Ht,Ke=Ie(Ht,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const gn=Ut.useRef(),Bn=Ut.useRef(),dn=()=>{const{keyEntities:ce}=(0,nt.I8)(Ye(Ke));let ne;return pn?ne=Object.keys(ce):ln?ne=(0,et.r7)(Ke.expandedKeys||Ee||[],ce):ne=Ke.expandedKeys||Ee,ne},[In,Ce]=Ut.useState(Ke.selectedKeys||Ke.defaultSelectedKeys||[]),[$n,Qn]=Ut.useState(()=>dn());Ut.useEffect(()=>{"selectedKeys"in Ke&&Ce(Ke.selectedKeys)},[Ke.selectedKeys]),Ut.useEffect(()=>{"expandedKeys"in Ke&&Qn(Ke.expandedKeys)},[Ke.expandedKeys]);const jt=(ce,ne)=>{var Ne;return"expandedKeys"in Ke||Qn(ce),(Ne=Ke.onExpand)===null||Ne===void 0?void 0:Ne.call(Ke,ce,ne)},Lt=(ce,ne)=>{var Ne;const{multiple:hn}=Ke,{node:an,nativeEvent:_e}=ne,{key:En=""}=an,Ln=Ye(Ke),ye=Object.assign(Object.assign({},ne),{selected:!0}),on=(_e==null?void 0:_e.ctrlKey)||(_e==null?void 0:_e.metaKey),Pn=_e==null?void 0:_e.shiftKey;let Cn;hn&&on?(Cn=ce,gn.current=En,Bn.current=Cn,ye.selectedNodes=Vt(Ln,Cn)):hn&&Pn?(Cn=Array.from(new Set([].concat((0,It.Z)(Bn.current||[]),(0,It.Z)(xe({treeData:Ln,expandedKeys:$n,startKey:En,endKey:gn.current}))))),ye.selectedNodes=Vt(Ln,Cn)):(Cn=[En],gn.current=En,Bn.current=Cn,ye.selectedNodes=Vt(Ln,Cn)),(Ne=Ke.onSelect)===null||Ne===void 0||Ne.call(Ke,Cn,ye),"selectedKeys"in Ke||Ce(Cn)},{getPrefixCls:xt,direction:Tt}=Ut.useContext(ht.E_),{prefixCls:Ft,className:yt,showIcon:ee=!0,expandAction:pe="click"}=Ke,qt=Ie(Ke,["prefixCls","className","showIcon","expandAction"]),Zt=xt("tree",Ft),fe=Ot()(`${Zt}-directory`,{[`${Zt}-directory-rtl`]:Tt==="rtl"},yt);return Ut.createElement(At,Object.assign({icon:Se,ref:ke,blockNode:!0},qt,{showIcon:ee,expandAction:pe,prefixCls:Zt,className:fe,expandedKeys:$n,selectedKeys:In,onSelect:Lt,onExpand:jt}))};var We=Ut.forwardRef(Le);const Ue=At;Ue.DirectoryTree=We,Ue.TreeNode=vt.O;var ue=Ue},20648:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{TM:function(){return me},Yk:function(){return re}});var vt=Pt(93083),It=Pt(98447),oe=Pt(17313),de=Pt(8378),$t=Pt(37613),Ut=Pt(83116);const Jt=new vt.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),De=(Ot,et)=>({[`.${Ot}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${et.motionDurationSlow}`}}}),we=(Ot,et)=>({[`.${Ot}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:et.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${et.lineWidthBold}px solid ${et.colorPrimary}`,borderRadius:"50%",content:'""'}}}),te=(Ot,et)=>{const{treeCls:nt,treeNodeCls:ht,treeNodePadding:at,titleHeight:ft,nodeSelectedBg:mt,nodeHoverBg:wt}=et,Et=et.paddingXS;return{[nt]:Object.assign(Object.assign({},(0,oe.Wf)(et)),{background:et.colorBgContainer,borderRadius:et.borderRadius,transition:`background-color ${et.motionDurationSlow}`,[`&${nt}-rtl`]:{[`${nt}-switcher`]:{"&_close":{[`${nt}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${nt}-active-focused)`]:Object.assign({},(0,oe.oN)(et)),[`${nt}-list-holder-inner`]:{alignItems:"flex-start"},[`&${nt}-block-node`]:{[`${nt}-list-holder-inner`]:{alignItems:"stretch",[`${nt}-node-content-wrapper`]:{flex:"auto"},[`${ht}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:at,insetInlineStart:0,border:`1px solid ${et.colorPrimary}`,opacity:0,animationName:Jt,animationDuration:et.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${ht}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${at}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${nt}-node-content-wrapper`]:{color:et.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${nt}-node-content-wrapper`]:Object.assign({},(0,oe.oN)(et)),[`&:not(${ht}-disabled).filter-node ${nt}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${nt}-draggable-icon`]:{flexShrink:0,width:ft,lineHeight:`${ft}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${et.motionDurationSlow}`,[`${ht}:hover &`]:{opacity:.45}},[`&${ht}-disabled`]:{[`${nt}-draggable-icon`]:{visibility:"hidden"}}}},[`${nt}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:ft}},[`${nt}-draggable-icon`]:{visibility:"hidden"},[`${nt}-switcher`]:Object.assign(Object.assign({},De(Ot,et)),{position:"relative",flex:"none",alignSelf:"stretch",width:ft,margin:0,lineHeight:`${ft}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${nt}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:et.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:ft/2,bottom:-at,marginInlineStart:-1,borderInlineEnd:`1px solid ${et.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:ft/2*.8,height:ft/2,borderBottom:`1px solid ${et.colorBorder}`,content:'""'}}}),[`${nt}-checkbox`]:{top:"initial",marginInlineEnd:Et},[`${nt}-node-content-wrapper, ${nt}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:ft,margin:0,padding:`0 ${et.paddingXS/2}px`,color:"inherit",lineHeight:`${ft}px`,background:"transparent",borderRadius:et.borderRadius,cursor:"pointer",transition:`all ${et.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:wt},[`&${nt}-node-selected`]:{backgroundColor:mt},[`${nt}-iconEle`]:{display:"inline-block",width:ft,height:ft,lineHeight:`${ft}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${nt}-unselectable ${nt}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${nt}-node-content-wrapper`]:Object.assign({lineHeight:`${ft}px`,userSelect:"none"},we(Ot,et)),[`${ht}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${et.colorPrimary}`}},"&-show-line":{[`${nt}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:ft/2,bottom:-at,borderInlineEnd:`1px solid ${et.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${nt}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${ht}-leaf-last`]:{[`${nt}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${ft/2}px !important`}}}}})}},Fe=Ot=>{const{treeCls:et,treeNodeCls:nt,treeNodePadding:ht,directoryNodeSelectedBg:at,directoryNodeSelectedColor:ft}=Ot;return{[`${et}${et}-directory`]:{[nt]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ht,insetInlineStart:0,transition:`background-color ${Ot.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Ot.controlItemBgHover}},"> *":{zIndex:1},[`${et}-switcher`]:{transition:`color ${Ot.motionDurationMid}`},[`${et}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${et}-node-selected`]:{color:ft,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:at},[`${et}-switcher`]:{color:ft},[`${et}-node-content-wrapper`]:{color:ft,background:"transparent"}}}}}},re=(Ot,et)=>{const nt=`.${Ot}`,ht=`${nt}-treenode`,at=et.paddingXS/2,ft=(0,$t.TS)(et,{treeCls:nt,treeNodeCls:ht,treeNodePadding:at});return[te(Ot,ft),Fe(ft)]},me=Ot=>{const{controlHeightSM:et}=Ot;return{titleHeight:et,nodeHoverBg:Ot.controlItemBgHover,nodeSelectedBg:Ot.controlItemBgActive}};Ve.ZP=(0,Ut.Z)("Tree",(Ot,et)=>{let{prefixCls:nt}=et;return[{[Ot.componentCls]:(0,It.C2)(`${nt}-checkbox`,Ot)},re(nt,Ot),(0,de.Z)(Ot)]},Ot=>{const{colorTextLightSolid:et,colorPrimary:nt}=Ot;return Object.assign(Object.assign({},me(Ot)),{directoryNodeSelectedColor:et,directoryNodeSelectedBg:nt})})},71997:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return ht}});var vt=Pt(96663),It=Pt(59301),oe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},de=oe,$t=Pt(7657),Ut=function(ft,mt){return It.createElement($t.Z,(0,vt.Z)({},ft,{ref:mt,icon:de}))},Jt=It.forwardRef(Ut),De=Jt,we=Pt(52671),te=Pt(58617),Fe=Pt(15075),re=Pt(43531),me=Pt(92310),Ot=Pt.n(me),et=Pt(92343),ht=at=>{const{prefixCls:ft,switcherIcon:mt,treeNodeProps:wt,showLine:Et}=at,{isLeaf:Nt,expanded:Dt,loading:At}=wt;if(At)return It.createElement(te.Z,{className:`${ft}-switcher-loading-icon`});let Kt;if(Et&&typeof Et=="object"&&(Kt=Et.showLeafIcon),Nt){if(!Et)return null;if(typeof Kt!="boolean"&&Kt){const Vt=typeof Kt=="function"?Kt(wt):Kt,Ie=`${ft}-switcher-line-custom-icon`;return(0,et.l$)(Vt)?(0,et.Tm)(Vt,{className:Ot()(Vt.props.className||"",Ie)}):Vt}return Kt?It.createElement(we.Z,{className:`${ft}-switcher-line-icon`}):It.createElement("span",{className:`${ft}-switcher-leaf-line`})}const Wt=`${ft}-switcher-icon`,xe=typeof mt=="function"?mt(wt):mt;return(0,et.l$)(xe)?(0,et.Tm)(xe,{className:Ot()(xe.props.className||"",Wt)}):xe!==void 0?xe:Et?Dt?It.createElement(Fe.Z,{className:`${ft}-switcher-line-icon`}):It.createElement(re.Z,{className:`${ft}-switcher-line-icon`}):It.createElement(De,{className:Wt})}},54580:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{default:function(){return fn}});var vt=Pt(59301),It=Pt(19127),oe=Pt(92310),de=Pt.n(oe),$t=Pt(96663),Ut=Pt(52884),Jt=Pt(95727),De=Pt(65711),we=Pt(85745),te=Pt(90493),Fe=Pt(6620),re=Pt(49581),me=Pt(20135),Ot=Pt(73324),et=Pt(26112);function nt(He,je){var vn="cannot ".concat(He.method," ").concat(He.action," ").concat(je.status,"'"),rn=new Error(vn);return rn.status=je.status,rn.method=He.method,rn.url=He.action,rn}function ht(He){var je=He.responseText||He.response;if(!je)return je;try{return JSON.parse(je)}catch(vn){return je}}function at(He){var je=new XMLHttpRequest;He.onProgress&&je.upload&&(je.upload.onprogress=function(xn){xn.total>0&&(xn.percent=xn.loaded/xn.total*100),He.onProgress(xn)});var vn=new FormData;He.data&&Object.keys(He.data).forEach(function(bn){var xn=He.data[bn];if(Array.isArray(xn)){xn.forEach(function(On){vn.append("".concat(bn,"[]"),On)});return}vn.append(bn,xn)}),He.file instanceof Blob?vn.append(He.filename,He.file,He.file.name):vn.append(He.filename,He.file),je.onerror=function(xn){He.onError(xn)},je.onload=function(){return je.status<200||je.status>=300?He.onError(nt(He,je),ht(je)):He.onSuccess(ht(je),je)},je.open(He.method,He.action,!0),He.withCredentials&&"withCredentials"in je&&(je.withCredentials=!0);var rn=He.headers||{};return rn["X-Requested-With"]!==null&&je.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(rn).forEach(function(bn){rn[bn]!==null&&je.setRequestHeader(bn,rn[bn])}),je.send(vn),{abort:function(){je.abort()}}}var ft=+new Date,mt=0;function wt(){return"rc-upload-".concat(ft,"-").concat(++mt)}var Et=Pt(48736),Nt=function(He,je){if(He&&je){var vn=Array.isArray(je)?je:je.split(","),rn=He.name||"",bn=He.type||"",xn=bn.replace(/\/.*$/,"");return vn.some(function(On){var zn=On.trim();if(/^\*(\/\*)?$/.test(On))return!0;if(zn.charAt(0)==="."){var yi=rn.toLowerCase(),Xe=zn.toLowerCase(),Li=[Xe];return(Xe===".jpg"||Xe===".jpeg")&&(Li=[".jpg",".jpeg"]),Li.some(function(ji){return yi.endsWith(ji)})}return/\/\*$/.test(zn)?xn===zn.replace(/\/.*$/,""):bn===zn?!0:/^\w+$/.test(zn)?((0,Et.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(zn,"'.Skip for check.")),!0):!1})}return!0};function Dt(He,je){var vn=He.createReader(),rn=[];function bn(){vn.readEntries(function(xn){var On=Array.prototype.slice.apply(xn);rn=rn.concat(On);var zn=!On.length;zn?je(rn):bn()})}bn()}var At=function(je,vn,rn){var bn=function xn(On,zn){On&&(On.path=zn||"",On.isFile?On.file(function(yi){rn(yi)&&(On.fullPath&&!yi.webkitRelativePath&&(Object.defineProperties(yi,{webkitRelativePath:{writable:!0}}),yi.webkitRelativePath=On.fullPath.replace(/^\//,""),Object.defineProperties(yi,{webkitRelativePath:{writable:!1}})),vn([yi]))}):On.isDirectory&&Dt(On,function(yi){yi.forEach(function(Xe){xn(Xe,"".concat(zn).concat(On.name,"/"))})}))};je.forEach(function(xn){bn(xn.webkitGetAsEntry())})},Kt=At,Wt=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],xe=function(He){(0,De.Z)(vn,He);var je=(0,we.Z)(vn);function vn(){var rn;(0,Ut.Z)(this,vn);for(var bn=arguments.length,xn=new Array(bn),On=0;On<bn;On++)xn[On]=arguments[On];return rn=je.call.apply(je,[this].concat(xn)),rn.state={uid:wt()},rn.reqs={},rn.fileInput=void 0,rn._isMounted=void 0,rn.onChange=function(zn){var yi=rn.props,Xe=yi.accept,Li=yi.directory,ji=zn.target.files,Ei=(0,It.Z)(ji).filter(function(nn){return!Li||Nt(nn,Xe)});rn.uploadFiles(Ei),rn.reset()},rn.onClick=function(zn){var yi=rn.fileInput;if(yi){var Xe=zn.target,Li=rn.props.onClick;if(Xe&&Xe.tagName==="BUTTON"){var ji=yi.parentNode;ji.focus(),Xe.blur()}yi.click(),Li&&Li(zn)}},rn.onKeyDown=function(zn){zn.key==="Enter"&&rn.onClick(zn)},rn.onFileDrop=function(zn){var yi=rn.props.multiple;if(zn.preventDefault(),zn.type!=="dragover")if(rn.props.directory)Kt(Array.prototype.slice.call(zn.dataTransfer.items),rn.uploadFiles,function(Li){return Nt(Li,rn.props.accept)});else{var Xe=(0,It.Z)(zn.dataTransfer.files).filter(function(Li){return Nt(Li,rn.props.accept)});yi===!1&&(Xe=Xe.slice(0,1)),rn.uploadFiles(Xe)}},rn.uploadFiles=function(zn){var yi=(0,It.Z)(zn),Xe=yi.map(function(Li){return Li.uid=wt(),rn.processFile(Li,yi)});Promise.all(Xe).then(function(Li){var ji=rn.props.onBatchStart;ji==null||ji(Li.map(function(Ei){var nn=Ei.origin,Vn=Ei.parsedFile;return{file:nn,parsedFile:Vn}})),Li.filter(function(Ei){return Ei.parsedFile!==null}).forEach(function(Ei){rn.post(Ei)})})},rn.processFile=function(){var zn=(0,Ot.Z)((0,re.Z)().mark(function yi(Xe,Li){var ji,Ei,nn,Vn,ze,Ge,Oe,un,kn;return(0,re.Z)().wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:if(ji=rn.props.beforeUpload,Ei=Xe,!ji){Rn.next=14;break}return Rn.prev=3,Rn.next=6,ji(Xe,Li);case 6:Ei=Rn.sent,Rn.next=12;break;case 9:Rn.prev=9,Rn.t0=Rn.catch(3),Ei=!1;case 12:if(Ei!==!1){Rn.next=14;break}return Rn.abrupt("return",{origin:Xe,parsedFile:null,action:null,data:null});case 14:if(nn=rn.props.action,typeof nn!="function"){Rn.next=21;break}return Rn.next=18,nn(Xe);case 18:Vn=Rn.sent,Rn.next=22;break;case 21:Vn=nn;case 22:if(ze=rn.props.data,typeof ze!="function"){Rn.next=29;break}return Rn.next=26,ze(Xe);case 26:Ge=Rn.sent,Rn.next=30;break;case 29:Ge=ze;case 30:return Oe=((0,me.Z)(Ei)==="object"||typeof Ei=="string")&&Ei?Ei:Xe,Oe instanceof File?un=Oe:un=new File([Oe],Xe.name,{type:Xe.type}),kn=un,kn.uid=Xe.uid,Rn.abrupt("return",{origin:Xe,data:Ge,parsedFile:kn,action:Vn});case 35:case"end":return Rn.stop()}},yi,null,[[3,9]])}));return function(yi,Xe){return zn.apply(this,arguments)}}(),rn.saveFileInput=function(zn){rn.fileInput=zn},rn}return(0,Jt.Z)(vn,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(bn){var xn=this,On=bn.data,zn=bn.origin,yi=bn.action,Xe=bn.parsedFile;if(this._isMounted){var Li=this.props,ji=Li.onStart,Ei=Li.customRequest,nn=Li.name,Vn=Li.headers,ze=Li.withCredentials,Ge=Li.method,Oe=zn.uid,un=Ei||at,kn={action:yi,filename:nn,data:On,file:Xe,headers:Vn,withCredentials:ze,method:Ge||"post",onProgress:function(Rn){var ei=xn.props.onProgress;ei==null||ei(Rn,Xe)},onSuccess:function(Rn,ei){var qe=xn.props.onSuccess;qe==null||qe(Rn,Xe,ei),delete xn.reqs[Oe]},onError:function(Rn,ei){var qe=xn.props.onError;qe==null||qe(Rn,ei,Xe),delete xn.reqs[Oe]}};ji(zn),this.reqs[Oe]=un(kn)}}},{key:"reset",value:function(){this.setState({uid:wt()})}},{key:"abort",value:function(bn){var xn=this.reqs;if(bn){var On=bn.uid?bn.uid:bn;xn[On]&&xn[On].abort&&xn[On].abort(),delete xn[On]}else Object.keys(xn).forEach(function(zn){xn[zn]&&xn[zn].abort&&xn[zn].abort(),delete xn[zn]})}},{key:"render",value:function(){var bn=this.props,xn=bn.component,On=bn.prefixCls,zn=bn.className,yi=bn.disabled,Xe=bn.id,Li=bn.style,ji=bn.multiple,Ei=bn.accept,nn=bn.capture,Vn=bn.children,ze=bn.directory,Ge=bn.openFileDialogOnClick,Oe=bn.onMouseEnter,un=bn.onMouseLeave,kn=(0,Fe.Z)(bn,Wt),Tn=de()((0,te.Z)((0,te.Z)((0,te.Z)({},On,!0),"".concat(On,"-disabled"),yi),zn,zn)),Rn=ze?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},ei=yi?{}:{onClick:Ge?this.onClick:function(){},onKeyDown:Ge?this.onKeyDown:function(){},onMouseEnter:Oe,onMouseLeave:un,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return vt.createElement(xn,(0,$t.Z)({},ei,{className:Tn,role:"button",style:Li}),vt.createElement("input",(0,$t.Z)({},(0,et.Z)(kn,{aria:!0,data:!0}),{id:Xe,disabled:yi,type:"file",ref:this.saveFileInput,onClick:function(pi){return pi.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:Ei},Rn,{multiple:ji,onChange:this.onChange},nn!=null?{capture:nn}:{})),Vn)}}]),vn}(vt.Component),Vt=xe;function Ie(){}var Se=function(He){(0,De.Z)(vn,He);var je=(0,we.Z)(vn);function vn(){var rn;(0,Ut.Z)(this,vn);for(var bn=arguments.length,xn=new Array(bn),On=0;On<bn;On++)xn[On]=arguments[On];return rn=je.call.apply(je,[this].concat(xn)),rn.uploader=void 0,rn.saveUploader=function(zn){rn.uploader=zn},rn}return(0,Jt.Z)(vn,[{key:"abort",value:function(bn){this.uploader.abort(bn)}},{key:"render",value:function(){return vt.createElement(Vt,(0,$t.Z)({},this.props,{ref:this.saveUploader}))}}]),vn}(vt.Component);Se.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ie,onError:Ie,onSuccess:Ie,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var Ye=Se,Le=Ye,Pe=Pt(18929),We=Pt(4676),Ue=Pt(36355),ue=Pt(1684),Ht=Pt(9763),ke=Pt(31724),pn={icon:function(je,vn){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:vn}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:je}}]}},name:"file",theme:"twotone"},ln=pn,Ee=Pt(7657),Ke=function(je,vn){return vt.createElement(Ee.Z,(0,$t.Z)({},je,{ref:vn,icon:ln}))},gn=vt.forwardRef(Ke),Bn=gn,dn=Pt(58617),In={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},Ce=In,$n=function(je,vn){return vt.createElement(Ee.Z,(0,$t.Z)({},je,{ref:vn,icon:Ce}))},Qn=vt.forwardRef($n),jt=Qn,Lt={icon:function(je,vn){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:je}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:vn}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:vn}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:vn}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:je}}]}},name:"picture",theme:"twotone"},xt=Lt,Tt=function(je,vn){return vt.createElement(Ee.Z,(0,$t.Z)({},je,{ref:vn,icon:xt}))},Ft=vt.forwardRef(Tt),yt=Ft,ee=Pt(77900),pe=Pt(56762),qt=Pt(62892),Zt=Pt(92343),fe=Pt(3113);function ce(He){return Object.assign(Object.assign({},He),{lastModified:He.lastModified,lastModifiedDate:He.lastModifiedDate,name:He.name,size:He.size,type:He.type,uid:He.uid,percent:0,originFileObj:He})}function ne(He,je){const vn=(0,It.Z)(je),rn=vn.findIndex(bn=>{let{uid:xn}=bn;return xn===He.uid});return rn===-1?vn.push(He):vn[rn]=He,vn}function Ne(He,je){const vn=He.uid!==void 0?"uid":"name";return je.filter(rn=>rn[vn]===He[vn])[0]}function hn(He,je){const vn=He.uid!==void 0?"uid":"name",rn=je.filter(bn=>bn[vn]!==He[vn]);return rn.length===je.length?null:rn}const an=function(){const je=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),rn=je[je.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(rn)||[""])[0]},_e=He=>He.indexOf("image/")===0,En=He=>{if(He.type&&!He.thumbUrl)return _e(He.type);const je=He.thumbUrl||He.url||"",vn=an(je);return/^data:image\//.test(je)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(vn)?!0:!(/^data:/.test(je)||vn)},Ln=200;function ye(He){return new Promise(je=>{if(!He.type||!_e(He.type)){je("");return}const vn=document.createElement("canvas");vn.width=Ln,vn.height=Ln,vn.style.cssText=`position: fixed; left: 0; top: 0; width: ${Ln}px; height: ${Ln}px; z-index: 9999; display: none;`,document.body.appendChild(vn);const rn=vn.getContext("2d"),bn=new Image;if(bn.onload=()=>{const{width:xn,height:On}=bn;let zn=Ln,yi=Ln,Xe=0,Li=0;xn>On?(yi=On*(Ln/xn),Li=-(yi-zn)/2):(zn=xn*(Ln/On),Xe=-(zn-yi)/2),rn.drawImage(bn,Xe,Li,zn,yi);const ji=vn.toDataURL();document.body.removeChild(vn),window.URL.revokeObjectURL(bn.src),je(ji)},bn.crossOrigin="anonymous",He.type.startsWith("image/svg+xml")){const xn=new FileReader;xn.onload=()=>{xn.result&&(bn.src=xn.result)},xn.readAsDataURL(He)}else if(He.type.startsWith("image/gif")){const xn=new FileReader;xn.onload=()=>{xn.result&&je(xn.result)},xn.readAsDataURL(He)}else bn.src=window.URL.createObjectURL(He)})}var on=Pt(26227),Pn=Pt(41464),Cn=Pt(15277),An=Pt(93948),Jn=Pt(6848),ni=vt.forwardRef((He,je)=>{let{prefixCls:vn,className:rn,style:bn,locale:xn,listType:On,file:zn,items:yi,progress:Xe,iconRender:Li,actionIconRender:ji,itemRender:Ei,isImgUrl:nn,showPreviewIcon:Vn,showRemoveIcon:ze,showDownloadIcon:Ge,previewIcon:Oe,removeIcon:un,downloadIcon:kn,onPreview:Tn,onDownload:Rn,onClose:ei}=He;var qe,pi;const{status:tn}=zn,[Ci,Ui]=vt.useState(tn);vt.useEffect(()=>{tn!=="removed"&&Ui(tn)},[tn]);const[$i,Co]=vt.useState(!1);vt.useEffect(()=>{const uo=setTimeout(()=>{Co(!0)},300);return()=>{clearTimeout(uo)}},[]);const lo=Li(zn);let Si=vt.createElement("div",{className:`${vn}-icon`},lo);if(On==="picture"||On==="picture-card"||On==="picture-circle")if(Ci==="uploading"||!zn.thumbUrl&&!zn.url){const uo=de()(`${vn}-list-item-thumbnail`,{[`${vn}-list-item-file`]:Ci!=="uploading"});Si=vt.createElement("div",{className:uo},lo)}else{const uo=nn!=null&&nn(zn)?vt.createElement("img",{src:zn.thumbUrl||zn.url,alt:zn.name,className:`${vn}-list-item-image`,crossOrigin:zn.crossOrigin}):lo,Pi=de()(`${vn}-list-item-thumbnail`,{[`${vn}-list-item-file`]:nn&&!nn(zn)});Si=vt.createElement("a",{className:Pi,onClick:Ni=>Tn(zn,Ni),href:zn.url||zn.thumbUrl,target:"_blank",rel:"noopener noreferrer"},uo)}const ii=de()(`${vn}-list-item`,`${vn}-list-item-${Ci}`),Yi=typeof zn.linkProps=="string"?JSON.parse(zn.linkProps):zn.linkProps,oo=ze?ji((typeof un=="function"?un(zn):un)||vt.createElement(on.Z,null),()=>ei(zn),vn,xn.removeFile):null,Yn=Ge&&Ci==="done"?ji((typeof kn=="function"?kn(zn):kn)||vt.createElement(Pn.Z,null),()=>Rn(zn),vn,xn.downloadFile):null,zt=On!=="picture-card"&&On!=="picture-circle"&&vt.createElement("span",{key:"download-delete",className:de()(`${vn}-list-item-actions`,{picture:On==="picture"})},Yn,oo),Ai=de()(`${vn}-list-item-name`),vo=zn.url?[vt.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:Ai,title:zn.name},Yi,{href:zn.url,onClick:uo=>Tn(zn,uo)}),zn.name),zt]:[vt.createElement("span",{key:"view",className:Ai,onClick:uo=>Tn(zn,uo),title:zn.name},zn.name),zt],ao={pointerEvents:"none",opacity:.5},Eo=Vn?vt.createElement("a",{href:zn.url||zn.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:zn.url||zn.thumbUrl?void 0:ao,onClick:uo=>Tn(zn,uo),title:xn.previewFile},typeof Oe=="function"?Oe(zn):Oe||vt.createElement(Cn.Z,null)):null,Ho=(On==="picture-card"||On==="picture-circle")&&Ci!=="uploading"&&vt.createElement("span",{className:`${vn}-list-item-actions`},Eo,Ci==="done"&&Yn,oo),{getPrefixCls:Zi}=vt.useContext(Ue.E_),xi=Zi(),Fi=vt.createElement("div",{className:ii},Si,vo,Ho,$i&&vt.createElement(ee.default,{motionName:`${xi}-fade`,visible:Ci==="uploading",motionDeadline:2e3},uo=>{let{className:Pi}=uo;const Ni="percent"in zn?vt.createElement(An.Z,Object.assign({},Xe,{type:"line",percent:zn.percent,"aria-label":zn["aria-label"],"aria-labelledby":zn["aria-labelledby"]})):null;return vt.createElement("div",{className:de()(`${vn}-list-item-progress`,Pi)},Ni)})),Mi=zn.response&&typeof zn.response=="string"?zn.response:((qe=zn.error)===null||qe===void 0?void 0:qe.statusText)||((pi=zn.error)===null||pi===void 0?void 0:pi.message)||xn.uploadError,co=Ci==="error"?vt.createElement(Jn.Z,{title:Mi,getPopupContainer:uo=>uo.parentNode},Fi):Fi;return vt.createElement("div",{className:de()(`${vn}-list-item-container`,rn),style:bn,ref:je},Ei?Ei(co,zn,yi,{download:Rn.bind(null,zn),preview:Tn.bind(null,zn),remove:ei.bind(null,zn)}):co)});const fi=(He,je)=>{const{listType:vn="text",previewFile:rn=ye,onPreview:bn,onDownload:xn,onRemove:On,locale:zn,iconRender:yi,isImageUrl:Xe=En,prefixCls:Li,items:ji=[],showPreviewIcon:Ei=!0,showRemoveIcon:nn=!0,showDownloadIcon:Vn=!1,removeIcon:ze,previewIcon:Ge,downloadIcon:Oe,progress:un={size:[-1,2],showInfo:!1},appendAction:kn,appendActionVisible:Tn=!0,itemRender:Rn,disabled:ei}=He,qe=(0,pe.Z)(),[pi,tn]=vt.useState(!1);vt.useEffect(()=>{vn!=="picture"&&vn!=="picture-card"&&vn!=="picture-circle"||(ji||[]).forEach(ao=>{typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(ao.originFileObj instanceof File||ao.originFileObj instanceof Blob)||ao.thumbUrl!==void 0||(ao.thumbUrl="",rn&&rn(ao.originFileObj).then(Eo=>{ao.thumbUrl=Eo||"",qe()}))})},[vn,ji,rn]),vt.useEffect(()=>{tn(!0)},[]);const Ci=(ao,Eo)=>{if(bn)return Eo==null||Eo.preventDefault(),bn(ao)},Ui=ao=>{typeof xn=="function"?xn(ao):ao.url&&window.open(ao.url)},$i=ao=>{On==null||On(ao)},Co=ao=>{if(yi)return yi(ao,vn);const Eo=ao.status==="uploading",Ho=Xe&&Xe(ao)?vt.createElement(yt,null):vt.createElement(Bn,null);let Zi=Eo?vt.createElement(dn.Z,null):vt.createElement(jt,null);return vn==="picture"?Zi=Eo?vt.createElement(dn.Z,null):Ho:(vn==="picture-card"||vn==="picture-circle")&&(Zi=Eo?zn.uploading:Ho),Zi},lo=(ao,Eo,Ho,Zi)=>{const xi={type:"text",size:"small",title:Zi,onClick:Fi=>{Eo(),(0,Zt.l$)(ao)&&ao.props.onClick&&ao.props.onClick(Fi)},className:`${Ho}-list-item-action`,disabled:ei};if((0,Zt.l$)(ao)){const Fi=(0,Zt.Tm)(ao,Object.assign(Object.assign({},ao.props),{onClick:()=>{}}));return vt.createElement(fe.ZP,Object.assign({},xi,{icon:Fi}))}return vt.createElement(fe.ZP,Object.assign({},xi),vt.createElement("span",null,ao))};vt.useImperativeHandle(je,()=>({handlePreview:Ci,handleDownload:Ui}));const{getPrefixCls:Si}=vt.useContext(Ue.E_),ii=Si("upload",Li),Yi=Si(),oo=de()(`${ii}-list`,`${ii}-list-${vn}`),Yn=(0,It.Z)(ji.map(ao=>({key:ao.uid,file:ao})));let Ai={motionDeadline:2e3,motionName:`${ii}-${vn==="picture-card"||vn==="picture-circle"?"animate-inline":"animate"}`,keys:Yn,motionAppear:pi};const vo=vt.useMemo(()=>{const ao=Object.assign({},(0,qt.Z)(Yi));return delete ao.onAppearEnd,delete ao.onEnterEnd,delete ao.onLeaveEnd,ao},[Yi]);return vn!=="picture-card"&&vn!=="picture-circle"&&(Ai=Object.assign(Object.assign({},vo),Ai)),vt.createElement("div",{className:oo},vt.createElement(ee.CSSMotionList,Object.assign({},Ai,{component:!1}),ao=>{let{key:Eo,file:Ho,className:Zi,style:xi}=ao;return vt.createElement(ni,{key:Eo,locale:zn,prefixCls:ii,className:Zi,style:xi,file:Ho,items:ji,progress:un,listType:vn,isImgUrl:Xe,showPreviewIcon:Ei,showRemoveIcon:nn,showDownloadIcon:Vn,removeIcon:ze,previewIcon:Ge,downloadIcon:Oe,iconRender:Co,actionIconRender:lo,itemRender:Rn,onPreview:Ci,onDownload:Ui,onClose:$i})}),kn&&vt.createElement(ee.default,Object.assign({},Ai,{visible:Tn,forceRender:!0}),ao=>{let{className:Eo,style:Ho}=ao;return(0,Zt.Tm)(kn,Zi=>({className:de()(Zi.className,Eo),style:Object.assign(Object.assign(Object.assign({},Ho),{pointerEvents:Eo?"none":void 0}),Zi.style)}))}))};var Ti=vt.forwardRef(fi),Di=Pt(17313),io=Pt(8378),to=Pt(83116),Ri=Pt(37613),Zn=He=>{const{componentCls:je,iconCls:vn}=He;return{[`${je}-wrapper`]:{[`${je}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:He.colorFillAlter,border:`${He.lineWidth}px dashed ${He.colorBorder}`,borderRadius:He.borderRadiusLG,cursor:"pointer",transition:`border-color ${He.motionDurationSlow}`,[je]:{padding:`${He.padding}px 0`},[`${je}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${je}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${je}-disabled):hover`]:{borderColor:He.colorPrimaryHover},[`p${je}-drag-icon`]:{marginBottom:He.margin,[vn]:{color:He.colorPrimary,fontSize:He.uploadThumbnailSize}},[`p${je}-text`]:{margin:`0 0 ${He.marginXXS}px`,color:He.colorTextHeading,fontSize:He.fontSizeLG},[`p${je}-hint`]:{color:He.colorTextDescription,fontSize:He.fontSize},[`&${je}-disabled`]:{cursor:"not-allowed",[`p${je}-drag-icon ${vn},
|
|
|
p${je}-text,
|
|
|
p${je}-hint
|
|
|
`]:{color:He.colorTextDisabled}}}}}},so=He=>{const{componentCls:je,antCls:vn,iconCls:rn,fontSize:bn,lineHeight:xn}=He,On=`${je}-list-item`,zn=`${On}-actions`,yi=`${On}-action`,Xe=Math.round(bn*xn);return{[`${je}-wrapper`]:{[`${je}-list`]:Object.assign(Object.assign({},(0,Di.dF)()),{lineHeight:He.lineHeight,[On]:{position:"relative",height:He.lineHeight*bn,marginTop:He.marginXS,fontSize:bn,display:"flex",alignItems:"center",transition:`background-color ${He.motionDurationSlow}`,"&:hover":{backgroundColor:He.controlItemBgHover},[`${On}-name`]:Object.assign(Object.assign({},Di.vS),{padding:`0 ${He.paddingXS}px`,lineHeight:xn,flex:"auto",transition:`all ${He.motionDurationSlow}`}),[zn]:{[yi]:{opacity:0},[`${yi}${vn}-btn-sm`]:{height:Xe,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
|
${yi}:focus-visible,
|
|
|
&.picture ${yi}
|
|
|
`]:{opacity:1},[rn]:{color:He.actionsColor,transition:`all ${He.motionDurationSlow}`},[`&:hover ${rn}`]:{color:He.colorText}},[`${je}-icon ${rn}`]:{color:He.colorTextDescription,fontSize:bn},[`${On}-progress`]:{position:"absolute",bottom:-He.uploadProgressOffset,width:"100%",paddingInlineStart:bn+He.paddingXS,fontSize:bn,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${On}:hover ${yi}`]:{opacity:1,color:He.colorText},[`${On}-error`]:{color:He.colorError,[`${On}-name, ${je}-icon ${rn}`]:{color:He.colorError},[zn]:{[`${rn}, ${rn}:hover`]:{color:He.colorError},[yi]:{opacity:1}}},[`${je}-list-item-container`]:{transition:`opacity ${He.motionDurationSlow}, height ${He.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Ii=Pt(93083),Wi=Pt(1950);const ki=new Ii.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Bo=new Ii.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}});var ai=He=>{const{componentCls:je}=He,vn=`${je}-animate-inline`;return[{[`${je}-wrapper`]:{[`${vn}-appear, ${vn}-enter, ${vn}-leave`]:{animationDuration:He.motionDurationSlow,animationTimingFunction:He.motionEaseInOutCirc,animationFillMode:"forwards"},[`${vn}-appear, ${vn}-enter`]:{animationName:ki},[`${vn}-leave`]:{animationName:Bo}}},{[`${je}-wrapper`]:(0,Wi.J$)(He)},ki,Bo]},di=Pt(93398),Ae=Pt(64993);const Be=He=>{const{componentCls:je,iconCls:vn,uploadThumbnailSize:rn,uploadProgressOffset:bn}=He,xn=`${je}-list`,On=`${xn}-item`;return{[`${je}-wrapper`]:{[`
|
|
|
${xn}${xn}-picture,
|
|
|
${xn}${xn}-picture-card,
|
|
|
${xn}${xn}-picture-circle
|
|
|
`]:{[On]:{position:"relative",height:rn+He.lineWidth*2+He.paddingXS*2,padding:He.paddingXS,border:`${He.lineWidth}px ${He.lineType} ${He.colorBorder}`,borderRadius:He.borderRadiusLG,"&:hover":{background:"transparent"},[`${On}-thumbnail`]:Object.assign(Object.assign({},Di.vS),{width:rn,height:rn,lineHeight:`${rn+He.paddingSM}px`,textAlign:"center",flex:"none",[vn]:{fontSize:He.fontSizeHeading2,color:He.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${On}-progress`]:{bottom:bn,width:`calc(100% - ${He.paddingSM*2}px)`,marginTop:0,paddingInlineStart:rn+He.paddingXS}},[`${On}-error`]:{borderColor:He.colorError,[`${On}-thumbnail ${vn}`]:{[`svg path[fill='${di.blue[0]}']`]:{fill:He.colorErrorBg},[`svg path[fill='${di.blue.primary}']`]:{fill:He.colorError}}},[`${On}-uploading`]:{borderStyle:"dashed",[`${On}-name`]:{marginBottom:bn}}},[`${xn}${xn}-picture-circle ${On}`]:{[`&, &::before, ${On}-thumbnail`]:{borderRadius:"50%"}}}}},_t=He=>{const{componentCls:je,iconCls:vn,fontSizeLG:rn,colorTextLightSolid:bn}=He,xn=`${je}-list`,On=`${xn}-item`,zn=He.uploadPicCardSize;return{[`
|
|
|
${je}-wrapper${je}-picture-card-wrapper,
|
|
|
${je}-wrapper${je}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,Di.dF)()),{display:"inline-block",width:"100%",[`${je}${je}-select`]:{width:zn,height:zn,marginInlineEnd:He.marginXS,marginBottom:He.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:He.colorFillAlter,border:`${He.lineWidth}px dashed ${He.colorBorder}`,borderRadius:He.borderRadiusLG,cursor:"pointer",transition:`border-color ${He.motionDurationSlow}`,[`> ${je}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${je}-disabled):hover`]:{borderColor:He.colorPrimary}},[`${xn}${xn}-picture-card, ${xn}${xn}-picture-circle`]:{[`${xn}-item-container`]:{display:"inline-block",width:zn,height:zn,marginBlock:`0 ${He.marginXS}px`,marginInline:`0 ${He.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[On]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${He.paddingXS*2}px)`,height:`calc(100% - ${He.paddingXS*2}px)`,backgroundColor:He.colorBgMask,opacity:0,transition:`all ${He.motionDurationSlow}`,content:'" "'}},[`${On}:hover`]:{[`&::before, ${On}-actions`]:{opacity:1}},[`${On}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${He.motionDurationSlow}`,[`${vn}-eye, ${vn}-download, ${vn}-delete`]:{zIndex:10,width:rn,margin:`0 ${He.marginXXS}px`,fontSize:rn,cursor:"pointer",transition:`all ${He.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${On}-actions, ${On}-actions:hover`]:{[`${vn}-eye, ${vn}-download, ${vn}-delete`]:{color:new Ae.C(bn).setAlpha(.65).toRgbString(),"&:hover":{color:bn}}},[`${On}-thumbnail, ${On}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${On}-name`]:{display:"none",textAlign:"center"},[`${On}-file + ${On}-name`]:{position:"absolute",bottom:He.margin,display:"block",width:`calc(100% - ${He.paddingXS*2}px)`},[`${On}-uploading`]:{[`&${On}`]:{backgroundColor:He.colorFillAlter},[`&::before, ${vn}-eye, ${vn}-download, ${vn}-delete`]:{display:"none"}},[`${On}-progress`]:{bottom:He.marginXL,width:`calc(100% - ${He.paddingXS*2}px)`,paddingInlineStart:0}}}),[`${je}-wrapper${je}-picture-circle-wrapper`]:{[`${je}${je}-select`]:{borderRadius:"50%"}}}};var cn=He=>{const{componentCls:je}=He;return{[`${je}-rtl`]:{direction:"rtl"}}};const ve=He=>{const{componentCls:je,colorTextDisabled:vn}=He;return{[`${je}-wrapper`]:Object.assign(Object.assign({},(0,Di.Wf)(He)),{[je]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${je}-select`]:{display:"inline-block"},[`${je}-disabled`]:{color:vn,cursor:"not-allowed"}})}};var ie=(0,to.Z)("Upload",He=>{const{fontSizeHeading3:je,fontSize:vn,lineHeight:rn,lineWidth:bn,controlHeightLG:xn}=He,On=Math.round(vn*rn),zn=(0,Ri.TS)(He,{uploadThumbnailSize:je*2,uploadProgressOffset:On/2+bn,uploadPicCardSize:xn*2.55});return[ve(zn),Zn(zn),Be(zn),_t(zn),so(zn),ai(zn),cn(zn),(0,io.Z)(zn)]},He=>({actionsColor:He.colorTextDescription})),Qe=function(He,je,vn,rn){function bn(xn){return xn instanceof vn?xn:new vn(function(On){On(xn)})}return new(vn||(vn=Promise))(function(xn,On){function zn(Li){try{Xe(rn.next(Li))}catch(ji){On(ji)}}function yi(Li){try{Xe(rn.throw(Li))}catch(ji){On(ji)}}function Xe(Li){Li.done?xn(Li.value):bn(Li.value).then(zn,yi)}Xe((rn=rn.apply(He,je||[])).next())})};const yn=`__LIST_IGNORE_${Date.now()}__`,Nn=(He,je)=>{const{fileList:vn,defaultFileList:rn,onRemove:bn,showUploadList:xn=!0,listType:On="text",onPreview:zn,onDownload:yi,onChange:Xe,onDrop:Li,previewFile:ji,disabled:Ei,locale:nn,iconRender:Vn,isImageUrl:ze,progress:Ge,prefixCls:Oe,className:un,type:kn="select",children:Tn,style:Rn,itemRender:ei,maxCount:qe,data:pi={},multiple:tn=!1,action:Ci="",accept:Ui="",supportServerRender:$i=!0,rootClassName:Co}=He,lo=vt.useContext(ue.Z),Si=Ei!=null?Ei:lo,[ii,Yi]=(0,Pe.Z)(rn||[],{value:vn,postState:jo=>jo!=null?jo:[]}),[oo,Yn]=vt.useState("drop"),zt=vt.useRef(null);vt.useMemo(()=>{const jo=Date.now();(vn||[]).forEach((Lo,vr)=>{!Lo.uid&&!Object.isFrozen(Lo)&&(Lo.uid=`__AUTO__${jo}_${vr}__`)})},[vn]);const Ai=(jo,Lo,vr)=>{let Xo=(0,It.Z)(Lo),bo=!1;qe===1?Xo=Xo.slice(-1):qe&&(bo=Xo.length>qe,Xo=Xo.slice(0,qe)),(0,We.flushSync)(()=>{Yi(Xo)});const Ao={file:jo,fileList:Xo};vr&&(Ao.event=vr),(!bo||Xo.some(ur=>ur.uid===jo.uid))&&(0,We.flushSync)(()=>{Xe==null||Xe(Ao)})},vo=(jo,Lo)=>Qe(void 0,void 0,void 0,function*(){const{beforeUpload:vr,transformFile:Xo}=He;let bo=jo;if(vr){const Ao=yield vr(jo,Lo);if(Ao===!1)return!1;if(delete jo[yn],Ao===yn)return Object.defineProperty(jo,yn,{value:!0,configurable:!0}),!1;typeof Ao=="object"&&Ao&&(bo=Ao)}return Xo&&(bo=yield Xo(bo)),bo}),ao=jo=>{const Lo=jo.filter(bo=>!bo.file[yn]);if(!Lo.length)return;const vr=Lo.map(bo=>ce(bo.file));let Xo=(0,It.Z)(ii);vr.forEach(bo=>{Xo=ne(bo,Xo)}),vr.forEach((bo,Ao)=>{let ur=bo;if(Lo[Ao].parsedFile)bo.status="uploading";else{const{originFileObj:no}=bo;let ko;try{ko=new File([no],no.name,{type:no.type})}catch(No){ko=new Blob([no],{type:no.type}),ko.name=no.name,ko.lastModifiedDate=new Date,ko.lastModified=new Date().getTime()}ko.uid=bo.uid,ur=ko}Ai(ur,Xo)})},Eo=(jo,Lo,vr)=>{try{typeof jo=="string"&&(jo=JSON.parse(jo))}catch(Ao){}if(!Ne(Lo,ii))return;const Xo=ce(Lo);Xo.status="done",Xo.percent=100,Xo.response=jo,Xo.xhr=vr;const bo=ne(Xo,ii);Ai(Xo,bo)},Ho=(jo,Lo)=>{if(!Ne(Lo,ii))return;const vr=ce(Lo);vr.status="uploading",vr.percent=jo.percent;const Xo=ne(vr,ii);Ai(vr,Xo,jo)},Zi=(jo,Lo,vr)=>{if(!Ne(vr,ii))return;const Xo=ce(vr);Xo.error=jo,Xo.response=Lo,Xo.status="error";const bo=ne(Xo,ii);Ai(Xo,bo)},xi=jo=>{let Lo;Promise.resolve(typeof bn=="function"?bn(jo):bn).then(vr=>{var Xo;if(vr===!1)return;const bo=hn(jo,ii);bo&&(Lo=Object.assign(Object.assign({},jo),{status:"removed"}),ii==null||ii.forEach(Ao=>{const ur=Lo.uid!==void 0?"uid":"name";Ao[ur]===Lo[ur]&&!Object.isFrozen(Ao)&&(Ao.status="removed")}),(Xo=zt.current)===null||Xo===void 0||Xo.abort(Lo),Ai(Lo,bo))})},Fi=jo=>{Yn(jo.type),jo.type==="drop"&&(Li==null||Li(jo))};vt.useImperativeHandle(je,()=>({onBatchStart:ao,onSuccess:Eo,onProgress:Ho,onError:Zi,fileList:ii,upload:zt.current}));const{getPrefixCls:Mi,direction:co,upload:uo}=vt.useContext(Ue.E_),Pi=Mi("upload",Oe),Ni=Object.assign(Object.assign({onBatchStart:ao,onError:Zi,onProgress:Ho,onSuccess:Eo},He),{data:pi,multiple:tn,action:Ci,accept:Ui,supportServerRender:$i,prefixCls:Pi,disabled:Si,beforeUpload:vo,onChange:void 0});delete Ni.className,delete Ni.style,(!Tn||Si)&&delete Ni.id;const[Wn,zi]=ie(Pi),[xo]=(0,Ht.Z)("Upload",ke.Z.Upload),{showRemoveIcon:Ko,showPreviewIcon:Uo,showDownloadIcon:Qo,removeIcon:ar,previewIcon:Ro,downloadIcon:er}=typeof xn=="boolean"?{}:xn,nr=(jo,Lo)=>xn?vt.createElement(Ti,{prefixCls:Pi,listType:On,items:ii,previewFile:ji,onPreview:zn,onDownload:yi,onRemove:xi,showRemoveIcon:!Si&&Ko,showPreviewIcon:Uo,showDownloadIcon:Qo,removeIcon:ar,previewIcon:Ro,downloadIcon:er,iconRender:Vn,locale:Object.assign(Object.assign({},xo),nn),isImageUrl:ze,progress:Ge,appendAction:jo,appendActionVisible:Lo,itemRender:ei,disabled:Si}):jo,qr=de()(`${Pi}-wrapper`,un,Co,zi,uo==null?void 0:uo.className,{[`${Pi}-rtl`]:co==="rtl",[`${Pi}-picture-card-wrapper`]:On==="picture-card",[`${Pi}-picture-circle-wrapper`]:On==="picture-circle"}),sn=Object.assign(Object.assign({},uo==null?void 0:uo.style),Rn);if(kn==="drag"){const jo=de()(zi,Pi,`${Pi}-drag`,{[`${Pi}-drag-uploading`]:ii.some(Lo=>Lo.status==="uploading"),[`${Pi}-drag-hover`]:oo==="dragover",[`${Pi}-disabled`]:Si,[`${Pi}-rtl`]:co==="rtl"});return Wn(vt.createElement("span",{className:qr},vt.createElement("div",{className:jo,style:sn,onDrop:Fi,onDragOver:Fi,onDragLeave:Fi},vt.createElement(Le,Object.assign({},Ni,{ref:zt,className:`${Pi}-btn`}),vt.createElement("div",{className:`${Pi}-drag-container`},Tn))),nr()))}const wr=de()(Pi,`${Pi}-select`,{[`${Pi}-disabled`]:Si}),Cs=(jo=>vt.createElement("div",{className:wr,style:jo},vt.createElement(Le,Object.assign({},Ni,{ref:zt}))))(Tn?void 0:{display:"none"});return Wn(On==="picture-card"||On==="picture-circle"?vt.createElement("span",{className:qr},nr(Cs,!!Tn)):vt.createElement("span",{className:qr},Cs,nr()))};var le=vt.forwardRef(Nn),mn=function(He,je){var vn={};for(var rn in He)Object.prototype.hasOwnProperty.call(He,rn)&&je.indexOf(rn)<0&&(vn[rn]=He[rn]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bn=0,rn=Object.getOwnPropertySymbols(He);bn<rn.length;bn++)je.indexOf(rn[bn])<0&&Object.prototype.propertyIsEnumerable.call(He,rn[bn])&&(vn[rn[bn]]=He[rn[bn]]);return vn},si=vt.forwardRef((He,je)=>{var{style:vn,height:rn}=He,bn=mn(He,["style","height"]);return vt.createElement(le,Object.assign({ref:je},bn,{type:"drag",style:Object.assign(Object.assign({},vn),{height:rn})}))});const Re=le;Re.Dragger=si,Re.LIST_IGNORE=yn;var fn=Re},57780:function(Sn,Ve,Pt){"use strict";Pt.r(Ve),Pt.d(Ve,{clsx:function(){return It}});function vt(oe){var de,$t,Ut="";if(typeof oe=="string"||typeof oe=="number")Ut+=oe;else if(typeof oe=="object")if(Array.isArray(oe))for(de=0;de<oe.length;de++)oe[de]&&($t=vt(oe[de]))&&(Ut&&(Ut+=" "),Ut+=$t);else for(de in oe)oe[de]&&(Ut&&(Ut+=" "),Ut+=de);return Ut}function It(){for(var oe,de,$t=0,Ut="";$t<arguments.length;)(oe=arguments[$t++])&&(de=vt(oe))&&(Ut&&(Ut+=" "),Ut+=de);return Ut}Ve.default=It},99498:function(Sn,Ve,Pt){(function(vt){vt(Pt(89780))})(function(vt){vt.defineOption("placeholder","",function(De,we,te){var Fe=te&&te!=vt.Init;if(we&&!Fe)De.on("blur",$t),De.on("change",Ut),De.on("swapDoc",Ut),vt.on(De.getInputField(),"compositionupdate",De.state.placeholderCompose=function(){de(De)}),Ut(De);else if(!we&&Fe){De.off("blur",$t),De.off("change",Ut),De.off("swapDoc",Ut),vt.off(De.getInputField(),"compositionupdate",De.state.placeholderCompose),It(De);var re=De.getWrapperElement();re.className=re.className.replace(" CodeMirror-empty","")}we&&!De.hasFocus()&&$t(De)});function It(De){De.state.placeholder&&(De.state.placeholder.parentNode.removeChild(De.state.placeholder),De.state.placeholder=null)}function oe(De){It(De);var we=De.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=De.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var te=De.getOption("placeholder");typeof te=="string"&&(te=document.createTextNode(te)),we.appendChild(te),De.display.lineSpace.insertBefore(we,De.display.lineSpace.firstChild)}function de(De){setTimeout(function(){var we=!1,te=De.getInputField();te.nodeName=="TEXTAREA"?we=!te.value:De.lineCount()==1&&(we=!/[^\u200b]/.test(te.querySelector(".CodeMirror-line").textContent)),we?oe(De):It(De)},20)}function $t(De){Jt(De)&&oe(De)}function Ut(De){var we=De.getWrapperElement(),te=Jt(De);we.className=we.className.replace(" CodeMirror-empty","")+(te?" CodeMirror-empty":""),te?oe(De):It(De)}function Jt(De){return De.lineCount()===1&&De.getLine(0)===""}})},25717:function(Sn,Ve,Pt){(function(vt){vt(Pt(89780))})(function(vt){var It={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},oe=vt.Pos;vt.defineOption("autoCloseBrackets",!1,function(et,nt,ht){ht&&ht!=vt.Init&&(et.removeKeyMap($t),et.state.closeBrackets=null),nt&&(Ut(de(nt,"pairs")),et.state.closeBrackets=nt,et.addKeyMap($t))});function de(et,nt){return nt=="pairs"&&typeof et=="string"?et:typeof et=="object"&&et[nt]!=null?et[nt]:It[nt]}var $t={Backspace:we,Enter:te};function Ut(et){for(var nt=0;nt<et.length;nt++){var ht=et.charAt(nt),at="'"+ht+"'";$t[at]||($t[at]=Jt(ht))}}Ut(It.pairs+"`");function Jt(et){return function(nt){return re(nt,et)}}function De(et){var nt=et.state.closeBrackets;if(!nt||nt.override)return nt;var ht=et.getModeAt(et.getCursor());return ht.closeBrackets||nt}function we(et){var nt=De(et);if(!nt||et.getOption("disableInput"))return vt.Pass;for(var ht=de(nt,"pairs"),at=et.listSelections(),ft=0;ft<at.length;ft++){if(!at[ft].empty())return vt.Pass;var mt=me(et,at[ft].head);if(!mt||ht.indexOf(mt)%2!=0)return vt.Pass}for(var ft=at.length-1;ft>=0;ft--){var wt=at[ft].head;et.replaceRange("",oe(wt.line,wt.ch-1),oe(wt.line,wt.ch+1),"+delete")}}function te(et){var nt=De(et),ht=nt&&de(nt,"explode");if(!ht||et.getOption("disableInput"))return vt.Pass;for(var at=et.listSelections(),ft=0;ft<at.length;ft++){if(!at[ft].empty())return vt.Pass;var mt=me(et,at[ft].head);if(!mt||ht.indexOf(mt)%2!=0)return vt.Pass}et.operation(function(){var wt=et.lineSeparator()||`
|
|
|
`;et.replaceSelection(wt+wt,null),et.execCommand("goCharLeft"),at=et.listSelections();for(var Et=0;Et<at.length;Et++){var Nt=at[Et].head.line;et.indentLine(Nt,null,!0),et.indentLine(Nt+1,null,!0)}})}function Fe(et){var nt=vt.cmpPos(et.anchor,et.head)>0;return{anchor:new oe(et.anchor.line,et.anchor.ch+(nt?-1:1)),head:new oe(et.head.line,et.head.ch+(nt?1:-1))}}function re(et,nt){var ht=De(et);if(!ht||et.getOption("disableInput"))return vt.Pass;var at=de(ht,"pairs"),ft=at.indexOf(nt);if(ft==-1)return vt.Pass;for(var mt=de(ht,"closeBefore"),wt=de(ht,"triples"),Et=at.charAt(ft+1)==nt,Nt=et.listSelections(),Dt=ft%2==0,At,Kt=0;Kt<Nt.length;Kt++){var Wt=Nt[Kt],xe=Wt.head,Vt,Ie=et.getRange(xe,oe(xe.line,xe.ch+1));if(Dt&&!Wt.empty())Vt="surround";else if((Et||!Dt)&&Ie==nt)Et&&Ot(et,xe)?Vt="both":wt.indexOf(nt)>=0&&et.getRange(xe,oe(xe.line,xe.ch+3))==nt+nt+nt?Vt="skipThree":Vt="skip";else if(Et&&xe.ch>1&&wt.indexOf(nt)>=0&&et.getRange(oe(xe.line,xe.ch-2),xe)==nt+nt){if(xe.ch>2&&/\bstring/.test(et.getTokenTypeAt(oe(xe.line,xe.ch-2))))return vt.Pass;Vt="addFour"}else if(Et){var Se=xe.ch==0?" ":et.getRange(oe(xe.line,xe.ch-1),xe);if(!vt.isWordChar(Ie)&&Se!=nt&&!vt.isWordChar(Se))Vt="both";else return vt.Pass}else if(Dt&&(Ie.length===0||/\s/.test(Ie)||mt.indexOf(Ie)>-1))Vt="both";else return vt.Pass;if(!At)At=Vt;else if(At!=Vt)return vt.Pass}var Ye=ft%2?at.charAt(ft-1):nt,Le=ft%2?nt:at.charAt(ft+1);et.operation(function(){if(At=="skip")et.execCommand("goCharRight");else if(At=="skipThree")for(var Pe=0;Pe<3;Pe++)et.execCommand("goCharRight");else if(At=="surround"){for(var We=et.getSelections(),Pe=0;Pe<We.length;Pe++)We[Pe]=Ye+We[Pe]+Le;et.replaceSelections(We,"around"),We=et.listSelections().slice();for(var Pe=0;Pe<We.length;Pe++)We[Pe]=Fe(We[Pe]);et.setSelections(We)}else At=="both"?(et.replaceSelection(Ye+Le,null),et.triggerElectric(Ye+Le),et.execCommand("goCharLeft")):At=="addFour"&&(et.replaceSelection(Ye+Ye+Ye+Ye,"before"),et.execCommand("goCharRight"))})}function me(et,nt){var ht=et.getRange(oe(nt.line,nt.ch-1),oe(nt.line,nt.ch+1));return ht.length==2?ht:null}function Ot(et,nt){var ht=et.getTokenAt(oe(nt.line,nt.ch+1));return/\bstring/.test(ht.type)&&ht.start==nt.ch&&(nt.ch==0||!/\bstring/.test(et.getTokenTypeAt(nt)))}})},6313:function(Sn,Ve,Pt){(function(vt){vt(Pt(89780),Pt(32855))})(function(vt){vt.defineOption("autoCloseTags",!1,function(we,te,Fe){if(Fe!=vt.Init&&Fe&&we.removeKeyMap("autoCloseTags"),!!te){var re={name:"autoCloseTags"};(typeof te!="object"||te.whenClosing!==!1)&&(re["'/'"]=function(me){return Ut(me)}),(typeof te!="object"||te.whenOpening!==!1)&&(re["'>'"]=function(me){return de(me)}),we.addKeyMap(re)}});var It=["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 de(we){if(we.getOption("disableInput"))return vt.Pass;for(var te=we.listSelections(),Fe=[],re=we.getOption("autoCloseTags"),me=0;me<te.length;me++){if(!te[me].empty())return vt.Pass;var Ot=te[me].head,et=we.getTokenAt(Ot),nt=vt.innerMode(we.getMode(),et.state),ht=nt.state,at=nt.mode.xmlCurrentTag&&nt.mode.xmlCurrentTag(ht),ft=at&&at.name;if(!ft)return vt.Pass;var mt=nt.mode.configuration=="html",wt=typeof re=="object"&&re.dontCloseTags||mt&&It,Et=typeof re=="object"&&re.indentTags||mt&&oe;et.end>Ot.ch&&(ft=ft.slice(0,ft.length-et.end+Ot.ch));var Nt=ft.toLowerCase();if(!ft||et.type=="string"&&(et.end!=Ot.ch||!/[\"\']/.test(et.string.charAt(et.string.length-1))||et.string.length==1)||et.type=="tag"&&at.close||et.string.indexOf("/")==Ot.ch-et.start-1||wt&&Jt(wt,Nt)>-1||De(we,nt.mode.xmlCurrentContext&&nt.mode.xmlCurrentContext(ht)||[],ft,Ot,!0))return vt.Pass;var Dt=typeof re=="object"&&re.emptyTags;if(Dt&&Jt(Dt,ft)>-1){Fe[me]={text:"/>",newPos:vt.Pos(Ot.line,Ot.ch+2)};continue}var At=Et&&Jt(Et,Nt)>-1;Fe[me]={indent:At,text:">"+(At?`
|
|
|
|
|
|
`:"")+"</"+ft+">",newPos:At?vt.Pos(Ot.line+1,0):vt.Pos(Ot.line,Ot.ch+1)}}for(var Kt=typeof re=="object"&&re.dontIndentOnAutoClose,me=te.length-1;me>=0;me--){var Wt=Fe[me];we.replaceRange(Wt.text,te[me].head,te[me].anchor,"+insert");var xe=we.listSelections().slice(0);xe[me]={head:Wt.newPos,anchor:Wt.newPos},we.setSelections(xe),!Kt&&Wt.indent&&(we.indentLine(Wt.newPos.line,null,!0),we.indentLine(Wt.newPos.line+1,null,!0))}}function $t(we,te){for(var Fe=we.listSelections(),re=[],me=te?"/":"</",Ot=we.getOption("autoCloseTags"),et=typeof Ot=="object"&&Ot.dontIndentOnSlash,nt=0;nt<Fe.length;nt++){if(!Fe[nt].empty())return vt.Pass;var ht=Fe[nt].head,at=we.getTokenAt(ht),ft=vt.innerMode(we.getMode(),at.state),mt=ft.state;if(te&&(at.type=="string"||at.string.charAt(0)!="<"||at.start!=ht.ch-1))return vt.Pass;var wt,Et=ft.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(Et&&ft.mode.name=="javascript")wt=me+"script";else if(Et&&ft.mode.name=="css")wt=me+"style";else{var Nt=ft.mode.xmlCurrentContext&&ft.mode.xmlCurrentContext(mt);if(!Nt||Nt.length&&De(we,Nt,Nt[Nt.length-1],ht))return vt.Pass;wt=me+Nt[Nt.length-1]}we.getLine(ht.line).charAt(at.end)!=">"&&(wt+=">"),re[nt]=wt}if(we.replaceSelections(re),Fe=we.listSelections(),!et)for(var nt=0;nt<Fe.length;nt++)(nt==Fe.length-1||Fe[nt].head.line<Fe[nt+1].head.line)&&we.indentLine(Fe[nt].head.line)}function Ut(we){return we.getOption("disableInput")?vt.Pass:$t(we,!0)}vt.commands.closeTag=function(we){return $t(we)};function Jt(we,te){if(we.indexOf)return we.indexOf(te);for(var Fe=0,re=we.length;Fe<re;++Fe)if(we[Fe]==te)return Fe;return-1}function De(we,te,Fe,re,me){if(!vt.scanForClosingTag)return!1;var Ot=Math.min(we.lastLine()+1,re.line+500),et=vt.scanForClosingTag(we,re,null,Ot);if(!et||et.tag!=Fe)return!1;for(var nt=me?1:0,ht=te.length-1;ht>=0&&te[ht]==Fe;ht--)++nt;re=et.to;for(var ht=1;ht<nt;ht++){var at=vt.scanForClosingTag(we,re,null,Ot);if(!at||at.tag!=Fe)return!1;re=at.to}return!0}})},32855:function(Sn,Ve,Pt){(function(vt){vt(Pt(89780))})(function(vt){"use strict";var It=vt.Pos;function oe(ht,at){return ht.line-at.line||ht.ch-at.ch}var de="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",$t=de+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ut=new RegExp("<(/?)(["+de+"]["+$t+"]*)","g");function Jt(ht,at,ft,mt){this.line=at,this.ch=ft,this.cm=ht,this.text=ht.getLine(at),this.min=mt?Math.max(mt.from,ht.firstLine()):ht.firstLine(),this.max=mt?Math.min(mt.to-1,ht.lastLine()):ht.lastLine()}function De(ht,at){var ft=ht.cm.getTokenTypeAt(It(ht.line,at));return ft&&/\btag\b/.test(ft)}function we(ht){if(!(ht.line>=ht.max))return ht.ch=0,ht.text=ht.cm.getLine(++ht.line),!0}function te(ht){if(!(ht.line<=ht.min))return ht.text=ht.cm.getLine(--ht.line),ht.ch=ht.text.length,!0}function Fe(ht){for(;;){var at=ht.text.indexOf(">",ht.ch);if(at==-1){if(we(ht))continue;return}if(!De(ht,at+1)){ht.ch=at+1;continue}var ft=ht.text.lastIndexOf("/",at),mt=ft>-1&&!/\S/.test(ht.text.slice(ft+1,at));return ht.ch=at+1,mt?"selfClose":"regular"}}function re(ht){for(;;){var at=ht.ch?ht.text.lastIndexOf("<",ht.ch-1):-1;if(at==-1){if(te(ht))continue;return}if(!De(ht,at+1)){ht.ch=at;continue}Ut.lastIndex=at,ht.ch=at;var ft=Ut.exec(ht.text);if(ft&&ft.index==at)return ft}}function me(ht){for(;;){Ut.lastIndex=ht.ch;var at=Ut.exec(ht.text);if(!at){if(we(ht))continue;return}if(!De(ht,at.index+1)){ht.ch=at.index+1;continue}return ht.ch=at.index+at[0].length,at}}function Ot(ht){for(;;){var at=ht.ch?ht.text.lastIndexOf(">",ht.ch-1):-1;if(at==-1){if(te(ht))continue;return}if(!De(ht,at+1)){ht.ch=at;continue}var ft=ht.text.lastIndexOf("/",at),mt=ft>-1&&!/\S/.test(ht.text.slice(ft+1,at));return ht.ch=at+1,mt?"selfClose":"regular"}}function et(ht,at){for(var ft=[];;){var mt=me(ht),wt,Et=ht.line,Nt=ht.ch-(mt?mt[0].length:0);if(!mt||!(wt=Fe(ht)))return;if(wt!="selfClose")if(mt[1]){for(var Dt=ft.length-1;Dt>=0;--Dt)if(ft[Dt]==mt[2]){ft.length=Dt;break}if(Dt<0&&(!at||at==mt[2]))return{tag:mt[2],from:It(Et,Nt),to:It(ht.line,ht.ch)}}else ft.push(mt[2])}}function nt(ht,at){for(var ft=[];;){var mt=Ot(ht);if(!mt)return;if(mt=="selfClose"){re(ht);continue}var wt=ht.line,Et=ht.ch,Nt=re(ht);if(!Nt)return;if(Nt[1])ft.push(Nt[2]);else{for(var Dt=ft.length-1;Dt>=0;--Dt)if(ft[Dt]==Nt[2]){ft.length=Dt;break}if(Dt<0&&(!at||at==Nt[2]))return{tag:Nt[2],from:It(ht.line,ht.ch),to:It(wt,Et)}}}}vt.registerHelper("fold","xml",function(ht,at){for(var ft=new Jt(ht,at.line,0);;){var mt=me(ft);if(!mt||ft.line!=at.line)return;var wt=Fe(ft);if(!wt)return;if(!mt[1]&&wt!="selfClose"){var Et=It(ft.line,ft.ch),Nt=et(ft,mt[2]);return Nt&&oe(Nt.from,Et)>0?{from:Et,to:Nt.from}:null}}}),vt.findMatchingTag=function(ht,at,ft){var mt=new Jt(ht,at.line,at.ch,ft);if(!(mt.text.indexOf(">")==-1&&mt.text.indexOf("<")==-1)){var wt=Fe(mt),Et=wt&&It(mt.line,mt.ch),Nt=wt&&re(mt);if(!(!wt||!Nt||oe(mt,at)>0)){var Dt={from:It(mt.line,mt.ch),to:Et,tag:Nt[2]};return wt=="selfClose"?{open:Dt,close:null,at:"open"}:Nt[1]?{open:nt(mt,Nt[2]),close:Dt,at:"close"}:(mt=new Jt(ht,Et.line,Et.ch,ft),{open:Dt,close:et(mt,Nt[2]),at:"open"})}}},vt.findEnclosingTag=function(ht,at,ft,mt){for(var wt=new Jt(ht,at.line,at.ch,ft);;){var Et=nt(wt,mt);if(!Et)break;var Nt=new Jt(ht,at.line,at.ch,ft),Dt=et(Nt,Et.tag);if(Dt)return{open:Et,close:Dt}}},vt.scanForClosingTag=function(ht,at,ft,mt){var wt=new Jt(ht,at.line,at.ch,mt?{from:0,to:mt}:null);return et(wt,ft)}})},89780:function(Sn){(function(Ve,Pt){Sn.exports=Pt()})(this,function(){"use strict";var Ve=navigator.userAgent,Pt=navigator.platform,vt=/gecko\/\d/i.test(Ve),It=/MSIE \d/.test(Ve),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ve),de=/Edge\/(\d+)/.exec(Ve),$t=It||oe||de,Ut=$t&&(It?document.documentMode||6:+(de||oe)[1]),Jt=!de&&/WebKit\//.test(Ve),De=Jt&&/Qt\/\d+\.\d+/.test(Ve),we=!de&&/Chrome\//.test(Ve),te=/Opera\//.test(Ve),Fe=/Apple Computer/.test(navigator.vendor),re=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ve),me=/PhantomJS/.test(Ve),Ot=!de&&/AppleWebKit/.test(Ve)&&/Mobile\/\w+/.test(Ve),et=/Android/.test(Ve),nt=Ot||et||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ve),ht=Ot||/Mac/.test(Pt),at=/\bCrOS\b/.test(Ve),ft=/win/i.test(Pt),mt=te&&Ve.match(/Version\/(\d*\.\d*)/);mt&&(mt=Number(mt[1])),mt&&mt>=15&&(te=!1,Jt=!0);var wt=ht&&(De||te&&(mt==null||mt<12.11)),Et=vt||$t&&Ut>=9;function Nt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Dt=function(it,st){var ct=it.className,dt=Nt(st).exec(ct);if(dt){var pt=ct.slice(dt.index+dt[0].length);it.className=ct.slice(0,dt.index)+(pt?dt[1]+pt:"")}};function At(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function Kt(it,st){return At(it).appendChild(st)}function Wt(it,st,ct,dt){var pt=document.createElement(it);if(ct&&(pt.className=ct),dt&&(pt.style.cssText=dt),typeof st=="string")pt.appendChild(document.createTextNode(st));else if(st)for(var kt=0;kt<st.length;++kt)pt.appendChild(st[kt]);return pt}function xe(it,st,ct,dt){var pt=Wt(it,st,ct,dt);return pt.setAttribute("role","presentation"),pt}var Vt;document.createRange?Vt=function(it,st,ct,dt){var pt=document.createRange();return pt.setEnd(dt||it,ct),pt.setStart(it,st),pt}:Vt=function(it,st,ct){var dt=document.body.createTextRange();try{dt.moveToElementText(it.parentNode)}catch(pt){return dt}return dt.collapse(!0),dt.moveEnd("character",ct),dt.moveStart("character",st),dt};function Ie(it,st){if(st.nodeType==3&&(st=st.parentNode),it.contains)return it.contains(st);do if(st.nodeType==11&&(st=st.host),st==it)return!0;while(st=st.parentNode)}function Se(){var it;try{it=document.activeElement}catch(st){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function Ye(it,st){var ct=it.className;Nt(st).test(ct)||(it.className+=(ct?" ":"")+st)}function Le(it,st){for(var ct=it.split(" "),dt=0;dt<ct.length;dt++)ct[dt]&&!Nt(ct[dt]).test(st)&&(st+=" "+ct[dt]);return st}var Pe=function(it){it.select()};Ot?Pe=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:$t&&(Pe=function(it){try{it.select()}catch(st){}});function We(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function Ue(it,st,ct){st||(st={});for(var dt in it)it.hasOwnProperty(dt)&&(ct!==!1||!st.hasOwnProperty(dt))&&(st[dt]=it[dt]);return st}function ue(it,st,ct,dt,pt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var kt=dt||0,Rt=pt||0;;){var Qt=it.indexOf(" ",kt);if(Qt<0||Qt>=st)return Rt+(st-kt);Rt+=Qt-kt,Rt+=ct-Rt%ct,kt=Qt+1}}var Ht=function(){this.id=null,this.f=null,this.time=0,this.handler=We(this.onTimeout,this)};Ht.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Ht.prototype.set=function(it,st){this.f=st;var ct=+new Date+it;(!this.id||ct<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=ct)};function ke(it,st){for(var ct=0;ct<it.length;++ct)if(it[ct]==st)return ct;return-1}var pn=50,ln={toString:function(){return"CodeMirror.Pass"}},Ee={scroll:!1},Ke={origin:"*mouse"},gn={origin:"+move"};function Bn(it,st,ct){for(var dt=0,pt=0;;){var kt=it.indexOf(" ",dt);kt==-1&&(kt=it.length);var Rt=kt-dt;if(kt==it.length||pt+Rt>=st)return dt+Math.min(Rt,st-pt);if(pt+=kt-dt,pt+=ct-pt%ct,dt=kt+1,pt>=st)return dt}}var dn=[""];function In(it){for(;dn.length<=it;)dn.push(Ce(dn)+" ");return dn[it]}function Ce(it){return it[it.length-1]}function $n(it,st){for(var ct=[],dt=0;dt<it.length;dt++)ct[dt]=st(it[dt],dt);return ct}function Qn(it,st,ct){for(var dt=0,pt=ct(st);dt<it.length&&ct(it[dt])<=pt;)dt++;it.splice(dt,0,st)}function jt(){}function Lt(it,st){var ct;return Object.create?ct=Object.create(it):(jt.prototype=it,ct=new jt),st&&Ue(st,ct),ct}var xt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Tt(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||xt.test(it))}function Ft(it,st){return st?st.source.indexOf("\\w")>-1&&Tt(it)?!0:st.test(it):Tt(it)}function yt(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var ee=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function pe(it){return it.charCodeAt(0)>=768&&ee.test(it)}function qt(it,st,ct){for(;(ct<0?st>0:st<it.length)&&pe(it.charAt(st));)st+=ct;return st}function Zt(it,st,ct){for(var dt=st>ct?-1:1;;){if(st==ct)return st;var pt=(st+ct)/2,kt=dt<0?Math.ceil(pt):Math.floor(pt);if(kt==st)return it(kt)?st:ct;it(kt)?ct=kt:st=kt+dt}}function fe(it,st,ct,dt){if(!it)return dt(st,ct,"ltr",0);for(var pt=!1,kt=0;kt<it.length;++kt){var Rt=it[kt];(Rt.from<ct&&Rt.to>st||st==ct&&Rt.to==st)&&(dt(Math.max(Rt.from,st),Math.min(Rt.to,ct),Rt.level==1?"rtl":"ltr",kt),pt=!0)}pt||dt(st,ct,"ltr")}var ce=null;function ne(it,st,ct){var dt;ce=null;for(var pt=0;pt<it.length;++pt){var kt=it[pt];if(kt.from<st&&kt.to>st)return pt;kt.to==st&&(kt.from!=kt.to&&ct=="before"?dt=pt:ce=pt),kt.from==st&&(kt.from!=kt.to&&ct!="before"?dt=pt:ce=pt)}return dt!=null?dt:ce}var Ne=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ct(ge){return ge<=247?it.charAt(ge):1424<=ge&&ge<=1524?"R":1536<=ge&&ge<=1785?st.charAt(ge-1536):1774<=ge&&ge<=2220?"r":8192<=ge&&ge<=8203?"w":ge==8204?"b":"L"}var dt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pt=/[stwN]/,kt=/[LRr]/,Rt=/[Lb1n]/,Qt=/[1n]/;function Xt(ge,en,Me){this.level=ge,this.from=en,this.to=Me}return function(ge,en){var Me=en=="ltr"?"L":"R";if(ge.length==0||en=="ltr"&&!dt.test(ge))return!1;for(var Fn=ge.length,Mn=[],hi=0;hi<Fn;++hi)Mn.push(ct(ge.charCodeAt(hi)));for(var gi=0,bi=Me;gi<Fn;++gi){var _i=Mn[gi];_i=="m"?Mn[gi]=bi:bi=_i}for(var ho=0,qi=Me;ho<Fn;++ho){var mo=Mn[ho];mo=="1"&&qi=="r"?Mn[ho]="n":kt.test(mo)&&(qi=mo,mo=="r"&&(Mn[ho]="R"))}for(var Io=1,Ji=Mn[0];Io<Fn-1;++Io){var Vo=Mn[Io];Vo=="+"&&Ji=="1"&&Mn[Io+1]=="1"?Mn[Io]="1":Vo==","&&Ji==Mn[Io+1]&&(Ji=="1"||Ji=="n")&&(Mn[Io]=Ji),Ji=Vo}for(var $r=0;$r<Fn;++$r){var Ss=Mn[$r];if(Ss==",")Mn[$r]="N";else if(Ss=="%"){var Jr=void 0;for(Jr=$r+1;Jr<Fn&&Mn[Jr]=="%";++Jr);for(var ba=$r&&Mn[$r-1]=="!"||Jr<Fn&&Mn[Jr]=="1"?"1":"N",ta=$r;ta<Jr;++ta)Mn[ta]=ba;$r=Jr-1}}for(var fs=0,Aa=Me;fs<Fn;++fs){var Zs=Mn[fs];Aa=="L"&&Zs=="1"?Mn[fs]="L":kt.test(Zs)&&(Aa=Zs)}for(var gs=0;gs<Fn;++gs)if(pt.test(Mn[gs])){var cr=void 0;for(cr=gs+1;cr<Fn&&pt.test(Mn[cr]);++cr);for(var es=(gs?Mn[gs-1]:Me)=="L",Ts=(cr<Fn?Mn[cr]:Me)=="L",_s=es==Ts?es?"L":"R":Me,Sl=gs;Sl<cr;++Sl)Mn[Sl]=_s;gs=cr-1}for(var Qr=[],ll,os=0;os<Fn;)if(Rt.test(Mn[os])){var mc=os;for(++os;os<Fn&&Rt.test(Mn[os]);++os);Qr.push(new Xt(0,mc,os))}else{var Ya=os,Ia=Qr.length,La=en=="rtl"?1:0;for(++os;os<Fn&&Mn[os]!="L";++os);for(var Ar=Ya;Ar<os;)if(Qt.test(Mn[Ar])){Ya<Ar&&(Qr.splice(Ia,0,new Xt(1,Ya,Ar)),Ia+=La);var Fs=Ar;for(++Ar;Ar<os&&Qt.test(Mn[Ar]);++Ar);Qr.splice(Ia,0,new Xt(2,Fs,Ar)),Ia+=La,Ya=Ar}else++Ar;Ya<os&&Qr.splice(Ia,0,new Xt(1,Ya,os))}return en=="ltr"&&(Qr[0].level==1&&(ll=ge.match(/^\s+/))&&(Qr[0].from=ll[0].length,Qr.unshift(new Xt(0,0,ll[0].length))),Ce(Qr).level==1&&(ll=ge.match(/\s+$/))&&(Ce(Qr).to-=ll[0].length,Qr.push(new Xt(0,Fn-ll[0].length,Fn)))),en=="rtl"?Qr.reverse():Qr}}();function hn(it,st){var ct=it.order;return ct==null&&(ct=it.order=Ne(it.text,st)),ct}var an=[],_e=function(it,st,ct){if(it.addEventListener)it.addEventListener(st,ct,!1);else if(it.attachEvent)it.attachEvent("on"+st,ct);else{var dt=it._handlers||(it._handlers={});dt[st]=(dt[st]||an).concat(ct)}};function En(it,st){return it._handlers&&it._handlers[st]||an}function Ln(it,st,ct){if(it.removeEventListener)it.removeEventListener(st,ct,!1);else if(it.detachEvent)it.detachEvent("on"+st,ct);else{var dt=it._handlers,pt=dt&&dt[st];if(pt){var kt=ke(pt,ct);kt>-1&&(dt[st]=pt.slice(0,kt).concat(pt.slice(kt+1)))}}}function ye(it,st){var ct=En(it,st);if(ct.length)for(var dt=Array.prototype.slice.call(arguments,2),pt=0;pt<ct.length;++pt)ct[pt].apply(null,dt)}function on(it,st,ct){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),ye(it,ct||st.type,it,st),ni(st)||st.codemirrorIgnore}function Pn(it){var st=it._handlers&&it._handlers.cursorActivity;if(st)for(var ct=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),dt=0;dt<st.length;++dt)ke(ct,st[dt])==-1&&ct.push(st[dt])}function Cn(it,st){return En(it,st).length>0}function An(it){it.prototype.on=function(st,ct){_e(this,st,ct)},it.prototype.off=function(st,ct){Ln(this,st,ct)}}function Jn(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function ui(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function ni(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function fi(it){Jn(it),ui(it)}function Bi(it){return it.target||it.srcElement}function Ti(it){var st=it.which;return st==null&&(it.button&1?st=1:it.button&2?st=3:it.button&4&&(st=2)),ht&&it.ctrlKey&&st==1&&(st=3),st}var Di=function(){if($t&&Ut<9)return!1;var it=Wt("div");return"draggable"in it||"dragDrop"in it}(),io;function to(it){if(io==null){var st=Wt("span","\u200B");Kt(it,Wt("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(io=st.offsetWidth<=1&&st.offsetHeight>2&&!($t&&Ut<8))}var ct=io?Wt("span","\u200B"):Wt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ct.setAttribute("cm-text",""),ct}var Ri;function Qi(it){if(Ri!=null)return Ri;var st=Kt(it,document.createTextNode("A\u062EA")),ct=Vt(st,0,1).getBoundingClientRect(),dt=Vt(st,1,2).getBoundingClientRect();return At(it),!ct||ct.left==ct.right?!1:Ri=dt.right-ct.right<3}var Zn=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(it){for(var st=0,ct=[],dt=it.length;st<=dt;){var pt=it.indexOf(`
|
|
|
`,st);pt==-1&&(pt=it.length);var kt=it.slice(st,it.charAt(pt-1)=="\r"?pt-1:pt),Rt=kt.indexOf("\r");Rt!=-1?(ct.push(kt.slice(0,Rt)),st+=Rt+1):(ct.push(kt),st=pt+1)}return ct}:function(it){return it.split(/\r\n?|\n/)},Mt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(st){return!1}}:function(it){var st;try{st=it.ownerDocument.selection.createRange()}catch(ct){}return!st||st.parentElement()!=it?!1:st.compareEndPoints("StartToEnd",st)!=0},so=function(){var it=Wt("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Ii=null;function Wi(it){if(Ii!=null)return Ii;var st=Kt(it,Wt("span","x")),ct=st.getBoundingClientRect(),dt=Vt(st,0,1).getBoundingClientRect();return Ii=Math.abs(ct.left-dt.left)>1}var ki={},Bo={};function Mo(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),ki[it]=st}function ai(it,st){Bo[it]=st}function di(it){if(typeof it=="string"&&Bo.hasOwnProperty(it))it=Bo[it];else if(it&&typeof it.name=="string"&&Bo.hasOwnProperty(it.name)){var st=Bo[it.name];typeof st=="string"&&(st={name:st}),it=Lt(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return di("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return di("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function Ae(it,st){st=di(st);var ct=ki[st.name];if(!ct)return Ae(it,"text/plain");var dt=ct(it,st);if(Be.hasOwnProperty(st.name)){var pt=Be[st.name];for(var kt in pt)pt.hasOwnProperty(kt)&&(dt.hasOwnProperty(kt)&&(dt["_"+kt]=dt[kt]),dt[kt]=pt[kt])}if(dt.name=st.name,st.helperType&&(dt.helperType=st.helperType),st.modeProps)for(var Rt in st.modeProps)dt[Rt]=st.modeProps[Rt];return dt}var Be={};function _t(it,st){var ct=Be.hasOwnProperty(it)?Be[it]:Be[it]={};Ue(st,ct)}function Je(it,st){if(st===!0)return st;if(it.copyState)return it.copyState(st);var ct={};for(var dt in st){var pt=st[dt];pt instanceof Array&&(pt=pt.concat([])),ct[dt]=pt}return ct}function cn(it,st){for(var ct;it.innerMode&&(ct=it.innerMode(st),!(!ct||ct.mode==it));)st=ct.state,it=ct.mode;return ct||{mode:it,state:st}}function ve(it,st,ct){return it.startState?it.startState(st,ct):!0}var ie=function(it,st,ct){this.pos=this.start=0,this.string=it,this.tabSize=st||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ct};ie.prototype.eol=function(){return this.pos>=this.string.length},ie.prototype.sol=function(){return this.pos==this.lineStart},ie.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ie.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ie.prototype.eat=function(it){var st=this.string.charAt(this.pos),ct;if(typeof it=="string"?ct=st==it:ct=st&&(it.test?it.test(st):it(st)),ct)return++this.pos,st},ie.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},ie.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},ie.prototype.skipToEnd=function(){this.pos=this.string.length},ie.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},ie.prototype.backUp=function(it){this.pos-=it},ie.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ue(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ue(this.string,this.lineStart,this.tabSize):0)},ie.prototype.indentation=function(){return ue(this.string,null,this.tabSize)-(this.lineStart?ue(this.string,this.lineStart,this.tabSize):0)},ie.prototype.match=function(it,st,ct){if(typeof it=="string"){var dt=function(Rt){return ct?Rt.toLowerCase():Rt},pt=this.string.substr(this.pos,it.length);if(dt(pt)==dt(it))return st!==!1&&(this.pos+=it.length),!0}else{var kt=this.string.slice(this.pos).match(it);return kt&&kt.index>0?null:(kt&&st!==!1&&(this.pos+=kt[0].length),kt)}},ie.prototype.current=function(){return this.string.slice(this.start,this.pos)},ie.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},ie.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},ie.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Qe(it,st){if(st-=it.first,st<0||st>=it.size)throw new Error("There is no line "+(st+it.first)+" in the document.");for(var ct=it;!ct.lines;)for(var dt=0;;++dt){var pt=ct.children[dt],kt=pt.chunkSize();if(st<kt){ct=pt;break}st-=kt}return ct.lines[st]}function yn(it,st,ct){var dt=[],pt=st.line;return it.iter(st.line,ct.line+1,function(kt){var Rt=kt.text;pt==ct.line&&(Rt=Rt.slice(0,ct.ch)),pt==st.line&&(Rt=Rt.slice(st.ch)),dt.push(Rt),++pt}),dt}function Nn(it,st,ct){var dt=[];return it.iter(st,ct,function(pt){dt.push(pt.text)}),dt}function _n(it,st){var ct=st-it.height;if(ct)for(var dt=it;dt;dt=dt.parent)dt.height+=ct}function le(it){if(it.parent==null)return null;for(var st=it.parent,ct=ke(st.lines,it),dt=st.parent;dt;st=dt,dt=dt.parent)for(var pt=0;dt.children[pt]!=st;++pt)ct+=dt.children[pt].chunkSize();return ct+st.first}function mn(it,st){var ct=it.first;t:do{for(var dt=0;dt<it.children.length;++dt){var pt=it.children[dt],kt=pt.height;if(st<kt){it=pt;continue t}st-=kt,ct+=pt.chunkSize()}return ct}while(!it.lines);for(var Rt=0;Rt<it.lines.length;++Rt){var Qt=it.lines[Rt],Xt=Qt.height;if(st<Xt)break;st-=Xt}return ct+Rt}function Gn(it,st){return st>=it.first&&st<it.first+it.size}function si(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function Re(it,st,ct){if(ct===void 0&&(ct=null),!(this instanceof Re))return new Re(it,st,ct);this.line=it,this.ch=st,this.sticky=ct}function fn(it,st){return it.line-st.line||it.ch-st.ch}function He(it,st){return it.sticky==st.sticky&&fn(it,st)==0}function je(it){return Re(it.line,it.ch)}function vn(it,st){return fn(it,st)<0?st:it}function rn(it,st){return fn(it,st)<0?it:st}function bn(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function xn(it,st){if(st.line<it.first)return Re(it.first,0);var ct=it.first+it.size-1;return st.line>ct?Re(ct,Qe(it,ct).text.length):On(st,Qe(it,st.line).text.length)}function On(it,st){var ct=it.ch;return ct==null||ct>st?Re(it.line,st):ct<0?Re(it.line,0):it}function zn(it,st){for(var ct=[],dt=0;dt<st.length;dt++)ct[dt]=xn(it,st[dt]);return ct}var yi=function(it,st){this.state=it,this.lookAhead=st},Xe=function(it,st,ct,dt){this.state=st,this.doc=it,this.line=ct,this.maxLookAhead=dt||0,this.baseTokens=null,this.baseTokenPos=1};Xe.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},Xe.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var st=this.baseTokens[this.baseTokenPos+1];return{type:st&&st.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},Xe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xe.fromSaved=function(it,st,ct){return st instanceof yi?new Xe(it,Je(it.mode,st.state),ct,st.lookAhead):new Xe(it,Je(it.mode,st),ct)},Xe.prototype.save=function(it){var st=it!==!1?Je(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yi(st,this.maxLookAhead):st};function Li(it,st,ct,dt){var pt=[it.state.modeGen],kt={};kn(it,st.text,it.doc.mode,ct,function(ge,en){return pt.push(ge,en)},kt,dt);for(var Rt=ct.state,Qt=function(ge){ct.baseTokens=pt;var en=it.state.overlays[ge],Me=1,Fn=0;ct.state=!0,kn(it,st.text,en.mode,ct,function(Mn,hi){for(var gi=Me;Fn<Mn;){var bi=pt[Me];bi>Mn&&pt.splice(Me,1,Mn,pt[Me+1],bi),Me+=2,Fn=Math.min(Mn,bi)}if(hi)if(en.opaque)pt.splice(gi,Me-gi,Mn,"overlay "+hi),Me=gi+2;else for(;gi<Me;gi+=2){var _i=pt[gi+1];pt[gi+1]=(_i?_i+" ":"")+"overlay "+hi}},kt),ct.state=Rt,ct.baseTokens=null,ct.baseTokenPos=1},Xt=0;Xt<it.state.overlays.length;++Xt)Qt(Xt);return{styles:pt,classes:kt.bgClass||kt.textClass?kt:null}}function ji(it,st,ct){if(!st.styles||st.styles[0]!=it.state.modeGen){var dt=Ei(it,le(st)),pt=st.text.length>it.options.maxHighlightLength&&Je(it.doc.mode,dt.state),kt=Li(it,st,dt);pt&&(dt.state=pt),st.stateAfter=dt.save(!pt),st.styles=kt.styles,kt.classes?st.styleClasses=kt.classes:st.styleClasses&&(st.styleClasses=null),ct===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return st.styles}function Ei(it,st,ct){var dt=it.doc,pt=it.display;if(!dt.mode.startState)return new Xe(dt,!0,st);var kt=Tn(it,st,ct),Rt=kt>dt.first&&Qe(dt,kt-1).stateAfter,Qt=Rt?Xe.fromSaved(dt,Rt,kt):new Xe(dt,ve(dt.mode),kt);return dt.iter(kt,st,function(Xt){nn(it,Xt.text,Qt);var ge=Qt.line;Xt.stateAfter=ge==st-1||ge%5==0||ge>=pt.viewFrom&&ge<pt.viewTo?Qt.save():null,Qt.nextLine()}),ct&&(dt.modeFrontier=Qt.line),Qt}function nn(it,st,ct,dt){var pt=it.doc.mode,kt=new ie(st,it.options.tabSize,ct);for(kt.start=kt.pos=dt||0,st==""&&Vn(pt,ct.state);!kt.eol();)ze(pt,kt,ct.state),kt.start=kt.pos}function Vn(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var ct=cn(it,st);if(ct.mode.blankLine)return ct.mode.blankLine(ct.state)}}function ze(it,st,ct,dt){for(var pt=0;pt<10;pt++){dt&&(dt[0]=cn(it,ct).mode);var kt=it.token(st,ct);if(st.pos>st.start)return kt}throw new Error("Mode "+it.name+" failed to advance stream.")}var Ge=function(it,st,ct){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=ct};function Oe(it,st,ct,dt){var pt=it.doc,kt=pt.mode,Rt;st=xn(pt,st);var Qt=Qe(pt,st.line),Xt=Ei(it,st.line,ct),ge=new ie(Qt.text,it.options.tabSize,Xt),en;for(dt&&(en=[]);(dt||ge.pos<st.ch)&&!ge.eol();)ge.start=ge.pos,Rt=ze(kt,ge,Xt.state),dt&&en.push(new Ge(ge,Rt,Je(pt.mode,Xt.state)));return dt?en:new Ge(ge,Rt,Xt.state)}function un(it,st){if(it)for(;;){var ct=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ct)break;it=it.slice(0,ct.index)+it.slice(ct.index+ct[0].length);var dt=ct[1]?"bgClass":"textClass";st[dt]==null?st[dt]=ct[2]:new RegExp("(?:^|\\s)"+ct[2]+"(?:$|\\s)").test(st[dt])||(st[dt]+=" "+ct[2])}return it}function kn(it,st,ct,dt,pt,kt,Rt){var Qt=ct.flattenSpans;Qt==null&&(Qt=it.options.flattenSpans);var Xt=0,ge=null,en=new ie(st,it.options.tabSize,dt),Me,Fn=it.options.addModeClass&&[null];for(st==""&&un(Vn(ct,dt.state),kt);!en.eol();){if(en.pos>it.options.maxHighlightLength?(Qt=!1,Rt&&nn(it,st,dt,en.pos),en.pos=st.length,Me=null):Me=un(ze(ct,en,dt.state,Fn),kt),Fn){var Mn=Fn[0].name;Mn&&(Me="m-"+(Me?Mn+" "+Me:Mn))}if(!Qt||ge!=Me){for(;Xt<en.start;)Xt=Math.min(en.start,Xt+5e3),pt(Xt,ge);ge=Me}en.start=en.pos}for(;Xt<en.pos;){var hi=Math.min(en.pos,Xt+5e3);pt(hi,ge),Xt=hi}}function Tn(it,st,ct){for(var dt,pt,kt=it.doc,Rt=ct?-1:st-(it.doc.mode.innerMode?1e3:100),Qt=st;Qt>Rt;--Qt){if(Qt<=kt.first)return kt.first;var Xt=Qe(kt,Qt-1),ge=Xt.stateAfter;if(ge&&(!ct||Qt+(ge instanceof yi?ge.lookAhead:0)<=kt.modeFrontier))return Qt;var en=ue(Xt.text,null,it.options.tabSize);(pt==null||dt>en)&&(pt=Qt-1,dt=en)}return pt}function Rn(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontier<st-10)){for(var ct=it.first,dt=st-1;dt>ct;dt--){var pt=Qe(it,dt).stateAfter;if(pt&&(!(pt instanceof yi)||dt+pt.lookAhead<st)){ct=dt+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ct)}}var ei=!1,qe=!1;function pi(){ei=!0}function tn(){qe=!0}function Ci(it,st,ct){this.marker=it,this.from=st,this.to=ct}function Ui(it,st){if(it)for(var ct=0;ct<it.length;++ct){var dt=it[ct];if(dt.marker==st)return dt}}function $i(it,st){for(var ct,dt=0;dt<it.length;++dt)it[dt]!=st&&(ct||(ct=[])).push(it[dt]);return ct}function Co(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function lo(it,st,ct){var dt;if(it)for(var pt=0;pt<it.length;++pt){var kt=it[pt],Rt=kt.marker,Qt=kt.from==null||(Rt.inclusiveLeft?kt.from<=st:kt.from<st);if(Qt||kt.from==st&&Rt.type=="bookmark"&&(!ct||!kt.marker.insertLeft)){var Xt=kt.to==null||(Rt.inclusiveRight?kt.to>=st:kt.to>st);(dt||(dt=[])).push(new Ci(Rt,kt.from,Xt?null:kt.to))}}return dt}function Si(it,st,ct){var dt;if(it)for(var pt=0;pt<it.length;++pt){var kt=it[pt],Rt=kt.marker,Qt=kt.to==null||(Rt.inclusiveRight?kt.to>=st:kt.to>st);if(Qt||kt.from==st&&Rt.type=="bookmark"&&(!ct||kt.marker.insertLeft)){var Xt=kt.from==null||(Rt.inclusiveLeft?kt.from<=st:kt.from<st);(dt||(dt=[])).push(new Ci(Rt,Xt?null:kt.from-st,kt.to==null?null:kt.to-st))}}return dt}function ii(it,st){if(st.full)return null;var ct=Gn(it,st.from.line)&&Qe(it,st.from.line).markedSpans,dt=Gn(it,st.to.line)&&Qe(it,st.to.line).markedSpans;if(!ct&&!dt)return null;var pt=st.from.ch,kt=st.to.ch,Rt=fn(st.from,st.to)==0,Qt=lo(ct,pt,Rt),Xt=Si(dt,kt,Rt),ge=st.text.length==1,en=Ce(st.text).length+(ge?pt:0);if(Qt)for(var Me=0;Me<Qt.length;++Me){var Fn=Qt[Me];if(Fn.to==null){var Mn=Ui(Xt,Fn.marker);Mn?ge&&(Fn.to=Mn.to==null?null:Mn.to+en):Fn.to=pt}}if(Xt)for(var hi=0;hi<Xt.length;++hi){var gi=Xt[hi];if(gi.to!=null&&(gi.to+=en),gi.from==null){var bi=Ui(Qt,gi.marker);bi||(gi.from=en,ge&&(Qt||(Qt=[])).push(gi))}else gi.from+=en,ge&&(Qt||(Qt=[])).push(gi)}Qt&&(Qt=Yi(Qt)),Xt&&Xt!=Qt&&(Xt=Yi(Xt));var _i=[Qt];if(!ge){var ho=st.text.length-2,qi;if(ho>0&&Qt)for(var mo=0;mo<Qt.length;++mo)Qt[mo].to==null&&(qi||(qi=[])).push(new Ci(Qt[mo].marker,null,null));for(var Io=0;Io<ho;++Io)_i.push(qi);_i.push(Xt)}return _i}function Yi(it){for(var st=0;st<it.length;++st){var ct=it[st];ct.from!=null&&ct.from==ct.to&&ct.marker.clearWhenEmpty!==!1&&it.splice(st--,1)}return it.length?it:null}function oo(it,st,ct){var dt=null;if(it.iter(st.line,ct.line+1,function(Mn){if(Mn.markedSpans)for(var hi=0;hi<Mn.markedSpans.length;++hi){var gi=Mn.markedSpans[hi].marker;gi.readOnly&&(!dt||ke(dt,gi)==-1)&&(dt||(dt=[])).push(gi)}}),!dt)return null;for(var pt=[{from:st,to:ct}],kt=0;kt<dt.length;++kt)for(var Rt=dt[kt],Qt=Rt.find(0),Xt=0;Xt<pt.length;++Xt){var ge=pt[Xt];if(!(fn(ge.to,Qt.from)<0||fn(ge.from,Qt.to)>0)){var en=[Xt,1],Me=fn(ge.from,Qt.from),Fn=fn(ge.to,Qt.to);(Me<0||!Rt.inclusiveLeft&&!Me)&&en.push({from:ge.from,to:Qt.from}),(Fn>0||!Rt.inclusiveRight&&!Fn)&&en.push({from:Qt.to,to:ge.to}),pt.splice.apply(pt,en),Xt+=en.length-3}}return pt}function Yn(it){var st=it.markedSpans;if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.detachLine(it);it.markedSpans=null}}function zt(it,st){if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.attachLine(it);it.markedSpans=st}}function Ai(it){return it.inclusiveLeft?-1:0}function vo(it){return it.inclusiveRight?1:0}function ao(it,st){var ct=it.lines.length-st.lines.length;if(ct!=0)return ct;var dt=it.find(),pt=st.find(),kt=fn(dt.from,pt.from)||Ai(it)-Ai(st);if(kt)return-kt;var Rt=fn(dt.to,pt.to)||vo(it)-vo(st);return Rt||st.id-it.id}function Eo(it,st){var ct=qe&&it.markedSpans,dt;if(ct)for(var pt=void 0,kt=0;kt<ct.length;++kt)pt=ct[kt],pt.marker.collapsed&&(st?pt.from:pt.to)==null&&(!dt||ao(dt,pt.marker)<0)&&(dt=pt.marker);return dt}function Ho(it){return Eo(it,!0)}function Zi(it){return Eo(it,!1)}function xi(it,st){var ct=qe&&it.markedSpans,dt;if(ct)for(var pt=0;pt<ct.length;++pt){var kt=ct[pt];kt.marker.collapsed&&(kt.from==null||kt.from<st)&&(kt.to==null||kt.to>st)&&(!dt||ao(dt,kt.marker)<0)&&(dt=kt.marker)}return dt}function Fi(it,st,ct,dt,pt){var kt=Qe(it,st),Rt=qe&&kt.markedSpans;if(Rt)for(var Qt=0;Qt<Rt.length;++Qt){var Xt=Rt[Qt];if(Xt.marker.collapsed){var ge=Xt.marker.find(0),en=fn(ge.from,ct)||Ai(Xt.marker)-Ai(pt),Me=fn(ge.to,dt)||vo(Xt.marker)-vo(pt);if(!(en>=0&&Me<=0||en<=0&&Me>=0)&&(en<=0&&(Xt.marker.inclusiveRight&&pt.inclusiveLeft?fn(ge.to,ct)>=0:fn(ge.to,ct)>0)||en>=0&&(Xt.marker.inclusiveRight&&pt.inclusiveLeft?fn(ge.from,dt)<=0:fn(ge.from,dt)<0)))return!0}}}function Mi(it){for(var st;st=Ho(it);)it=st.find(-1,!0).line;return it}function co(it){for(var st;st=Zi(it);)it=st.find(1,!0).line;return it}function uo(it){for(var st,ct;st=Zi(it);)it=st.find(1,!0).line,(ct||(ct=[])).push(it);return ct}function Pi(it,st){var ct=Qe(it,st),dt=Mi(ct);return ct==dt?st:le(dt)}function Ni(it,st){if(st>it.lastLine())return st;var ct=Qe(it,st),dt;if(!Wn(it,ct))return st;for(;dt=Zi(ct);)ct=dt.find(1,!0).line;return le(ct)+1}function Wn(it,st){var ct=qe&&st.markedSpans;if(ct){for(var dt=void 0,pt=0;pt<ct.length;++pt)if(dt=ct[pt],!!dt.marker.collapsed){if(dt.from==null)return!0;if(!dt.marker.widgetNode&&dt.from==0&&dt.marker.inclusiveLeft&&zi(it,st,dt))return!0}}}function zi(it,st,ct){if(ct.to==null){var dt=ct.marker.find(1,!0);return zi(it,dt.line,Ui(dt.line.markedSpans,ct.marker))}if(ct.marker.inclusiveRight&&ct.to==st.text.length)return!0;for(var pt=void 0,kt=0;kt<st.markedSpans.length;++kt)if(pt=st.markedSpans[kt],pt.marker.collapsed&&!pt.marker.widgetNode&&pt.from==ct.to&&(pt.to==null||pt.to!=ct.from)&&(pt.marker.inclusiveLeft||ct.marker.inclusiveRight)&&zi(it,st,pt))return!0}function xo(it){it=Mi(it);for(var st=0,ct=it.parent,dt=0;dt<ct.lines.length;++dt){var pt=ct.lines[dt];if(pt==it)break;st+=pt.height}for(var kt=ct.parent;kt;ct=kt,kt=ct.parent)for(var Rt=0;Rt<kt.children.length;++Rt){var Qt=kt.children[Rt];if(Qt==ct)break;st+=Qt.height}return st}function Ko(it){if(it.height==0)return 0;for(var st=it.text.length,ct,dt=it;ct=Ho(dt);){var pt=ct.find(0,!0);dt=pt.from.line,st+=pt.from.ch-pt.to.ch}for(dt=it;ct=Zi(dt);){var kt=ct.find(0,!0);st-=dt.text.length-kt.from.ch,dt=kt.to.line,st+=dt.text.length-kt.to.ch}return st}function Uo(it){var st=it.display,ct=it.doc;st.maxLine=Qe(ct,ct.first),st.maxLineLength=Ko(st.maxLine),st.maxLineChanged=!0,ct.iter(function(dt){var pt=Ko(dt);pt>st.maxLineLength&&(st.maxLineLength=pt,st.maxLine=dt)})}var Qo=function(it,st,ct){this.text=it,zt(this,st),this.height=ct?ct(this):1};Qo.prototype.lineNo=function(){return le(this)},An(Qo);function ar(it,st,ct,dt){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),Yn(it),zt(it,ct);var pt=dt?dt(it):1;pt!=it.height&&_n(it,pt)}function Ro(it){it.parent=null,Yn(it)}var er={},nr={};function qr(it,st){if(!it||/^\s*$/.test(it))return null;var ct=st.addModeClass?nr:er;return ct[it]||(ct[it]=it.replace(/\S+/g,"cm-$&"))}function sn(it,st){var ct=xe("span",null,null,Jt?"padding-right: .1px":null),dt={pre:xe("pre",[ct],"CodeMirror-line"),content:ct,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};st.measure={};for(var pt=0;pt<=(st.rest?st.rest.length:0);pt++){var kt=pt?st.rest[pt-1]:st.line,Rt=void 0;dt.pos=0,dt.addToken=Sa,Qi(it.display.measure)&&(Rt=hn(kt,it.doc.direction))&&(dt.addToken=jo(dt.addToken,Rt)),dt.map=[];var Qt=st!=it.display.externalMeasured&&le(kt);vr(kt,dt,ji(it,kt,Qt)),kt.styleClasses&&(kt.styleClasses.bgClass&&(dt.bgClass=Le(kt.styleClasses.bgClass,dt.bgClass||"")),kt.styleClasses.textClass&&(dt.textClass=Le(kt.styleClasses.textClass,dt.textClass||""))),dt.map.length==0&&dt.map.push(0,0,dt.content.appendChild(to(it.display.measure))),pt==0?(st.measure.map=dt.map,st.measure.cache={}):((st.measure.maps||(st.measure.maps=[])).push(dt.map),(st.measure.caches||(st.measure.caches=[])).push({}))}if(Jt){var Xt=dt.content.lastChild;(/\bcm-tab\b/.test(Xt.className)||Xt.querySelector&&Xt.querySelector(".cm-tab"))&&(dt.content.className="cm-tab-wrap-hack")}return ye(it,"renderLine",it,st.line,dt.pre),dt.pre.className&&(dt.textClass=Le(dt.pre.className,dt.textClass||"")),dt}function wr(it){var st=Wt("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function Sa(it,st,ct,dt,pt,kt,Rt){if(st){var Qt=it.splitSpaces?Cs(st,it.trailingSpace):st,Xt=it.cm.state.specialChars,ge=!1,en;if(!Xt.test(st))it.col+=st.length,en=document.createTextNode(Qt),it.map.push(it.pos,it.pos+st.length,en),$t&&Ut<9&&(ge=!0),it.pos+=st.length;else{en=document.createDocumentFragment();for(var Me=0;;){Xt.lastIndex=Me;var Fn=Xt.exec(st),Mn=Fn?Fn.index-Me:st.length-Me;if(Mn){var hi=document.createTextNode(Qt.slice(Me,Me+Mn));$t&&Ut<9?en.appendChild(Wt("span",[hi])):en.appendChild(hi),it.map.push(it.pos,it.pos+Mn,hi),it.col+=Mn,it.pos+=Mn}if(!Fn)break;Me+=Mn+1;var gi=void 0;if(Fn[0]==" "){var bi=it.cm.options.tabSize,_i=bi-it.col%bi;gi=en.appendChild(Wt("span",In(_i),"cm-tab")),gi.setAttribute("role","presentation"),gi.setAttribute("cm-text"," "),it.col+=_i}else Fn[0]=="\r"||Fn[0]==`
|
|
|
`?(gi=en.appendChild(Wt("span",Fn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),gi.setAttribute("cm-text",Fn[0]),it.col+=1):(gi=it.cm.options.specialCharPlaceholder(Fn[0]),gi.setAttribute("cm-text",Fn[0]),$t&&Ut<9?en.appendChild(Wt("span",[gi])):en.appendChild(gi),it.col+=1);it.map.push(it.pos,it.pos+1,gi),it.pos++}}if(it.trailingSpace=Qt.charCodeAt(st.length-1)==32,ct||dt||pt||ge||kt||Rt){var ho=ct||"";dt&&(ho+=dt),pt&&(ho+=pt);var qi=Wt("span",[en],ho,kt);if(Rt)for(var mo in Rt)Rt.hasOwnProperty(mo)&&mo!="style"&&mo!="class"&&qi.setAttribute(mo,Rt[mo]);return it.content.appendChild(qi)}it.content.appendChild(en)}}function Cs(it,st){if(it.length>1&&!/ /.test(it))return it;for(var ct=st,dt="",pt=0;pt<it.length;pt++){var kt=it.charAt(pt);kt==" "&&ct&&(pt==it.length-1||it.charCodeAt(pt+1)==32)&&(kt="\xA0"),dt+=kt,ct=kt==" "}return dt}function jo(it,st){return function(ct,dt,pt,kt,Rt,Qt,Xt){pt=pt?pt+" cm-force-border":"cm-force-border";for(var ge=ct.pos,en=ge+dt.length;;){for(var Me=void 0,Fn=0;Fn<st.length&&(Me=st[Fn],!(Me.to>ge&&Me.from<=ge));Fn++);if(Me.to>=en)return it(ct,dt,pt,kt,Rt,Qt,Xt);it(ct,dt.slice(0,Me.to-ge),pt,kt,null,Qt,Xt),kt=null,dt=dt.slice(Me.to-ge),ge=Me.to}}}function Lo(it,st,ct,dt){var pt=!dt&&ct.widgetNode;pt&&it.map.push(it.pos,it.pos+st,pt),!dt&&it.cm.display.input.needsContentAttribute&&(pt||(pt=it.content.appendChild(document.createElement("span"))),pt.setAttribute("cm-marker",ct.id)),pt&&(it.cm.display.input.setUneditable(pt),it.content.appendChild(pt)),it.pos+=st,it.trailingSpace=!1}function vr(it,st,ct){var dt=it.markedSpans,pt=it.text,kt=0;if(!dt){for(var Rt=1;Rt<ct.length;Rt+=2)st.addToken(st,pt.slice(kt,kt=ct[Rt]),qr(ct[Rt+1],st.cm.options));return}for(var Qt=pt.length,Xt=0,ge=1,en="",Me,Fn,Mn=0,hi,gi,bi,_i,ho;;){if(Mn==Xt){hi=gi=bi=Fn="",ho=null,_i=null,Mn=1/0;for(var qi=[],mo=void 0,Io=0;Io<dt.length;++Io){var Ji=dt[Io],Vo=Ji.marker;if(Vo.type=="bookmark"&&Ji.from==Xt&&Vo.widgetNode)qi.push(Vo);else if(Ji.from<=Xt&&(Ji.to==null||Ji.to>Xt||Vo.collapsed&&Ji.to==Xt&&Ji.from==Xt)){if(Ji.to!=null&&Ji.to!=Xt&&Mn>Ji.to&&(Mn=Ji.to,gi=""),Vo.className&&(hi+=" "+Vo.className),Vo.css&&(Fn=(Fn?Fn+";":"")+Vo.css),Vo.startStyle&&Ji.from==Xt&&(bi+=" "+Vo.startStyle),Vo.endStyle&&Ji.to==Mn&&(mo||(mo=[])).push(Vo.endStyle,Ji.to),Vo.title&&((ho||(ho={})).title=Vo.title),Vo.attributes)for(var $r in Vo.attributes)(ho||(ho={}))[$r]=Vo.attributes[$r];Vo.collapsed&&(!_i||ao(_i.marker,Vo)<0)&&(_i=Ji)}else Ji.from>Xt&&Mn>Ji.from&&(Mn=Ji.from)}if(mo)for(var Ss=0;Ss<mo.length;Ss+=2)mo[Ss+1]==Mn&&(gi+=" "+mo[Ss]);if(!_i||_i.from==Xt)for(var Jr=0;Jr<qi.length;++Jr)Lo(st,0,qi[Jr]);if(_i&&(_i.from||0)==Xt){if(Lo(st,(_i.to==null?Qt+1:_i.to)-Xt,_i.marker,_i.from==null),_i.to==null)return;_i.to==Xt&&(_i=!1)}}if(Xt>=Qt)break;for(var ba=Math.min(Qt,Mn);;){if(en){var ta=Xt+en.length;if(!_i){var fs=ta>ba?en.slice(0,ba-Xt):en;st.addToken(st,fs,Me?Me+hi:hi,bi,Xt+fs.length==Mn?gi:"",Fn,ho)}if(ta>=ba){en=en.slice(ba-Xt),Xt=ba;break}Xt=ta,bi=""}en=pt.slice(kt,kt=ct[ge++]),Me=qr(ct[ge++],st.cm.options)}}}function Xo(it,st,ct){this.line=st,this.rest=uo(st),this.size=this.rest?le(Ce(this.rest))-ct+1:1,this.node=this.text=null,this.hidden=Wn(it,st)}function bo(it,st,ct){for(var dt=[],pt,kt=st;kt<ct;kt=pt){var Rt=new Xo(it.doc,Qe(it.doc,kt),kt);pt=kt+Rt.size,dt.push(Rt)}return dt}var Ao=null;function ur(it){Ao?Ao.ops.push(it):it.ownsGroup=Ao={ops:[it],delayedCallbacks:[]}}function no(it){var st=it.delayedCallbacks,ct=0;do{for(;ct<st.length;ct++)st[ct].call(null);for(var dt=0;dt<it.ops.length;dt++){var pt=it.ops[dt];if(pt.cursorActivityHandlers)for(;pt.cursorActivityCalled<pt.cursorActivityHandlers.length;)pt.cursorActivityHandlers[pt.cursorActivityCalled++].call(null,pt.cm)}}while(ct<st.length)}function ko(it,st){var ct=it.ownsGroup;if(ct)try{no(ct)}finally{Ao=null,st(ct)}}var No=null;function mi(it,st){var ct=En(it,st);if(ct.length){var dt=Array.prototype.slice.call(arguments,2),pt;Ao?pt=Ao.delayedCallbacks:No?pt=No:(pt=No=[],setTimeout(Fr,0));for(var kt=function(Qt){pt.push(function(){return ct[Qt].apply(null,dt)})},Rt=0;Rt<ct.length;++Rt)kt(Rt)}}function Fr(){var it=No;No=null;for(var st=0;st<it.length;++st)it[st]()}function Or(it,st,ct,dt){for(var pt=0;pt<st.changes.length;pt++){var kt=st.changes[pt];kt=="text"?ri(it,st):kt=="gutter"?Dr(it,st,ct,dt):kt=="class"?hr(it,st):kt=="widget"&&Js(it,st,dt)}st.changes=null}function jr(it){return it.node==it.text&&(it.node=Wt("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),$t&&Ut<8&&(it.node.style.zIndex=2)),it.node}function xa(it,st){var ct=st.bgClass?st.bgClass+" "+(st.line.bgClass||""):st.line.bgClass;if(ct&&(ct+=" CodeMirror-linebackground"),st.background)ct?st.background.className=ct:(st.background.parentNode.removeChild(st.background),st.background=null);else if(ct){var dt=jr(st);st.background=dt.insertBefore(Wt("div",null,ct),dt.firstChild),it.display.input.setUneditable(st.background)}}function Ta(it,st){var ct=it.display.externalMeasured;return ct&&ct.line==st.line?(it.display.externalMeasured=null,st.measure=ct.measure,ct.built):sn(it,st)}function ri(it,st){var ct=st.text.className,dt=Ta(it,st);st.text==st.node&&(st.node=dt.pre),st.text.parentNode.replaceChild(dt.pre,st.text),st.text=dt.pre,dt.bgClass!=st.bgClass||dt.textClass!=st.textClass?(st.bgClass=dt.bgClass,st.textClass=dt.textClass,hr(it,st)):ct&&(st.text.className=ct)}function hr(it,st){xa(it,st),st.line.wrapClass?jr(st).className=st.line.wrapClass:st.node!=st.text&&(st.node.className="");var ct=st.textClass?st.textClass+" "+(st.line.textClass||""):st.line.textClass;st.text.className=ct||""}function Dr(it,st,ct,dt){if(st.gutter&&(st.node.removeChild(st.gutter),st.gutter=null),st.gutterBackground&&(st.node.removeChild(st.gutterBackground),st.gutterBackground=null),st.line.gutterClass){var pt=jr(st);st.gutterBackground=Wt("div",null,"CodeMirror-gutter-background "+st.line.gutterClass,"left: "+(it.options.fixedGutter?dt.fixedPos:-dt.gutterTotalWidth)+"px; width: "+dt.gutterTotalWidth+"px"),it.display.input.setUneditable(st.gutterBackground),pt.insertBefore(st.gutterBackground,st.text)}var kt=st.line.gutterMarkers;if(it.options.lineNumbers||kt){var Rt=jr(st),Qt=st.gutter=Wt("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?dt.fixedPos:-dt.gutterTotalWidth)+"px");if(it.display.input.setUneditable(Qt),Rt.insertBefore(Qt,st.text),st.line.gutterClass&&(Qt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!kt||!kt["CodeMirror-linenumbers"])&&(st.lineNumber=Qt.appendChild(Wt("div",si(it.options,ct),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+dt.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),kt)for(var Xt=0;Xt<it.display.gutterSpecs.length;++Xt){var ge=it.display.gutterSpecs[Xt].className,en=kt.hasOwnProperty(ge)&&kt[ge];en&&Qt.appendChild(Wt("div",[en],"CodeMirror-gutter-elt","left: "+dt.gutterLeft[ge]+"px; width: "+dt.gutterWidth[ge]+"px"))}}}function Js(it,st,ct){st.alignable&&(st.alignable=null);for(var dt=Nt("CodeMirror-linewidget"),pt=st.node.firstChild,kt=void 0;pt;pt=kt)kt=pt.nextSibling,dt.test(pt.className)&&st.node.removeChild(pt);sa(it,st,ct)}function Nl(it,st,ct,dt){var pt=Ta(it,st);return st.text=st.node=pt.pre,pt.bgClass&&(st.bgClass=pt.bgClass),pt.textClass&&(st.textClass=pt.textClass),hr(it,st),Dr(it,st,ct,dt),sa(it,st,dt),st.node}function sa(it,st,ct){if(po(it,st.line,st,ct,!0),st.rest)for(var dt=0;dt<st.rest.length;dt++)po(it,st.rest[dt],st,ct,!1)}function po(it,st,ct,dt,pt){if(st.widgets)for(var kt=jr(ct),Rt=0,Qt=st.widgets;Rt<Qt.length;++Rt){var Xt=Qt[Rt],ge=Wt("div",[Xt.node],"CodeMirror-linewidget"+(Xt.className?" "+Xt.className:""));Xt.handleMouseEvents||ge.setAttribute("cm-ignore-events","true"),hu(Xt,ge,ct,dt),it.display.input.setUneditable(ge),pt&&Xt.above?kt.insertBefore(ge,ct.gutter||ct.text):kt.appendChild(ge),mi(Xt,"redraw")}}function hu(it,st,ct,dt){if(it.noHScroll){(ct.alignable||(ct.alignable=[])).push(st);var pt=dt.wrapperWidth;st.style.left=dt.fixedPos+"px",it.coverGutter||(pt-=dt.gutterTotalWidth,st.style.paddingLeft=dt.gutterTotalWidth+"px"),st.style.width=pt+"px"}it.coverGutter&&(st.style.zIndex=5,st.style.position="relative",it.noHScroll||(st.style.marginLeft=-dt.gutterTotalWidth+"px"))}function Gs(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!Ie(document.body,it.node)){var ct="position: relative;";it.coverGutter&&(ct+="margin-left: -"+st.display.gutters.offsetWidth+"px;"),it.noHScroll&&(ct+="width: "+st.display.wrapper.clientWidth+"px;"),Kt(st.display.measure,Wt("div",[it.node],null,ct))}return it.height=it.node.parentNode.offsetHeight}function bs(it,st){for(var ct=Bi(st);ct!=it.wrapper;ct=ct.parentNode)if(!ct||ct.nodeType==1&&ct.getAttribute("cm-ignore-events")=="true"||ct.parentNode==it.sizer&&ct!=it.mover)return!0}function Ws(it){return it.lineSpace.offsetTop}function Tl(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function vl(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=Kt(it.measure,Wt("pre","x","CodeMirror-line-like")),ct=window.getComputedStyle?window.getComputedStyle(st):st.currentStyle,dt={left:parseInt(ct.paddingLeft),right:parseInt(ct.paddingRight)};return!isNaN(dt.left)&&!isNaN(dt.right)&&(it.cachedPaddingH=dt),dt}function Ks(it){return pn-it.display.nativeBarWidth}function aa(it){return it.display.scroller.clientWidth-Ks(it)-it.display.barWidth}function Kl(it){return it.display.scroller.clientHeight-Ks(it)-it.display.barHeight}function Du(it,st,ct){var dt=it.options.lineWrapping,pt=dt&&aa(it);if(!st.measure.heights||dt&&st.measure.width!=pt){var kt=st.measure.heights=[];if(dt){st.measure.width=pt;for(var Rt=st.text.firstChild.getClientRects(),Qt=0;Qt<Rt.length-1;Qt++){var Xt=Rt[Qt],ge=Rt[Qt+1];Math.abs(Xt.bottom-ge.bottom)>2&&kt.push((Xt.bottom+ge.top)/2-ct.top)}}kt.push(ct.bottom-ct.top)}}function hs(it,st,ct){if(it.line==st)return{map:it.measure.map,cache:it.measure.cache};for(var dt=0;dt<it.rest.length;dt++)if(it.rest[dt]==st)return{map:it.measure.maps[dt],cache:it.measure.caches[dt]};for(var pt=0;pt<it.rest.length;pt++)if(le(it.rest[pt])>ct)return{map:it.measure.maps[pt],cache:it.measure.caches[pt],before:!0}}function xh(it,st){st=Mi(st);var ct=le(st),dt=it.display.externalMeasured=new Xo(it.doc,st,ct);dt.lineN=ct;var pt=dt.built=sn(it,dt);return dt.text=pt.pre,Kt(it.display.lineMeasure,pt.pre),dt}function $l(it,st,ct,dt){return Qs(it,$a(it,st),ct,dt)}function du(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[_a(it,st)];var ct=it.display.externalMeasured;if(ct&&st>=ct.lineN&&st<ct.lineN+ct.size)return ct}function $a(it,st){var ct=le(st),dt=du(it,ct);dt&&!dt.text?dt=null:dt&&dt.changes&&(Or(it,dt,ct,zc(it)),it.curOp.forceUpdate=!0),dt||(dt=xh(it,st));var pt=hs(dt,st,ct);return{line:st,view:dt,rect:null,map:pt.map,cache:pt.cache,before:pt.before,hasHeights:!1}}function Qs(it,st,ct,dt,pt){st.before&&(ct=-1);var kt=ct+(dt||""),Rt;return st.cache.hasOwnProperty(kt)?Rt=st.cache[kt]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(Du(it,st.view,st.rect),st.hasHeights=!0),Rt=wi(it,st,ct,dt),Rt.bogus||(st.cache[kt]=Rt)),{left:Rt.left,right:Rt.right,top:pt?Rt.rtop:Rt.top,bottom:pt?Rt.rbottom:Rt.bottom}}var qn={left:0,right:0,top:0,bottom:0};function li(it,st,ct){for(var dt,pt,kt,Rt,Qt,Xt,ge=0;ge<it.length;ge+=3)if(Qt=it[ge],Xt=it[ge+1],st<Qt?(pt=0,kt=1,Rt="left"):st<Xt?(pt=st-Qt,kt=pt+1):(ge==it.length-3||st==Xt&&it[ge+3]>st)&&(kt=Xt-Qt,pt=kt-1,st>=Xt&&(Rt="right")),pt!=null){if(dt=it[ge+2],Qt==Xt&&ct==(dt.insertLeft?"left":"right")&&(Rt=ct),ct=="left"&&pt==0)for(;ge&&it[ge-2]==it[ge-3]&&it[ge-1].insertLeft;)dt=it[(ge-=3)+2],Rt="left";if(ct=="right"&&pt==Xt-Qt)for(;ge<it.length-3&&it[ge+3]==it[ge+4]&&!it[ge+5].insertLeft;)dt=it[(ge+=3)+2],Rt="right";break}return{node:dt,start:pt,end:kt,collapse:Rt,coverStart:Qt,coverEnd:Xt}}function Vi(it,st){var ct=qn;if(st=="left")for(var dt=0;dt<it.length&&(ct=it[dt]).left==ct.right;dt++);else for(var pt=it.length-1;pt>=0&&(ct=it[pt]).left==ct.right;pt--);return ct}function wi(it,st,ct,dt){var pt=li(st.map,ct,dt),kt=pt.node,Rt=pt.start,Qt=pt.end,Xt=pt.collapse,ge;if(kt.nodeType==3){for(var en=0;en<4;en++){for(;Rt&&pe(st.line.text.charAt(pt.coverStart+Rt));)--Rt;for(;pt.coverStart+Qt<pt.coverEnd&&pe(st.line.text.charAt(pt.coverStart+Qt));)++Qt;if($t&&Ut<9&&Rt==0&&Qt==pt.coverEnd-pt.coverStart?ge=kt.parentNode.getBoundingClientRect():ge=Vi(Vt(kt,Rt,Qt).getClientRects(),dt),ge.left||ge.right||Rt==0)break;Qt=Rt,Rt=Rt-1,Xt="right"}$t&&Ut<11&&(ge=Hi(it.display.measure,ge))}else{Rt>0&&(Xt=dt="right");var Me;it.options.lineWrapping&&(Me=kt.getClientRects()).length>1?ge=Me[dt=="right"?Me.length-1:0]:ge=kt.getBoundingClientRect()}if($t&&Ut<9&&!Rt&&(!ge||!ge.left&&!ge.right)){var Fn=kt.parentNode.getClientRects()[0];Fn?ge={left:Fn.left,right:Fn.left+wh(it.display),top:Fn.top,bottom:Fn.bottom}:ge=qn}for(var Mn=ge.top-st.rect.top,hi=ge.bottom-st.rect.top,gi=(Mn+hi)/2,bi=st.view.measure.heights,_i=0;_i<bi.length-1&&!(gi<bi[_i]);_i++);var ho=_i?bi[_i-1]:0,qi=bi[_i],mo={left:(Xt=="right"?ge.right:ge.left)-st.rect.left,right:(Xt=="left"?ge.left:ge.right)-st.rect.left,top:ho,bottom:qi};return!ge.left&&!ge.right&&(mo.bogus=!0),it.options.singleCursorHeightPerLine||(mo.rtop=Mn,mo.rbottom=hi),mo}function Hi(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Wi(it))return st;var ct=screen.logicalXDPI/screen.deviceXDPI,dt=screen.logicalYDPI/screen.deviceYDPI;return{left:st.left*ct,right:st.right*ct,top:st.top*dt,bottom:st.bottom*dt}}function Fo(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var st=0;st<it.rest.length;st++)it.measure.caches[st]={}}function lr(it){it.display.externalMeasure=null,At(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)Fo(it.display.view[st])}function fr(it){lr(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function gr(){return we&&et?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Sr(){return we&&et?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function xr(it){var st=0;if(it.widgets)for(var ct=0;ct<it.widgets.length;++ct)it.widgets[ct].above&&(st+=Gs(it.widgets[ct]));return st}function yr(it,st,ct,dt,pt){if(!pt){var kt=xr(st);ct.top+=kt,ct.bottom+=kt}if(dt=="line")return ct;dt||(dt="local");var Rt=xo(st);if(dt=="local"?Rt+=Ws(it.display):Rt-=it.display.viewOffset,dt=="page"||dt=="window"){var Qt=it.display.lineSpace.getBoundingClientRect();Rt+=Qt.top+(dt=="window"?0:Sr());var Xt=Qt.left+(dt=="window"?0:gr());ct.left+=Xt,ct.right+=Xt}return ct.top+=Rt,ct.bottom+=Rt,ct}function Za(it,st,ct){if(ct=="div")return st;var dt=st.left,pt=st.top;if(ct=="page")dt-=gr(),pt-=Sr();else if(ct=="local"||!ct){var kt=it.display.sizer.getBoundingClientRect();dt+=kt.left,pt+=kt.top}var Rt=it.display.lineSpace.getBoundingClientRect();return{left:dt-Rt.left,top:pt-Rt.top}}function la(it,st,ct,dt,pt){return dt||(dt=Qe(it.doc,st.line)),yr(it,dt,$l(it,dt,st.ch,pt),ct)}function Cr(it,st,ct,dt,pt,kt){dt=dt||Qe(it.doc,st.line),pt||(pt=$a(it,dt));function Rt(hi,gi){var bi=Qs(it,pt,hi,gi?"right":"left",kt);return gi?bi.left=bi.right:bi.right=bi.left,yr(it,dt,bi,ct)}var Qt=hn(dt,it.doc.direction),Xt=st.ch,ge=st.sticky;if(Xt>=dt.text.length?(Xt=dt.text.length,ge="before"):Xt<=0&&(Xt=0,ge="after"),!Qt)return Rt(ge=="before"?Xt-1:Xt,ge=="before");function en(hi,gi,bi){var _i=Qt[gi],ho=_i.level==1;return Rt(bi?hi-1:hi,ho!=bi)}var Me=ne(Qt,Xt,ge),Fn=ce,Mn=en(Xt,Me,ge=="before");return Fn!=null&&(Mn.other=en(Xt,Fn,ge!="before")),Mn}function Bu(it,st){var ct=0;st=xn(it.doc,st),it.options.lineWrapping||(ct=wh(it.display)*st.ch);var dt=Qe(it.doc,st.line),pt=xo(dt)+Ws(it.display);return{left:ct,right:ct,top:pt,bottom:pt+dt.height}}function hd(it,st,ct,dt,pt){var kt=Re(it,st,ct);return kt.xRel=pt,dt&&(kt.outside=dt),kt}function Ph(it,st,ct){var dt=it.doc;if(ct+=it.display.viewOffset,ct<0)return hd(dt.first,0,null,-1,-1);var pt=mn(dt,ct),kt=dt.first+dt.size-1;if(pt>kt)return hd(dt.first+dt.size-1,Qe(dt,kt).text.length,null,1,1);st<0&&(st=0);for(var Rt=Qe(dt,pt);;){var Qt=Kn(it,Rt,pt,st,ct),Xt=xi(Rt,Qt.ch+(Qt.xRel>0||Qt.outside>0?1:0));if(!Xt)return Qt;var ge=Xt.find(1);if(ge.line==pt)return ge;Rt=Qe(dt,pt=ge.line)}}function eo(it,st,ct,dt){dt-=xr(st);var pt=st.text.length,kt=Zt(function(Rt){return Qs(it,ct,Rt-1).bottom<=dt},pt,0);return pt=Zt(function(Rt){return Qs(it,ct,Rt).top>dt},kt,pt),{begin:kt,end:pt}}function Qf(it,st,ct,dt){ct||(ct=$a(it,st));var pt=yr(it,st,Qs(it,ct,dt),"line").top;return eo(it,st,ct,pt)}function Te(it,st,ct,dt){return it.bottom<=ct?!1:it.top>ct?!0:(dt?it.left:it.right)>st}function Kn(it,st,ct,dt,pt){pt-=xo(st);var kt=$a(it,st),Rt=xr(st),Qt=0,Xt=st.text.length,ge=!0,en=hn(st,it.doc.direction);if(en){var Me=(it.options.lineWrapping?Bp:Dp)(it,st,ct,kt,en,dt,pt);ge=Me.level!=1,Qt=ge?Me.from:Me.to-1,Xt=ge?Me.to:Me.from-1}var Fn=null,Mn=null,hi=Zt(function(Io){var Ji=Qs(it,kt,Io);return Ji.top+=Rt,Ji.bottom+=Rt,Te(Ji,dt,pt,!1)?(Ji.top<=pt&&Ji.left<=dt&&(Fn=Io,Mn=Ji),!0):!1},Qt,Xt),gi,bi,_i=!1;if(Mn){var ho=dt-Mn.left<Mn.right-dt,qi=ho==ge;hi=Fn+(qi?0:1),bi=qi?"after":"before",gi=ho?Mn.left:Mn.right}else{!ge&&(hi==Xt||hi==Qt)&&hi++,bi=hi==0?"after":hi==st.text.length?"before":Qs(it,kt,hi-(ge?1:0)).bottom+Rt<=pt==ge?"after":"before";var mo=Cr(it,Re(ct,hi,bi),"line",st,kt);gi=mo.left,_i=pt<mo.top?-1:pt>=mo.bottom?1:0}return hi=qt(st.text,hi,1),hd(ct,hi,bi,_i,dt-gi)}function Dp(it,st,ct,dt,pt,kt,Rt){var Qt=Zt(function(Me){var Fn=pt[Me],Mn=Fn.level!=1;return Te(Cr(it,Re(ct,Mn?Fn.to:Fn.from,Mn?"before":"after"),"line",st,dt),kt,Rt,!0)},0,pt.length-1),Xt=pt[Qt];if(Qt>0){var ge=Xt.level!=1,en=Cr(it,Re(ct,ge?Xt.from:Xt.to,ge?"after":"before"),"line",st,dt);Te(en,kt,Rt,!0)&&en.top>Rt&&(Xt=pt[Qt-1])}return Xt}function Bp(it,st,ct,dt,pt,kt,Rt){var Qt=eo(it,st,dt,Rt),Xt=Qt.begin,ge=Qt.end;/\s/.test(st.text.charAt(ge-1))&&ge--;for(var en=null,Me=null,Fn=0;Fn<pt.length;Fn++){var Mn=pt[Fn];if(!(Mn.from>=ge||Mn.to<=Xt)){var hi=Mn.level!=1,gi=Qs(it,dt,hi?Math.min(ge,Mn.to)-1:Math.max(Xt,Mn.from)).right,bi=gi<kt?kt-gi+1e9:gi-kt;(!en||Me>bi)&&(en=Mn,Me=bi)}}return en||(en=pt[pt.length-1]),en.from<Xt&&(en={from:Xt,to:en.to,level:en.level}),en.to>ge&&(en={from:en.from,to:ge,level:en.level}),en}var cu;function fu(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(cu==null){cu=Wt("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)cu.appendChild(document.createTextNode("x")),cu.appendChild(Wt("br"));cu.appendChild(document.createTextNode("x"))}Kt(it.measure,cu);var ct=cu.offsetHeight/50;return ct>3&&(it.cachedTextHeight=ct),At(it.measure),ct||1}function wh(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=Wt("span","xxxxxxxxxx"),ct=Wt("pre",[st],"CodeMirror-line-like");Kt(it.measure,ct);var dt=st.getBoundingClientRect(),pt=(dt.right-dt.left)/10;return pt>2&&(it.cachedCharWidth=pt),pt||10}function zc(it){for(var st=it.display,ct={},dt={},pt=st.gutters.clientLeft,kt=st.gutters.firstChild,Rt=0;kt;kt=kt.nextSibling,++Rt){var Qt=it.display.gutterSpecs[Rt].className;ct[Qt]=kt.offsetLeft+kt.clientLeft+pt,dt[Qt]=kt.clientWidth}return{fixedPos:Vd(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:ct,gutterWidth:dt,wrapperWidth:st.wrapper.clientWidth}}function Vd(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function Wr(it){var st=fu(it.display),ct=it.options.lineWrapping,dt=ct&&Math.max(5,it.display.scroller.clientWidth/wh(it.display)-3);return function(pt){if(Wn(it.doc,pt))return 0;var kt=0;if(pt.widgets)for(var Rt=0;Rt<pt.widgets.length;Rt++)pt.widgets[Rt].height&&(kt+=pt.widgets[Rt].height);return ct?kt+(Math.ceil(pt.text.length/dt)||1)*st:kt+st}}function Po(it){var st=it.doc,ct=Wr(it);st.iter(function(dt){var pt=ct(dt);pt!=dt.height&&_n(dt,pt)})}function ua(it,st,ct,dt){var pt=it.display;if(!ct&&Bi(st).getAttribute("cm-not-content")=="true")return null;var kt,Rt,Qt=pt.lineSpace.getBoundingClientRect();try{kt=st.clientX-Qt.left,Rt=st.clientY-Qt.top}catch(Me){return null}var Xt=Ph(it,kt,Rt),ge;if(dt&&Xt.xRel>0&&(ge=Qe(it.doc,Xt.line).text).length==Xt.ch){var en=ue(ge,ge.length,it.options.tabSize)-ge.length;Xt=Re(Xt.line,Math.max(0,Math.round((kt-vl(it.display).left)/wh(it.display))-en))}return Xt}function _a(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var ct=it.display.view,dt=0;dt<ct.length;dt++)if(st-=ct[dt].size,st<0)return dt}function Kr(it,st,ct,dt){st==null&&(st=it.doc.first),ct==null&&(ct=it.doc.first+it.doc.size),dt||(dt=0);var pt=it.display;if(dt&&ct<pt.viewTo&&(pt.updateLineNumbers==null||pt.updateLineNumbers>st)&&(pt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=pt.viewTo)qe&&Pi(it.doc,st)<pt.viewTo&&rs(it);else if(ct<=pt.viewFrom)qe&&Ni(it.doc,ct+dt)>pt.viewFrom?rs(it):(pt.viewFrom+=dt,pt.viewTo+=dt);else if(st<=pt.viewFrom&&ct>=pt.viewTo)rs(it);else if(st<=pt.viewFrom){var kt=Pa(it,ct,ct+dt,1);kt?(pt.view=pt.view.slice(kt.index),pt.viewFrom=kt.lineN,pt.viewTo+=dt):rs(it)}else if(ct>=pt.viewTo){var Rt=Pa(it,st,st,-1);Rt?(pt.view=pt.view.slice(0,Rt.index),pt.viewTo=Rt.lineN):rs(it)}else{var Qt=Pa(it,st,st,-1),Xt=Pa(it,ct,ct+dt,1);Qt&&Xt?(pt.view=pt.view.slice(0,Qt.index).concat(bo(it,Qt.lineN,Xt.lineN)).concat(pt.view.slice(Xt.index)),pt.viewTo+=dt):rs(it)}var ge=pt.externalMeasured;ge&&(ct<ge.lineN?ge.lineN+=dt:st<ge.lineN+ge.size&&(pt.externalMeasured=null))}function Zo(it,st,ct){it.curOp.viewChanged=!0;var dt=it.display,pt=it.display.externalMeasured;if(pt&&st>=pt.lineN&&st<pt.lineN+pt.size&&(dt.externalMeasured=null),!(st<dt.viewFrom||st>=dt.viewTo)){var kt=dt.view[_a(it,st)];if(kt.node!=null){var Rt=kt.changes||(kt.changes=[]);ke(Rt,ct)==-1&&Rt.push(ct)}}}function rs(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Pa(it,st,ct,dt){var pt=_a(it,st),kt,Rt=it.display.view;if(!qe||ct==it.doc.first+it.doc.size)return{index:pt,lineN:ct};for(var Qt=it.display.viewFrom,Xt=0;Xt<pt;Xt++)Qt+=Rt[Xt].size;if(Qt!=st){if(dt>0){if(pt==Rt.length-1)return null;kt=Qt+Rt[pt].size-st,pt++}else kt=Qt-st;st+=kt,ct+=kt}for(;Pi(it.doc,ct)!=ct;){if(pt==(dt<0?0:Rt.length-1))return null;ct+=dt*Rt[pt-(dt<0?1:0)].size,pt+=dt}return{index:pt,lineN:ct}}function Tr(it,st,ct){var dt=it.display,pt=dt.view;pt.length==0||st>=dt.viewTo||ct<=dt.viewFrom?(dt.view=bo(it,st,ct),dt.viewFrom=st):(dt.viewFrom>st?dt.view=bo(it,st,dt.viewFrom).concat(dt.view):dt.viewFrom<st&&(dt.view=dt.view.slice(_a(it,st))),dt.viewFrom=st,dt.viewTo<ct?dt.view=dt.view.concat(bo(it,dt.viewTo,ct)):dt.viewTo>ct&&(dt.view=dt.view.slice(0,_a(it,ct)))),dt.viewTo=ct}function Fa(it){for(var st=it.display.view,ct=0,dt=0;dt<st.length;dt++){var pt=st[dt];!pt.hidden&&(!pt.node||pt.changes)&&++ct}return ct}function ms(it){it.display.input.showSelection(it.display.input.prepareSelection())}function Au(it,st){st===void 0&&(st=!0);for(var ct=it.doc,dt={},pt=dt.cursors=document.createDocumentFragment(),kt=dt.selection=document.createDocumentFragment(),Rt=0;Rt<ct.sel.ranges.length;Rt++)if(!(!st&&Rt==ct.sel.primIndex)){var Qt=ct.sel.ranges[Rt];if(!(Qt.from().line>=it.display.viewTo||Qt.to().line<it.display.viewFrom)){var Xt=Qt.empty();(Xt||it.options.showCursorWhenSelecting)&&ir(it,Qt.head,pt),Xt||tr(it,Qt,kt)}}return dt}function ir(it,st,ct){var dt=Cr(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),pt=ct.appendChild(Wt("div","\xA0","CodeMirror-cursor"));if(pt.style.left=dt.left+"px",pt.style.top=dt.top+"px",pt.style.height=Math.max(0,dt.bottom-dt.top)*it.options.cursorHeight+"px",dt.other){var kt=ct.appendChild(Wt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));kt.style.display="",kt.style.left=dt.other.left+"px",kt.style.top=dt.other.top+"px",kt.style.height=(dt.other.bottom-dt.other.top)*.85+"px"}}function ha(it,st){return it.top-st.top||it.left-st.left}function tr(it,st,ct){var dt=it.display,pt=it.doc,kt=document.createDocumentFragment(),Rt=vl(it.display),Qt=Rt.left,Xt=Math.max(dt.sizerWidth,aa(it)-dt.sizer.offsetLeft)-Rt.right,ge=pt.direction=="ltr";function en(qi,mo,Io,Ji){mo<0&&(mo=0),mo=Math.round(mo),Ji=Math.round(Ji),kt.appendChild(Wt("div",null,"CodeMirror-selected","position: absolute; left: "+qi+`px;
|
|
|
top: `+mo+"px; width: "+(Io==null?Xt-qi:Io)+`px;
|
|
|
height: `+(Ji-mo)+"px"))}function Me(qi,mo,Io){var Ji=Qe(pt,qi),Vo=Ji.text.length,$r,Ss;function Jr(fs,Aa){return la(it,Re(qi,fs),"div",Ji,Aa)}function ba(fs,Aa,Zs){var gs=Qf(it,Ji,null,fs),cr=Aa=="ltr"==(Zs=="after")?"left":"right",es=Zs=="after"?gs.begin:gs.end-(/\s/.test(Ji.text.charAt(gs.end-1))?2:1);return Jr(es,cr)[cr]}var ta=hn(Ji,pt.direction);return fe(ta,mo||0,Io==null?Vo:Io,function(fs,Aa,Zs,gs){var cr=Zs=="ltr",es=Jr(fs,cr?"left":"right"),Ts=Jr(Aa-1,cr?"right":"left"),_s=mo==null&&fs==0,Sl=Io==null&&Aa==Vo,Qr=gs==0,ll=!ta||gs==ta.length-1;if(Ts.top-es.top<=3){var os=(ge?_s:Sl)&&Qr,mc=(ge?Sl:_s)&&ll,Ya=os?Qt:(cr?es:Ts).left,Ia=mc?Xt:(cr?Ts:es).right;en(Ya,es.top,Ia-Ya,es.bottom)}else{var La,Ar,Fs,Yl;cr?(La=ge&&_s&&Qr?Qt:es.left,Ar=ge?Xt:ba(fs,Zs,"before"),Fs=ge?Qt:ba(Aa,Zs,"after"),Yl=ge&&Sl&&ll?Xt:Ts.right):(La=ge?ba(fs,Zs,"before"):Qt,Ar=!ge&&_s&&Qr?Xt:es.right,Fs=!ge&&Sl&&ll?Qt:Ts.left,Yl=ge?ba(Aa,Zs,"after"):Xt),en(La,es.top,Ar-La,es.bottom),es.bottom<Ts.top&&en(Qt,es.bottom,null,Ts.top),en(Fs,Ts.top,Yl-Fs,Ts.bottom)}(!$r||ha(es,$r)<0)&&($r=es),ha(Ts,$r)<0&&($r=Ts),(!Ss||ha(es,Ss)<0)&&(Ss=es),ha(Ts,Ss)<0&&(Ss=Ts)}),{start:$r,end:Ss}}var Fn=st.from(),Mn=st.to();if(Fn.line==Mn.line)Me(Fn.line,Fn.ch,Mn.ch);else{var hi=Qe(pt,Fn.line),gi=Qe(pt,Mn.line),bi=Mi(hi)==Mi(gi),_i=Me(Fn.line,Fn.ch,bi?hi.text.length+1:null).end,ho=Me(Mn.line,bi?0:null,Mn.ch).start;bi&&(_i.top<ho.top-2?(en(_i.right,_i.top,null,_i.bottom),en(Qt,ho.top,ho.left,ho.bottom)):en(_i.right,_i.top,ho.left-_i.right,_i.bottom)),_i.bottom<ho.top&&en(Qt,_i.bottom,null,ho.top)}ct.appendChild(kt)}function br(it){if(it.state.focused){var st=it.display;clearInterval(st.blinker);var ct=!0;st.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?st.blinker=setInterval(function(){it.hasFocus()||Ch(it),st.cursorDiv.style.visibility=(ct=!ct)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function zr(it){it.state.focused||(it.display.input.focus(),or(it))}function Vr(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,Ch(it))},100)}function or(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(ye(it,"focus",it,st),it.state.focused=!0,Ye(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),Jt&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),br(it))}function Ch(it,st){it.state.delayingBlurEvent||(it.state.focused&&(ye(it,"blur",it,st),it.state.focused=!1,Dt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function yo(it){for(var st=it.display,ct=st.lineDiv.offsetTop,dt=0;dt<st.view.length;dt++){var pt=st.view[dt],kt=it.options.lineWrapping,Rt=void 0,Qt=0;if(!pt.hidden){if($t&&Ut<8){var Xt=pt.node.offsetTop+pt.node.offsetHeight;Rt=Xt-ct,ct=Xt}else{var ge=pt.node.getBoundingClientRect();Rt=ge.bottom-ge.top,!kt&&pt.text.firstChild&&(Qt=pt.text.firstChild.getBoundingClientRect().right-ge.left-1)}var en=pt.line.height-Rt;if((en>.005||en<-.005)&&(_n(pt.line,Rt),Ap(pt.line),pt.rest))for(var Me=0;Me<pt.rest.length;Me++)Ap(pt.rest[Me]);if(Qt>it.display.sizerWidth){var Fn=Math.ceil(Qt/wh(it.display));Fn>it.display.maxLineLength&&(it.display.maxLineLength=Fn,it.display.maxLine=pt.line,it.display.maxLineChanged=!0)}}}}function Ap(it){if(it.widgets)for(var st=0;st<it.widgets.length;++st){var ct=it.widgets[st],dt=ct.node.parentNode;dt&&(ct.height=dt.offsetHeight)}}function qo(it,st,ct){var dt=ct&&ct.top!=null?Math.max(0,ct.top):it.scroller.scrollTop;dt=Math.floor(dt-Ws(it));var pt=ct&&ct.bottom!=null?ct.bottom:dt+it.wrapper.clientHeight,kt=mn(st,dt),Rt=mn(st,pt);if(ct&&ct.ensure){var Qt=ct.ensure.from.line,Xt=ct.ensure.to.line;Qt<kt?(kt=Qt,Rt=mn(st,xo(Qe(st,Qt))+it.wrapper.clientHeight)):Math.min(Xt,st.lastLine())>=Rt&&(kt=mn(st,xo(Qe(st,Xt))-it.wrapper.clientHeight),Rt=Xt)}return{from:kt,to:Math.max(Rt,kt+1)}}function Ip(it,st){if(!on(it,"scrollCursorIntoView")){var ct=it.display,dt=ct.sizer.getBoundingClientRect(),pt=null;if(st.top+dt.top<0?pt=!0:st.bottom+dt.top>(window.innerHeight||document.documentElement.clientHeight)&&(pt=!1),pt!=null&&!me){var kt=Wt("div","\u200B",null,`position: absolute;
|
|
|
top: `+(st.top-ct.viewOffset-Ws(it.display))+`px;
|
|
|
height: `+(st.bottom-st.top+Ks(it)+ct.barHeight)+`px;
|
|
|
left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(kt),kt.scrollIntoView(pt),it.display.lineSpace.removeChild(kt)}}}function dd(it,st,ct,dt){dt==null&&(dt=0);var pt;!it.options.lineWrapping&&st==ct&&(st=st.ch?Re(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,ct=st.sticky=="before"?Re(st.line,st.ch+1,"before"):st);for(var kt=0;kt<5;kt++){var Rt=!1,Qt=Cr(it,st),Xt=!ct||ct==st?Qt:Cr(it,ct);pt={left:Math.min(Qt.left,Xt.left),top:Math.min(Qt.top,Xt.top)-dt,right:Math.max(Qt.left,Xt.left),bottom:Math.max(Qt.bottom,Xt.bottom)+dt};var ge=qf(it,pt),en=it.doc.scrollTop,Me=it.doc.scrollLeft;if(ge.scrollTop!=null&&(Lh(it,ge.scrollTop),Math.abs(it.doc.scrollTop-en)>1&&(Rt=!0)),ge.scrollLeft!=null&&(pu(it,ge.scrollLeft),Math.abs(it.doc.scrollLeft-Me)>1&&(Rt=!0)),!Rt)break}return pt}function Ud(it,st){var ct=qf(it,st);ct.scrollTop!=null&&Lh(it,ct.scrollTop),ct.scrollLeft!=null&&pu(it,ct.scrollLeft)}function qf(it,st){var ct=it.display,dt=fu(it.display);st.top<0&&(st.top=0);var pt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ct.scroller.scrollTop,kt=Kl(it),Rt={};st.bottom-st.top>kt&&(st.bottom=st.top+kt);var Qt=it.doc.height+Tl(ct),Xt=st.top<dt,ge=st.bottom>Qt-dt;if(st.top<pt)Rt.scrollTop=Xt?0:st.top;else if(st.bottom>pt+kt){var en=Math.min(st.top,(ge?Qt:st.bottom)-kt);en!=pt&&(Rt.scrollTop=en)}var Me=it.options.fixedGutter?0:ct.gutters.offsetWidth,Fn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ct.scroller.scrollLeft-Me,Mn=aa(it)-ct.gutters.offsetWidth,hi=st.right-st.left>Mn;return hi&&(st.right=st.left+Mn),st.left<10?Rt.scrollLeft=0:st.left<Fn?Rt.scrollLeft=Math.max(0,st.left+Me-(hi?0:10)):st.right>Mn+Fn-3&&(Rt.scrollLeft=st.right+(hi?0:10)-Mn),Rt}function Hc(it,st){st!=null&&(Zl(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function gu(it){Zl(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function bh(it,st,ct){(st!=null||ct!=null)&&Zl(it),st!=null&&(it.curOp.scrollLeft=st),ct!=null&&(it.curOp.scrollTop=ct)}function rr(it,st){Zl(it),it.curOp.scrollToPos=st}function Zl(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var ct=Bu(it,st.from),dt=Bu(it,st.to);Gc(it,ct,dt,st.margin)}}function Gc(it,st,ct,dt){var pt=qf(it,{left:Math.min(st.left,ct.left),top:Math.min(st.top,ct.top)-dt,right:Math.max(st.right,ct.right),bottom:Math.max(st.bottom,ct.bottom)+dt});bh(it,pt.scrollLeft,pt.scrollTop)}function Lh(it,st){Math.abs(it.doc.scrollTop-st)<2||(vt||Gu(it,{top:st}),tg(it,st,!0),vt&&Gu(it),cd(it,100))}function tg(it,st,ct){st=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,st)),!(it.display.scroller.scrollTop==st&&!ct)&&(it.doc.scrollTop=st,it.display.scrollbars.setScrollTop(st),it.display.scroller.scrollTop!=st&&(it.display.scroller.scrollTop=st))}function pu(it,st,ct,dt){st=Math.max(0,Math.min(st,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((ct?st==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-st)<2)&&!dt)&&(it.doc.scrollLeft=st,$c(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function ol(it){var st=it.display,ct=st.gutters.offsetWidth,dt=Math.round(it.doc.height+Tl(it.display));return{clientHeight:st.scroller.clientHeight,viewHeight:st.wrapper.clientHeight,scrollWidth:st.scroller.scrollWidth,clientWidth:st.scroller.clientWidth,viewWidth:st.wrapper.clientWidth,barLeft:it.options.fixedGutter?ct:0,docHeight:dt,scrollHeight:dt+Ks(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:ct}}var Iu=function(it,st,ct){this.cm=ct;var dt=this.vert=Wt("div",[Wt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pt=this.horiz=Wt("div",[Wt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");dt.tabIndex=pt.tabIndex=-1,it(dt),it(pt),_e(dt,"scroll",function(){dt.clientHeight&&st(dt.scrollTop,"vertical")}),_e(pt,"scroll",function(){pt.clientWidth&&st(pt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,$t&&Ut<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Iu.prototype.update=function(it){var st=it.scrollWidth>it.clientWidth+1,ct=it.scrollHeight>it.clientHeight+1,dt=it.nativeBarWidth;if(ct){this.vert.style.display="block",this.vert.style.bottom=st?dt+"px":"0";var pt=it.viewHeight-(st?dt:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+pt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(st){this.horiz.style.display="block",this.horiz.style.right=ct?dt+"px":"0",this.horiz.style.left=it.barLeft+"px";var kt=it.viewWidth-it.barLeft-(ct?dt:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+kt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(dt==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ct?dt:0,bottom:st?dt:0}},Iu.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Iu.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Iu.prototype.zeroWidthHack=function(){var it=ht&&!re?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ht,this.disableVert=new Ht},Iu.prototype.enableZeroWidthBar=function(it,st,ct){it.style.pointerEvents="auto";function dt(){var pt=it.getBoundingClientRect(),kt=ct=="vert"?document.elementFromPoint(pt.right-1,(pt.top+pt.bottom)/2):document.elementFromPoint((pt.right+pt.left)/2,pt.bottom-1);kt!=it?it.style.pointerEvents="none":st.set(1e3,dt)}st.set(1e3,dt)},Iu.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var Fl=function(){};Fl.prototype.update=function(){return{bottom:0,right:0}},Fl.prototype.setScrollLeft=function(){},Fl.prototype.setScrollTop=function(){},Fl.prototype.clear=function(){};function Ru(it,st){st||(st=ol(it));var ct=it.display.barWidth,dt=it.display.barHeight;Wc(it,st);for(var pt=0;pt<4&&ct!=it.display.barWidth||dt!=it.display.barHeight;pt++)ct!=it.display.barWidth&&it.options.lineWrapping&&yo(it),Wc(it,ol(it)),ct=it.display.barWidth,dt=it.display.barHeight}function Wc(it,st){var ct=it.display,dt=ct.scrollbars.update(st);ct.sizer.style.paddingRight=(ct.barWidth=dt.right)+"px",ct.sizer.style.paddingBottom=(ct.barHeight=dt.bottom)+"px",ct.heightForcer.style.borderBottom=dt.bottom+"px solid transparent",dt.right&&dt.bottom?(ct.scrollbarFiller.style.display="block",ct.scrollbarFiller.style.height=dt.bottom+"px",ct.scrollbarFiller.style.width=dt.right+"px"):ct.scrollbarFiller.style.display="",dt.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(ct.gutterFiller.style.display="block",ct.gutterFiller.style.height=dt.bottom+"px",ct.gutterFiller.style.width=st.gutterWidth+"px"):ct.gutterFiller.style.display=""}var eg={native:Iu,null:Fl};function ng(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Dt(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new eg[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),_e(st,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),st.setAttribute("cm-not-content","true")},function(st,ct){ct=="horizontal"?pu(it,st):Lh(it,st)},it),it.display.scrollbars.addClass&&Ye(it.display.wrapper,it.display.scrollbars.addClass)}var Rp=0;function ju(it){it.curOp={cm:it,viewChanged:!1,startHeight:it.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Rp},ur(it.curOp)}function zu(it){var st=it.curOp;st&&ko(st,function(ct){for(var dt=0;dt<ct.ops.length;dt++)ct.ops[dt].cm.curOp=null;Q0(ct)})}function Q0(it){for(var st=it.ops,ct=0;ct<st.length;ct++)q0(st[ct]);for(var dt=0;dt<st.length;dt++)tv(st[dt]);for(var pt=0;pt<st.length;pt++)jp(st[pt]);for(var kt=0;kt<st.length;kt++)ts(st[kt]);for(var Rt=0;Rt<st.length;Rt++)Hu(st[Rt])}function q0(it){var st=it.cm,ct=st.display;zp(st),it.updateMaxLine&&Uo(st),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<ct.viewFrom||it.scrollToPos.to.line>=ct.viewTo)||ct.maxLineChanged&&st.options.lineWrapping,it.update=it.mustUpdate&&new Mh(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function tv(it){it.updatedDisplay=it.mustUpdate&&Kc(it.cm,it.update)}function jp(it){var st=it.cm,ct=st.display;it.updatedDisplay&&yo(st),it.barMeasure=ol(st),ct.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=$l(st,ct.maxLine,ct.maxLine.text.length).left+3,st.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(ct.scroller.clientWidth,ct.sizer.offsetLeft+it.adjustWidthTo+Ks(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,ct.sizer.offsetLeft+it.adjustWidthTo-aa(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ct.input.prepareSelection())}function ts(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&pu(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var ct=it.focus&&it.focus==Se();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,ct),(it.updatedDisplay||it.startHeight!=st.doc.height)&&Ru(st,it.barMeasure),it.updatedDisplay&&Ku(st,it.barMeasure),it.selectionChanged&&br(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),ct&&zr(it.cm)}function Hu(it){var st=it.cm,ct=st.display,dt=st.doc;if(it.updatedDisplay&&Lr(st,it.update),ct.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ct.wheelStartX=ct.wheelStartY=null),it.scrollTop!=null&&tg(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&pu(st,it.scrollLeft,!0,!0),it.scrollToPos){var pt=dd(st,xn(dt,it.scrollToPos.from),xn(dt,it.scrollToPos.to),it.scrollToPos.margin);Ip(st,pt)}var kt=it.maybeHiddenMarkers,Rt=it.maybeUnhiddenMarkers;if(kt)for(var Qt=0;Qt<kt.length;++Qt)kt[Qt].lines.length||ye(kt[Qt],"hide");if(Rt)for(var Xt=0;Xt<Rt.length;++Xt)Rt[Xt].lines.length&&ye(Rt[Xt],"unhide");ct.wrapper.offsetHeight&&(dt.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&ye(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function pr(it,st){if(it.curOp)return st();ju(it);try{return st()}finally{zu(it)}}function vs(it,st){return function(){if(it.curOp)return st.apply(it,arguments);ju(it);try{return st.apply(it,arguments)}finally{zu(it)}}}function Ls(it){return function(){if(this.curOp)return it.apply(this,arguments);ju(this);try{return it.apply(this,arguments)}finally{zu(this)}}}function Ms(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);ju(st);try{return it.apply(this,arguments)}finally{zu(st)}}}function cd(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,We(Es,it))}function Es(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var ct=+new Date+it.options.workTime,dt=Ei(it,st.highlightFrontier),pt=[];st.iter(dt.line,Math.min(st.first+st.size,it.display.viewTo+500),function(kt){if(dt.line>=it.display.viewFrom){var Rt=kt.styles,Qt=kt.text.length>it.options.maxHighlightLength?Je(st.mode,dt.state):null,Xt=Li(it,kt,dt,!0);Qt&&(dt.state=Qt),kt.styles=Xt.styles;var ge=kt.styleClasses,en=Xt.classes;en?kt.styleClasses=en:ge&&(kt.styleClasses=null);for(var Me=!Rt||Rt.length!=kt.styles.length||ge!=en&&(!ge||!en||ge.bgClass!=en.bgClass||ge.textClass!=en.textClass),Fn=0;!Me&&Fn<Rt.length;++Fn)Me=Rt[Fn]!=kt.styles[Fn];Me&&pt.push(dt.line),kt.stateAfter=dt.save(),dt.nextLine()}else kt.text.length<=it.options.maxHighlightLength&&nn(it,kt.text,dt),kt.stateAfter=dt.line%5==0?dt.save():null,dt.nextLine();if(+new Date>ct)return cd(it,it.options.workDelay),!0}),st.highlightFrontier=dt.line,st.modeFrontier=Math.max(st.modeFrontier,dt.line),pt.length&&pr(it,function(){for(var kt=0;kt<pt.length;kt++)Zo(it,pt[kt],"text")})}}var Mh=function(it,st,ct){var dt=it.display;this.viewport=st,this.visible=qo(dt,it.doc,st),this.editorIsHidden=!dt.wrapper.offsetWidth,this.wrapperHeight=dt.wrapper.clientHeight,this.wrapperWidth=dt.wrapper.clientWidth,this.oldDisplayWidth=aa(it),this.force=ct,this.dims=zc(it),this.events=[]};Mh.prototype.signal=function(it,st){Cn(it,st)&&this.events.push(arguments)},Mh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)ye.apply(null,this.events[it])};function zp(it){var st=it.display;!st.scrollbarsClipped&&st.scroller.offsetWidth&&(st.nativeBarWidth=st.scroller.offsetWidth-st.scroller.clientWidth,st.heightForcer.style.height=Ks(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=Ks(it)+"px",st.scrollbarsClipped=!0)}function Hp(it){if(it.hasFocus())return null;var st=Se();if(!st||!Ie(it.display.lineDiv,st))return null;var ct={activeElt:st};if(window.getSelection){var dt=window.getSelection();dt.anchorNode&&dt.extend&&Ie(it.display.lineDiv,dt.anchorNode)&&(ct.anchorNode=dt.anchorNode,ct.anchorOffset=dt.anchorOffset,ct.focusNode=dt.focusNode,ct.focusOffset=dt.focusOffset)}return ct}function wa(it){if(!(!it||!it.activeElt||it.activeElt==Se())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Ie(document.body,it.anchorNode)&&Ie(document.body,it.focusNode))){var st=window.getSelection(),ct=document.createRange();ct.setEnd(it.anchorNode,it.anchorOffset),ct.collapse(!1),st.removeAllRanges(),st.addRange(ct),st.extend(it.focusNode,it.focusOffset)}}function Kc(it,st){var ct=it.display,dt=it.doc;if(st.editorIsHidden)return rs(it),!1;if(!st.force&&st.visible.from>=ct.viewFrom&&st.visible.to<=ct.viewTo&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo)&&ct.renderedView==ct.view&&Fa(it)==0)return!1;ds(it)&&(rs(it),st.dims=zc(it));var pt=dt.first+dt.size,kt=Math.max(st.visible.from-it.options.viewportMargin,dt.first),Rt=Math.min(pt,st.visible.to+it.options.viewportMargin);ct.viewFrom<kt&&kt-ct.viewFrom<20&&(kt=Math.max(dt.first,ct.viewFrom)),ct.viewTo>Rt&&ct.viewTo-Rt<20&&(Rt=Math.min(pt,ct.viewTo)),qe&&(kt=Pi(it.doc,kt),Rt=Ni(it.doc,Rt));var Qt=kt!=ct.viewFrom||Rt!=ct.viewTo||ct.lastWrapHeight!=st.wrapperHeight||ct.lastWrapWidth!=st.wrapperWidth;Tr(it,kt,Rt),ct.viewOffset=xo(Qe(it.doc,ct.viewFrom)),it.display.mover.style.top=ct.viewOffset+"px";var Xt=Fa(it);if(!Qt&&Xt==0&&!st.force&&ct.renderedView==ct.view&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo))return!1;var ge=Hp(it);return Xt>4&&(ct.lineDiv.style.display="none"),ig(it,ct.updateLineNumbers,st.dims),Xt>4&&(ct.lineDiv.style.display=""),ct.renderedView=ct.view,wa(ge),At(ct.cursorDiv),At(ct.selectionDiv),ct.gutters.style.height=ct.sizer.style.minHeight=0,Qt&&(ct.lastWrapHeight=st.wrapperHeight,ct.lastWrapWidth=st.wrapperWidth,cd(it,400)),ct.updateLineNumbers=null,!0}function Lr(it,st){for(var ct=st.viewport,dt=!0;;dt=!1){if(!dt||!it.options.lineWrapping||st.oldDisplayWidth==aa(it)){if(ct&&ct.top!=null&&(ct={top:Math.min(it.doc.height+Tl(it.display)-Kl(it),ct.top)}),st.visible=qo(it.display,it.doc,ct),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else dt&&(st.visible=qo(it.display,it.doc,ct));if(!Kc(it,st))break;yo(it);var pt=ol(it);ms(it),Ru(it,pt),Ku(it,pt),st.force=!1}st.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(st.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function Gu(it,st){var ct=new Mh(it,st);if(Kc(it,ct)){yo(it),Lr(it,ct);var dt=ol(it);ms(it),Ru(it,dt),Ku(it,dt),ct.finish()}}function ig(it,st,ct){var dt=it.display,pt=it.options.lineNumbers,kt=dt.lineDiv,Rt=kt.firstChild;function Qt(hi){var gi=hi.nextSibling;return Jt&&ht&&it.display.currentWheelTarget==hi?hi.style.display="none":hi.parentNode.removeChild(hi),gi}for(var Xt=dt.view,ge=dt.viewFrom,en=0;en<Xt.length;en++){var Me=Xt[en];if(!Me.hidden)if(!Me.node||Me.node.parentNode!=kt){var Fn=Nl(it,Me,ge,ct);kt.insertBefore(Fn,Rt)}else{for(;Rt!=Me.node;)Rt=Qt(Rt);var Mn=pt&&st!=null&&st<=ge&&Me.lineNumber;Me.changes&&(ke(Me.changes,"gutter")>-1&&(Mn=!1),Or(it,Me,ge,ct)),Mn&&(At(Me.lineNumber),Me.lineNumber.appendChild(document.createTextNode(si(it.options,ge)))),Rt=Me.node.nextSibling}ge+=Me.size}for(;Rt;)Rt=Qt(Rt)}function Wu(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function Ku(it,st){it.display.sizer.style.minHeight=st.docHeight+"px",it.display.heightForcer.style.top=st.docHeight+"px",it.display.gutters.style.height=st.docHeight+it.display.barHeight+Ks(it)+"px"}function $c(it){var st=it.display,ct=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var dt=Vd(st)-st.scroller.scrollLeft+it.doc.scrollLeft,pt=st.gutters.offsetWidth,kt=dt+"px",Rt=0;Rt<ct.length;Rt++)if(!ct[Rt].hidden){it.options.fixedGutter&&(ct[Rt].gutter&&(ct[Rt].gutter.style.left=kt),ct[Rt].gutterBackground&&(ct[Rt].gutterBackground.style.left=kt));var Qt=ct[Rt].alignable;if(Qt)for(var Xt=0;Xt<Qt.length;Xt++)Qt[Xt].style.left=kt}it.options.fixedGutter&&(st.gutters.style.left=dt+pt+"px")}}function ds(it){if(!it.options.lineNumbers)return!1;var st=it.doc,ct=si(it.options,st.first+st.size-1),dt=it.display;if(ct.length!=dt.lineNumChars){var pt=dt.measure.appendChild(Wt("div",[Wt("div",ct)],"CodeMirror-linenumber CodeMirror-gutter-elt")),kt=pt.firstChild.offsetWidth,Rt=pt.offsetWidth-kt;return dt.lineGutter.style.width="",dt.lineNumInnerWidth=Math.max(kt,dt.lineGutter.offsetWidth-Rt)+1,dt.lineNumWidth=dt.lineNumInnerWidth+Rt,dt.lineNumChars=dt.lineNumInnerWidth?ct.length:-1,dt.lineGutter.style.width=dt.lineNumWidth+"px",Wu(it.display),!0}return!1}function ks(it,st){for(var ct=[],dt=!1,pt=0;pt<it.length;pt++){var kt=it[pt],Rt=null;if(typeof kt!="string"&&(Rt=kt.style,kt=kt.className),kt=="CodeMirror-linenumbers")if(st)dt=!0;else continue;ct.push({className:kt,style:Rt})}return st&&!dt&&ct.push({className:"CodeMirror-linenumbers",style:null}),ct}function Eh(it){var st=it.gutters,ct=it.gutterSpecs;At(st),it.lineGutter=null;for(var dt=0;dt<ct.length;++dt){var pt=ct[dt],kt=pt.className,Rt=pt.style,Qt=st.appendChild(Wt("div",null,"CodeMirror-gutter "+kt));Rt&&(Qt.style.cssText=Rt),kt=="CodeMirror-linenumbers"&&(it.lineGutter=Qt,Qt.style.width=(it.lineNumWidth||1)+"px")}st.style.display=ct.length?"":"none",Wu(it)}function Va(it){Eh(it.display),Kr(it),$c(it)}function $u(it,st,ct,dt){var pt=this;this.input=ct,pt.scrollbarFiller=Wt("div",null,"CodeMirror-scrollbar-filler"),pt.scrollbarFiller.setAttribute("cm-not-content","true"),pt.gutterFiller=Wt("div",null,"CodeMirror-gutter-filler"),pt.gutterFiller.setAttribute("cm-not-content","true"),pt.lineDiv=xe("div",null,"CodeMirror-code"),pt.selectionDiv=Wt("div",null,null,"position: relative; z-index: 1"),pt.cursorDiv=Wt("div",null,"CodeMirror-cursors"),pt.measure=Wt("div",null,"CodeMirror-measure"),pt.lineMeasure=Wt("div",null,"CodeMirror-measure"),pt.lineSpace=xe("div",[pt.measure,pt.lineMeasure,pt.selectionDiv,pt.cursorDiv,pt.lineDiv],null,"position: relative; outline: none");var kt=xe("div",[pt.lineSpace],"CodeMirror-lines");pt.mover=Wt("div",[kt],null,"position: relative"),pt.sizer=Wt("div",[pt.mover],"CodeMirror-sizer"),pt.sizerWidth=null,pt.heightForcer=Wt("div",null,null,"position: absolute; height: "+pn+"px; width: 1px;"),pt.gutters=Wt("div",null,"CodeMirror-gutters"),pt.lineGutter=null,pt.scroller=Wt("div",[pt.sizer,pt.heightForcer,pt.gutters],"CodeMirror-scroll"),pt.scroller.setAttribute("tabIndex","-1"),pt.wrapper=Wt("div",[pt.scrollbarFiller,pt.gutterFiller,pt.scroller],"CodeMirror"),$t&&Ut<8&&(pt.gutters.style.zIndex=-1,pt.scroller.style.paddingRight=0),!Jt&&!(vt&&nt)&&(pt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(pt.wrapper):it(pt.wrapper)),pt.viewFrom=pt.viewTo=st.first,pt.reportedViewFrom=pt.reportedViewTo=st.first,pt.view=[],pt.renderedView=null,pt.externalMeasured=null,pt.viewOffset=0,pt.lastWrapHeight=pt.lastWrapWidth=0,pt.updateLineNumbers=null,pt.nativeBarWidth=pt.barHeight=pt.barWidth=0,pt.scrollbarsClipped=!1,pt.lineNumWidth=pt.lineNumInnerWidth=pt.lineNumChars=null,pt.alignWidgets=!1,pt.cachedCharWidth=pt.cachedTextHeight=pt.cachedPaddingH=null,pt.maxLine=null,pt.maxLineLength=0,pt.maxLineChanged=!1,pt.wheelDX=pt.wheelDY=pt.wheelStartX=pt.wheelStartY=null,pt.shift=!1,pt.selForContextMenu=null,pt.activeTouch=null,pt.gutterSpecs=ks(dt.gutters,dt.lineNumbers),Eh(pt),ct.init(pt)}var Oa=0,ss=null;$t?ss=-.53:vt?ss=15:we?ss=-.7:Fe&&(ss=-1/3);function Ol(it){var st=it.wheelDeltaX,ct=it.wheelDeltaY;return st==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(st=it.detail),ct==null&&it.detail&&it.axis==it.VERTICAL_AXIS?ct=it.detail:ct==null&&(ct=it.wheelDelta),{x:st,y:ct}}function Ua(it){var st=Ol(it);return st.x*=ss,st.y*=ss,st}function Ns(it,st){var ct=Ol(st),dt=ct.x,pt=ct.y,kt=it.display,Rt=kt.scroller,Qt=Rt.scrollWidth>Rt.clientWidth,Xt=Rt.scrollHeight>Rt.clientHeight;if(dt&&Qt||pt&&Xt){if(pt&&ht&&Jt){t:for(var ge=st.target,en=kt.view;ge!=Rt;ge=ge.parentNode)for(var Me=0;Me<en.length;Me++)if(en[Me].node==ge){it.display.currentWheelTarget=ge;break t}}if(dt&&!vt&&!te&&ss!=null){pt&&Xt&&Lh(it,Math.max(0,Rt.scrollTop+pt*ss)),pu(it,Math.max(0,Rt.scrollLeft+dt*ss)),(!pt||pt&&Xt)&&Jn(st),kt.wheelStartX=null;return}if(pt&&ss!=null){var Fn=pt*ss,Mn=it.doc.scrollTop,hi=Mn+kt.wrapper.clientHeight;Fn<0?Mn=Math.max(0,Mn+Fn-50):hi=Math.min(it.doc.height,hi+Fn+50),Gu(it,{top:Mn,bottom:hi})}Oa<20&&(kt.wheelStartX==null?(kt.wheelStartX=Rt.scrollLeft,kt.wheelStartY=Rt.scrollTop,kt.wheelDX=dt,kt.wheelDY=pt,setTimeout(function(){if(kt.wheelStartX!=null){var gi=Rt.scrollLeft-kt.wheelStartX,bi=Rt.scrollTop-kt.wheelStartY,_i=bi&&kt.wheelDY&&bi/kt.wheelDY||gi&&kt.wheelDX&&gi/kt.wheelDX;kt.wheelStartX=kt.wheelStartY=null,_i&&(ss=(ss*Oa+_i)/(Oa+1),++Oa)}},200)):(kt.wheelDX+=dt,kt.wheelDY+=pt))}}var rl=function(it,st){this.ranges=it,this.primIndex=st};rl.prototype.primary=function(){return this.ranges[this.primIndex]},rl.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var st=0;st<this.ranges.length;st++){var ct=this.ranges[st],dt=it.ranges[st];if(!He(ct.anchor,dt.anchor)||!He(ct.head,dt.head))return!1}return!0},rl.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new Mr(je(this.ranges[st].anchor),je(this.ranges[st].head));return new rl(it,this.primIndex)},rl.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},rl.prototype.contains=function(it,st){st||(st=it);for(var ct=0;ct<this.ranges.length;ct++){var dt=this.ranges[ct];if(fn(st,dt.from())>=0&&fn(it,dt.to())<=0)return ct}return-1};var Mr=function(it,st){this.anchor=it,this.head=st};Mr.prototype.from=function(){return rn(this.anchor,this.head)},Mr.prototype.to=function(){return vn(this.anchor,this.head)},Mr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function yl(it,st,ct){var dt=it&&it.options.selectionsMayTouch,pt=st[ct];st.sort(function(Fn,Mn){return fn(Fn.from(),Mn.from())}),ct=ke(st,pt);for(var kt=1;kt<st.length;kt++){var Rt=st[kt],Qt=st[kt-1],Xt=fn(Qt.to(),Rt.from());if(dt&&!Rt.empty()?Xt>0:Xt>=0){var ge=rn(Qt.from(),Rt.from()),en=vn(Qt.to(),Rt.to()),Me=Qt.empty()?Rt.from()==Rt.head:Qt.from()==Qt.head;kt<=ct&&--ct,st.splice(--kt,2,new Mr(Me?en:ge,Me?ge:en))}}return new rl(st,ct)}function mu(it,st){return new rl([new Mr(it,st||it)],0)}function Zu(it){return it.text?Re(it.from.line+it.text.length-1,Ce(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function kh(it,st){if(fn(it,st.from)<0)return it;if(fn(it,st.to)<=0)return Zu(st);var ct=it.line+st.text.length-(st.to.line-st.from.line)-1,dt=it.ch;return it.line==st.to.line&&(dt+=Zu(st).ch-st.to.ch),Re(ct,dt)}function Xd(it,st){for(var ct=[],dt=0;dt<it.sel.ranges.length;dt++){var pt=it.sel.ranges[dt];ct.push(new Mr(kh(pt.anchor,st),kh(pt.head,st)))}return yl(it.cm,ct,it.sel.primIndex)}function fd(it,st,ct){return it.line==st.line?Re(ct.line,it.ch-st.ch+ct.ch):Re(ct.line+(it.line-st.line),it.ch)}function Yd(it,st,ct){for(var dt=[],pt=Re(it.first,0),kt=pt,Rt=0;Rt<st.length;Rt++){var Qt=st[Rt],Xt=fd(Qt.from,pt,kt),ge=fd(Zu(Qt),pt,kt);if(pt=Qt.to,kt=ge,ct=="around"){var en=it.sel.ranges[Rt],Me=fn(en.head,en.anchor)<0;dt[Rt]=new Mr(Me?ge:Xt,Me?Xt:ge)}else dt[Rt]=new Mr(Xt,Xt)}return new rl(dt,it.sel.primIndex)}function _o(it){it.doc.mode=Ae(it.options,it.doc.modeOption),Jd(it)}function Jd(it){it.doc.iter(function(st){st.stateAfter&&(st.stateAfter=null),st.styles&&(st.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,cd(it,100),it.state.modeGen++,it.curOp&&Kr(it)}function og(it,st){return st.from.ch==0&&st.to.ch==0&&Ce(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Zc(it,st,ct,dt){function pt(ho){return ct?ct[ho]:null}function kt(ho,qi,mo){ar(ho,qi,mo,dt),mi(ho,"change",ho,st)}function Rt(ho,qi){for(var mo=[],Io=ho;Io<qi;++Io)mo.push(new Qo(ge[Io],pt(Io),dt));return mo}var Qt=st.from,Xt=st.to,ge=st.text,en=Qe(it,Qt.line),Me=Qe(it,Xt.line),Fn=Ce(ge),Mn=pt(ge.length-1),hi=Xt.line-Qt.line;if(st.full)it.insert(0,Rt(0,ge.length)),it.remove(ge.length,it.size-ge.length);else if(og(it,st)){var gi=Rt(0,ge.length-1);kt(Me,Me.text,Mn),hi&&it.remove(Qt.line,hi),gi.length&&it.insert(Qt.line,gi)}else if(en==Me)if(ge.length==1)kt(en,en.text.slice(0,Qt.ch)+Fn+en.text.slice(Xt.ch),Mn);else{var bi=Rt(1,ge.length-1);bi.push(new Qo(Fn+en.text.slice(Xt.ch),Mn,dt)),kt(en,en.text.slice(0,Qt.ch)+ge[0],pt(0)),it.insert(Qt.line+1,bi)}else if(ge.length==1)kt(en,en.text.slice(0,Qt.ch)+ge[0]+Me.text.slice(Xt.ch),pt(0)),it.remove(Qt.line+1,hi);else{kt(en,en.text.slice(0,Qt.ch)+ge[0],pt(0)),kt(Me,Fn+Me.text.slice(Xt.ch),Mn);var _i=Rt(1,ge.length-1);hi>1&&it.remove(Qt.line+1,hi-1),it.insert(Qt.line+1,_i)}mi(it,"change",it,st)}function Dl(it,st,ct){function dt(pt,kt,Rt){if(pt.linked)for(var Qt=0;Qt<pt.linked.length;++Qt){var Xt=pt.linked[Qt];if(Xt.doc!=kt){var ge=Rt&&Xt.sharedHist;ct&&!ge||(st(Xt.doc,ge),dt(Xt.doc,pt,ge))}}}dt(it,null,!0)}function _c(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,Po(it),_o(it),Qd(it),it.options.lineWrapping||Uo(it),it.options.mode=st.modeOption,Kr(it)}function Qd(it){(it.doc.direction=="rtl"?Ye:Dt)(it.display.lineDiv,"CodeMirror-rtl")}function ev(it){pr(it,function(){Qd(it),Kr(it)})}function gd(it){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=it||1}function Vc(it,st){var ct={from:je(st.from),to:Zu(st),text:yn(it,st.from,st.to)};return _u(it,ct,st.from.line,st.to.line+1),Dl(it,function(dt){return _u(dt,ct,st.from.line,st.to.line+1)},!0),ct}function pd(it){for(;it.length;){var st=Ce(it);if(st.ranges)it.pop();else break}}function qd(it,st){if(st)return pd(it.done),Ce(it.done);if(it.done.length&&!Ce(it.done).ranges)return Ce(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),Ce(it.done)}function tc(it,st,ct,dt){var pt=it.history;pt.undone.length=0;var kt=+new Date,Rt,Qt;if((pt.lastOp==dt||pt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&pt.lastModTime>kt-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Rt=qd(pt,pt.lastOp==dt)))Qt=Ce(Rt.changes),fn(st.from,st.to)==0&&fn(st.from,Qt.to)==0?Qt.to=Zu(st):Rt.changes.push(Vc(it,st));else{var Xt=Ce(pt.done);for((!Xt||!Xt.ranges)&&md(it.sel,pt.done),Rt={changes:[Vc(it,st)],generation:pt.generation},pt.done.push(Rt);pt.done.length>pt.undoDepth;)pt.done.shift(),pt.done[0].ranges||pt.done.shift()}pt.done.push(ct),pt.generation=++pt.maxGeneration,pt.lastModTime=pt.lastSelTime=kt,pt.lastOp=pt.lastSelOp=dt,pt.lastOrigin=pt.lastSelOrigin=st.origin,Qt||ye(it,"historyAdded")}function rg(it,st,ct,dt){var pt=st.charAt(0);return pt=="*"||pt=="+"&&ct.ranges.length==dt.ranges.length&&ct.somethingSelected()==dt.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function ec(it,st,ct,dt){var pt=it.history,kt=dt&&dt.origin;ct==pt.lastSelOp||kt&&pt.lastSelOrigin==kt&&(pt.lastModTime==pt.lastSelTime&&pt.lastOrigin==kt||rg(it,kt,Ce(pt.done),st))?pt.done[pt.done.length-1]=st:md(st,pt.done),pt.lastSelTime=+new Date,pt.lastSelOrigin=kt,pt.lastSelOp=ct,dt&&dt.clearRedo!==!1&&pd(pt.undone)}function md(it,st){var ct=Ce(st);ct&&ct.ranges&&ct.equals(it)||st.push(it)}function _u(it,st,ct,dt){var pt=st["spans_"+it.id],kt=0;it.iter(Math.max(it.first,ct),Math.min(it.first+it.size,dt),function(Rt){Rt.markedSpans&&((pt||(pt=st["spans_"+it.id]={}))[kt]=Rt.markedSpans),++kt})}function da(it){if(!it)return null;for(var st,ct=0;ct<it.length;++ct)it[ct].marker.explicitlyCleared?st||(st=it.slice(0,ct)):st&&st.push(it[ct]);return st?st.length?st:null:it}function _l(it,st){var ct=st["spans_"+it.id];if(!ct)return null;for(var dt=[],pt=0;pt<st.text.length;++pt)dt.push(da(ct[pt]));return dt}function Uc(it,st){var ct=_l(it,st),dt=ii(it,st);if(!ct)return dt;if(!dt)return ct;for(var pt=0;pt<ct.length;++pt){var kt=ct[pt],Rt=dt[pt];if(kt&&Rt)t:for(var Qt=0;Qt<Rt.length;++Qt){for(var Xt=Rt[Qt],ge=0;ge<kt.length;++ge)if(kt[ge].marker==Xt.marker)continue t;kt.push(Xt)}else Rt&&(ct[pt]=Rt)}return ct}function vu(it,st,ct){for(var dt=[],pt=0;pt<it.length;++pt){var kt=it[pt];if(kt.ranges){dt.push(ct?rl.prototype.deepCopy.call(kt):kt);continue}var Rt=kt.changes,Qt=[];dt.push({changes:Qt});for(var Xt=0;Xt<Rt.length;++Xt){var ge=Rt[Xt],en=void 0;if(Qt.push({from:ge.from,to:ge.to,text:ge.text}),st)for(var Me in ge)(en=Me.match(/^spans_(\d+)$/))&&ke(st,Number(en[1]))>-1&&(Ce(Qt)[Me]=ge[Me],delete ge[Me])}}return dt}function Xc(it,st,ct,dt){if(dt){var pt=it.anchor;if(ct){var kt=fn(st,pt)<0;kt!=fn(ct,pt)<0?(pt=st,st=ct):kt!=fn(st,ct)<0&&(st=ct)}return new Mr(pt,st)}else return new Mr(ct||st,st)}function Yc(it,st,ct,dt,pt){pt==null&&(pt=it.cm&&(it.cm.display.shift||it.extend)),qs(it,new rl([Xc(it.sel.primary(),st,ct,pt)],0),dt)}function Gp(it,st,ct){for(var dt=[],pt=it.cm&&(it.cm.display.shift||it.extend),kt=0;kt<it.sel.ranges.length;kt++)dt[kt]=Xc(it.sel.ranges[kt],st[kt],null,pt);var Rt=yl(it.cm,dt,it.sel.primIndex);qs(it,Rt,ct)}function Vu(it,st,ct,dt){var pt=it.sel.ranges.slice(0);pt[st]=ct,qs(it,yl(it.cm,pt,it.sel.primIndex),dt)}function Nh(it,st,ct,dt){qs(it,mu(st,ct),dt)}function Wp(it,st,ct){var dt={ranges:st.ranges,update:function(pt){this.ranges=[];for(var kt=0;kt<pt.length;kt++)this.ranges[kt]=new Mr(xn(it,pt[kt].anchor),xn(it,pt[kt].head))},origin:ct&&ct.origin};return ye(it,"beforeSelectionChange",it,dt),it.cm&&ye(it.cm,"beforeSelectionChange",it.cm,dt),dt.ranges!=st.ranges?yl(it.cm,dt.ranges,dt.ranges.length-1):st}function Jc(it,st,ct){var dt=it.history.done,pt=Ce(dt);pt&&pt.ranges?(dt[dt.length-1]=st,Th(it,st,ct)):qs(it,st,ct)}function qs(it,st,ct){Th(it,st,ct),ec(it,it.sel,it.cm?it.cm.curOp.id:NaN,ct)}function Th(it,st,ct){(Cn(it,"beforeSelectionChange")||it.cm&&Cn(it.cm,"beforeSelectionChange"))&&(st=Wp(it,st,ct));var dt=ct&&ct.bias||(fn(st.primary().head,it.sel.primary().head)<0?-1:1);sg(it,ic(it,st,dt,!0)),!(ct&&ct.scroll===!1)&&it.cm&&gu(it.cm)}function sg(it,st){st.equals(it.sel)||(it.sel=st,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,Pn(it.cm)),mi(it,"cursorActivity",it))}function nc(it){sg(it,ic(it,it.sel,null,!1))}function ic(it,st,ct,dt){for(var pt,kt=0;kt<st.ranges.length;kt++){var Rt=st.ranges[kt],Qt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[kt],Xt=oc(it,Rt.anchor,Qt&&Qt.anchor,ct,dt),ge=oc(it,Rt.head,Qt&&Qt.head,ct,dt);(pt||Xt!=Rt.anchor||ge!=Rt.head)&&(pt||(pt=st.ranges.slice(0,kt)),pt[kt]=new Mr(Xt,ge))}return pt?yl(it.cm,pt,st.primIndex):st}function yu(it,st,ct,dt,pt){var kt=Qe(it,st.line);if(kt.markedSpans)for(var Rt=0;Rt<kt.markedSpans.length;++Rt){var Qt=kt.markedSpans[Rt],Xt=Qt.marker,ge="selectLeft"in Xt?!Xt.selectLeft:Xt.inclusiveLeft,en="selectRight"in Xt?!Xt.selectRight:Xt.inclusiveRight;if((Qt.from==null||(ge?Qt.from<=st.ch:Qt.from<st.ch))&&(Qt.to==null||(en?Qt.to>=st.ch:Qt.to>st.ch))){if(pt&&(ye(Xt,"beforeCursorEnter"),Xt.explicitlyCleared))if(kt.markedSpans){--Rt;continue}else break;if(!Xt.atomic)continue;if(ct){var Me=Xt.find(dt<0?1:-1),Fn=void 0;if((dt<0?en:ge)&&(Me=ag(it,Me,-dt,Me&&Me.line==st.line?kt:null)),Me&&Me.line==st.line&&(Fn=fn(Me,ct))&&(dt<0?Fn<0:Fn>0))return yu(it,Me,st,dt,pt)}var Mn=Xt.find(dt<0?-1:1);return(dt<0?ge:en)&&(Mn=ag(it,Mn,dt,Mn.line==st.line?kt:null)),Mn?yu(it,Mn,st,dt,pt):null}}return st}function oc(it,st,ct,dt,pt){var kt=dt||1,Rt=yu(it,st,ct,kt,pt)||!pt&&yu(it,st,ct,kt,!0)||yu(it,st,ct,-kt,pt)||!pt&&yu(it,st,ct,-kt,!0);return Rt||(it.cantEdit=!0,Re(it.first,0))}function ag(it,st,ct,dt){return ct<0&&st.ch==0?st.line>it.first?xn(it,Re(st.line-1)):null:ct>0&&st.ch==(dt||Qe(it,st.line)).text.length?st.line<it.first+it.size-1?Re(st.line+1,0):null:new Re(st.line,st.ch+ct)}function as(it){it.setSelection(Re(it.firstLine(),0),Re(it.lastLine()),Ee)}function rc(it,st,ct){var dt={canceled:!1,from:st.from,to:st.to,text:st.text,origin:st.origin,cancel:function(){return dt.canceled=!0}};return ct&&(dt.update=function(pt,kt,Rt,Qt){pt&&(dt.from=xn(it,pt)),kt&&(dt.to=xn(it,kt)),Rt&&(dt.text=Rt),Qt!==void 0&&(dt.origin=Qt)}),ye(it,"beforeChange",it,dt),it.cm&&ye(it.cm,"beforeChange",it.cm,dt),dt.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:dt.from,to:dt.to,text:dt.text,origin:dt.origin}}function Uu(it,st,ct){if(it.cm){if(!it.cm.curOp)return vs(it.cm,Uu)(it,st,ct);if(it.cm.state.suppressEdits)return}if(!((Cn(it,"beforeChange")||it.cm&&Cn(it.cm,"beforeChange"))&&(st=rc(it,st,!0),!st))){var dt=ei&&!ct&&oo(it,st.from,st.to);if(dt)for(var pt=dt.length-1;pt>=0;--pt)Fh(it,{from:dt[pt].from,to:dt[pt].to,text:pt?[""]:st.text,origin:st.origin});else Fh(it,st)}}function Fh(it,st){if(!(st.text.length==1&&st.text[0]==""&&fn(st.from,st.to)==0)){var ct=Xd(it,st);tc(it,st,ct,it.cm?it.cm.curOp.id:NaN),vd(it,st,ct,ii(it,st));var dt=[];Dl(it,function(pt,kt){!kt&&ke(dt,pt.history)==-1&&(ug(pt.history,st),dt.push(pt.history)),vd(pt,st,null,ii(pt,st))})}}function sc(it,st,ct){var dt=it.cm&&it.cm.state.suppressEdits;if(!(dt&&!ct)){for(var pt=it.history,kt,Rt=it.sel,Qt=st=="undo"?pt.done:pt.undone,Xt=st=="undo"?pt.undone:pt.done,ge=0;ge<Qt.length&&(kt=Qt[ge],!(ct?kt.ranges&&!kt.equals(it.sel):!kt.ranges));ge++);if(ge!=Qt.length){for(pt.lastOrigin=pt.lastSelOrigin=null;;)if(kt=Qt.pop(),kt.ranges){if(md(kt,Xt),ct&&!kt.equals(it.sel)){qs(it,kt,{clearRedo:!1});return}Rt=kt}else if(dt){Qt.push(kt);return}else break;var en=[];md(Rt,Xt),Xt.push({changes:en,generation:pt.generation}),pt.generation=kt.generation||++pt.maxGeneration;for(var Me=Cn(it,"beforeChange")||it.cm&&Cn(it.cm,"beforeChange"),Fn=function(gi){var bi=kt.changes[gi];if(bi.origin=st,Me&&!rc(it,bi,!1))return Qt.length=0,{};en.push(Vc(it,bi));var _i=gi?Xd(it,bi):Ce(Qt);vd(it,bi,_i,Uc(it,bi)),!gi&&it.cm&&it.cm.scrollIntoView({from:bi.from,to:Zu(bi)});var ho=[];Dl(it,function(qi,mo){!mo&&ke(ho,qi.history)==-1&&(ug(qi.history,bi),ho.push(qi.history)),vd(qi,bi,null,Uc(qi,bi))})},Mn=kt.changes.length-1;Mn>=0;--Mn){var hi=Fn(Mn);if(hi)return hi.v}}}}function lg(it,st){if(st!=0&&(it.first+=st,it.sel=new rl($n(it.sel.ranges,function(pt){return new Mr(Re(pt.anchor.line+st,pt.anchor.ch),Re(pt.head.line+st,pt.head.ch))}),it.sel.primIndex),it.cm)){Kr(it.cm,it.first,it.first-st,st);for(var ct=it.cm.display,dt=ct.viewFrom;dt<ct.viewTo;dt++)Zo(it.cm,dt,"gutter")}}function vd(it,st,ct,dt){if(it.cm&&!it.cm.curOp)return vs(it.cm,vd)(it,st,ct,dt);if(st.to.line<it.first){lg(it,st.text.length-1-(st.to.line-st.from.line));return}if(!(st.from.line>it.lastLine())){if(st.from.line<it.first){var pt=st.text.length-1-(it.first-st.from.line);lg(it,pt),st={from:Re(it.first,0),to:Re(st.to.line+pt,st.to.ch),text:[Ce(st.text)],origin:st.origin}}var kt=it.lastLine();st.to.line>kt&&(st={from:st.from,to:Re(kt,Qe(it,kt).text.length),text:[st.text[0]],origin:st.origin}),st.removed=yn(it,st.from,st.to),ct||(ct=Xd(it,st)),it.cm?Kp(it.cm,st,dt):Zc(it,st,dt),Th(it,ct,Ee),it.cantEdit&&oc(it,Re(it.firstLine(),0))&&(it.cantEdit=!1)}}function Kp(it,st,ct){var dt=it.doc,pt=it.display,kt=st.from,Rt=st.to,Qt=!1,Xt=kt.line;it.options.lineWrapping||(Xt=le(Mi(Qe(dt,kt.line))),dt.iter(Xt,Rt.line+1,function(Mn){if(Mn==pt.maxLine)return Qt=!0,!0})),dt.sel.contains(st.from,st.to)>-1&&Pn(it),Zc(dt,st,ct,Wr(it)),it.options.lineWrapping||(dt.iter(Xt,kt.line+st.text.length,function(Mn){var hi=Ko(Mn);hi>pt.maxLineLength&&(pt.maxLine=Mn,pt.maxLineLength=hi,pt.maxLineChanged=!0,Qt=!1)}),Qt&&(it.curOp.updateMaxLine=!0)),Rn(dt,kt.line),cd(it,400);var ge=st.text.length-(Rt.line-kt.line)-1;st.full?Kr(it):kt.line==Rt.line&&st.text.length==1&&!og(it.doc,st)?Zo(it,kt.line,"text"):Kr(it,kt.line,Rt.line+1,ge);var en=Cn(it,"changes"),Me=Cn(it,"change");if(Me||en){var Fn={from:kt,to:Rt,text:st.text,removed:st.removed,origin:st.origin};Me&&mi(it,"change",it,Fn),en&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(Fn)}it.display.selForContextMenu=null}function Oh(it,st,ct,dt,pt){var kt;dt||(dt=ct),fn(dt,ct)<0&&(kt=[dt,ct],ct=kt[0],dt=kt[1]),typeof st=="string"&&(st=it.splitLines(st)),Uu(it,{from:ct,to:dt,text:st,origin:pt})}function sl(it,st,ct,dt){ct<it.line?it.line+=dt:st<it.line&&(it.line=st,it.ch=0)}function $p(it,st,ct,dt){for(var pt=0;pt<it.length;++pt){var kt=it[pt],Rt=!0;if(kt.ranges){kt.copied||(kt=it[pt]=kt.deepCopy(),kt.copied=!0);for(var Qt=0;Qt<kt.ranges.length;Qt++)sl(kt.ranges[Qt].anchor,st,ct,dt),sl(kt.ranges[Qt].head,st,ct,dt);continue}for(var Xt=0;Xt<kt.changes.length;++Xt){var ge=kt.changes[Xt];if(ct<ge.from.line)ge.from=Re(ge.from.line+dt,ge.from.ch),ge.to=Re(ge.to.line+dt,ge.to.ch);else if(st<=ge.to.line){Rt=!1;break}}Rt||(it.splice(0,pt+1),pt=0)}}function ug(it,st){var ct=st.from.line,dt=st.to.line,pt=st.text.length-(dt-ct)-1;$p(it.done,ct,dt,pt),$p(it.undone,ct,dt,pt)}function Dh(it,st,ct,dt){var pt=st,kt=st;return typeof st=="number"?kt=Qe(it,bn(it,st)):pt=le(st),pt==null?null:(dt(kt,pt)&&it.cm&&Zo(it.cm,pt,ct),kt)}function yd(it){this.lines=it,this.parent=null;for(var st=0,ct=0;ct<it.length;++ct)it[ct].parent=this,st+=it[ct].height;this.height=st}yd.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,st){for(var ct=it,dt=it+st;ct<dt;++ct){var pt=this.lines[ct];this.height-=pt.height,Ro(pt),mi(pt,"delete")}this.lines.splice(it,st)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,st,ct){this.height+=ct,this.lines=this.lines.slice(0,it).concat(st).concat(this.lines.slice(it));for(var dt=0;dt<st.length;++dt)st[dt].parent=this},iterN:function(it,st,ct){for(var dt=it+st;it<dt;++it)if(ct(this.lines[it]))return!0}};function Yr(it){this.children=it;for(var st=0,ct=0,dt=0;dt<it.length;++dt){var pt=it[dt];st+=pt.chunkSize(),ct+=pt.height,pt.parent=this}this.size=st,this.height=ct,this.parent=null}Yr.prototype={chunkSize:function(){return this.size},removeInner:function(it,st){this.size-=st;for(var ct=0;ct<this.children.length;++ct){var dt=this.children[ct],pt=dt.chunkSize();if(it<pt){var kt=Math.min(st,pt-it),Rt=dt.height;if(dt.removeInner(it,kt),this.height-=Rt-dt.height,pt==kt&&(this.children.splice(ct--,1),dt.parent=null),(st-=kt)==0)break;it=0}else it-=pt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof yd))){var Qt=[];this.collapse(Qt),this.children=[new yd(Qt)],this.children[0].parent=this}},collapse:function(it){for(var st=0;st<this.children.length;++st)this.children[st].collapse(it)},insertInner:function(it,st,ct){this.size+=st.length,this.height+=ct;for(var dt=0;dt<this.children.length;++dt){var pt=this.children[dt],kt=pt.chunkSize();if(it<=kt){if(pt.insertInner(it,st,ct),pt.lines&&pt.lines.length>50){for(var Rt=pt.lines.length%25+25,Qt=Rt;Qt<pt.lines.length;){var Xt=new yd(pt.lines.slice(Qt,Qt+=25));pt.height-=Xt.height,this.children.splice(++dt,0,Xt),Xt.parent=this}pt.lines=pt.lines.slice(0,Rt),this.maybeSpill()}break}it-=kt}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var st=it.children.splice(it.children.length-5,5),ct=new Yr(st);if(it.parent){it.size-=ct.size,it.height-=ct.height;var pt=ke(it.parent.children,it);it.parent.children.splice(pt+1,0,ct)}else{var dt=new Yr(it.children);dt.parent=it,it.children=[dt,ct],it=dt}ct.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,st,ct){for(var dt=0;dt<this.children.length;++dt){var pt=this.children[dt],kt=pt.chunkSize();if(it<kt){var Rt=Math.min(st,kt-it);if(pt.iterN(it,Rt,ct))return!0;if((st-=Rt)==0)break;it=0}else it-=kt}}};var Su=function(it,st,ct){if(ct)for(var dt in ct)ct.hasOwnProperty(dt)&&(this[dt]=ct[dt]);this.doc=it,this.node=st};Su.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,ct=this.line,dt=le(ct);if(!(dt==null||!st)){for(var pt=0;pt<st.length;++pt)st[pt]==this&&st.splice(pt--,1);st.length||(ct.widgets=null);var kt=Gs(this);_n(ct,Math.max(0,ct.height-kt)),it&&(pr(it,function(){Zp(it,ct,-kt),Zo(it,dt,"widget")}),mi(it,"lineWidgetCleared",it,this,dt))}},Su.prototype.changed=function(){var it=this,st=this.height,ct=this.doc.cm,dt=this.line;this.height=null;var pt=Gs(this)-st;pt&&(Wn(this.doc,dt)||_n(dt,dt.height+pt),ct&&pr(ct,function(){ct.curOp.forceUpdate=!0,Zp(ct,dt,pt),mi(ct,"lineWidgetChanged",ct,it,le(dt))}))},An(Su);function Zp(it,st,ct){xo(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&Hc(it,ct)}function Qc(it,st,ct,dt){var pt=new Su(it,ct,dt),kt=it.cm;return kt&&pt.noHScroll&&(kt.display.alignWidgets=!0),Dh(it,st,"widget",function(Rt){var Qt=Rt.widgets||(Rt.widgets=[]);if(pt.insertAt==null?Qt.push(pt):Qt.splice(Math.min(Qt.length-1,Math.max(0,pt.insertAt)),0,pt),pt.line=Rt,kt&&!Wn(it,Rt)){var Xt=xo(Rt)<it.scrollTop;_n(Rt,Rt.height+Gs(pt)),Xt&&Hc(kt,pt.height),kt.curOp.forceUpdate=!0}return!0}),kt&&mi(kt,"lineWidgetAdded",kt,pt,typeof st=="number"?st:le(st)),pt}var _p=0,Ze=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++_p};Ze.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&ju(it),Cn(this,"clear")){var ct=this.find();ct&&mi(this,"clear",ct.from,ct.to)}for(var dt=null,pt=null,kt=0;kt<this.lines.length;++kt){var Rt=this.lines[kt],Qt=Ui(Rt.markedSpans,this);it&&!this.collapsed?Zo(it,le(Rt),"text"):it&&(Qt.to!=null&&(pt=le(Rt)),Qt.from!=null&&(dt=le(Rt))),Rt.markedSpans=$i(Rt.markedSpans,Qt),Qt.from==null&&this.collapsed&&!Wn(this.doc,Rt)&&it&&_n(Rt,fu(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Xt=0;Xt<this.lines.length;++Xt){var ge=Mi(this.lines[Xt]),en=Ko(ge);en>it.display.maxLineLength&&(it.display.maxLine=ge,it.display.maxLineLength=en,it.display.maxLineChanged=!0)}dt!=null&&it&&this.collapsed&&Kr(it,dt,pt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&nc(it.doc)),it&&mi(it,"markerCleared",it,this,dt,pt),st&&zu(it),this.parent&&this.parent.clear()}},Ze.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var ct,dt,pt=0;pt<this.lines.length;++pt){var kt=this.lines[pt],Rt=Ui(kt.markedSpans,this);if(Rt.from!=null&&(ct=Re(st?kt:le(kt),Rt.from),it==-1))return ct;if(Rt.to!=null&&(dt=Re(st?kt:le(kt),Rt.to),it==1))return dt}return ct&&{from:ct,to:dt}},Ze.prototype.changed=function(){var it=this,st=this.find(-1,!0),ct=this,dt=this.doc.cm;!st||!dt||pr(dt,function(){var pt=st.line,kt=le(st.line),Rt=du(dt,kt);if(Rt&&(Fo(Rt),dt.curOp.selectionChanged=dt.curOp.forceUpdate=!0),dt.curOp.updateMaxLine=!0,!Wn(ct.doc,pt)&&ct.height!=null){var Qt=ct.height;ct.height=null;var Xt=Gs(ct)-Qt;Xt&&_n(pt,pt.height+Xt)}mi(dt,"markerChanged",dt,it)})},Ze.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||ke(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},Ze.prototype.detachLine=function(it){if(this.lines.splice(ke(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},An(Ze);function Bh(it,st,ct,dt,pt){if(dt&&dt.shared)return Vp(it,st,ct,dt,pt);if(it.cm&&!it.cm.curOp)return vs(it.cm,Bh)(it,st,ct,dt,pt);var kt=new Ze(it,pt),Rt=fn(st,ct);if(dt&&Ue(dt,kt,!1),Rt>0||Rt==0&&kt.clearWhenEmpty!==!1)return kt;if(kt.replacedWith&&(kt.collapsed=!0,kt.widgetNode=xe("span",[kt.replacedWith],"CodeMirror-widget"),dt.handleMouseEvents||kt.widgetNode.setAttribute("cm-ignore-events","true"),dt.insertLeft&&(kt.widgetNode.insertLeft=!0)),kt.collapsed){if(Fi(it,st.line,st,ct,kt)||st.line!=ct.line&&Fi(it,ct.line,st,ct,kt))throw new Error("Inserting collapsed marker partially overlapping an existing one");tn()}kt.addToHistory&&tc(it,{from:st,to:ct,origin:"markText"},it.sel,NaN);var Qt=st.line,Xt=it.cm,ge;if(it.iter(Qt,ct.line+1,function(Me){Xt&&kt.collapsed&&!Xt.options.lineWrapping&&Mi(Me)==Xt.display.maxLine&&(ge=!0),kt.collapsed&&Qt!=st.line&&_n(Me,0),Co(Me,new Ci(kt,Qt==st.line?st.ch:null,Qt==ct.line?ct.ch:null)),++Qt}),kt.collapsed&&it.iter(st.line,ct.line+1,function(Me){Wn(it,Me)&&_n(Me,0)}),kt.clearOnEnter&&_e(kt,"beforeCursorEnter",function(){return kt.clear()}),kt.readOnly&&(pi(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),kt.collapsed&&(kt.id=++_p,kt.atomic=!0),Xt){if(ge&&(Xt.curOp.updateMaxLine=!0),kt.collapsed)Kr(Xt,st.line,ct.line+1);else if(kt.className||kt.startStyle||kt.endStyle||kt.css||kt.attributes||kt.title)for(var en=st.line;en<=ct.line;en++)Zo(Xt,en,"text");kt.atomic&&nc(Xt.doc),mi(Xt,"markerAdded",Xt,kt)}return kt}var Vl=function(it,st){this.markers=it,this.primary=st;for(var ct=0;ct<it.length;++ct)it[ct].parent=this};Vl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();mi(this,"clear")}},Vl.prototype.find=function(it,st){return this.primary.find(it,st)},An(Vl);function Vp(it,st,ct,dt,pt){dt=Ue(dt),dt.shared=!1;var kt=[Bh(it,st,ct,dt,pt)],Rt=kt[0],Qt=dt.widgetNode;return Dl(it,function(Xt){Qt&&(dt.widgetNode=Qt.cloneNode(!0)),kt.push(Bh(Xt,xn(Xt,st),xn(Xt,ct),dt,pt));for(var ge=0;ge<Xt.linked.length;++ge)if(Xt.linked[ge].isParent)return;Rt=Ce(kt)}),new Vl(kt,Rt)}function hg(it){return it.findMarks(Re(it.first,0),it.clipPos(Re(it.lastLine())),function(st){return st.parent})}function Up(it,st){for(var ct=0;ct<st.length;ct++){var dt=st[ct],pt=dt.find(),kt=it.clipPos(pt.from),Rt=it.clipPos(pt.to);if(fn(kt,Rt)){var Qt=Bh(it,kt,Rt,dt.primary,dt.primary.type);dt.markers.push(Qt),Qt.parent=dt}}}function dg(it){for(var st=function(dt){var pt=it[dt],kt=[pt.primary.doc];Dl(pt.primary.doc,function(Xt){return kt.push(Xt)});for(var Rt=0;Rt<pt.markers.length;Rt++){var Qt=pt.markers[Rt];ke(kt,Qt.doc)==-1&&(Qt.parent=null,pt.markers.splice(Rt--,1))}},ct=0;ct<it.length;ct++)st(ct)}var nv=0,$s=function(it,st,ct,dt,pt){if(!(this instanceof $s))return new $s(it,st,ct,dt,pt);ct==null&&(ct=0),Yr.call(this,[new yd([new Qo("",null)])]),this.first=ct,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ct;var kt=Re(ct,0);this.sel=mu(kt),this.history=new gd(null),this.id=++nv,this.modeOption=st,this.lineSep=dt,this.direction=pt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),Zc(this,{from:kt,to:kt,text:it}),qs(this,mu(kt),Ee)};$s.prototype=Lt(Yr.prototype,{constructor:$s,iter:function(it,st,ct){ct?this.iterN(it-this.first,st-it,ct):this.iterN(this.first,this.first+this.size,it)},insert:function(it,st){for(var ct=0,dt=0;dt<st.length;++dt)ct+=st[dt].height;this.insertInner(it-this.first,st,ct)},remove:function(it,st){this.removeInner(it-this.first,st)},getValue:function(it){var st=Nn(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:Ms(function(it){var st=Re(this.first,0),ct=this.first+this.size-1;Uu(this,{from:st,to:Re(ct,Qe(this,ct).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&bh(this.cm,0,0),qs(this,mu(st),Ee)}),replaceRange:function(it,st,ct,dt){st=xn(this,st),ct=ct?xn(this,ct):st,Oh(this,it,st,ct,dt)},getRange:function(it,st,ct){var dt=yn(this,xn(this,it),xn(this,st));return ct===!1?dt:dt.join(ct||this.lineSeparator())},getLine:function(it){var st=this.getLineHandle(it);return st&&st.text},getLineHandle:function(it){if(Gn(this,it))return Qe(this,it)},getLineNumber:function(it){return le(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Qe(this,it)),Mi(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return xn(this,it)},getCursor:function(it){var st=this.sel.primary(),ct;return it==null||it=="head"?ct=st.head:it=="anchor"?ct=st.anchor:it=="end"||it=="to"||it===!1?ct=st.to():ct=st.from(),ct},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ms(function(it,st,ct){Nh(this,xn(this,typeof it=="number"?Re(it,st||0):it),null,ct)}),setSelection:Ms(function(it,st,ct){Nh(this,xn(this,it),xn(this,st||it),ct)}),extendSelection:Ms(function(it,st,ct){Yc(this,xn(this,it),st&&xn(this,st),ct)}),extendSelections:Ms(function(it,st){Gp(this,zn(this,it),st)}),extendSelectionsBy:Ms(function(it,st){var ct=$n(this.sel.ranges,it);Gp(this,zn(this,ct),st)}),setSelections:Ms(function(it,st,ct){if(it.length){for(var dt=[],pt=0;pt<it.length;pt++)dt[pt]=new Mr(xn(this,it[pt].anchor),xn(this,it[pt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),qs(this,yl(this.cm,dt,st),ct)}}),addSelection:Ms(function(it,st,ct){var dt=this.sel.ranges.slice(0);dt.push(new Mr(xn(this,it),xn(this,st||it))),qs(this,yl(this.cm,dt,dt.length-1),ct)}),getSelection:function(it){for(var st=this.sel.ranges,ct,dt=0;dt<st.length;dt++){var pt=yn(this,st[dt].from(),st[dt].to());ct=ct?ct.concat(pt):pt}return it===!1?ct:ct.join(it||this.lineSeparator())},getSelections:function(it){for(var st=[],ct=this.sel.ranges,dt=0;dt<ct.length;dt++){var pt=yn(this,ct[dt].from(),ct[dt].to());it!==!1&&(pt=pt.join(it||this.lineSeparator())),st[dt]=pt}return st},replaceSelection:function(it,st,ct){for(var dt=[],pt=0;pt<this.sel.ranges.length;pt++)dt[pt]=it;this.replaceSelections(dt,st,ct||"+input")},replaceSelections:Ms(function(it,st,ct){for(var dt=[],pt=this.sel,kt=0;kt<pt.ranges.length;kt++){var Rt=pt.ranges[kt];dt[kt]={from:Rt.from(),to:Rt.to(),text:this.splitLines(it[kt]),origin:ct}}for(var Qt=st&&st!="end"&&Yd(this,dt,st),Xt=dt.length-1;Xt>=0;Xt--)Uu(this,dt[Xt]);Qt?Jc(this,Qt):this.cm&&gu(this.cm)}),undo:Ms(function(){sc(this,"undo")}),redo:Ms(function(){sc(this,"redo")}),undoSelection:Ms(function(){sc(this,"undo",!0)}),redoSelection:Ms(function(){sc(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,st=0,ct=0,dt=0;dt<it.done.length;dt++)it.done[dt].ranges||++st;for(var pt=0;pt<it.undone.length;pt++)it.undone[pt].ranges||++ct;return{undo:st,redo:ct}},clearHistory:function(){var it=this;this.history=new gd(this.history.maxGeneration),Dl(this,function(st){return st.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:vu(this.history.done),undone:vu(this.history.undone)}},setHistory:function(it){var st=this.history=new gd(this.history.maxGeneration);st.done=vu(it.done.slice(0),null,!0),st.undone=vu(it.undone.slice(0),null,!0)},setGutterMarker:Ms(function(it,st,ct){return Dh(this,it,"gutter",function(dt){var pt=dt.gutterMarkers||(dt.gutterMarkers={});return pt[st]=ct,!ct&&yt(pt)&&(dt.gutterMarkers=null),!0})}),clearGutter:Ms(function(it){var st=this;this.iter(function(ct){ct.gutterMarkers&&ct.gutterMarkers[it]&&Dh(st,ct,"gutter",function(){return ct.gutterMarkers[it]=null,yt(ct.gutterMarkers)&&(ct.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!Gn(this,it)||(st=it,it=Qe(this,it),!it))return null}else if(st=le(it),st==null)return null;return{line:st,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:Ms(function(it,st,ct){return Dh(this,it,st=="gutter"?"gutter":"class",function(dt){var pt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass";if(!dt[pt])dt[pt]=ct;else{if(Nt(ct).test(dt[pt]))return!1;dt[pt]+=" "+ct}return!0})}),removeLineClass:Ms(function(it,st,ct){return Dh(this,it,st=="gutter"?"gutter":"class",function(dt){var pt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",kt=dt[pt];if(kt)if(ct==null)dt[pt]=null;else{var Rt=kt.match(Nt(ct));if(!Rt)return!1;var Qt=Rt.index+Rt[0].length;dt[pt]=kt.slice(0,Rt.index)+(!Rt.index||Qt==kt.length?"":" ")+kt.slice(Qt)||null}else return!1;return!0})}),addLineWidget:Ms(function(it,st,ct){return Qc(this,it,st,ct)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,ct){return Bh(this,xn(this,it),xn(this,st),ct,ct&&ct.type||"range")},setBookmark:function(it,st){var ct={replacedWith:st&&(st.nodeType==null?st.widget:st),insertLeft:st&&st.insertLeft,clearWhenEmpty:!1,shared:st&&st.shared,handleMouseEvents:st&&st.handleMouseEvents};return it=xn(this,it),Bh(this,it,it,ct,"bookmark")},findMarksAt:function(it){it=xn(this,it);var st=[],ct=Qe(this,it.line).markedSpans;if(ct)for(var dt=0;dt<ct.length;++dt){var pt=ct[dt];(pt.from==null||pt.from<=it.ch)&&(pt.to==null||pt.to>=it.ch)&&st.push(pt.marker.parent||pt.marker)}return st},findMarks:function(it,st,ct){it=xn(this,it),st=xn(this,st);var dt=[],pt=it.line;return this.iter(it.line,st.line+1,function(kt){var Rt=kt.markedSpans;if(Rt)for(var Qt=0;Qt<Rt.length;Qt++){var Xt=Rt[Qt];!(Xt.to!=null&&pt==it.line&&it.ch>=Xt.to||Xt.from==null&&pt!=it.line||Xt.from!=null&&pt==st.line&&Xt.from>=st.ch)&&(!ct||ct(Xt.marker))&&dt.push(Xt.marker.parent||Xt.marker)}++pt}),dt},getAllMarks:function(){var it=[];return this.iter(function(st){var ct=st.markedSpans;if(ct)for(var dt=0;dt<ct.length;++dt)ct[dt].from!=null&&it.push(ct[dt].marker)}),it},posFromIndex:function(it){var st,ct=this.first,dt=this.lineSeparator().length;return this.iter(function(pt){var kt=pt.text.length+dt;if(kt>it)return st=it,!0;it-=kt,++ct}),xn(this,Re(ct,st))},indexFromPos:function(it){it=xn(this,it);var st=it.ch;if(it.line<this.first||it.ch<0)return 0;var ct=this.lineSeparator().length;return this.iter(this.first,it.line,function(dt){st+=dt.text.length+ct}),st},copy:function(it){var st=new $s(Nn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return st.scrollTop=this.scrollTop,st.scrollLeft=this.scrollLeft,st.sel=this.sel,st.extend=!1,it&&(st.history.undoDepth=this.history.undoDepth,st.setHistory(this.getHistory())),st},linkedDoc:function(it){it||(it={});var st=this.first,ct=this.first+this.size;it.from!=null&&it.from>st&&(st=it.from),it.to!=null&&it.to<ct&&(ct=it.to);var dt=new $s(Nn(this,st,ct),it.mode||this.modeOption,st,this.lineSep,this.direction);return it.sharedHist&&(dt.history=this.history),(this.linked||(this.linked=[])).push({doc:dt,sharedHist:it.sharedHist}),dt.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],Up(dt,hg(this)),dt},unlinkDoc:function(it){if(it instanceof dr&&(it=it.doc),this.linked)for(var st=0;st<this.linked.length;++st){var ct=this.linked[st];if(ct.doc==it){this.linked.splice(st,1),it.unlinkDoc(this),dg(hg(this));break}}if(it.history==this.history){var dt=[it.id];Dl(it,function(pt){return dt.push(pt.id)},!0),it.history=new gd(null),it.history.done=vu(this.history.done,dt),it.history.undone=vu(this.history.undone,dt)}},iterLinkedDocs:function(it){Dl(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Zn(it)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Ms(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&ev(this.cm))})}),$s.prototype.eachLine=$s.prototype.iter;var ac=0;function cg(it){var st=this;if(Jp(st),!(on(st,it)||bs(st.display,it))){Jn(it),$t&&(ac=+new Date);var ct=ua(st,it,!0),dt=it.dataTransfer.files;if(!(!ct||st.isReadOnly()))if(dt&&dt.length&&window.FileReader&&window.File)for(var pt=dt.length,kt=Array(pt),Rt=0,Qt=function(){++Rt==pt&&vs(st,function(){ct=xn(st.doc,ct);var Mn={from:ct,to:ct,text:st.doc.splitLines(kt.filter(function(hi){return hi!=null}).join(st.doc.lineSeparator())),origin:"paste"};Uu(st.doc,Mn),Jc(st.doc,mu(xn(st.doc,ct),xn(st.doc,Zu(Mn))))})()},Xt=function(Mn,hi){if(st.options.allowDropFileTypes&&ke(st.options.allowDropFileTypes,Mn.type)==-1){Qt();return}var gi=new FileReader;gi.onerror=function(){return Qt()},gi.onload=function(){var bi=gi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(bi)){Qt();return}kt[hi]=bi,Qt()},gi.readAsText(Mn)},ge=0;ge<dt.length;ge++)Xt(dt[ge],ge);else{if(st.state.draggingText&&st.doc.sel.contains(ct)>-1){st.state.draggingText(it),setTimeout(function(){return st.display.input.focus()},20);return}try{var en=it.dataTransfer.getData("Text");if(en){var Me;if(st.state.draggingText&&!st.state.draggingText.copy&&(Me=st.listSelections()),Th(st.doc,mu(ct,ct)),Me)for(var Fn=0;Fn<Me.length;++Fn)Oh(st.doc,"",Me[Fn].anchor,Me[Fn].head,"drag");st.replaceSelection(en,"around","paste"),st.display.input.focus()}}catch(Mn){}}}}function Xp(it,st){if($t&&(!it.state.draggingText||+new Date-ac<100)){fi(st);return}if(!(on(it,st)||bs(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!Fe)){var ct=Wt("img",null,null,"position: fixed; left: 0; top: 0;");ct.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",te&&(ct.width=ct.height=1,it.display.wrapper.appendChild(ct),ct._top=ct.offsetTop),st.dataTransfer.setDragImage(ct,0,0),te&&ct.parentNode.removeChild(ct)}}function Yp(it,st){var ct=ua(it,st);if(ct){var dt=document.createDocumentFragment();ir(it,ct,dt),it.display.dragCursor||(it.display.dragCursor=Wt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),Kt(it.display.dragCursor,dt)}}function Jp(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function Qp(it){if(document.getElementsByClassName){for(var st=document.getElementsByClassName("CodeMirror"),ct=[],dt=0;dt<st.length;dt++){var pt=st[dt].CodeMirror;pt&&ct.push(pt)}ct.length&&ct[0].operation(function(){for(var kt=0;kt<ct.length;kt++)it(ct[kt])})}}var fg=!1;function Xa(){fg||(Sd(),fg=!0)}function Sd(){var it;_e(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,Qp(gg)},100))}),_e(window,"blur",function(){return Qp(Ch)})}function gg(it){var st=it.display;st.cachedCharWidth=st.cachedTextHeight=st.cachedPaddingH=null,st.scrollbarsClipped=!1,it.setSize()}for(var Ul={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"},lc=0;lc<10;lc++)Ul[lc+48]=Ul[lc+96]=String(lc);for(var qc=65;qc<=90;qc++)Ul[qc]=String.fromCharCode(qc);for(var uc=1;uc<=12;uc++)Ul[uc+111]=Ul[uc+63235]="F"+uc;var Da={};Da.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"},Da.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"},Da.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"},Da.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"]},Da.default=ht?Da.macDefault:Da.pcDefault;function pg(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var ct,dt,pt,kt,Rt=0;Rt<st.length-1;Rt++){var Qt=st[Rt];if(/^(cmd|meta|m)$/i.test(Qt))kt=!0;else if(/^a(lt)?$/i.test(Qt))ct=!0;else if(/^(c|ctrl|control)$/i.test(Qt))dt=!0;else if(/^s(hift)?$/i.test(Qt))pt=!0;else throw new Error("Unrecognized modifier name: "+Qt)}return ct&&(it="Alt-"+it),dt&&(it="Ctrl-"+it),kt&&(it="Cmd-"+it),pt&&(it="Shift-"+it),it}function mg(it){var st={};for(var ct in it)if(it.hasOwnProperty(ct)){var dt=it[ct];if(/^(name|fallthrough|(de|at)tach)$/.test(ct))continue;if(dt=="..."){delete it[ct];continue}for(var pt=$n(ct.split(" "),pg),kt=0;kt<pt.length;kt++){var Rt=void 0,Qt=void 0;kt==pt.length-1?(Qt=pt.join(" "),Rt=dt):(Qt=pt.slice(0,kt+1).join(" "),Rt="...");var Xt=st[Qt];if(!Xt)st[Qt]=Rt;else if(Xt!=Rt)throw new Error("Inconsistent bindings for "+Qt)}delete it[ct]}for(var ge in st)it[ge]=st[ge];return it}function al(it,st,ct,dt){st=Ah(st);var pt=st.call?st.call(it,dt):st[it];if(pt===!1)return"nothing";if(pt==="...")return"multi";if(pt!=null&&ct(pt))return"handled";if(st.fallthrough){if(Object.prototype.toString.call(st.fallthrough)!="[object Array]")return al(it,st.fallthrough,ct,dt);for(var kt=0;kt<st.fallthrough.length;kt++){var Rt=al(it,st.fallthrough[kt],ct,dt);if(Rt)return Rt}}}function xd(it){var st=typeof it=="string"?it:Ul[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function vg(it,st,ct){var dt=it;return st.altKey&&dt!="Alt"&&(it="Alt-"+it),(wt?st.metaKey:st.ctrlKey)&&dt!="Ctrl"&&(it="Ctrl-"+it),(wt?st.ctrlKey:st.metaKey)&&dt!="Mod"&&(it="Cmd-"+it),!ct&&st.shiftKey&&dt!="Shift"&&(it="Shift-"+it),it}function qp(it,st){if(te&&it.keyCode==34&&it.char)return!1;var ct=Ul[it.keyCode];return ct==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(ct=it.code),vg(ct,it,st))}function Ah(it){return typeof it=="string"?Da[it]:it}function Ba(it,st){for(var ct=it.doc.sel.ranges,dt=[],pt=0;pt<ct.length;pt++){for(var kt=st(ct[pt]);dt.length&&fn(kt.from,Ce(dt).to)<=0;){var Rt=dt.pop();if(fn(Rt.from,kt.from)<0){kt.from=Rt.from;break}}dt.push(kt)}pr(it,function(){for(var Qt=dt.length-1;Qt>=0;Qt--)Oh(it.doc,"",dt[Qt].from,dt[Qt].to,"+delete");gu(it)})}function yg(it,st,ct){var dt=qt(it.text,st+ct,ct);return dt<0||dt>it.text.length?null:dt}function ls(it,st,ct){var dt=yg(it,st.ch,ct);return dt==null?null:new Re(st.line,dt,ct<0?"after":"before")}function hc(it,st,ct,dt,pt){if(it){st.doc.direction=="rtl"&&(pt=-pt);var kt=hn(ct,st.doc.direction);if(kt){var Rt=pt<0?Ce(kt):kt[0],Qt=pt<0==(Rt.level==1),Xt=Qt?"after":"before",ge;if(Rt.level>0||st.doc.direction=="rtl"){var en=$a(st,ct);ge=pt<0?ct.text.length-1:0;var Me=Qs(st,en,ge).top;ge=Zt(function(Fn){return Qs(st,en,Fn).top==Me},pt<0==(Rt.level==1)?Rt.from:Rt.to-1,ge),Xt=="before"&&(ge=yg(ct,ge,1))}else ge=pt<0?Rt.to:Rt.from;return new Re(dt,ge,Xt)}}return new Re(dt,pt<0?ct.text.length:0,pt<0?"before":"after")}function tf(it,st,ct,dt){var pt=hn(st,it.doc.direction);if(!pt)return ls(st,ct,dt);ct.ch>=st.text.length?(ct.ch=st.text.length,ct.sticky="before"):ct.ch<=0&&(ct.ch=0,ct.sticky="after");var kt=ne(pt,ct.ch,ct.sticky),Rt=pt[kt];if(it.doc.direction=="ltr"&&Rt.level%2==0&&(dt>0?Rt.to>ct.ch:Rt.from<ct.ch))return ls(st,ct,dt);var Qt=function(_i,ho){return yg(st,_i instanceof Re?_i.ch:_i,ho)},Xt,ge=function(_i){return it.options.lineWrapping?(Xt=Xt||$a(it,st),Qf(it,st,Xt,_i)):{begin:0,end:st.text.length}},en=ge(ct.sticky=="before"?Qt(ct,-1):ct.ch);if(it.doc.direction=="rtl"||Rt.level==1){var Me=Rt.level==1==dt<0,Fn=Qt(ct,Me?1:-1);if(Fn!=null&&(Me?Fn<=Rt.to&&Fn<=en.end:Fn>=Rt.from&&Fn>=en.begin)){var Mn=Me?"before":"after";return new Re(ct.line,Fn,Mn)}}var hi=function(_i,ho,qi){for(var mo=function($r,Ss){return Ss?new Re(ct.line,Qt($r,1),"before"):new Re(ct.line,$r,"after")};_i>=0&&_i<pt.length;_i+=ho){var Io=pt[_i],Ji=ho>0==(Io.level!=1),Vo=Ji?qi.begin:Qt(qi.end,-1);if(Io.from<=Vo&&Vo<Io.to||(Vo=Ji?Io.from:Qt(Io.to,-1),qi.begin<=Vo&&Vo<qi.end))return mo(Vo,Ji)}},gi=hi(kt+dt,dt,en);if(gi)return gi;var bi=dt>0?en.end:Qt(en.begin,-1);return bi!=null&&!(dt>0&&bi==st.text.length)&&(gi=hi(dt>0?0:pt.length-1,dt,ge(bi)),gi)?gi:null}var Xu={selectAll:as,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),Ee)},killLine:function(it){return Ba(it,function(st){if(st.empty()){var ct=Qe(it.doc,st.head.line).text.length;return st.head.ch==ct&&st.head.line<it.lastLine()?{from:st.head,to:Re(st.head.line+1,0)}:{from:st.head,to:Re(st.head.line,ct)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return Ba(it,function(st){return{from:Re(st.from().line,0),to:xn(it.doc,Re(st.to().line+1,0))}})},delLineLeft:function(it){return Ba(it,function(st){return{from:Re(st.from().line,0),to:st.from()}})},delWrappedLineLeft:function(it){return Ba(it,function(st){var ct=it.charCoords(st.head,"div").top+5,dt=it.coordsChar({left:0,top:ct},"div");return{from:dt,to:st.from()}})},delWrappedLineRight:function(it){return Ba(it,function(st){var ct=it.charCoords(st.head,"div").top+5,dt=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div");return{from:st.from(),to:dt}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(Re(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(Re(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return Pd(it,st.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(st){return Sg(it,st.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(st){return wd(it,st.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div")},gn)},goLineLeft:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:0,top:ct},"div")},gn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5,dt=it.coordsChar({left:0,top:ct},"div");return dt.ch<it.getLine(dt.line).search(/\S/)?Sg(it,st.head):dt},gn)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var st=[],ct=it.listSelections(),dt=it.options.tabSize,pt=0;pt<ct.length;pt++){var kt=ct[pt].from(),Rt=ue(it.getLine(kt.line),kt.ch,dt);st.push(In(dt-Rt%dt))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return pr(it,function(){for(var st=it.listSelections(),ct=[],dt=0;dt<st.length;dt++)if(st[dt].empty()){var pt=st[dt].head,kt=Qe(it.doc,pt.line).text;if(kt){if(pt.ch==kt.length&&(pt=new Re(pt.line,pt.ch-1)),pt.ch>0)pt=new Re(pt.line,pt.ch+1),it.replaceRange(kt.charAt(pt.ch-1)+kt.charAt(pt.ch-2),Re(pt.line,pt.ch-2),pt,"+transpose");else if(pt.line>it.doc.first){var Rt=Qe(it.doc,pt.line-1).text;Rt&&(pt=new Re(pt.line,1),it.replaceRange(kt.charAt(0)+it.doc.lineSeparator()+Rt.charAt(Rt.length-1),Re(pt.line-1,Rt.length-1),pt,"+transpose"))}}ct.push(new Mr(pt,pt))}it.setSelections(ct)})},newlineAndIndent:function(it){return pr(it,function(){for(var st=it.listSelections(),ct=st.length-1;ct>=0;ct--)it.replaceRange(it.doc.lineSeparator(),st[ct].anchor,st[ct].head,"+input");st=it.listSelections();for(var dt=0;dt<st.length;dt++)it.indentLine(st[dt].from().line,null,!0);gu(it)})},openLine:function(it){return it.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function Pd(it,st){var ct=Qe(it.doc,st),dt=Mi(ct);return dt!=ct&&(st=le(dt)),hc(!0,it,dt,st,1)}function wd(it,st){var ct=Qe(it.doc,st),dt=co(ct);return dt!=ct&&(st=le(dt)),hc(!0,it,ct,st,-1)}function Sg(it,st){var ct=Pd(it,st.line),dt=Qe(it.doc,ct.line),pt=hn(dt,it.doc.direction);if(!pt||pt[0].level==0){var kt=Math.max(ct.ch,dt.text.search(/\S/)),Rt=st.line==ct.line&&st.ch<=kt&&st.ch;return Re(ct.line,Rt?0:kt,ct.sticky)}return ct}function Cd(it,st,ct){if(typeof st=="string"&&(st=Xu[st],!st))return!1;it.display.input.ensurePolled();var dt=it.display.shift,pt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),ct&&(it.display.shift=!1),pt=st(it)!=ln}finally{it.display.shift=dt,it.state.suppressEdits=!1}return pt}function xg(it,st,ct){for(var dt=0;dt<it.state.keyMaps.length;dt++){var pt=al(st,it.state.keyMaps[dt],ct,it);if(pt)return pt}return it.options.extraKeys&&al(st,it.options.extraKeys,ct,it)||al(st,it.options.keyMap,ct,it)}var Xl=new Ht;function Ih(it,st,ct,dt){var pt=it.state.keySeq;if(pt){if(xd(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:Xl.set(50,function(){it.state.keySeq==pt&&(it.state.keySeq=null,it.display.input.reset())}),ef(it,pt+" "+st,ct,dt))return!0}return ef(it,st,ct,dt)}function ef(it,st,ct,dt){var pt=xg(it,st,dt);return pt=="multi"&&(it.state.keySeq=st),pt=="handled"&&mi(it,"keyHandled",it,st,ct),(pt=="handled"||pt=="multi")&&(Jn(ct),br(it)),!!pt}function nf(it,st){var ct=qp(st,!0);return ct?st.shiftKey&&!it.state.keySeq?Ih(it,"Shift-"+ct,st,function(dt){return Cd(it,dt,!0)})||Ih(it,ct,st,function(dt){if(typeof dt=="string"?/^go[A-Z]/.test(dt):dt.motion)return Cd(it,dt)}):Ih(it,ct,st,function(dt){return Cd(it,dt)}):!1}function of(it,st,ct){return Ih(it,"'"+ct+"'",st,function(dt){return Cd(it,dt,!0)})}var Rh=null;function Pg(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=Se(),!on(st,it))){$t&&Ut<11&&it.keyCode==27&&(it.returnValue=!1);var ct=it.keyCode;st.display.shift=ct==16||it.shiftKey;var dt=nf(st,it);te&&(Rh=dt?ct:null,!dt&&ct==88&&!so&&(ht?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),vt&&!ht&&!dt&&ct==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),ct==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&wg(st)}}function wg(it){var st=it.display.lineDiv;Ye(st,"CodeMirror-crosshair");function ct(dt){(dt.keyCode==18||!dt.altKey)&&(Dt(st,"CodeMirror-crosshair"),Ln(document,"keyup",ct),Ln(document,"mouseover",ct))}_e(document,"keyup",ct),_e(document,"mouseover",ct)}function Cg(it){it.keyCode==16&&(this.doc.sel.shift=!1),on(this,it)}function Bl(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(bs(st.display,it)||on(st,it)||it.ctrlKey&&!it.altKey||ht&&it.metaKey)){var ct=it.keyCode,dt=it.charCode;if(te&&ct==Rh){Rh=null,Jn(it);return}if(!(te&&(!it.which||it.which<10)&&nf(st,it))){var pt=String.fromCharCode(dt==null?ct:dt);pt!="\b"&&(of(st,it,pt)||st.display.input.onKeyPress(it))}}}var tm=400,bg=function(it,st,ct){this.time=it,this.pos=st,this.button=ct};bg.prototype.compare=function(it,st,ct){return this.time+tm>it&&fn(st,this.pos)==0&&ct==this.button};var bd,jh;function Lg(it,st){var ct=+new Date;return jh&&jh.compare(ct,it,st)?(bd=jh=null,"triple"):bd&&bd.compare(ct,it,st)?(jh=new bg(ct,it,st),bd=null,"double"):(bd=new bg(ct,it,st),jh=null,"single")}function Al(it){var st=this,ct=st.display;if(!(on(st,it)||ct.activeTouch&&ct.input.supportsTouch())){if(ct.input.ensurePolled(),ct.shift=it.shiftKey,bs(ct,it)){Jt||(ct.scroller.draggable=!1,setTimeout(function(){return ct.scroller.draggable=!0},100));return}if(!af(st,it)){var dt=ua(st,it),pt=Ti(it),kt=dt?Lg(dt,pt):"single";window.focus(),pt==1&&st.state.selectingText&&st.state.selectingText(it),!(dt&&Mg(st,pt,dt,kt,it))&&(pt==1?dt?em(st,dt,kt,it):Bi(it)==ct.scroller&&Jn(it):pt==2?(dt&&Yc(st.doc,dt),setTimeout(function(){return ct.input.focus()},20)):pt==3&&(Et?st.display.input.onContextMenu(it):Vr(st)))}}}function Mg(it,st,ct,dt,pt){var kt="Click";return dt=="double"?kt="Double"+kt:dt=="triple"&&(kt="Triple"+kt),kt=(st==1?"Left":st==2?"Middle":"Right")+kt,Ih(it,vg(kt,pt),pt,function(Rt){if(typeof Rt=="string"&&(Rt=Xu[Rt]),!Rt)return!1;var Qt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),Qt=Rt(it,ct)!=ln}finally{it.state.suppressEdits=!1}return Qt})}function rf(it,st,ct){var dt=it.getOption("configureMouse"),pt=dt?dt(it,st,ct):{};if(pt.unit==null){var kt=at?ct.shiftKey&&ct.metaKey:ct.altKey;pt.unit=kt?"rectangle":st=="single"?"char":st=="double"?"word":"line"}return(pt.extend==null||it.doc.extend)&&(pt.extend=it.doc.extend||ct.shiftKey),pt.addNew==null&&(pt.addNew=ht?ct.metaKey:ct.ctrlKey),pt.moveOnDrag==null&&(pt.moveOnDrag=!(ht?ct.altKey:ct.ctrlKey)),pt}function em(it,st,ct,dt){$t?setTimeout(We(zr,it),0):it.curOp.focus=Se();var pt=rf(it,ct,dt),kt=it.doc.sel,Rt;it.options.dragDrop&&Di&&!it.isReadOnly()&&ct=="single"&&(Rt=kt.contains(st))>-1&&(fn((Rt=kt.ranges[Rt]).from(),st)<0||st.xRel>0)&&(fn(Rt.to(),st)>0||st.xRel<0)?Eg(it,dt,st,pt):iv(it,dt,st,pt)}function Eg(it,st,ct,dt){var pt=it.display,kt=!1,Rt=vs(it,function(ge){Jt&&(pt.scroller.draggable=!1),it.state.draggingText=!1,Ln(pt.wrapper.ownerDocument,"mouseup",Rt),Ln(pt.wrapper.ownerDocument,"mousemove",Qt),Ln(pt.scroller,"dragstart",Xt),Ln(pt.scroller,"drop",Rt),kt||(Jn(ge),dt.addNew||Yc(it.doc,ct,null,null,dt.extend),Jt&&!Fe||$t&&Ut==9?setTimeout(function(){pt.wrapper.ownerDocument.body.focus({preventScroll:!0}),pt.input.focus()},20):pt.input.focus())}),Qt=function(ge){kt=kt||Math.abs(st.clientX-ge.clientX)+Math.abs(st.clientY-ge.clientY)>=10},Xt=function(){return kt=!0};Jt&&(pt.scroller.draggable=!0),it.state.draggingText=Rt,Rt.copy=!dt.moveOnDrag,pt.scroller.dragDrop&&pt.scroller.dragDrop(),_e(pt.wrapper.ownerDocument,"mouseup",Rt),_e(pt.wrapper.ownerDocument,"mousemove",Qt),_e(pt.scroller,"dragstart",Xt),_e(pt.scroller,"drop",Rt),Vr(it),setTimeout(function(){return pt.input.focus()},20)}function kg(it,st,ct){if(ct=="char")return new Mr(st,st);if(ct=="word")return it.findWordAt(st);if(ct=="line")return new Mr(Re(st.line,0),xn(it.doc,Re(st.line+1,0)));var dt=ct(it,st);return new Mr(dt.from,dt.to)}function iv(it,st,ct,dt){var pt=it.display,kt=it.doc;Jn(st);var Rt,Qt,Xt=kt.sel,ge=Xt.ranges;if(dt.addNew&&!dt.extend?(Qt=kt.sel.contains(ct),Qt>-1?Rt=ge[Qt]:Rt=new Mr(ct,ct)):(Rt=kt.sel.primary(),Qt=kt.sel.primIndex),dt.unit=="rectangle")dt.addNew||(Rt=new Mr(ct,ct)),ct=ua(it,st,!0,!0),Qt=-1;else{var en=kg(it,ct,dt.unit);dt.extend?Rt=Xc(Rt,en.anchor,en.head,dt.extend):Rt=en}dt.addNew?Qt==-1?(Qt=ge.length,qs(kt,yl(it,ge.concat([Rt]),Qt),{scroll:!1,origin:"*mouse"})):ge.length>1&&ge[Qt].empty()&&dt.unit=="char"&&!dt.extend?(qs(kt,yl(it,ge.slice(0,Qt).concat(ge.slice(Qt+1)),0),{scroll:!1,origin:"*mouse"}),Xt=kt.sel):Vu(kt,Qt,Rt,Ke):(Qt=0,qs(kt,new rl([Rt],0),Ke),Xt=kt.sel);var Me=ct;function Fn(qi){if(fn(Me,qi)!=0)if(Me=qi,dt.unit=="rectangle"){for(var mo=[],Io=it.options.tabSize,Ji=ue(Qe(kt,ct.line).text,ct.ch,Io),Vo=ue(Qe(kt,qi.line).text,qi.ch,Io),$r=Math.min(Ji,Vo),Ss=Math.max(Ji,Vo),Jr=Math.min(ct.line,qi.line),ba=Math.min(it.lastLine(),Math.max(ct.line,qi.line));Jr<=ba;Jr++){var ta=Qe(kt,Jr).text,fs=Bn(ta,$r,Io);$r==Ss?mo.push(new Mr(Re(Jr,fs),Re(Jr,fs))):ta.length>fs&&mo.push(new Mr(Re(Jr,fs),Re(Jr,Bn(ta,Ss,Io))))}mo.length||mo.push(new Mr(ct,ct)),qs(kt,yl(it,Xt.ranges.slice(0,Qt).concat(mo),Qt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(qi)}else{var Aa=Rt,Zs=kg(it,qi,dt.unit),gs=Aa.anchor,cr;fn(Zs.anchor,gs)>0?(cr=Zs.head,gs=rn(Aa.from(),Zs.anchor)):(cr=Zs.anchor,gs=vn(Aa.to(),Zs.head));var es=Xt.ranges.slice(0);es[Qt]=nm(it,new Mr(xn(kt,gs),cr)),qs(kt,yl(it,es,Qt),Ke)}}var Mn=pt.wrapper.getBoundingClientRect(),hi=0;function gi(qi){var mo=++hi,Io=ua(it,qi,!0,dt.unit=="rectangle");if(Io)if(fn(Io,Me)!=0){it.curOp.focus=Se(),Fn(Io);var Ji=qo(pt,kt);(Io.line>=Ji.to||Io.line<Ji.from)&&setTimeout(vs(it,function(){hi==mo&&gi(qi)}),150)}else{var Vo=qi.clientY<Mn.top?-20:qi.clientY>Mn.bottom?20:0;Vo&&setTimeout(vs(it,function(){hi==mo&&(pt.scroller.scrollTop+=Vo,gi(qi))}),50)}}function bi(qi){it.state.selectingText=!1,hi=1/0,qi&&(Jn(qi),pt.input.focus()),Ln(pt.wrapper.ownerDocument,"mousemove",_i),Ln(pt.wrapper.ownerDocument,"mouseup",ho),kt.history.lastSelOrigin=null}var _i=vs(it,function(qi){qi.buttons===0||!Ti(qi)?bi(qi):gi(qi)}),ho=vs(it,bi);it.state.selectingText=ho,_e(pt.wrapper.ownerDocument,"mousemove",_i),_e(pt.wrapper.ownerDocument,"mouseup",ho)}function nm(it,st){var ct=st.anchor,dt=st.head,pt=Qe(it.doc,ct.line);if(fn(ct,dt)==0&&ct.sticky==dt.sticky)return st;var kt=hn(pt);if(!kt)return st;var Rt=ne(kt,ct.ch,ct.sticky),Qt=kt[Rt];if(Qt.from!=ct.ch&&Qt.to!=ct.ch)return st;var Xt=Rt+(Qt.from==ct.ch==(Qt.level!=1)?0:1);if(Xt==0||Xt==kt.length)return st;var ge;if(dt.line!=ct.line)ge=(dt.line-ct.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var en=ne(kt,dt.ch,dt.sticky),Me=en-Rt||(dt.ch-ct.ch)*(Qt.level==1?-1:1);en==Xt-1||en==Xt?ge=Me<0:ge=Me>0}var Fn=kt[Xt+(ge?-1:0)],Mn=ge==(Fn.level==1),hi=Mn?Fn.from:Fn.to,gi=Mn?"after":"before";return ct.ch==hi&&ct.sticky==gi?st:new Mr(new Re(ct.line,hi,gi),dt)}function sf(it,st,ct,dt){var pt,kt;if(st.touches)pt=st.touches[0].clientX,kt=st.touches[0].clientY;else try{pt=st.clientX,kt=st.clientY}catch(Fn){return!1}if(pt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;dt&&Jn(st);var Rt=it.display,Qt=Rt.lineDiv.getBoundingClientRect();if(kt>Qt.bottom||!Cn(it,ct))return ni(st);kt-=Qt.top-Rt.viewOffset;for(var Xt=0;Xt<it.display.gutterSpecs.length;++Xt){var ge=Rt.gutters.childNodes[Xt];if(ge&&ge.getBoundingClientRect().right>=pt){var en=mn(it.doc,kt),Me=it.display.gutterSpecs[Xt];return ye(it,ct,it,en,Me.className,st),ni(st)}}}function af(it,st){return sf(it,st,"gutterClick",!0)}function lf(it,st){bs(it.display,st)||im(it,st)||on(it,st,"contextmenu")||Et||it.display.input.onContextMenu(st)}function im(it,st){return Cn(it,"gutterContextMenu")?sf(it,st,"gutterContextMenu",!1):!1}function uf(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),fr(it)}var Yu={toString:function(){return"CodeMirror.Init"}},Ng={},dc={};function om(it){var st=it.optionHandlers;function ct(dt,pt,kt,Rt){it.defaults[dt]=pt,kt&&(st[dt]=Rt?function(Qt,Xt,ge){ge!=Yu&&kt(Qt,Xt,ge)}:kt)}it.defineOption=ct,it.Init=Yu,ct("value","",function(dt,pt){return dt.setValue(pt)},!0),ct("mode",null,function(dt,pt){dt.doc.modeOption=pt,_o(dt)},!0),ct("indentUnit",2,_o,!0),ct("indentWithTabs",!1),ct("smartIndent",!0),ct("tabSize",4,function(dt){Jd(dt),fr(dt),Kr(dt)},!0),ct("lineSeparator",null,function(dt,pt){if(dt.doc.lineSep=pt,!!pt){var kt=[],Rt=dt.doc.first;dt.doc.iter(function(Xt){for(var ge=0;;){var en=Xt.text.indexOf(pt,ge);if(en==-1)break;ge=en+pt.length,kt.push(Re(Rt,en))}Rt++});for(var Qt=kt.length-1;Qt>=0;Qt--)Oh(dt.doc,pt,kt[Qt],Re(kt[Qt].line,kt[Qt].ch+pt.length))}}),ct("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(dt,pt,kt){dt.state.specialChars=new RegExp(pt.source+(pt.test(" ")?"":"| "),"g"),kt!=Yu&&dt.refresh()}),ct("specialCharPlaceholder",wr,function(dt){return dt.refresh()},!0),ct("electricChars",!0),ct("inputStyle",nt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ct("spellcheck",!1,function(dt,pt){return dt.getInputField().spellcheck=pt},!0),ct("autocorrect",!1,function(dt,pt){return dt.getInputField().autocorrect=pt},!0),ct("autocapitalize",!1,function(dt,pt){return dt.getInputField().autocapitalize=pt},!0),ct("rtlMoveVisually",!ft),ct("wholeLineUpdateBefore",!0),ct("theme","default",function(dt){uf(dt),Va(dt)},!0),ct("keyMap","default",function(dt,pt,kt){var Rt=Ah(pt),Qt=kt!=Yu&&Ah(kt);Qt&&Qt.detach&&Qt.detach(dt,Rt),Rt.attach&&Rt.attach(dt,Qt||null)}),ct("extraKeys",null),ct("configureMouse",null),ct("lineWrapping",!1,rm,!0),ct("gutters",[],function(dt,pt){dt.display.gutterSpecs=ks(pt,dt.options.lineNumbers),Va(dt)},!0),ct("fixedGutter",!0,function(dt,pt){dt.display.gutters.style.left=pt?Vd(dt.display)+"px":"0",dt.refresh()},!0),ct("coverGutterNextToScrollbar",!1,function(dt){return Ru(dt)},!0),ct("scrollbarStyle","native",function(dt){ng(dt),Ru(dt),dt.display.scrollbars.setScrollTop(dt.doc.scrollTop),dt.display.scrollbars.setScrollLeft(dt.doc.scrollLeft)},!0),ct("lineNumbers",!1,function(dt,pt){dt.display.gutterSpecs=ks(dt.options.gutters,pt),Va(dt)},!0),ct("firstLineNumber",1,Va,!0),ct("lineNumberFormatter",function(dt){return dt},Va,!0),ct("showCursorWhenSelecting",!1,ms,!0),ct("resetSelectionOnContextMenu",!0),ct("lineWiseCopyCut",!0),ct("pasteLinesPerSelection",!0),ct("selectionsMayTouch",!1),ct("readOnly",!1,function(dt,pt){pt=="nocursor"&&(Ch(dt),dt.display.input.blur()),dt.display.input.readOnlyChanged(pt)}),ct("screenReaderLabel",null,function(dt,pt){pt=pt===""?null:pt,dt.display.input.screenReaderLabelChanged(pt)}),ct("disableInput",!1,function(dt,pt){pt||dt.display.input.reset()},!0),ct("dragDrop",!0,hf),ct("allowDropFileTypes",null),ct("cursorBlinkRate",530),ct("cursorScrollMargin",0),ct("cursorHeight",1,ms,!0),ct("singleCursorHeightPerLine",!0,ms,!0),ct("workTime",100),ct("workDelay",100),ct("flattenSpans",!0,Jd,!0),ct("addModeClass",!1,Jd,!0),ct("pollInterval",100),ct("undoDepth",200,function(dt,pt){return dt.doc.history.undoDepth=pt}),ct("historyEventDelay",1250),ct("viewportMargin",10,function(dt){return dt.refresh()},!0),ct("maxHighlightLength",1e4,Jd,!0),ct("moveInputWithCursor",!0,function(dt,pt){pt||dt.display.input.resetPosition()}),ct("tabindex",null,function(dt,pt){return dt.display.input.getField().tabIndex=pt||""}),ct("autofocus",null),ct("direction","ltr",function(dt,pt){return dt.doc.setDirection(pt)},!0),ct("phrases",null)}function hf(it,st,ct){var dt=ct&&ct!=Yu;if(!st!=!dt){var pt=it.display.dragFunctions,kt=st?_e:Ln;kt(it.display.scroller,"dragstart",pt.start),kt(it.display.scroller,"dragenter",pt.enter),kt(it.display.scroller,"dragover",pt.over),kt(it.display.scroller,"dragleave",pt.leave),kt(it.display.scroller,"drop",pt.drop)}}function rm(it){it.options.lineWrapping?(Ye(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Dt(it.display.wrapper,"CodeMirror-wrap"),Uo(it)),Po(it),Kr(it),fr(it),setTimeout(function(){return Ru(it)},100)}function dr(it,st){var ct=this;if(!(this instanceof dr))return new dr(it,st);this.options=st=st?Ue(st):{},Ue(Ng,st,!1);var dt=st.value;typeof dt=="string"?dt=new $s(dt,st.mode,null,st.lineSeparator,st.direction):st.mode&&(dt.modeOption=st.mode),this.doc=dt;var pt=new dr.inputStyles[st.inputStyle](this),kt=this.display=new $u(it,dt,pt,st);kt.wrapper.CodeMirror=this,uf(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ng(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 Ht,keySeq:null,specialChars:null},st.autofocus&&!nt&&kt.input.focus(),$t&&Ut<11&&setTimeout(function(){return ct.display.input.reset(!0)},20),Ld(this),Xa(),ju(this),this.curOp.forceUpdate=!0,_c(this,dt),st.autofocus&&!nt||this.hasFocus()?setTimeout(function(){ct.hasFocus()&&!ct.state.focused&&or(ct)},20):Ch(this);for(var Rt in dc)dc.hasOwnProperty(Rt)&&dc[Rt](this,st[Rt],Yu);ds(this),st.finishInit&&st.finishInit(this);for(var Qt=0;Qt<zh.length;++Qt)zh[Qt](this);zu(this),Jt&&st.lineWrapping&&getComputedStyle(kt.lineDiv).textRendering=="optimizelegibility"&&(kt.lineDiv.style.textRendering="auto")}dr.defaults=Ng,dr.optionHandlers=dc;function Ld(it){var st=it.display;_e(st.scroller,"mousedown",vs(it,Al)),$t&&Ut<11?_e(st.scroller,"dblclick",vs(it,function(Xt){if(!on(it,Xt)){var ge=ua(it,Xt);if(!(!ge||af(it,Xt)||bs(it.display,Xt))){Jn(Xt);var en=it.findWordAt(ge);Yc(it.doc,en.anchor,en.head)}}})):_e(st.scroller,"dblclick",function(Xt){return on(it,Xt)||Jn(Xt)}),_e(st.scroller,"contextmenu",function(Xt){return lf(it,Xt)}),_e(st.input.getField(),"contextmenu",function(Xt){st.scroller.contains(Xt.target)||lf(it,Xt)});var ct,dt={end:0};function pt(){st.activeTouch&&(ct=setTimeout(function(){return st.activeTouch=null},1e3),dt=st.activeTouch,dt.end=+new Date)}function kt(Xt){if(Xt.touches.length!=1)return!1;var ge=Xt.touches[0];return ge.radiusX<=1&&ge.radiusY<=1}function Rt(Xt,ge){if(ge.left==null)return!0;var en=ge.left-Xt.left,Me=ge.top-Xt.top;return en*en+Me*Me>20*20}_e(st.scroller,"touchstart",function(Xt){if(!on(it,Xt)&&!kt(Xt)&&!af(it,Xt)){st.input.ensurePolled(),clearTimeout(ct);var ge=+new Date;st.activeTouch={start:ge,moved:!1,prev:ge-dt.end<=300?dt:null},Xt.touches.length==1&&(st.activeTouch.left=Xt.touches[0].pageX,st.activeTouch.top=Xt.touches[0].pageY)}}),_e(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),_e(st.scroller,"touchend",function(Xt){var ge=st.activeTouch;if(ge&&!bs(st,Xt)&&ge.left!=null&&!ge.moved&&new Date-ge.start<300){var en=it.coordsChar(st.activeTouch,"page"),Me;!ge.prev||Rt(ge,ge.prev)?Me=new Mr(en,en):!ge.prev.prev||Rt(ge,ge.prev.prev)?Me=it.findWordAt(en):Me=new Mr(Re(en.line,0),xn(it.doc,Re(en.line+1,0))),it.setSelection(Me.anchor,Me.head),it.focus(),Jn(Xt)}pt()}),_e(st.scroller,"touchcancel",pt),_e(st.scroller,"scroll",function(){st.scroller.clientHeight&&(Lh(it,st.scroller.scrollTop),pu(it,st.scroller.scrollLeft,!0),ye(it,"scroll",it))}),_e(st.scroller,"mousewheel",function(Xt){return Ns(it,Xt)}),_e(st.scroller,"DOMMouseScroll",function(Xt){return Ns(it,Xt)}),_e(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Xt){on(it,Xt)||fi(Xt)},over:function(Xt){on(it,Xt)||(Yp(it,Xt),fi(Xt))},start:function(Xt){return Xp(it,Xt)},drop:vs(it,cg),leave:function(Xt){on(it,Xt)||Jp(it)}};var Qt=st.input.getField();_e(Qt,"keyup",function(Xt){return Cg.call(it,Xt)}),_e(Qt,"keydown",vs(it,Pg)),_e(Qt,"keypress",vs(it,Bl)),_e(Qt,"focus",function(Xt){return or(it,Xt)}),_e(Qt,"blur",function(Xt){return Ch(it,Xt)})}var zh=[];dr.defineInitHook=function(it){return zh.push(it)};function ys(it,st,ct,dt){var pt=it.doc,kt;ct==null&&(ct="add"),ct=="smart"&&(pt.mode.indent?kt=Ei(it,st).state:ct="prev");var Rt=it.options.tabSize,Qt=Qe(pt,st),Xt=ue(Qt.text,null,Rt);Qt.stateAfter&&(Qt.stateAfter=null);var ge=Qt.text.match(/^\s*/)[0],en;if(!dt&&!/\S/.test(Qt.text))en=0,ct="not";else if(ct=="smart"&&(en=pt.mode.indent(kt,Qt.text.slice(ge.length),Qt.text),en==ln||en>150)){if(!dt)return;ct="prev"}ct=="prev"?st>pt.first?en=ue(Qe(pt,st-1).text,null,Rt):en=0:ct=="add"?en=Xt+it.options.indentUnit:ct=="subtract"?en=Xt-it.options.indentUnit:typeof ct=="number"&&(en=Xt+ct),en=Math.max(0,en);var Me="",Fn=0;if(it.options.indentWithTabs)for(var Mn=Math.floor(en/Rt);Mn;--Mn)Fn+=Rt,Me+=" ";if(Fn<en&&(Me+=In(en-Fn)),Me!=ge)return Oh(pt,Me,Re(st,0),Re(st,ge.length),"+input"),Qt.stateAfter=null,!0;for(var hi=0;hi<pt.sel.ranges.length;hi++){var gi=pt.sel.ranges[hi];if(gi.head.line==st&&gi.head.ch<ge.length){var bi=Re(st,ge.length);Vu(pt,hi,new Mr(bi,bi));break}}}var Ca=null;function Hh(it){Ca=it}function cc(it,st,ct,dt,pt){var kt=it.doc;it.display.shift=!1,dt||(dt=kt.sel);var Rt=+new Date-200,Qt=pt=="paste"||it.state.pasteIncoming>Rt,Xt=Zn(st),ge=null;if(Qt&&dt.ranges.length>1)if(Ca&&Ca.text.join(`
|
|
|
`)==st){if(dt.ranges.length%Ca.text.length==0){ge=[];for(var en=0;en<Ca.text.length;en++)ge.push(kt.splitLines(Ca.text[en]))}}else Xt.length==dt.ranges.length&&it.options.pasteLinesPerSelection&&(ge=$n(Xt,function(_i){return[_i]}));for(var Me=it.curOp.updateInput,Fn=dt.ranges.length-1;Fn>=0;Fn--){var Mn=dt.ranges[Fn],hi=Mn.from(),gi=Mn.to();Mn.empty()&&(ct&&ct>0?hi=Re(hi.line,hi.ch-ct):it.state.overwrite&&!Qt?gi=Re(gi.line,Math.min(Qe(kt,gi.line).text.length,gi.ch+Ce(Xt).length)):Qt&&Ca&&Ca.lineWise&&Ca.text.join(`
|
|
|
`)==Xt.join(`
|
|
|
`)&&(hi=gi=Re(hi.line,0)));var bi={from:hi,to:gi,text:ge?ge[Fn%ge.length]:Xt,origin:pt||(Qt?"paste":it.state.cutIncoming>Rt?"cut":"+input")};Uu(it.doc,bi),mi(it,"inputRead",it,bi)}st&&!Qt&&Fg(it,st),gu(it),it.curOp.updateInput<2&&(it.curOp.updateInput=Me),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Tg(it,st){var ct=it.clipboardData&&it.clipboardData.getData("Text");if(ct)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&pr(st,function(){return cc(st,ct,0,null,"paste")}),!0}function Fg(it,st){if(!(!it.options.electricChars||!it.options.smartIndent))for(var ct=it.doc.sel,dt=ct.ranges.length-1;dt>=0;dt--){var pt=ct.ranges[dt];if(!(pt.head.ch>100||dt&&ct.ranges[dt-1].head.line==pt.head.line)){var kt=it.getModeAt(pt.head),Rt=!1;if(kt.electricChars){for(var Qt=0;Qt<kt.electricChars.length;Qt++)if(st.indexOf(kt.electricChars.charAt(Qt))>-1){Rt=ys(it,pt.head.line,"smart");break}}else kt.electricInput&&kt.electricInput.test(Qe(it.doc,pt.head.line).text.slice(0,pt.head.ch))&&(Rt=ys(it,pt.head.line,"smart"));Rt&&mi(it,"electricInput",it,pt.head.line)}}}function Og(it){for(var st=[],ct=[],dt=0;dt<it.doc.sel.ranges.length;dt++){var pt=it.doc.sel.ranges[dt].head.line,kt={anchor:Re(pt,0),head:Re(pt+1,0)};ct.push(kt),st.push(it.getRange(kt.anchor,kt.head))}return{text:st,ranges:ct}}function Dg(it,st,ct,dt){it.setAttribute("autocorrect",ct?"":"off"),it.setAttribute("autocapitalize",dt?"":"off"),it.setAttribute("spellcheck",!!st)}function Bg(){var it=Wt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=Wt("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Jt?it.style.width="1000px":it.setAttribute("wrap","off"),Ot&&(it.style.border="1px solid black"),Dg(it),st}function Ju(it){var st=it.optionHandlers,ct=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(dt,pt){var kt=this.options,Rt=kt[dt];kt[dt]==pt&&dt!="mode"||(kt[dt]=pt,st.hasOwnProperty(dt)&&vs(this,st[dt])(this,pt,Rt),ye(this,"optionChange",this,dt))},getOption:function(dt){return this.options[dt]},getDoc:function(){return this.doc},addKeyMap:function(dt,pt){this.state.keyMaps[pt?"push":"unshift"](Ah(dt))},removeKeyMap:function(dt){for(var pt=this.state.keyMaps,kt=0;kt<pt.length;++kt)if(pt[kt]==dt||pt[kt].name==dt)return pt.splice(kt,1),!0},addOverlay:Ls(function(dt,pt){var kt=dt.token?dt:it.getMode(this.options,dt);if(kt.startState)throw new Error("Overlays may not be stateful.");Qn(this.state.overlays,{mode:kt,modeSpec:dt,opaque:pt&&pt.opaque,priority:pt&&pt.priority||0},function(Rt){return Rt.priority}),this.state.modeGen++,Kr(this)}),removeOverlay:Ls(function(dt){for(var pt=this.state.overlays,kt=0;kt<pt.length;++kt){var Rt=pt[kt].modeSpec;if(Rt==dt||typeof dt=="string"&&Rt.name==dt){pt.splice(kt,1),this.state.modeGen++,Kr(this);return}}}),indentLine:Ls(function(dt,pt,kt){typeof pt!="string"&&typeof pt!="number"&&(pt==null?pt=this.options.smartIndent?"smart":"prev":pt=pt?"add":"subtract"),Gn(this.doc,dt)&&ys(this,dt,pt,kt)}),indentSelection:Ls(function(dt){for(var pt=this.doc.sel.ranges,kt=-1,Rt=0;Rt<pt.length;Rt++){var Qt=pt[Rt];if(Qt.empty())Qt.head.line>kt&&(ys(this,Qt.head.line,dt,!0),kt=Qt.head.line,Rt==this.doc.sel.primIndex&&gu(this));else{var Xt=Qt.from(),ge=Qt.to(),en=Math.max(kt,Xt.line);kt=Math.min(this.lastLine(),ge.line-(ge.ch?0:1))+1;for(var Me=en;Me<kt;++Me)ys(this,Me,dt);var Fn=this.doc.sel.ranges;Xt.ch==0&&pt.length==Fn.length&&Fn[Rt].from().ch>0&&Vu(this.doc,Rt,new Mr(Xt,Fn[Rt].to()),Ee)}}}),getTokenAt:function(dt,pt){return Oe(this,dt,pt)},getLineTokens:function(dt,pt){return Oe(this,Re(dt),pt,!0)},getTokenTypeAt:function(dt){dt=xn(this.doc,dt);var pt=ji(this,Qe(this.doc,dt.line)),kt=0,Rt=(pt.length-1)/2,Qt=dt.ch,Xt;if(Qt==0)Xt=pt[2];else for(;;){var ge=kt+Rt>>1;if((ge?pt[ge*2-1]:0)>=Qt)Rt=ge;else if(pt[ge*2+1]<Qt)kt=ge+1;else{Xt=pt[ge*2+2];break}}var en=Xt?Xt.indexOf("overlay "):-1;return en<0?Xt:en==0?null:Xt.slice(0,en-1)},getModeAt:function(dt){var pt=this.doc.mode;return pt.innerMode?it.innerMode(pt,this.getTokenAt(dt).state).mode:pt},getHelper:function(dt,pt){return this.getHelpers(dt,pt)[0]},getHelpers:function(dt,pt){var kt=[];if(!ct.hasOwnProperty(pt))return kt;var Rt=ct[pt],Qt=this.getModeAt(dt);if(typeof Qt[pt]=="string")Rt[Qt[pt]]&&kt.push(Rt[Qt[pt]]);else if(Qt[pt])for(var Xt=0;Xt<Qt[pt].length;Xt++){var ge=Rt[Qt[pt][Xt]];ge&&kt.push(ge)}else Qt.helperType&&Rt[Qt.helperType]?kt.push(Rt[Qt.helperType]):Rt[Qt.name]&&kt.push(Rt[Qt.name]);for(var en=0;en<Rt._global.length;en++){var Me=Rt._global[en];Me.pred(Qt,this)&&ke(kt,Me.val)==-1&&kt.push(Me.val)}return kt},getStateAfter:function(dt,pt){var kt=this.doc;return dt=bn(kt,dt==null?kt.first+kt.size-1:dt),Ei(this,dt+1,pt).state},cursorCoords:function(dt,pt){var kt,Rt=this.doc.sel.primary();return dt==null?kt=Rt.head:typeof dt=="object"?kt=xn(this.doc,dt):kt=dt?Rt.from():Rt.to(),Cr(this,kt,pt||"page")},charCoords:function(dt,pt){return la(this,xn(this.doc,dt),pt||"page")},coordsChar:function(dt,pt){return dt=Za(this,dt,pt||"page"),Ph(this,dt.left,dt.top)},lineAtHeight:function(dt,pt){return dt=Za(this,{top:dt,left:0},pt||"page").top,mn(this.doc,dt+this.display.viewOffset)},heightAtLine:function(dt,pt,kt){var Rt=!1,Qt;if(typeof dt=="number"){var Xt=this.doc.first+this.doc.size-1;dt<this.doc.first?dt=this.doc.first:dt>Xt&&(dt=Xt,Rt=!0),Qt=Qe(this.doc,dt)}else Qt=dt;return yr(this,Qt,{top:0,left:0},pt||"page",kt||Rt).top+(Rt?this.doc.height-xo(Qt):0)},defaultTextHeight:function(){return fu(this.display)},defaultCharWidth:function(){return wh(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(dt,pt,kt,Rt,Qt){var Xt=this.display;dt=Cr(this,xn(this.doc,dt));var ge=dt.bottom,en=dt.left;if(pt.style.position="absolute",pt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pt),Xt.sizer.appendChild(pt),Rt=="over")ge=dt.top;else if(Rt=="above"||Rt=="near"){var Me=Math.max(Xt.wrapper.clientHeight,this.doc.height),Fn=Math.max(Xt.sizer.clientWidth,Xt.lineSpace.clientWidth);(Rt=="above"||dt.bottom+pt.offsetHeight>Me)&&dt.top>pt.offsetHeight?ge=dt.top-pt.offsetHeight:dt.bottom+pt.offsetHeight<=Me&&(ge=dt.bottom),en+pt.offsetWidth>Fn&&(en=Fn-pt.offsetWidth)}pt.style.top=ge+"px",pt.style.left=pt.style.right="",Qt=="right"?(en=Xt.sizer.clientWidth-pt.offsetWidth,pt.style.right="0px"):(Qt=="left"?en=0:Qt=="middle"&&(en=(Xt.sizer.clientWidth-pt.offsetWidth)/2),pt.style.left=en+"px"),kt&&Ud(this,{left:en,top:ge,right:en+pt.offsetWidth,bottom:ge+pt.offsetHeight})},triggerOnKeyDown:Ls(Pg),triggerOnKeyPress:Ls(Bl),triggerOnKeyUp:Cg,triggerOnMouseDown:Ls(Al),execCommand:function(dt){if(Xu.hasOwnProperty(dt))return Xu[dt].call(null,this)},triggerElectric:Ls(function(dt){Fg(this,dt)}),findPosH:function(dt,pt,kt,Rt){var Qt=1;pt<0&&(Qt=-1,pt=-pt);for(var Xt=xn(this.doc,dt),ge=0;ge<pt&&(Xt=fc(this.doc,Xt,Qt,kt,Rt),!Xt.hitSide);++ge);return Xt},moveH:Ls(function(dt,pt){var kt=this;this.extendSelectionsBy(function(Rt){return kt.display.shift||kt.doc.extend||Rt.empty()?fc(kt.doc,Rt.head,dt,pt,kt.options.rtlMoveVisually):dt<0?Rt.from():Rt.to()},gn)}),deleteH:Ls(function(dt,pt){var kt=this.doc.sel,Rt=this.doc;kt.somethingSelected()?Rt.replaceSelection("",null,"+delete"):Ba(this,function(Qt){var Xt=fc(Rt,Qt.head,dt,pt,!1);return dt<0?{from:Xt,to:Qt.head}:{from:Qt.head,to:Xt}})}),findPosV:function(dt,pt,kt,Rt){var Qt=1,Xt=Rt;pt<0&&(Qt=-1,pt=-pt);for(var ge=xn(this.doc,dt),en=0;en<pt;++en){var Me=Cr(this,ge,"div");if(Xt==null?Xt=Me.left:Me.left=Xt,ge=Qu(this,Me,Qt,kt),ge.hitSide)break}return ge},moveV:Ls(function(dt,pt){var kt=this,Rt=this.doc,Qt=[],Xt=!this.display.shift&&!Rt.extend&&Rt.sel.somethingSelected();if(Rt.extendSelectionsBy(function(en){if(Xt)return dt<0?en.from():en.to();var Me=Cr(kt,en.head,"div");en.goalColumn!=null&&(Me.left=en.goalColumn),Qt.push(Me.left);var Fn=Qu(kt,Me,dt,pt);return pt=="page"&&en==Rt.sel.primary()&&Hc(kt,la(kt,Fn,"div").top-Me.top),Fn},gn),Qt.length)for(var ge=0;ge<Rt.sel.ranges.length;ge++)Rt.sel.ranges[ge].goalColumn=Qt[ge]}),findWordAt:function(dt){var pt=this.doc,kt=Qe(pt,dt.line).text,Rt=dt.ch,Qt=dt.ch;if(kt){var Xt=this.getHelper(dt,"wordChars");(dt.sticky=="before"||Qt==kt.length)&&Rt?--Rt:++Qt;for(var ge=kt.charAt(Rt),en=Ft(ge,Xt)?function(Me){return Ft(Me,Xt)}:/\s/.test(ge)?function(Me){return/\s/.test(Me)}:function(Me){return!/\s/.test(Me)&&!Ft(Me)};Rt>0&&en(kt.charAt(Rt-1));)--Rt;for(;Qt<kt.length&&en(kt.charAt(Qt));)++Qt}return new Mr(Re(dt.line,Rt),Re(dt.line,Qt))},toggleOverwrite:function(dt){dt!=null&&dt==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ye(this.display.cursorDiv,"CodeMirror-overwrite"):Dt(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Se()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ls(function(dt,pt){bh(this,dt,pt)}),getScrollInfo:function(){var dt=this.display.scroller;return{left:dt.scrollLeft,top:dt.scrollTop,height:dt.scrollHeight-Ks(this)-this.display.barHeight,width:dt.scrollWidth-Ks(this)-this.display.barWidth,clientHeight:Kl(this),clientWidth:aa(this)}},scrollIntoView:Ls(function(dt,pt){dt==null?(dt={from:this.doc.sel.primary().head,to:null},pt==null&&(pt=this.options.cursorScrollMargin)):typeof dt=="number"?dt={from:Re(dt,0),to:null}:dt.from==null&&(dt={from:dt,to:null}),dt.to||(dt.to=dt.from),dt.margin=pt||0,dt.from.line!=null?rr(this,dt):Gc(this,dt.from,dt.to,dt.margin)}),setSize:Ls(function(dt,pt){var kt=this,Rt=function(Xt){return typeof Xt=="number"||/^\d+$/.test(String(Xt))?Xt+"px":Xt};dt!=null&&(this.display.wrapper.style.width=Rt(dt)),pt!=null&&(this.display.wrapper.style.height=Rt(pt)),this.options.lineWrapping&&lr(this);var Qt=this.display.viewFrom;this.doc.iter(Qt,this.display.viewTo,function(Xt){if(Xt.widgets){for(var ge=0;ge<Xt.widgets.length;ge++)if(Xt.widgets[ge].noHScroll){Zo(kt,Qt,"widget");break}}++Qt}),this.curOp.forceUpdate=!0,ye(this,"refresh",this)}),operation:function(dt){return pr(this,dt)},startOperation:function(){return ju(this)},endOperation:function(){return zu(this)},refresh:Ls(function(){var dt=this.display.cachedTextHeight;Kr(this),this.curOp.forceUpdate=!0,fr(this),bh(this,this.doc.scrollLeft,this.doc.scrollTop),Wu(this.display),(dt==null||Math.abs(dt-fu(this.display))>.5||this.options.lineWrapping)&&Po(this),ye(this,"refresh",this)}),swapDoc:Ls(function(dt){var pt=this.doc;return pt.cm=null,this.state.selectingText&&this.state.selectingText(),_c(this,dt),fr(this),this.display.input.reset(),bh(this,dt.scrollLeft,dt.scrollTop),this.curOp.forceScroll=!0,mi(this,"swapDoc",this,pt),pt}),phrase:function(dt){var pt=this.options.phrases;return pt&&Object.prototype.hasOwnProperty.call(pt,dt)?pt[dt]:dt},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}},An(it),it.registerHelper=function(dt,pt,kt){ct.hasOwnProperty(dt)||(ct[dt]=it[dt]={_global:[]}),ct[dt][pt]=kt},it.registerGlobalHelper=function(dt,pt,kt,Rt){it.registerHelper(dt,pt,Rt),ct[dt]._global.push({pred:kt,val:Rt})}}function fc(it,st,ct,dt,pt){var kt=st,Rt=ct,Qt=Qe(it,st.line),Xt=pt&&it.direction=="rtl"?-ct:ct;function ge(){var ho=st.line+Xt;return ho<it.first||ho>=it.first+it.size?!1:(st=new Re(ho,st.ch,st.sticky),Qt=Qe(it,ho))}function en(ho){var qi;if(dt=="codepoint"){var mo=Qt.text.charCodeAt(st.ch+(dt>0?0:-1));isNaN(mo)?qi=null:qi=new Re(st.line,Math.max(0,Math.min(Qt.text.length,st.ch+ct*(mo>=55296&&mo<56320?2:1))),-ct)}else pt?qi=tf(it.cm,Qt,st,ct):qi=ls(Qt,st,ct);if(qi==null)if(!ho&&ge())st=hc(pt,it.cm,Qt,st.line,Xt);else return!1;else st=qi;return!0}if(dt=="char"||dt=="codepoint")en();else if(dt=="column")en(!0);else if(dt=="word"||dt=="group")for(var Me=null,Fn=dt=="group",Mn=it.cm&&it.cm.getHelper(st,"wordChars"),hi=!0;!(ct<0&&!en(!hi));hi=!1){var gi=Qt.text.charAt(st.ch)||`
|
|
|
`,bi=Ft(gi,Mn)?"w":Fn&&gi==`
|
|
|
`?"n":!Fn||/\s/.test(gi)?null:"p";if(Fn&&!hi&&!bi&&(bi="s"),Me&&Me!=bi){ct<0&&(ct=1,en(),st.sticky="after");break}if(bi&&(Me=bi),ct>0&&!en(!hi))break}var _i=oc(it,st,kt,Rt,!0);return He(kt,_i)&&(_i.hitSide=!0),_i}function Qu(it,st,ct,dt){var pt=it.doc,kt=st.left,Rt;if(dt=="page"){var Qt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Xt=Math.max(Qt-.5*fu(it.display),3);Rt=(ct>0?st.bottom:st.top)+ct*Xt}else dt=="line"&&(Rt=ct>0?st.bottom+3:st.top-3);for(var ge;ge=Ph(it,kt,Rt),!!ge.outside;){if(ct<0?Rt<=0:Rt>=pt.height){ge.hitSide=!0;break}Rt+=ct*5}return ge}var Br=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ht,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Br.prototype.init=function(it){var st=this,ct=this,dt=ct.cm,pt=ct.div=it.lineDiv;Dg(pt,dt.options.spellcheck,dt.options.autocorrect,dt.options.autocapitalize);function kt(Qt){for(var Xt=Qt.target;Xt;Xt=Xt.parentNode){if(Xt==pt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Xt.className))break}return!1}_e(pt,"paste",function(Qt){!kt(Qt)||on(dt,Qt)||Tg(Qt,dt)||Ut<=11&&setTimeout(vs(dt,function(){return st.updateFromDOM()}),20)}),_e(pt,"compositionstart",function(Qt){st.composing={data:Qt.data,done:!1}}),_e(pt,"compositionupdate",function(Qt){st.composing||(st.composing={data:Qt.data,done:!1})}),_e(pt,"compositionend",function(Qt){st.composing&&(Qt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),_e(pt,"touchstart",function(){return ct.forceCompositionEnd()}),_e(pt,"input",function(){st.composing||st.readFromDOMSoon()});function Rt(Qt){if(!(!kt(Qt)||on(dt,Qt))){if(dt.somethingSelected())Hh({lineWise:!1,text:dt.getSelections()}),Qt.type=="cut"&&dt.replaceSelection("",null,"cut");else if(dt.options.lineWiseCopyCut){var Xt=Og(dt);Hh({lineWise:!0,text:Xt.text}),Qt.type=="cut"&&dt.operation(function(){dt.setSelections(Xt.ranges,0,Ee),dt.replaceSelection("",null,"cut")})}else return;if(Qt.clipboardData){Qt.clipboardData.clearData();var ge=Ca.text.join(`
|
|
|
`);if(Qt.clipboardData.setData("Text",ge),Qt.clipboardData.getData("Text")==ge){Qt.preventDefault();return}}var en=Bg(),Me=en.firstChild;dt.display.lineSpace.insertBefore(en,dt.display.lineSpace.firstChild),Me.value=Ca.text.join(`
|
|
|
`);var Fn=document.activeElement;Pe(Me),setTimeout(function(){dt.display.lineSpace.removeChild(en),Fn.focus(),Fn==pt&&ct.showPrimarySelection()},50)}}_e(pt,"copy",Rt),_e(pt,"cut",Rt)},Br.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Br.prototype.prepareSelection=function(){var it=Au(this.cm,!1);return it.focus=document.activeElement==this.div,it},Br.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Br.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Br.prototype.showPrimarySelection=function(){var it=this.getSelection(),st=this.cm,ct=st.doc.sel.primary(),dt=ct.from(),pt=ct.to();if(st.display.viewTo==st.display.viewFrom||dt.line>=st.display.viewTo||pt.line<st.display.viewFrom){it.removeAllRanges();return}var kt=gc(st,it.anchorNode,it.anchorOffset),Rt=gc(st,it.focusNode,it.focusOffset);if(!(kt&&!kt.bad&&Rt&&!Rt.bad&&fn(rn(kt,Rt),dt)==0&&fn(vn(kt,Rt),pt)==0)){var Qt=st.display.view,Xt=dt.line>=st.display.viewFrom&&df(st,dt)||{node:Qt[0].measure.map[2],offset:0},ge=pt.line<st.display.viewTo&&df(st,pt);if(!ge){var en=Qt[Qt.length-1].measure,Me=en.maps?en.maps[en.maps.length-1]:en.map;ge={node:Me[Me.length-1],offset:Me[Me.length-2]-Me[Me.length-3]}}if(!Xt||!ge){it.removeAllRanges();return}var Fn=it.rangeCount&&it.getRangeAt(0),Mn;try{Mn=Vt(Xt.node,Xt.offset,ge.offset,ge.node)}catch(hi){}Mn&&(!vt&&st.state.focused?(it.collapse(Xt.node,Xt.offset),Mn.collapsed||(it.removeAllRanges(),it.addRange(Mn))):(it.removeAllRanges(),it.addRange(Mn)),Fn&&it.anchorNode==null?it.addRange(Fn):vt&&this.startGracePeriod()),this.rememberSelection()}},Br.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},Br.prototype.showMultipleSelections=function(it){Kt(this.cm.display.cursorDiv,it.cursors),Kt(this.cm.display.selectionDiv,it.selection)},Br.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Br.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return Ie(this.div,st)},Br.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Br.prototype.blur=function(){this.div.blur()},Br.prototype.getField=function(){return this.div},Br.prototype.supportsTouch=function(){return!0},Br.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():pr(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function st(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,st))}this.polling.set(this.cm.options.pollInterval,st)},Br.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Br.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(et&&we&&this.cm.display.gutterSpecs.length&&Ag(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ct=gc(st,it.anchorNode,it.anchorOffset),dt=gc(st,it.focusNode,it.focusOffset);ct&&dt&&pr(st,function(){qs(st.doc,mu(ct,dt),Ee),(ct.bad||dt.bad)&&(st.curOp.selectionChanged=!0)})}}},Br.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,st=it.display,ct=it.doc.sel.primary(),dt=ct.from(),pt=ct.to();if(dt.ch==0&&dt.line>it.firstLine()&&(dt=Re(dt.line-1,Qe(it.doc,dt.line-1).length)),pt.ch==Qe(it.doc,pt.line).text.length&&pt.line<it.lastLine()&&(pt=Re(pt.line+1,0)),dt.line<st.viewFrom||pt.line>st.viewTo-1)return!1;var kt,Rt,Qt;dt.line==st.viewFrom||(kt=_a(it,dt.line))==0?(Rt=le(st.view[0].line),Qt=st.view[0].node):(Rt=le(st.view[kt].line),Qt=st.view[kt-1].node.nextSibling);var Xt=_a(it,pt.line),ge,en;if(Xt==st.view.length-1?(ge=st.viewTo-1,en=st.lineDiv.lastChild):(ge=le(st.view[Xt+1].line)-1,en=st.view[Xt+1].node.previousSibling),!Qt)return!1;for(var Me=it.doc.splitLines(Ed(it,Qt,en,Rt,ge)),Fn=yn(it.doc,Re(Rt,0),Re(ge,Qe(it.doc,ge).text.length));Me.length>1&&Fn.length>1;)if(Ce(Me)==Ce(Fn))Me.pop(),Fn.pop(),ge--;else if(Me[0]==Fn[0])Me.shift(),Fn.shift(),Rt++;else break;for(var Mn=0,hi=0,gi=Me[0],bi=Fn[0],_i=Math.min(gi.length,bi.length);Mn<_i&&gi.charCodeAt(Mn)==bi.charCodeAt(Mn);)++Mn;for(var ho=Ce(Me),qi=Ce(Fn),mo=Math.min(ho.length-(Me.length==1?Mn:0),qi.length-(Fn.length==1?Mn:0));hi<mo&&ho.charCodeAt(ho.length-hi-1)==qi.charCodeAt(qi.length-hi-1);)++hi;if(Me.length==1&&Fn.length==1&&Rt==dt.line)for(;Mn&&Mn>dt.ch&&ho.charCodeAt(ho.length-hi-1)==qi.charCodeAt(qi.length-hi-1);)Mn--,hi++;Me[Me.length-1]=ho.slice(0,ho.length-hi).replace(/^\u200b+/,""),Me[0]=Me[0].slice(Mn).replace(/\u200b+$/,"");var Io=Re(Rt,Mn),Ji=Re(ge,Fn.length?Ce(Fn).length-hi:0);if(Me.length>1||Me[0]||fn(Io,Ji))return Oh(it.doc,Me,Io,Ji,"+input"),!0},Br.prototype.ensurePolled=function(){this.forceCompositionEnd()},Br.prototype.reset=function(){this.forceCompositionEnd()},Br.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Br.prototype.readFromDOMSoon=function(){var it=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(it.readDOMTimeout=null,it.composing)if(it.composing.done)it.composing=null;else return;it.updateFromDOM()},80))},Br.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&pr(this.cm,function(){return Kr(it.cm)})},Br.prototype.setUneditable=function(it){it.contentEditable="false"},Br.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||vs(this.cm,cc)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Br.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Br.prototype.onContextMenu=function(){},Br.prototype.resetPosition=function(){},Br.prototype.needsContentAttribute=!0;function df(it,st){var ct=du(it,st.line);if(!ct||ct.hidden)return null;var dt=Qe(it.doc,st.line),pt=hs(ct,dt,st.line),kt=hn(dt,it.doc.direction),Rt="left";if(kt){var Qt=ne(kt,st.ch);Rt=Qt%2?"right":"left"}var Xt=li(pt.map,st.ch,Rt);return Xt.offset=Xt.collapse=="right"?Xt.end:Xt.start,Xt}function Ag(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function Md(it,st){return st&&(it.bad=!0),it}function Ed(it,st,ct,dt,pt){var kt="",Rt=!1,Qt=it.doc.lineSeparator(),Xt=!1;function ge(Mn){return function(hi){return hi.id==Mn}}function en(){Rt&&(kt+=Qt,Xt&&(kt+=Qt),Rt=Xt=!1)}function Me(Mn){Mn&&(en(),kt+=Mn)}function Fn(Mn){if(Mn.nodeType==1){var hi=Mn.getAttribute("cm-text");if(hi){Me(hi);return}var gi=Mn.getAttribute("cm-marker"),bi;if(gi){var _i=it.findMarks(Re(dt,0),Re(pt+1,0),ge(+gi));_i.length&&(bi=_i[0].find(0))&&Me(yn(it.doc,bi.from,bi.to).join(Qt));return}if(Mn.getAttribute("contenteditable")=="false")return;var ho=/^(pre|div|p|li|table|br)$/i.test(Mn.nodeName);if(!/^br$/i.test(Mn.nodeName)&&Mn.textContent.length==0)return;ho&&en();for(var qi=0;qi<Mn.childNodes.length;qi++)Fn(Mn.childNodes[qi]);/^(pre|p)$/i.test(Mn.nodeName)&&(Xt=!0),ho&&(Rt=!0)}else Mn.nodeType==3&&Me(Mn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Fn(st),st!=ct;)st=st.nextSibling,Xt=!1;return kt}function gc(it,st,ct){var dt;if(st==it.display.lineDiv){if(dt=it.display.lineDiv.childNodes[ct],!dt)return Md(it.clipPos(Re(it.display.viewTo-1)),!0);st=null,ct=0}else for(dt=st;;dt=dt.parentNode){if(!dt||dt==it.display.lineDiv)return null;if(dt.parentNode&&dt.parentNode==it.display.lineDiv)break}for(var pt=0;pt<it.display.view.length;pt++){var kt=it.display.view[pt];if(kt.node==dt)return sm(kt,st,ct)}}function sm(it,st,ct){var dt=it.text.firstChild,pt=!1;if(!st||!Ie(dt,st))return Md(Re(le(it.line),0),!0);if(st==dt&&(pt=!0,st=dt.childNodes[ct],ct=0,!st)){var kt=it.rest?Ce(it.rest):it.line;return Md(Re(le(kt),kt.text.length),pt)}var Rt=st.nodeType==3?st:null,Qt=st;for(!Rt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Rt=st.firstChild,ct&&(ct=Rt.nodeValue.length));Qt.parentNode!=dt;)Qt=Qt.parentNode;var Xt=it.measure,ge=Xt.maps;function en(bi,_i,ho){for(var qi=-1;qi<(ge?ge.length:0);qi++)for(var mo=qi<0?Xt.map:ge[qi],Io=0;Io<mo.length;Io+=3){var Ji=mo[Io+2];if(Ji==bi||Ji==_i){var Vo=le(qi<0?it.line:it.rest[qi]),$r=mo[Io]+ho;return(ho<0||Ji!=bi)&&($r=mo[Io+(ho?1:0)]),Re(Vo,$r)}}}var Me=en(Rt,Qt,ct);if(Me)return Md(Me,pt);for(var Fn=Qt.nextSibling,Mn=Rt?Rt.nodeValue.length-ct:0;Fn;Fn=Fn.nextSibling){if(Me=en(Fn,Fn.firstChild,0),Me)return Md(Re(Me.line,Me.ch-Mn),pt);Mn+=Fn.textContent.length}for(var hi=Qt.previousSibling,gi=ct;hi;hi=hi.previousSibling){if(Me=en(hi,hi.firstChild,-1),Me)return Md(Re(Me.line,Me.ch+gi),pt);gi+=hi.textContent.length}}var cs=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new Ht,this.hasSelection=!1,this.composing=null};cs.prototype.init=function(it){var st=this,ct=this,dt=this.cm;this.createField(it);var pt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),Ot&&(pt.style.width="0px"),_e(pt,"input",function(){$t&&Ut>=9&&st.hasSelection&&(st.hasSelection=null),ct.poll()}),_e(pt,"paste",function(Rt){on(dt,Rt)||Tg(Rt,dt)||(dt.state.pasteIncoming=+new Date,ct.fastPoll())});function kt(Rt){if(!on(dt,Rt)){if(dt.somethingSelected())Hh({lineWise:!1,text:dt.getSelections()});else if(dt.options.lineWiseCopyCut){var Qt=Og(dt);Hh({lineWise:!0,text:Qt.text}),Rt.type=="cut"?dt.setSelections(Qt.ranges,null,Ee):(ct.prevInput="",pt.value=Qt.text.join(`
|
|
|
`),Pe(pt))}else return;Rt.type=="cut"&&(dt.state.cutIncoming=+new Date)}}_e(pt,"cut",kt),_e(pt,"copy",kt),_e(it.scroller,"paste",function(Rt){if(!(bs(it,Rt)||on(dt,Rt))){if(!pt.dispatchEvent){dt.state.pasteIncoming=+new Date,ct.focus();return}var Qt=new Event("paste");Qt.clipboardData=Rt.clipboardData,pt.dispatchEvent(Qt)}}),_e(it.lineSpace,"selectstart",function(Rt){bs(it,Rt)||Jn(Rt)}),_e(pt,"compositionstart",function(){var Rt=dt.getCursor("from");ct.composing&&ct.composing.range.clear(),ct.composing={start:Rt,range:dt.markText(Rt,dt.getCursor("to"),{className:"CodeMirror-composing"})}}),_e(pt,"compositionend",function(){ct.composing&&(ct.poll(),ct.composing.range.clear(),ct.composing=null)})},cs.prototype.createField=function(it){this.wrapper=Bg(),this.textarea=this.wrapper.firstChild},cs.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},cs.prototype.prepareSelection=function(){var it=this.cm,st=it.display,ct=it.doc,dt=Au(it);if(it.options.moveInputWithCursor){var pt=Cr(it,ct.sel.primary().head,"div"),kt=st.wrapper.getBoundingClientRect(),Rt=st.lineDiv.getBoundingClientRect();dt.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,pt.top+Rt.top-kt.top)),dt.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,pt.left+Rt.left-kt.left))}return dt},cs.prototype.showSelection=function(it){var st=this.cm,ct=st.display;Kt(ct.cursorDiv,it.cursors),Kt(ct.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},cs.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var st=this.cm;if(st.somethingSelected()){this.prevInput="";var ct=st.getSelection();this.textarea.value=ct,st.state.focused&&Pe(this.textarea),$t&&Ut>=9&&(this.hasSelection=ct)}else it||(this.prevInput=this.textarea.value="",$t&&Ut>=9&&(this.hasSelection=null))}},cs.prototype.getField=function(){return this.textarea},cs.prototype.supportsTouch=function(){return!1},cs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!nt||Se()!=this.textarea))try{this.textarea.focus()}catch(it){}},cs.prototype.blur=function(){this.textarea.blur()},cs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},cs.prototype.receivedFocus=function(){this.slowPoll()},cs.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},cs.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function ct(){var dt=st.poll();!dt&&!it?(it=!0,st.polling.set(60,ct)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,ct)},cs.prototype.poll=function(){var it=this,st=this.cm,ct=this.textarea,dt=this.prevInput;if(this.contextMenuPending||!st.state.focused||Mt(ct)&&!dt&&!this.composing||st.isReadOnly()||st.options.disableInput||st.state.keySeq)return!1;var pt=ct.value;if(pt==dt&&!st.somethingSelected())return!1;if($t&&Ut>=9&&this.hasSelection===pt||ht&&/[\uf700-\uf7ff]/.test(pt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var kt=pt.charCodeAt(0);if(kt==8203&&!dt&&(dt="\u200B"),kt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Rt=0,Qt=Math.min(dt.length,pt.length);Rt<Qt&&dt.charCodeAt(Rt)==pt.charCodeAt(Rt);)++Rt;return pr(st,function(){cc(st,pt.slice(Rt),dt.length-Rt,null,it.composing?"*compose":null),pt.length>1e3||pt.indexOf(`
|
|
|
`)>-1?ct.value=it.prevInput="":it.prevInput=pt,it.composing&&(it.composing.range.clear(),it.composing.range=st.markText(it.composing.start,st.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},cs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},cs.prototype.onKeyPress=function(){$t&&Ut>=9&&(this.hasSelection=null),this.fastPoll()},cs.prototype.onContextMenu=function(it){var st=this,ct=st.cm,dt=ct.display,pt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var kt=ua(ct,it),Rt=dt.scroller.scrollTop;if(!kt||te)return;var Qt=ct.options.resetSelectionOnContextMenu;Qt&&ct.doc.sel.contains(kt)==-1&&vs(ct,qs)(ct.doc,mu(kt),Ee);var Xt=pt.style.cssText,ge=st.wrapper.style.cssText,en=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",pt.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(it.clientY-en.top-5)+"px; left: "+(it.clientX-en.left-5)+`px;
|
|
|
z-index: 1000; background: `+($t?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Me;Jt&&(Me=window.scrollY),dt.input.focus(),Jt&&window.scrollTo(null,Me),dt.input.reset(),ct.somethingSelected()||(pt.value=st.prevInput=" "),st.contextMenuPending=Mn,dt.selForContextMenu=ct.doc.sel,clearTimeout(dt.detectingSelectAll);function Fn(){if(pt.selectionStart!=null){var gi=ct.somethingSelected(),bi="\u200B"+(gi?pt.value:"");pt.value="\u21DA",pt.value=bi,st.prevInput=gi?"":"\u200B",pt.selectionStart=1,pt.selectionEnd=bi.length,dt.selForContextMenu=ct.doc.sel}}function Mn(){if(st.contextMenuPending==Mn&&(st.contextMenuPending=!1,st.wrapper.style.cssText=ge,pt.style.cssText=Xt,$t&&Ut<9&&dt.scrollbars.setScrollTop(dt.scroller.scrollTop=Rt),pt.selectionStart!=null)){(!$t||$t&&Ut<9)&&Fn();var gi=0,bi=function(){dt.selForContextMenu==ct.doc.sel&&pt.selectionStart==0&&pt.selectionEnd>0&&st.prevInput=="\u200B"?vs(ct,as)(ct):gi++<10?dt.detectingSelectAll=setTimeout(bi,500):(dt.selForContextMenu=null,dt.input.reset())};dt.detectingSelectAll=setTimeout(bi,200)}}if($t&&Ut>=9&&Fn(),Et){fi(it);var hi=function(){Ln(window,"mouseup",hi),setTimeout(Mn,20)};_e(window,"mouseup",hi)}else setTimeout(Mn,50)},cs.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},cs.prototype.setUneditable=function(){},cs.prototype.needsContentAttribute=!1;function am(it,st){if(st=st?Ue(st):{},st.value=it.value,!st.tabindex&&it.tabIndex&&(st.tabindex=it.tabIndex),!st.placeholder&&it.placeholder&&(st.placeholder=it.placeholder),st.autofocus==null){var ct=Se();st.autofocus=ct==it||it.getAttribute("autofocus")!=null&&ct==document.body}function dt(){it.value=Qt.getValue()}var pt;if(it.form&&(_e(it.form,"submit",dt),!st.leaveSubmitMethodAlone)){var kt=it.form;pt=kt.submit;try{var Rt=kt.submit=function(){dt(),kt.submit=pt,kt.submit(),kt.submit=Rt}}catch(Xt){}}st.finishInit=function(Xt){Xt.save=dt,Xt.getTextArea=function(){return it},Xt.toTextArea=function(){Xt.toTextArea=isNaN,dt(),it.parentNode.removeChild(Xt.getWrapperElement()),it.style.display="",it.form&&(Ln(it.form,"submit",dt),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=pt))}},it.style.display="none";var Qt=dr(function(Xt){return it.parentNode.insertBefore(Xt,it.nextSibling)},st);return Qt}function kd(it){it.off=Ln,it.on=_e,it.wheelEventPixels=Ua,it.Doc=$s,it.splitLines=Zn,it.countColumn=ue,it.findColumn=Bn,it.isWordChar=Tt,it.Pass=ln,it.signal=ye,it.Line=Qo,it.changeEnd=Zu,it.scrollbarModel=eg,it.Pos=Re,it.cmpPos=fn,it.modes=ki,it.mimeModes=Bo,it.resolveMode=di,it.getMode=Ae,it.modeExtensions=Be,it.extendMode=_t,it.copyState=Je,it.startState=ve,it.innerMode=cn,it.commands=Xu,it.keyMap=Da,it.keyName=qp,it.isModifierKey=xd,it.lookupKey=al,it.normalizeKeyMap=mg,it.StringStream=ie,it.SharedTextMarker=Vl,it.TextMarker=Ze,it.LineWidget=Su,it.e_preventDefault=Jn,it.e_stopPropagation=ui,it.e_stop=fi,it.addClass=Ye,it.contains=Ie,it.rmClass=Dt,it.keyNames=Ul}om(dr),Ju(dr);var xu="iter insert remove copy getEditor constructor".split(" ");for(var pc in $s.prototype)$s.prototype.hasOwnProperty(pc)&&ke(xu,pc)<0&&(dr.prototype[pc]=function(it){return function(){return it.apply(this.doc,arguments)}}($s.prototype[pc]));return An($s),dr.inputStyles={textarea:cs,contenteditable:Br},dr.defineMode=function(it){!dr.defaults.mode&&it!="null"&&(dr.defaults.mode=it),Mo.apply(this,arguments)},dr.defineMIME=ai,dr.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),dr.defineMIME("text/plain","null"),dr.defineExtension=function(it,st){dr.prototype[it]=st},dr.defineDocExtension=function(it,st){$s.prototype[it]=st},dr.fromTextArea=am,kd(dr),dr.version="5.58.2",dr})},25419:function(Sn,Ve,Pt){(function(vt){vt(Pt(89780),Pt(15525),Pt(98101))})(function(vt){"use strict";vt.defineMode("markdown",function(It,oe){var de=vt.getMode(It,"text/html"),$t=de.name=="null";function Ut(ue){if(vt.findModeByName){var Ht=vt.findModeByName(ue);Ht&&(ue=Ht.mime||Ht.mimes[0])}var ke=vt.getMode(It,ue);return ke.name=="null"?null:ke}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 Jt={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 De in Jt)Jt.hasOwnProperty(De)&&oe.tokenTypeOverrides[De]&&(Jt[De]=oe.tokenTypeOverrides[De]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,te=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Fe=/^\[(x| )\](?=\s)/i,re=oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,me=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ot=/^[^#!\[\]*_\\<>` "'(~:]+/,et=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,nt=/^\s*\[[^\]]+?\]:.*$/,ht=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,at=" ";function ft(ue,Ht,ke){return Ht.f=Ht.inline=ke,ke(ue,Ht)}function mt(ue,Ht,ke){return Ht.f=Ht.block=ke,ke(ue,Ht)}function wt(ue){return!ue||!/\S/.test(ue.string)}function Et(ue){if(ue.linkTitle=!1,ue.linkHref=!1,ue.linkText=!1,ue.em=!1,ue.strong=!1,ue.strikethrough=!1,ue.quote=0,ue.indentedCode=!1,ue.f==Dt){var Ht=$t;if(!Ht){var ke=vt.innerMode(de,ue.htmlState);Ht=ke.mode.name=="xml"&&ke.state.tagStart===null&&!ke.state.context&&ke.state.tokenize.isInText}Ht&&(ue.f=xe,ue.block=Nt,ue.htmlState=null)}return ue.trailingSpace=0,ue.trailingSpaceNewLine=!1,ue.prevLine=ue.thisLine,ue.thisLine={stream:null},null}function Nt(ue,Ht){var ke=ue.column()===Ht.indentation,pn=wt(Ht.prevLine.stream),ln=Ht.indentedCode,Ee=Ht.prevLine.hr,Ke=Ht.list!==!1,gn=(Ht.listStack[Ht.listStack.length-1]||0)+3;Ht.indentedCode=!1;var Bn=Ht.indentation;if(Ht.indentationDiff===null&&(Ht.indentationDiff=Ht.indentation,Ke)){for(Ht.list=null;Bn<Ht.listStack[Ht.listStack.length-1];)Ht.listStack.pop(),Ht.listStack.length?Ht.indentation=Ht.listStack[Ht.listStack.length-1]:Ht.list=!1;Ht.list!==!1&&(Ht.indentationDiff=Bn-Ht.listStack[Ht.listStack.length-1])}var dn=!pn&&!Ee&&!Ht.prevLine.header&&(!Ke||!ln)&&!Ht.prevLine.fencedCodeEnd,In=(Ht.list===!1||Ee||pn)&&Ht.indentation<=gn&&ue.match(we),Ce=null;if(Ht.indentationDiff>=4&&(ln||Ht.prevLine.fencedCodeEnd||Ht.prevLine.header||pn))return ue.skipToEnd(),Ht.indentedCode=!0,Jt.code;if(ue.eatSpace())return null;if(ke&&Ht.indentation<=gn&&(Ce=ue.match(re))&&Ce[1].length<=6)return Ht.quote=0,Ht.header=Ce[1].length,Ht.thisLine.header=!0,oe.highlightFormatting&&(Ht.formatting="header"),Ht.f=Ht.inline,Kt(Ht);if(Ht.indentation<=gn&&ue.eat(">"))return Ht.quote=ke?1:Ht.quote+1,oe.highlightFormatting&&(Ht.formatting="quote"),ue.eatSpace(),Kt(Ht);if(!In&&!Ht.setext&&ke&&Ht.indentation<=gn&&(Ce=ue.match(te))){var $n=Ce[1]?"ol":"ul";return Ht.indentation=Bn+ue.current().length,Ht.list=!0,Ht.quote=0,Ht.listStack.push(Ht.indentation),Ht.em=!1,Ht.strong=!1,Ht.code=!1,Ht.strikethrough=!1,oe.taskLists&&ue.match(Fe,!1)&&(Ht.taskList=!0),Ht.f=Ht.inline,oe.highlightFormatting&&(Ht.formatting=["list","list-"+$n]),Kt(Ht)}else{if(ke&&Ht.indentation<=gn&&(Ce=ue.match(et,!0)))return Ht.quote=0,Ht.fencedEndRE=new RegExp(Ce[1]+"+ *$"),Ht.localMode=oe.fencedCodeBlockHighlighting&&Ut(Ce[2]||oe.fencedCodeBlockDefaultMode),Ht.localMode&&(Ht.localState=vt.startState(Ht.localMode)),Ht.f=Ht.block=At,oe.highlightFormatting&&(Ht.formatting="code-block"),Ht.code=-1,Kt(Ht);if(Ht.setext||(!dn||!Ke)&&!Ht.quote&&Ht.list===!1&&!Ht.code&&!In&&!nt.test(ue.string)&&(Ce=ue.lookAhead(1))&&(Ce=Ce.match(me)))return Ht.setext?(Ht.header=Ht.setext,Ht.setext=0,ue.skipToEnd(),oe.highlightFormatting&&(Ht.formatting="header")):(Ht.header=Ce[0].charAt(0)=="="?1:2,Ht.setext=Ht.header),Ht.thisLine.header=!0,Ht.f=Ht.inline,Kt(Ht);if(In)return ue.skipToEnd(),Ht.hr=!0,Ht.thisLine.hr=!0,Jt.hr;if(ue.peek()==="[")return ft(ue,Ht,Le)}return ft(ue,Ht,Ht.inline)}function Dt(ue,Ht){var ke=de.token(ue,Ht.htmlState);if(!$t){var pn=vt.innerMode(de,Ht.htmlState);(pn.mode.name=="xml"&&pn.state.tagStart===null&&!pn.state.context&&pn.state.tokenize.isInText||Ht.md_inside&&ue.current().indexOf(">")>-1)&&(Ht.f=xe,Ht.block=Nt,Ht.htmlState=null)}return ke}function At(ue,Ht){var ke=Ht.listStack[Ht.listStack.length-1]||0,pn=Ht.indentation<ke,ln=ke+3;if(Ht.fencedEndRE&&Ht.indentation<=ln&&(pn||ue.match(Ht.fencedEndRE))){oe.highlightFormatting&&(Ht.formatting="code-block");var Ee;return pn||(Ee=Kt(Ht)),Ht.localMode=Ht.localState=null,Ht.block=Nt,Ht.f=xe,Ht.fencedEndRE=null,Ht.code=0,Ht.thisLine.fencedCodeEnd=!0,pn?mt(ue,Ht,Ht.block):Ee}else return Ht.localMode?Ht.localMode.token(ue,Ht.localState):(ue.skipToEnd(),Jt.code)}function Kt(ue){var Ht=[];if(ue.formatting){Ht.push(Jt.formatting),typeof ue.formatting=="string"&&(ue.formatting=[ue.formatting]);for(var ke=0;ke<ue.formatting.length;ke++)Ht.push(Jt.formatting+"-"+ue.formatting[ke]),ue.formatting[ke]==="header"&&Ht.push(Jt.formatting+"-"+ue.formatting[ke]+"-"+ue.header),ue.formatting[ke]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=ue.quote?Ht.push(Jt.formatting+"-"+ue.formatting[ke]+"-"+ue.quote):Ht.push("error"))}if(ue.taskOpen)return Ht.push("meta"),Ht.length?Ht.join(" "):null;if(ue.taskClosed)return Ht.push("property"),Ht.length?Ht.join(" "):null;if(ue.linkHref?Ht.push(Jt.linkHref,"url"):(ue.strong&&Ht.push(Jt.strong),ue.em&&Ht.push(Jt.em),ue.strikethrough&&Ht.push(Jt.strikethrough),ue.emoji&&Ht.push(Jt.emoji),ue.linkText&&Ht.push(Jt.linkText),ue.code&&Ht.push(Jt.code),ue.image&&Ht.push(Jt.image),ue.imageAltText&&Ht.push(Jt.imageAltText,"link"),ue.imageMarker&&Ht.push(Jt.imageMarker)),ue.header&&Ht.push(Jt.header,Jt.header+"-"+ue.header),ue.quote&&(Ht.push(Jt.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=ue.quote?Ht.push(Jt.quote+"-"+ue.quote):Ht.push(Jt.quote+"-"+oe.maxBlockquoteDepth)),ue.list!==!1){var pn=(ue.listStack.length-1)%3;pn?pn===1?Ht.push(Jt.list2):Ht.push(Jt.list3):Ht.push(Jt.list1)}return ue.trailingSpaceNewLine?Ht.push("trailing-space-new-line"):ue.trailingSpace&&Ht.push("trailing-space-"+(ue.trailingSpace%2?"a":"b")),Ht.length?Ht.join(" "):null}function Wt(ue,Ht){if(ue.match(Ot,!0))return Kt(Ht)}function xe(ue,Ht){var ke=Ht.text(ue,Ht);if(typeof ke!="undefined")return ke;if(Ht.list)return Ht.list=null,Kt(Ht);if(Ht.taskList){var pn=ue.match(Fe,!0)[1]===" ";return pn?Ht.taskOpen=!0:Ht.taskClosed=!0,oe.highlightFormatting&&(Ht.formatting="task"),Ht.taskList=!1,Kt(Ht)}if(Ht.taskOpen=!1,Ht.taskClosed=!1,Ht.header&&ue.match(/^#+$/,!0))return oe.highlightFormatting&&(Ht.formatting="header"),Kt(Ht);var ln=ue.next();if(Ht.linkTitle){Ht.linkTitle=!1;var Ee=ln;ln==="("&&(Ee=")"),Ee=(Ee+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ke="^\\s*(?:[^"+Ee+"\\\\]+|\\\\\\\\|\\\\.)"+Ee;if(ue.match(new RegExp(Ke),!0))return Jt.linkHref}if(ln==="`"){var gn=Ht.formatting;oe.highlightFormatting&&(Ht.formatting="code"),ue.eatWhile("`");var Bn=ue.current().length;if(Ht.code==0&&(!Ht.quote||Bn==1))return Ht.code=Bn,Kt(Ht);if(Bn==Ht.code){var dn=Kt(Ht);return Ht.code=0,dn}else return Ht.formatting=gn,Kt(Ht)}else if(Ht.code)return Kt(Ht);if(ln==="\\"&&(ue.next(),oe.highlightFormatting)){var In=Kt(Ht),Ce=Jt.formatting+"-escape";return In?In+" "+Ce:Ce}if(ln==="!"&&ue.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ht.imageMarker=!0,Ht.image=!0,oe.highlightFormatting&&(Ht.formatting="image"),Kt(Ht);if(ln==="["&&Ht.imageMarker&&ue.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ht.imageMarker=!1,Ht.imageAltText=!0,oe.highlightFormatting&&(Ht.formatting="image"),Kt(Ht);if(ln==="]"&&Ht.imageAltText){oe.highlightFormatting&&(Ht.formatting="image");var In=Kt(Ht);return Ht.imageAltText=!1,Ht.image=!1,Ht.inline=Ht.f=Ie,In}if(ln==="["&&!Ht.image)return Ht.linkText&&ue.match(/^.*?\]/)||(Ht.linkText=!0,oe.highlightFormatting&&(Ht.formatting="link")),Kt(Ht);if(ln==="]"&&Ht.linkText){oe.highlightFormatting&&(Ht.formatting="link");var In=Kt(Ht);return Ht.linkText=!1,Ht.inline=Ht.f=ue.match(/\(.*?\)| ?\[.*?\]/,!1)?Ie:xe,In}if(ln==="<"&&ue.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ht.f=Ht.inline=Vt,oe.highlightFormatting&&(Ht.formatting="link");var In=Kt(Ht);return In?In+=" ":In="",In+Jt.linkInline}if(ln==="<"&&ue.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ht.f=Ht.inline=Vt,oe.highlightFormatting&&(Ht.formatting="link");var In=Kt(Ht);return In?In+=" ":In="",In+Jt.linkEmail}if(oe.xml&&ln==="<"&&ue.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var $n=ue.string.indexOf(">",ue.pos);if($n!=-1){var Qn=ue.string.substring(ue.start,$n);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Qn)&&(Ht.md_inside=!0)}return ue.backUp(1),Ht.htmlState=vt.startState(de),mt(ue,Ht,Dt)}if(oe.xml&&ln==="<"&&ue.match(/^\/\w*?>/))return Ht.md_inside=!1,"tag";if(ln==="*"||ln==="_"){for(var jt=1,Lt=ue.pos==1?" ":ue.string.charAt(ue.pos-2);jt<3&&ue.eat(ln);)jt++;var xt=ue.peek()||" ",Tt=!/\s/.test(xt)&&(!ht.test(xt)||/\s/.test(Lt)||ht.test(Lt)),Ft=!/\s/.test(Lt)&&(!ht.test(Lt)||/\s/.test(xt)||ht.test(xt)),yt=null,ee=null;if(jt%2&&(!Ht.em&&Tt&&(ln==="*"||!Ft||ht.test(Lt))?yt=!0:Ht.em==ln&&Ft&&(ln==="*"||!Tt||ht.test(xt))&&(yt=!1)),jt>1&&(!Ht.strong&&Tt&&(ln==="*"||!Ft||ht.test(Lt))?ee=!0:Ht.strong==ln&&Ft&&(ln==="*"||!Tt||ht.test(xt))&&(ee=!1)),ee!=null||yt!=null){oe.highlightFormatting&&(Ht.formatting=yt==null?"strong":ee==null?"em":"strong em"),yt===!0&&(Ht.em=ln),ee===!0&&(Ht.strong=ln);var dn=Kt(Ht);return yt===!1&&(Ht.em=!1),ee===!1&&(Ht.strong=!1),dn}}else if(ln===" "&&(ue.eat("*")||ue.eat("_"))){if(ue.peek()===" ")return Kt(Ht);ue.backUp(1)}if(oe.strikethrough){if(ln==="~"&&ue.eatWhile(ln)){if(Ht.strikethrough){oe.highlightFormatting&&(Ht.formatting="strikethrough");var dn=Kt(Ht);return Ht.strikethrough=!1,dn}else if(ue.match(/^[^\s]/,!1))return Ht.strikethrough=!0,oe.highlightFormatting&&(Ht.formatting="strikethrough"),Kt(Ht)}else if(ln===" "&&ue.match(/^~~/,!0)){if(ue.peek()===" ")return Kt(Ht);ue.backUp(2)}}if(oe.emoji&&ln===":"&&ue.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ht.emoji=!0,oe.highlightFormatting&&(Ht.formatting="emoji");var pe=Kt(Ht);return Ht.emoji=!1,pe}return ln===" "&&(ue.match(/^ +$/,!1)?Ht.trailingSpace++:Ht.trailingSpace&&(Ht.trailingSpaceNewLine=!0)),Kt(Ht)}function Vt(ue,Ht){var ke=ue.next();if(ke===">"){Ht.f=Ht.inline=xe,oe.highlightFormatting&&(Ht.formatting="link");var pn=Kt(Ht);return pn?pn+=" ":pn="",pn+Jt.linkInline}return ue.match(/^[^>]+/,!0),Jt.linkInline}function Ie(ue,Ht){if(ue.eatSpace())return null;var ke=ue.next();return ke==="("||ke==="["?(Ht.f=Ht.inline=Ye(ke==="("?")":"]"),oe.highlightFormatting&&(Ht.formatting="link-string"),Ht.linkHref=!0,Kt(Ht)):"error"}var Se={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ye(ue){return function(Ht,ke){var pn=Ht.next();if(pn===ue){ke.f=ke.inline=xe,oe.highlightFormatting&&(ke.formatting="link-string");var ln=Kt(ke);return ke.linkHref=!1,ln}return Ht.match(Se[ue]),ke.linkHref=!0,Kt(ke)}}function Le(ue,Ht){return ue.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ht.f=Pe,ue.next(),oe.highlightFormatting&&(Ht.formatting="link"),Ht.linkText=!0,Kt(Ht)):ft(ue,Ht,xe)}function Pe(ue,Ht){if(ue.match(/^\]:/,!0)){Ht.f=Ht.inline=We,oe.highlightFormatting&&(Ht.formatting="link");var ke=Kt(Ht);return Ht.linkText=!1,ke}return ue.match(/^([^\]\\]|\\.)+/,!0),Jt.linkText}function We(ue,Ht){return ue.eatSpace()?null:(ue.match(/^[^\s]+/,!0),ue.peek()===void 0?Ht.linkTitle=!0:ue.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ht.f=Ht.inline=xe,Jt.linkHref+" url")}var Ue={startState:function(){return{f:Nt,prevLine:{stream:null},thisLine:{stream:null},block:Nt,htmlState:null,indentation:0,inline:xe,text:Wt,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(ue){return{f:ue.f,prevLine:ue.prevLine,thisLine:ue.thisLine,block:ue.block,htmlState:ue.htmlState&&vt.copyState(de,ue.htmlState),indentation:ue.indentation,localMode:ue.localMode,localState:ue.localMode?vt.copyState(ue.localMode,ue.localState):null,inline:ue.inline,text:ue.text,formatting:!1,linkText:ue.linkText,linkTitle:ue.linkTitle,linkHref:ue.linkHref,code:ue.code,em:ue.em,strong:ue.strong,strikethrough:ue.strikethrough,emoji:ue.emoji,header:ue.header,setext:ue.setext,hr:ue.hr,taskList:ue.taskList,list:ue.list,listStack:ue.listStack.slice(0),quote:ue.quote,indentedCode:ue.indentedCode,trailingSpace:ue.trailingSpace,trailingSpaceNewLine:ue.trailingSpaceNewLine,md_inside:ue.md_inside,fencedEndRE:ue.fencedEndRE}},token:function(ue,Ht){if(Ht.formatting=!1,ue!=Ht.thisLine.stream){if(Ht.header=0,Ht.hr=!1,ue.match(/^\s*$/,!0))return Et(Ht),null;if(Ht.prevLine=Ht.thisLine,Ht.thisLine={stream:ue},Ht.taskList=!1,Ht.trailingSpace=0,Ht.trailingSpaceNewLine=!1,!Ht.localState&&(Ht.f=Ht.block,Ht.f!=Dt)){var ke=ue.match(/^\s*/,!0)[0].replace(/\t/g,at).length;if(Ht.indentation=ke,Ht.indentationDiff=null,ke>0)return null}}return Ht.f(ue,Ht)},innerMode:function(ue){return ue.block==Dt?{state:ue.htmlState,mode:de}:ue.localState?{state:ue.localState,mode:ue.localMode}:{state:ue,mode:Ue}},indent:function(ue,Ht,ke){return ue.block==Dt&&de.indent?de.indent(ue.htmlState,Ht,ke):ue.localState&&ue.localMode.indent?ue.localMode.indent(ue.localState,Ht,ke):vt.Pass},blankLine:Et,getType:Kt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ue},"xml"),vt.defineMIME("text/markdown","markdown"),vt.defineMIME("text/x-markdown","markdown")})},98101:function(Sn,Ve,Pt){(function(vt){vt(Pt(89780))})(function(vt){"use strict";vt.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 It=0;It<vt.modeInfo.length;It++){var oe=vt.modeInfo[It];oe.mimes&&(oe.mime=oe.mimes[0])}vt.findModeByMIME=function(de){de=de.toLowerCase();for(var $t=0;$t<vt.modeInfo.length;$t++){var Ut=vt.modeInfo[$t];if(Ut.mime==de)return Ut;if(Ut.mimes){for(var Jt=0;Jt<Ut.mimes.length;Jt++)if(Ut.mimes[Jt]==de)return Ut}}if(/\+xml$/.test(de))return vt.findModeByMIME("application/xml");if(/\+json$/.test(de))return vt.findModeByMIME("application/json")},vt.findModeByExtension=function(de){de=de.toLowerCase();for(var $t=0;$t<vt.modeInfo.length;$t++){var Ut=vt.modeInfo[$t];if(Ut.ext){for(var Jt=0;Jt<Ut.ext.length;Jt++)if(Ut.ext[Jt]==de)return Ut}}},vt.findModeByFileName=function(de){for(var $t=0;$t<vt.modeInfo.length;$t++){var Ut=vt.modeInfo[$t];if(Ut.file&&Ut.file.test(de))return Ut}var Jt=de.lastIndexOf("."),De=Jt>-1&&de.substring(Jt+1,de.length);if(De)return vt.findModeByExtension(De)},vt.findModeByName=function(de){de=de.toLowerCase();for(var $t=0;$t<vt.modeInfo.length;$t++){var Ut=vt.modeInfo[$t];if(Ut.name.toLowerCase()==de)return Ut;if(Ut.alias){for(var Jt=0;Jt<Ut.alias.length;Jt++)if(Ut.alias[Jt].toLowerCase()==de)return Ut}}}})},67549:function(Sn,Ve,Pt){(function(vt){vt(Pt(89780))})(function(vt){"use strict";vt.defineMode("stex",function(It,oe){"use strict";function de(Ot,et){Ot.cmdState.push(et)}function $t(Ot){return Ot.cmdState.length>0?Ot.cmdState[Ot.cmdState.length-1]:null}function Ut(Ot){var et=Ot.cmdState.pop();et&&et.closeBracket()}function Jt(Ot){for(var et=Ot.cmdState,nt=et.length-1;nt>=0;nt--){var ht=et[nt];if(ht.name!="DEFAULT")return ht}return{styleIdentifier:function(){return null}}}function De(Ot,et,nt){return function(){this.name=Ot,this.bracketNo=0,this.style=et,this.styles=nt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var we={};we.importmodule=De("importmodule","tag",["string","builtin"]),we.documentclass=De("documentclass","tag",["","atom"]),we.usepackage=De("usepackage","tag",["atom"]),we.begin=De("begin","tag",["atom"]),we.end=De("end","tag",["atom"]),we.label=De("label","tag",["atom"]),we.ref=De("ref","tag",["atom"]),we.eqref=De("eqref","tag",["atom"]),we.cite=De("cite","tag",["atom"]),we.bibitem=De("bibitem","tag",["atom"]),we.Bibitem=De("Bibitem","tag",["atom"]),we.RBibitem=De("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function te(Ot,et){Ot.f=et}function Fe(Ot,et){var nt;if(Ot.match(/^\\[a-zA-Z@]+/)){var ht=Ot.current().slice(1);return nt=we.hasOwnProperty(ht)?we[ht]:we.DEFAULT,nt=new nt,de(et,nt),te(et,me),nt.style}if(Ot.match(/^\\[$&%#{}_]/)||Ot.match(/^\\[,;!\/\\]/))return"tag";if(Ot.match("\\["))return te(et,function(ft,mt){return re(ft,mt,"\\]")}),"keyword";if(Ot.match("\\("))return te(et,function(ft,mt){return re(ft,mt,"\\)")}),"keyword";if(Ot.match("$$"))return te(et,function(ft,mt){return re(ft,mt,"$$")}),"keyword";if(Ot.match("$"))return te(et,function(ft,mt){return re(ft,mt,"$")}),"keyword";var at=Ot.next();if(at=="%")return Ot.skipToEnd(),"comment";if(at=="}"||at=="]"){if(nt=$t(et),nt)nt.closeBracket(at),te(et,me);else return"error";return"bracket"}else return at=="{"||at=="["?(nt=we.DEFAULT,nt=new nt,de(et,nt),"bracket"):/\d/.test(at)?(Ot.eatWhile(/[\w.%]/),"atom"):(Ot.eatWhile(/[\w\-_]/),nt=Jt(et),nt.name=="begin"&&(nt.argument=Ot.current()),nt.styleIdentifier())}function re(Ot,et,nt){if(Ot.eatSpace())return null;if(nt&&Ot.match(nt))return te(et,Fe),"keyword";if(Ot.match(/^\\[a-zA-Z@]+/))return"tag";if(Ot.match(/^[a-zA-Z]+/))return"variable-2";if(Ot.match(/^\\[$&%#{}_]/)||Ot.match(/^\\[,;!\/]/)||Ot.match(/^[\^_&]/))return"tag";if(Ot.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ot.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ht=Ot.next();return ht=="{"||ht=="}"||ht=="["||ht=="]"||ht=="("||ht==")"?"bracket":ht=="%"?(Ot.skipToEnd(),"comment"):"error"}function me(Ot,et){var nt=Ot.peek(),ht;return nt=="{"||nt=="["?(ht=$t(et),ht.openBracket(nt),Ot.eat(nt),te(et,Fe),"bracket"):/[ \t\r]/.test(nt)?(Ot.eat(nt),null):(te(et,Fe),Ut(et),Fe(Ot,et))}return{startState:function(){var Ot=oe.inMathMode?function(et,nt){return re(et,nt)}:Fe;return{cmdState:[],f:Ot}},copyState:function(Ot){return{cmdState:Ot.cmdState.slice(),f:Ot.f}},token:function(Ot,et){return et.f(Ot,et)},blankLine:function(Ot){Ot.f=Fe,Ot.cmdState.length=0},lineComment:"%"}}),vt.defineMIME("text/x-stex","stex"),vt.defineMIME("text/x-latex","stex")})},15525:function(Sn,Ve,Pt){(function(vt){vt(Pt(89780))})(function(vt){"use strict";var It={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};vt.defineMode("xml",function(de,$t){var Ut=de.indentUnit,Jt={},De=$t.htmlMode?It:oe;for(var we in De)Jt[we]=De[we];for(var we in $t)Jt[we]=$t[we];var te,Fe;function re(Vt,Ie){function Se(Pe){return Ie.tokenize=Pe,Pe(Vt,Ie)}var Ye=Vt.next();if(Ye=="<")return Vt.eat("!")?Vt.eat("[")?Vt.match("CDATA[")?Se(et("atom","]]>")):null:Vt.match("--")?Se(et("comment","-->")):Vt.match("DOCTYPE",!0,!0)?(Vt.eatWhile(/[\w\._\-]/),Se(nt(1))):null:Vt.eat("?")?(Vt.eatWhile(/[\w\._\-]/),Ie.tokenize=et("meta","?>"),"meta"):(te=Vt.eat("/")?"closeTag":"openTag",Ie.tokenize=me,"tag bracket");if(Ye=="&"){var Le;return Vt.eat("#")?Vt.eat("x")?Le=Vt.eatWhile(/[a-fA-F\d]/)&&Vt.eat(";"):Le=Vt.eatWhile(/[\d]/)&&Vt.eat(";"):Le=Vt.eatWhile(/[\w\.\-:]/)&&Vt.eat(";"),Le?"atom":"error"}else return Vt.eatWhile(/[^&<]/),null}re.isInText=!0;function me(Vt,Ie){var Se=Vt.next();if(Se==">"||Se=="/"&&Vt.eat(">"))return Ie.tokenize=re,te=Se==">"?"endTag":"selfcloseTag","tag bracket";if(Se=="=")return te="equals",null;if(Se=="<"){Ie.tokenize=re,Ie.state=mt,Ie.tagName=Ie.tagStart=null;var Ye=Ie.tokenize(Vt,Ie);return Ye?Ye+" tag error":"tag error"}else return/[\'\"]/.test(Se)?(Ie.tokenize=Ot(Se),Ie.stringStartCol=Vt.column(),Ie.tokenize(Vt,Ie)):(Vt.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ot(Vt){var Ie=function(Se,Ye){for(;!Se.eol();)if(Se.next()==Vt){Ye.tokenize=me;break}return"string"};return Ie.isInAttribute=!0,Ie}function et(Vt,Ie){return function(Se,Ye){for(;!Se.eol();){if(Se.match(Ie)){Ye.tokenize=re;break}Se.next()}return Vt}}function nt(Vt){return function(Ie,Se){for(var Ye;(Ye=Ie.next())!=null;){if(Ye=="<")return Se.tokenize=nt(Vt+1),Se.tokenize(Ie,Se);if(Ye==">")if(Vt==1){Se.tokenize=re;break}else return Se.tokenize=nt(Vt-1),Se.tokenize(Ie,Se)}return"meta"}}function ht(Vt,Ie,Se){this.prev=Vt.context,this.tagName=Ie,this.indent=Vt.indented,this.startOfLine=Se,(Jt.doNotIndent.hasOwnProperty(Ie)||Vt.context&&Vt.context.noIndent)&&(this.noIndent=!0)}function at(Vt){Vt.context&&(Vt.context=Vt.context.prev)}function ft(Vt,Ie){for(var Se;;){if(!Vt.context||(Se=Vt.context.tagName,!Jt.contextGrabbers.hasOwnProperty(Se)||!Jt.contextGrabbers[Se].hasOwnProperty(Ie)))return;at(Vt)}}function mt(Vt,Ie,Se){return Vt=="openTag"?(Se.tagStart=Ie.column(),wt):Vt=="closeTag"?Et:mt}function wt(Vt,Ie,Se){return Vt=="word"?(Se.tagName=Ie.current(),Fe="tag",At):Jt.allowMissingTagName&&Vt=="endTag"?(Fe="tag bracket",At(Vt,Ie,Se)):(Fe="error",wt)}function Et(Vt,Ie,Se){if(Vt=="word"){var Ye=Ie.current();return Se.context&&Se.context.tagName!=Ye&&Jt.implicitlyClosed.hasOwnProperty(Se.context.tagName)&&at(Se),Se.context&&Se.context.tagName==Ye||Jt.matchClosing===!1?(Fe="tag",Nt):(Fe="tag error",Dt)}else return Jt.allowMissingTagName&&Vt=="endTag"?(Fe="tag bracket",Nt(Vt,Ie,Se)):(Fe="error",Dt)}function Nt(Vt,Ie,Se){return Vt!="endTag"?(Fe="error",Nt):(at(Se),mt)}function Dt(Vt,Ie,Se){return Fe="error",Nt(Vt,Ie,Se)}function At(Vt,Ie,Se){if(Vt=="word")return Fe="attribute",Kt;if(Vt=="endTag"||Vt=="selfcloseTag"){var Ye=Se.tagName,Le=Se.tagStart;return Se.tagName=Se.tagStart=null,Vt=="selfcloseTag"||Jt.autoSelfClosers.hasOwnProperty(Ye)?ft(Se,Ye):(ft(Se,Ye),Se.context=new ht(Se,Ye,Le==Se.indented)),mt}return Fe="error",At}function Kt(Vt,Ie,Se){return Vt=="equals"?Wt:(Jt.allowMissing||(Fe="error"),At(Vt,Ie,Se))}function Wt(Vt,Ie,Se){return Vt=="string"?xe:Vt=="word"&&Jt.allowUnquoted?(Fe="string",At):(Fe="error",At(Vt,Ie,Se))}function xe(Vt,Ie,Se){return Vt=="string"?xe:At(Vt,Ie,Se)}return{startState:function(Vt){var Ie={tokenize:re,state:mt,indented:Vt||0,tagName:null,tagStart:null,context:null};return Vt!=null&&(Ie.baseIndent=Vt),Ie},token:function(Vt,Ie){if(!Ie.tagName&&Vt.sol()&&(Ie.indented=Vt.indentation()),Vt.eatSpace())return null;te=null;var Se=Ie.tokenize(Vt,Ie);return(Se||te)&&Se!="comment"&&(Fe=null,Ie.state=Ie.state(te||Se,Vt,Ie),Fe&&(Se=Fe=="error"?Se+" error":Fe)),Se},indent:function(Vt,Ie,Se){var Ye=Vt.context;if(Vt.tokenize.isInAttribute)return Vt.tagStart==Vt.indented?Vt.stringStartCol+1:Vt.indented+Ut;if(Ye&&Ye.noIndent)return vt.Pass;if(Vt.tokenize!=me&&Vt.tokenize!=re)return Se?Se.match(/^(\s*)/)[0].length:0;if(Vt.tagName)return Jt.multilineTagIndentPastTag!==!1?Vt.tagStart+Vt.tagName.length+2:Vt.tagStart+Ut*(Jt.multilineTagIndentFactor||1);if(Jt.alignCDATA&&/<!\[CDATA\[/.test(Ie))return 0;var Le=Ie&&/^<(\/)?([\w_:\.-]*)/.exec(Ie);if(Le&&Le[1])for(;Ye;)if(Ye.tagName==Le[2]){Ye=Ye.prev;break}else if(Jt.implicitlyClosed.hasOwnProperty(Ye.tagName))Ye=Ye.prev;else break;else if(Le)for(;Ye;){var Pe=Jt.contextGrabbers[Ye.tagName];if(Pe&&Pe.hasOwnProperty(Le[2]))Ye=Ye.prev;else break}for(;Ye&&Ye.prev&&!Ye.startOfLine;)Ye=Ye.prev;return Ye?Ye.indent+Ut:Vt.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Jt.htmlMode?"html":"xml",helperType:Jt.htmlMode?"html":"xml",skipAttribute:function(Vt){Vt.state==Wt&&(Vt.state=At)},xmlCurrentTag:function(Vt){return Vt.tagName?{name:Vt.tagName,close:Vt.type=="closeTag"}:null},xmlCurrentContext:function(Vt){for(var Ie=[],Se=Vt.context;Se;Se=Se.prev)Se.tagName&&Ie.push(Se.tagName);return Ie.reverse()}}}),vt.defineMIME("text/xml","xml"),vt.defineMIME("application/xml","xml"),vt.mimeModes.hasOwnProperty("text/html")||vt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{$u:function(){return we},BD:function(){return jt},E9:function(){return De},FF:function(){return io},FJ:function(){return mt},Hn:function(){return ft},KX:function(){return Et},NB:function(){return fe},S0:function(){return Ce},UL:function(){return te},Vk:function(){return at},Vm:function(){return ne},YI:function(){return $n},ZA:function(){return oe},Zt:function(){return Fe},al:function(){return yt},bn:function(){return Ft},bx:function(){return Lt},g2:function(){return Qn},h1:function(){return Wt},hD:function(){return An},l4:function(){return Ut},rU:function(){return ce},s_:function(){return xt},uz:function(){return Zt},z6:function(){return re}}),Sn=Pt.hmd(Sn),function(){var Mt;function so(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Ii(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:so(a)}}function Wi(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var ki=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Bo;if(typeof Object.setPrototypeOf=="function")Bo=Object.setPrototypeOf;else{var Mo;t:{var ai={a:!0},di={};try{di.__proto__=ai,Mo=di.a;break t}catch(a){}Mo=!1}Bo=Mo?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ae=Bo;function Be(a,y){if(a.prototype=ki(y.prototype),a.prototype.constructor=a,Ae)Ae(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 _t=typeof Pt.g!="undefined"&&Pt.g!=null?Pt.g:self,Je=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},cn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function ve(a,y){if(y){var x=_t;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&&cn(x,a,{writable:!0,value:y})}}ve("Object.assign",function(a){return a||Je}),ve("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 ie=typeof globalThis=="object"&&globalThis||typeof Pt.g=="object"&&Pt.g.global===Pt.g&&Pt.g||typeof self=="object"&&self.self===self&&self||{};ie.requestAnimationFrame===void 0&&(ie.setImmediate===void 0?ie.requestAnimationFrame=function(a){ie.setTimeout(a,0)}:ie.requestAnimationFrame=ie.setImmediate);function Qe(){}function yn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&ie.clearTimeout(x),x=Nn(function(){x=-1,a.apply(b,E)},y)}}function Nn(a,y){return ie.setTimeout(a,y)}function _n(a){return ie.document.createElement(a)}function le(a){throw Error(a)}function mn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),le(a)}function Gn(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),le(x+" is not in the range "+y+": "+a)}function si(a){ie.console&&ie.console.log(a)}function Re(a){return typeof a=="object"&&a!==null}function fn(a){return Array.isArray(a)||ie.NodeList&&a instanceof ie.NodeList||ie.HTMLCollection&&a instanceof ie.HTMLCollection}function He(a){return Array.prototype.slice.call(a)}function je(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):le("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function vn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):le("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function rn(){var a=Ei.pop();return a===void 0?[]:a}function bn(a){a.length=0,Ei.push(a)}function xn(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(Re(a)&&a.constructor)return xn(a.constructor);return typeof a}function On(a){var y=a;return Re(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 zn(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 yi(a,y,x){Object.defineProperty(qo.prototype,a,{get:y,set:x})}function Xe(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 z="",tt=0;tt<a.length;tt++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[b])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var Li=ie.navigator!==void 0&&0<ie.navigator.userAgent.indexOf("Trident/7"),ji=ie.navigator!==void 0&&ie.navigator.platform!==void 0&&ie.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Ei=[];Object.freeze([]),Qe.className="Util",Qe.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Qe.adym="gojs.net",Qe.vfo="28e645fdb266",Qe.className="Util";function nn(a,y,x){Ci(this),this.j=a,this.xa=y,this.o=x}nn.prototype.toString=function(){return"EnumValue."+this.xa};function Vn(a,y){return y==null||y===""?null:a[y]}_t.Object.defineProperties(nn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),nn.className="EnumValue";function ze(){this.ew=[]}ze.prototype.toString=function(){return this.ew.join("")},ze.prototype.add=function(a){a!==""&&this.ew.push(a)},ze.className="StringBuilder";function Ge(){}Ge.className="PropertyCollection";var Oe={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){ie.console&&ie.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 z=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(tt,ot){return function(){throw Error("Property "+tt.Zl[ot.Tj]+" of "+tt.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function un(){}un.prototype.reset=function(){},un.prototype.next=function(){return!1},un.prototype.Ad=function(){return!1},un.prototype.first=function(){return null},un.prototype.any=function(){return!1},un.prototype.all=function(){return!0},un.prototype.each=function(){return this},un.prototype.map=function(){return this},un.prototype.filter=function(){return this},un.prototype.de=function(){},un.prototype.toString=function(){return"EmptyIterator"},_t.Object.defineProperties(un.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),un.prototype.first=un.prototype.first,un.prototype.hasNext=un.prototype.Ad,un.prototype.next=un.prototype.next,un.prototype.reset=un.prototype.reset;var kn=null;un.className="EmptyIterator",kn=new un;function Tn(a){this.key=-1,this.value=a}Tn.prototype.reset=function(){this.key=-1},Tn.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Tn.prototype.Ad=function(){return this.next()},Tn.prototype.first=function(){return this.key=0,this.value},Tn.prototype.any=function(a){return this.key=-1,a(this.value)},Tn.prototype.all=function(a){return this.key=-1,a(this.value)},Tn.prototype.each=function(a){return this.key=-1,a(this.value),this},Tn.prototype.map=function(a){return new Tn(a(this.value))},Tn.prototype.filter=function(a){return a(this.value)?new Tn(this.value):kn},Tn.prototype.de=function(){this.value=null},Tn.prototype.toString=function(){return"SingletonIterator("+this.value+")"},_t.Object.defineProperties(Tn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Tn.prototype.first=Tn.prototype.first,Tn.prototype.hasNext=Tn.prototype.Ad,Tn.prototype.next=Tn.prototype.next,Tn.prototype.reset=Tn.prototype.reset,Tn.className="SingletonIterator";function Rn(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Rn.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Rn.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},Rn.prototype.Ad=function(){return this.next()},Rn.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},Rn.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 z=y[E];if((b===null||b(z))&&a(z))return!0}return!1},Rn.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 z=y[E];if((b===null||b(z))&&!a(z))return!1}return!0},Rn.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 z=y[E];(b===null||b(z))&&a(z)}return this},Rn.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,z=0;z<b;z++){var tt=y[z];(E===null||E(tt))&&x.push(a(tt))}return a=new qe,a.s=x,a.xb(),a.iterator},Rn.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,z=0;z<b;z++){var tt=y[z];(E===null||E(tt))&&a(tt)&&x.push(tt)}return a=new qe,a.s=x,a.xb(),a.iterator},Rn.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Rn.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},_t.Object.defineProperties(Rn.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}}}),Rn.prototype.first=Rn.prototype.first,Rn.prototype.hasNext=Rn.prototype.Ad,Rn.prototype.next=Rn.prototype.next,Rn.prototype.reset=Rn.prototype.reset,Rn.className="ListIterator";function ei(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}ei.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},ei.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)},ei.prototype.Ad=function(){return this.next()},ei.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},ei.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},ei.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},ei.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},ei.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 qe,a.s=x,a.xb(),a.iterator},ei.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 qe,a.s=x,a.xb(),a.iterator},ei.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},ei.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},_t.Object.defineProperties(ei.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),ei.prototype.first=ei.prototype.first,ei.prototype.hasNext=ei.prototype.Ad,ei.prototype.next=ei.prototype.next,ei.prototype.reset=ei.prototype.reset,ei.className="ListIteratorBackwards";function qe(a){Ci(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&le("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=qe.prototype,Mt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.toString=function(){return"List()#"+$i(this)},Mt.add=function(a){return a===null?this:(this._isFrozen&&mn(this,a),this.s.push(a),this.xb(),this)},Mt.push=function(a){this.add(a)},Mt.addAll=function(a){if(a===null)return this;this._isFrozen&&mn(this);var y=this.s;if(fn(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},Mt.clear=function(){this._isFrozen&&mn(this),this.s.length=0,this.xb()},Mt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Mt.has=function(a){return this.contains(a)},Mt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Mt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Gn(a,"0 <= i < length",qe,"elt:i"),y[a]},Mt.get=function(a){return this.M(a)},Mt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Gn(a,"0 <= i < length",qe,"setElt:i"),this._isFrozen&&mn(this,a),x[a]=y},Mt.set=function(a,y){this.cd(a,y)},Mt.first=function(){var a=this.s;return a.length===0?null:a[0]},Mt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Mt.pop=function(){this._isFrozen&&mn(this);var a=this.s;return 0<a.length?a.pop():null},qe.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},qe.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},qe.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},qe.prototype.map=function(a){for(var y=new qe,x=[],b=this.s,E=b.length,z=0;z<E;z++)x.push(a(b[z]));return y.s=x,y.xb(),y},qe.prototype.filter=function(a){for(var y=new qe,x=[],b=this.s,E=b.length,z=0;z<E;z++){var tt=b[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},Mt=qe.prototype,Mt.Gb=function(a,y){0>a&&Gn(a,">= 0",qe,"insertAt:i"),this._isFrozen&&mn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Mt.remove=function(a){if(a===null)return!1;this._isFrozen&&mn(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)},Mt.delete=function(a){return this.remove(a)},Mt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Gn(a,"0 <= i < length",qe,"removeAt:i"),this._isFrozen&&mn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Mt.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&&mn(this);for(var E=a,z=y+1;z<b;)x[E++]=x[z++];return x.length=b-(y-a+1),this.xb(),this},qe.prototype.copy=function(){var a=new qe,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Mt=qe.prototype,Mt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},Mt.Iv=function(){for(var a=new tn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},Mt.sort=function(a){return this._isFrozen&&mn(this),this.s.sort(a),this.xb(),this},Mt.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&mn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=E-1)&&Gn(y,"0 <= from < length",qe,"sortRange:from"),z===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},Mt.reverse=function(){return this._isFrozen&&mn(this),this.s.reverse(),this.xb(),this},_t.Object.defineProperties(qe.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 kn;var a=this.Sa;return a!==null?(a.reset(),a):new Rn(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return kn;var a=this.Hg;return a!==null?(a.reset(),a):new ei(this)}}}),qe.prototype.reverse=qe.prototype.reverse,qe.prototype.sortRange=qe.prototype.zi,qe.prototype.sort=qe.prototype.sort,qe.prototype.toSet=qe.prototype.Iv,qe.prototype.toArray=qe.prototype.Fa,qe.prototype.removeRange=qe.prototype.removeRange,qe.prototype.removeAt=qe.prototype.mb,qe.prototype.delete=qe.prototype.delete,qe.prototype.remove=qe.prototype.remove,qe.prototype.insertAt=qe.prototype.Gb,qe.prototype.pop=qe.prototype.pop,qe.prototype.last=qe.prototype.jc,qe.prototype.first=qe.prototype.first,qe.prototype.set=qe.prototype.set,qe.prototype.setElt=qe.prototype.cd,qe.prototype.get=qe.prototype.get,qe.prototype.elt=qe.prototype.M,qe.prototype.indexOf=qe.prototype.indexOf,qe.prototype.has=qe.prototype.has,qe.prototype.contains=qe.prototype.contains,qe.prototype.clear=qe.prototype.clear,qe.prototype.addAll=qe.prototype.addAll,qe.prototype.push=qe.prototype.push,qe.prototype.add=qe.prototype.add,qe.prototype.thaw=qe.prototype.ka,qe.prototype.freeze=qe.prototype.freeze,qe.className="List";function pi(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}pi.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},pi.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)},pi.prototype.Ad=function(){return this.next()},pi.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},pi.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},pi.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},pi.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},pi.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new qe;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},pi.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new qe;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},pi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},pi.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},_t.Object.defineProperties(pi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),pi.prototype.first=pi.prototype.first,pi.prototype.hasNext=pi.prototype.Ad,pi.prototype.next=pi.prototype.next,pi.prototype.reset=pi.prototype.reset,pi.className="SetIterator";function tn(a){Ci(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&le("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=tn.prototype,Mt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.toString=function(){return"Set()#"+$i(this)},Mt.add=function(a){if(a===null)return this;this._isFrozen&&mn(this,a);var y=a;return Re(a)&&(y=Ui(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Yi(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},Mt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&mn(this),fn(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},Mt.contains=function(a){if(a===null)return!1;var y=a;return Re(a)&&(y=$i(a),y===void 0)?!1:this.Tb[y]!==void 0},Mt.has=function(a){return this.contains(a)},Mt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Mt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Mt.first=function(){var a=this.ea;return a===null?null:a.value},tn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},tn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},tn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},tn.prototype.map=function(a){for(var y=new tn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},tn.prototype.filter=function(a){for(var y=new tn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},Mt=tn.prototype,Mt.remove=function(a){if(a===null)return!1;this._isFrozen&&mn(this,a);var y=a;if(Re(a)&&(y=$i(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},Mt.delete=function(a){return this.remove(a)},Mt.hp=function(a){if(a===null)return this;if(this._isFrozen&&mn(this),fn(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},Mt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&mn(this);var y=new tn;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},Mt.clear=function(){this._isFrozen&&mn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},tn.prototype.copy=function(){var a=new tn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},tn.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},tn.prototype.Hv=function(){var a=new qe,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Ci(a){a.__gohashid=Co++}function Ui(a){var y=a.__gohashid;return y===void 0&&(y=Co++,a.__gohashid=y),y}function $i(a){return a.__gohashid}_t.Object.defineProperties(tn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return kn;var a=this.Sa;return a!==null?(a.reset(),a):new pi(this)}}}),tn.prototype.toList=tn.prototype.Hv,tn.prototype.toArray=tn.prototype.Fa,tn.prototype.clear=tn.prototype.clear,tn.prototype.retainAll=tn.prototype.pA,tn.prototype.removeAll=tn.prototype.hp,tn.prototype.delete=tn.prototype.delete,tn.prototype.remove=tn.prototype.remove,tn.prototype.first=tn.prototype.first,tn.prototype.containsAny=tn.prototype.Ty,tn.prototype.containsAll=tn.prototype.Sy,tn.prototype.has=tn.prototype.has,tn.prototype.contains=tn.prototype.contains,tn.prototype.addAll=tn.prototype.addAll,tn.prototype.add=tn.prototype.add,tn.prototype.thaw=tn.prototype.ka,tn.prototype.freeze=tn.prototype.freeze;var Co=1;tn.className="Set",tn.uniqueHash=Ci,tn.hashIdUnique=Ui,tn.hashId=$i;function lo(a){this.ma=a,this.qa=a.Ja,this.sa=null}lo.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},lo.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)},lo.prototype.Ad=function(){return this.next()},lo.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},lo.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},lo.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},lo.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},lo.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new qe;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},lo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new qe;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},lo.prototype.de=function(){this.value=this.key=null,this.qa=-1},lo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},_t.Object.defineProperties(lo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),lo.prototype.first=lo.prototype.first,lo.prototype.hasNext=lo.prototype.Ad,lo.prototype.next=lo.prototype.next,lo.prototype.reset=lo.prototype.reset,lo.className="MapKeySetIterator";function Si(a){tn.call(this),Ci(this),this._isFrozen=!0,this.ma=a}Be(Si,tn),Mt=Si.prototype,Mt.freeze=function(){return this},Mt.ka=function(){return this},Mt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Mt.add=function(){le("This Set is read-only: "+this.toString())},Mt.contains=function(a){return this.ma.contains(a)},Mt.has=function(a){return this.contains(a)},Mt.remove=function(){le("This Set is read-only: "+this.toString())},Mt.delete=function(a){return this.remove(a)},Mt.clear=function(){le("This Set is read-only: "+this.toString())},Mt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Si.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Si.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Si.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Si.prototype.map=function(a){for(var y=new tn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Si.prototype.filter=function(a){for(var y=new tn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Si.prototype.copy=function(){return new Si(this.ma)},Si.prototype.Iv=function(){var a=new tn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Si.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},Si.prototype.Hv=function(){var a=new qe,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},_t.Object.defineProperties(Si.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?kn:new lo(this.ma)}}}),Si.prototype.toList=Si.prototype.Hv,Si.prototype.toArray=Si.prototype.Fa,Si.prototype.toSet=Si.prototype.Iv,Si.prototype.first=Si.prototype.first,Si.prototype.clear=Si.prototype.clear,Si.prototype.delete=Si.prototype.delete,Si.prototype.remove=Si.prototype.remove,Si.prototype.has=Si.prototype.has,Si.prototype.contains=Si.prototype.contains,Si.prototype.add=Si.prototype.add,Si.prototype.thaw=Si.prototype.ka,Si.prototype.freeze=Si.prototype.freeze,Si.className="MapKeySet";function ii(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}ii.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},ii.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},ii.prototype.Ad=function(){return this.next()},ii.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},ii.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},ii.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},ii.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},ii.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new qe;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},ii.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new qe;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},ii.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},ii.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},_t.Object.defineProperties(ii.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ii.prototype.first=ii.prototype.first,ii.prototype.hasNext=ii.prototype.Ad,ii.prototype.next=ii.prototype.next,ii.prototype.reset=ii.prototype.reset,ii.className="MapValueSetIterator";function Yi(a,y){this.key=a,this.value=y,this.ll=this.va=null}Yi.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Yi.className="KeyValuePair";function oo(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}oo.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},oo.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)},oo.prototype.Ad=function(){return this.next()},oo.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},oo.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},oo.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},oo.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},oo.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new qe;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},oo.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new qe;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},oo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},oo.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},_t.Object.defineProperties(oo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),oo.prototype.first=oo.prototype.first,oo.prototype.hasNext=oo.prototype.Ad,oo.prototype.next=oo.prototype.next,oo.prototype.reset=oo.prototype.reset,oo.className="MapIterator";function Yn(a){Ci(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&le("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Mt=Yn.prototype,Mt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.toString=function(){return"Map()#"+$i(this)},Mt.add=function(a,y){this._isFrozen&&mn(this,a);var x=a;Re(a)&&(x=Ui(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new Yi(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},Mt.set=function(a,y){return this.add(a,y)},Mt.addAll=function(a){if(a===null)return this;if(fn(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 Yn)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},Mt.first=function(){return this.ea},Yn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Yn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Yn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Yn.prototype.map=function(a){for(var y=new Yn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Yn.prototype.filter=function(a){for(var y=new Yn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Mt=Yn.prototype,Mt.contains=function(a){var y=a;return Re(a)&&(y=$i(a),y===void 0)?!1:this.Tb[y]!==void 0},Mt.has=function(a){return this.contains(a)},Mt.I=function(a){var y=a;return Re(a)&&(y=$i(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Mt.get=function(a){return this.I(a)},Mt.remove=function(a){if(a===null)return!1;this._isFrozen&&mn(this,a);var y=a;if(Re(a)&&(y=$i(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},Mt.delete=function(a){return this.remove(a)},Mt.clear=function(){this._isFrozen&&mn(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()},Yn.prototype.copy=function(){var a=new Yn,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Yn.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 Yi(E.key,E.value),x++}return y},Yn.prototype.Lf=function(){return new Si(this)},_t.Object.defineProperties(Yn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return kn;var a=this.Sa;return a!==null?(a.reset(),a):new oo(this)}},iteratorKeys:{get:function(){return 0>=this.count?kn:new lo(this)}},iteratorValues:{get:function(){if(0>=this.count)return kn;var a=this.jf;return a!==null?(a.reset(),a):new ii(this)}}}),Yn.prototype.toKeySet=Yn.prototype.Lf,Yn.prototype.toArray=Yn.prototype.Fa,Yn.prototype.clear=Yn.prototype.clear,Yn.prototype.delete=Yn.prototype.delete,Yn.prototype.remove=Yn.prototype.remove,Yn.prototype.get=Yn.prototype.get,Yn.prototype.getValue=Yn.prototype.I,Yn.prototype.has=Yn.prototype.has,Yn.prototype.contains=Yn.prototype.contains,Yn.prototype.first=Yn.prototype.first,Yn.prototype.addAll=Yn.prototype.addAll,Yn.prototype.set=Yn.prototype.set,Yn.prototype.add=Yn.prototype.add,Yn.prototype.thaw=Yn.prototype.ka,Yn.prototype.freeze=Yn.prototype.freeze,Yn.className="Map";function zt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):le("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ai,vo,ao,Eo,Ho;zt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},zt.prototype.h=function(a,y){return this.x=a,this.y=y,this},zt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},zt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},zt.prototype.copy=function(){var a=new zt;return a.x=this.x,a.y=this.y,a},Mt=zt.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this};function Zi(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 zt(x,E)}return new zt}function xi(a){return a.x.toString()+" "+a.y.toString()}Mt.toString=function(){return"Point("+this.x+","+this.y+")"},Mt.D=function(a){return a instanceof zt?this.x===a.x&&this.y===a.y:!1},Mt.hi=function(a,y){return this.x===a&&this.y===y},Mt.Xa=function(a){return Te.B(this.x,a.x)&&Te.B(this.y,a.y)},Mt.add=function(a){return this.x+=a.x,this.y+=a.y,this},Mt.re=function(a){return this.x-=a.x,this.y-=a.y,this},Mt.offset=function(a,y){return this.x+=a,this.y+=y,this},zt.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},Mt=zt.prototype,Mt.scale=function(a,y){return this.x*=a,this.y*=y,this},Mt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Mt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Mt.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},Mt.ab=function(a){return Fi(a.x-this.x,a.y-this.y)},Mt.direction=function(a,y){return Fi(a-this.x,y-this.y)};function Fi(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}Mt.Ry=function(a,y){return Te.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Mt.fA=function(a,y,x,b){return Te.qh(a,y,x,b,this.x,this.y,this),this},Mt.gA=function(a,y){return Te.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Mt.uA=function(a,y,x,b){return Te.No(this.x,this.y,a,y,x,b,this),this},Mt.vA=function(a,y){return Te.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Mt.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},Mt.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},Mt.transform=function(a){return a.Ga(this),this};function Mi(a,y){return y.Cd(a),a}function co(a,y,x,b,E,z){var tt=E-x,ot=z-b,rt=tt*tt+ot*ot;x-=a,b-=y;var lt=-x*tt-b*ot;return 0>=lt||lt>=rt?(tt=E-a,ot=z-y,Math.min(x*x+b*b,tt*tt+ot*ot)):(a=tt*b-ot*x,a*a/rt)}function uo(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Pi(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)}Mt.w=function(){return isFinite(this.x)&&isFinite(this.y)},zt.alloc=function(){var a=Ni.pop();return a===void 0?new zt:a},zt.allocAt=function(a,y){var x=Ni.pop();return x===void 0?new zt(a,y):(x.x=a,x.y=y,x)},zt.free=function(a){Ni.push(a)},zt.prototype.isReal=zt.prototype.w,zt.prototype.setSpot=zt.prototype.yi,zt.prototype.setRectSpot=zt.prototype.xi,zt.prototype.snapToGridPoint=zt.prototype.vA,zt.prototype.snapToGrid=zt.prototype.uA,zt.prototype.projectOntoLineSegmentPoint=zt.prototype.gA,zt.prototype.projectOntoLineSegment=zt.prototype.fA,zt.intersectingLineSegments=function(a,y,x,b,E,z,tt,ot){return Te.Rl(a,y,x,b,E,z,tt,ot)},zt.prototype.compareWithLineSegmentPoint=zt.prototype.Ry,zt.compareWithLineSegment=function(a,y,x,b,E,z){return Te.Fl(a,y,x,b,E,z)},zt.prototype.direction=zt.prototype.direction,zt.prototype.directionPoint=zt.prototype.ab,zt.prototype.normalize=zt.prototype.normalize,zt.prototype.distanceSquared=zt.prototype.zd,zt.prototype.distanceSquaredPoint=zt.prototype.Bf,zt.prototype.scale=zt.prototype.scale,zt.prototype.rotate=zt.prototype.rotate,zt.prototype.offset=zt.prototype.offset,zt.prototype.subtract=zt.prototype.re,zt.prototype.add=zt.prototype.add,zt.prototype.equalsApprox=zt.prototype.Xa,zt.prototype.equalTo=zt.prototype.hi,zt.prototype.equals=zt.prototype.D,zt.prototype.set=zt.prototype.set,zt.prototype.setTo=zt.prototype.sg;var Ni=[];zt.className="Point",zt.parse=Zi,zt.stringify=xi,zt.distanceLineSegmentSquared=co,zt.distanceSquared=uo,zt.direction=Pi,zt.Origin=Ai=new zt(0,0).ja(),zt.InfiniteTopLeft=vo=new zt(-1/0,-1/0).ja(),zt.InfiniteBottomRight=ao=new zt(1/0,1/0).ja(),zt.SixPoint=Eo=new zt(6,6).ja(),zt.NoPoint=Ho=new zt(NaN,NaN).ja(),zt.parse=Zi,zt.stringify=xi,zt.distanceLineSegmentSquared=co,zt.distanceSquared=uo,zt.direction=Pi;function Wn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):le("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var zi,xo,Ko,Uo,Qo,ar,Ro;Wn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Wn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Wn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Wn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Wn.prototype.copy=function(){var a=new Wn;return a.width=this.width,a.height=this.height,a},Mt=Wn.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this};function er(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Wn(x,E)}return new Wn}function nr(a){return a.width.toString()+" "+a.height.toString()}Mt.toString=function(){return"Size("+this.width+","+this.height+")"},Mt.D=function(a){return a instanceof Wn?this.width===a.width&&this.height===a.height:!1},Mt.hi=function(a,y){return this.width===a&&this.height===y},Mt.Xa=function(a){return Te.B(this.width,a.width)&&Te.B(this.height,a.height)},Mt.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},Mt.w=function(){return isFinite(this.width)&&isFinite(this.height)},Wn.alloc=function(){var a=qr.pop();return a===void 0?new Wn:a},Wn.free=function(a){qr.push(a)},Wn.prototype.isReal=Wn.prototype.w,Wn.prototype.inflate=Wn.prototype.Bc,Wn.prototype.equalsApprox=Wn.prototype.Xa,Wn.prototype.equalTo=Wn.prototype.hi,Wn.prototype.equals=Wn.prototype.D,Wn.prototype.set=Wn.prototype.set,Wn.prototype.setTo=Wn.prototype.sg;var qr=[];Wn.className="Size",Wn.parse=er,Wn.stringify=nr,Wn.ZeroSize=zi=new Wn(0,0).ja(),Wn.OneSize=xo=new Wn(1,1).ja(),Wn.SixSize=Ko=new Wn(6,6).ja(),Wn.EightSize=Uo=new Wn(8,8).ja(),Wn.TenSize=Qo=new Wn(10,10).ja(),Wn.InfiniteSize=ar=new Wn(1/0,1/0).ja(),Wn.NoSize=Ro=new Wn(NaN,NaN).ja(),Wn.parse=er,Wn.stringify=nr;function sn(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 zt?(x=a.x,a=a.y,y instanceof zt?(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 Wn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):le("Incorrect second argument supplied to Rect constructor "+y)):le("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Mt=sn.prototype,Mt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Mt.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function wr(a,y,x){a.width=y,a.height=x}Mt.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},Mt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Mt.dd=function(a){return this.x=a.x,this.y=a.y,this},Mt.tA=function(a){return this.width=a.width,this.height=a.height,this},sn.prototype.copy=function(){var a=new sn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Mt=sn.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this};function Sa(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 z=0;a[y]==="";)y++;(b=a[y++])&&(z=parseFloat(b));for(var tt=0;a[y]==="";)y++;return(b=a[y++])&&(tt=parseFloat(b)),new sn(x,E,z,tt)}return new sn}function Cs(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Mt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Mt.D=function(a){return a instanceof sn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Mt.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},Mt.Xa=function(a){return Te.B(this.x,a.x)&&Te.B(this.y,a.y)&&Te.B(this.width,a.width)&&Te.B(this.height,a.height)};function jo(a,y){return Te.$(a.x,y.x)&&Te.$(a.y,y.y)&&Te.$(a.width,y.width)&&Te.$(a.height,y.height)}Mt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Mt.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},Mt.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},Mt.offset=function(a,y){return this.x+=a,this.y+=y,this},Mt.Bc=function(a,y){return Lo(this,y,a,y,a)},Mt.Co=function(a){return Lo(this,a.top,a.right,a.bottom,a.left)},Mt.Fv=function(a){return Lo(this,-a.top,-a.right,-a.bottom,-a.left)},Mt.Hz=function(a,y,x,b){return Lo(this,a,y,x,b)};function Lo(a,y,x,b,E){var z=a.width;return x+E<=-z?(a.x+=z/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}Mt.Ex=function(a){return vr(this,a.x,a.y,a.width,a.height)},Mt.Uu=function(a,y,x,b){return vr(this,a,y,x,b)};function vr(a,y,x,b,E){var z=Math.max(a.x,y),tt=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=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}Mt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Mt.Vu=function(a,y,x,b){var E=this.width,z=this.x;return E!==1/0&&x!==1/0&&(E+=z,x+=a,isNaN(x)||isNaN(E)||z>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 Xo(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))}Mt.Ye=function(a){return bo(this,a.x,a.y,0,0)},Mt.ed=function(a){return bo(this,a.x,a.y,a.width,a.height)},Mt.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),bo(this,a,y,x,b)};function bo(a,y,x,b,E){var z=Math.min(a.x,y),tt=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=z,a.y=tt,a.width=y-z,a.height=x-tt,a}Mt.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function Ao(a,y,x,b,E,z,tt,ot){return tt===void 0&&(tt=0),ot===void 0&&(ot=0),a<=E&&E+tt<=a+x&&y<=z&&z+ot<=y+b}function ur(a,y,x,b,E,z,tt,ot){return a>tt+E||E>x+a?!1:!(y>ot+z||z>b+y)}Mt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Mt.Mz=function(){return this.width===0&&this.height===0},sn.alloc=function(){var a=No.pop();return a===void 0?new sn:a},sn.allocAt=function(a,y,x,b){var E=No.pop();return E===void 0?new sn(a,y,x,b):E.h(a,y,x,b)},sn.free=function(a){No.push(a)},_t.Object.defineProperties(sn.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 zt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Wn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new zt(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}}}),sn.prototype.isEmpty=sn.prototype.Mz,sn.prototype.isReal=sn.prototype.w,sn.intersectsLineSegment=function(a,y,x,b,E,z,tt,ot){return Te.Fx(a,y,x,b,E,z,tt,ot)},sn.prototype.setSpot=sn.prototype.yi,sn.prototype.union=sn.prototype.Kv,sn.prototype.unionRect=sn.prototype.ed,sn.prototype.unionPoint=sn.prototype.Ye,sn.prototype.intersects=sn.prototype.Vu,sn.prototype.intersectsRect=sn.prototype.Yc,sn.prototype.intersect=sn.prototype.Uu,sn.prototype.intersectRect=sn.prototype.Ex,sn.prototype.grow=sn.prototype.Hz,sn.prototype.subtractMargin=sn.prototype.Fv,sn.prototype.addMargin=sn.prototype.Co,sn.prototype.inflate=sn.prototype.Bc,sn.prototype.offset=sn.prototype.offset,sn.prototype.contains=sn.prototype.contains,sn.prototype.containsRect=sn.prototype.Re,sn.prototype.containsPoint=sn.prototype.ca,sn.prototype.equalsApprox=sn.prototype.Xa,sn.prototype.equalTo=sn.prototype.hi,sn.prototype.equals=sn.prototype.D,sn.prototype.setSize=sn.prototype.tA,sn.prototype.setPoint=sn.prototype.dd,sn.prototype.set=sn.prototype.set,sn.prototype.setTo=sn.prototype.sg;var no=null,ko=null,No=[];sn.className="Rect",sn.parse=Sa,sn.stringify=Cs,sn.contains=Ao,sn.intersects=ur,sn.ZeroRect=no=new sn(0,0,0,0).ja(),sn.NoRect=ko=new sn(NaN,NaN,NaN,NaN).ja(),sn.parse=Sa,sn.stringify=Cs,sn.contains=Ao,sn.intersects=ur;function mi(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):le("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}mi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},mi.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},mi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},mi.prototype.copy=function(){var a=new mi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Mt=mi.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this};function Fr(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 mi;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new mi(x);for(var z=NaN;a[y]==="";)y++;if((b=a[y++])&&(z=parseFloat(b)),isNaN(z))return new mi(x,E);for(var tt=NaN;a[y]==="";)y++;return(b=a[y++])&&(tt=parseFloat(b)),isNaN(tt)?new mi(x,E):new mi(x,E,z,tt)}return new mi}function Or(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Mt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Mt.D=function(a){return a instanceof mi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Mt.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},Mt.Xa=function(a){return Te.B(this.top,a.top)&&Te.B(this.right,a.right)&&Te.B(this.bottom,a.bottom)&&Te.B(this.left,a.left)},Mt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},mi.alloc=function(){var a=Ta.pop();return a===void 0?new mi:a},mi.free=function(a){Ta.push(a)},mi.prototype.isReal=mi.prototype.w,mi.prototype.equalsApprox=mi.prototype.Xa,mi.prototype.equalTo=mi.prototype.hi,mi.prototype.equals=mi.prototype.D,mi.prototype.set=mi.prototype.set,mi.prototype.setTo=mi.prototype.sg;var jr=null,xa=null,Ta=[];mi.className="Margin",mi.parse=Fr,mi.stringify=Or,mi.ZeroMargin=jr=new mi(0,0,0,0).ja(),mi.TwoMargin=xa=new mi(2,2,2,2).ja(),mi.parse=Fr,mi.stringify=Or;function ri(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 hr,Dr,Js,Nl,sa,po,hu,Gs,bs,Ws,Tl,vl,Ks,aa,Kl,Du,hs,xh,$l,du,$a,Qs,qn,li,Vi,wi,Hi,Fo,lr,fr,gr,Sr,xr,yr,Za,la;ri.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ri.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},ri.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ri.prototype.copy=function(){var a=new ri;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Mt=ri.prototype,Mt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Mt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this};function Cr(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Bu(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return hr;if(a==="TopLeft")return Dr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Js;if(a==="TopRight")return Nl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return sa;if(a==="Center")return po;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return hu;if(a==="BottomLeft")return Gs;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return bs;if(a==="BottomRight")return Ws;if(a==="TopSide")return Tl;if(a==="LeftSide")return vl;if(a==="RightSide")return Ks;if(a==="BottomSide")return aa;if(a==="TopBottomSides")return Kl;if(a==="LeftRightSides")return Du;if(a==="TopLeftSides")return hs;if(a==="TopRightSides")return xh;if(a==="BottomLeftSides")return $l;if(a==="BottomRightSides")return du;if(a==="NotTopSide")return $a;if(a==="NotLeftSide")return Qs;if(a==="NotRightSide")return qn;if(a==="NotBottomSide")return li;if(a==="AllSides")return Vi;if(a==="Default")return wi;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 z=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(z=parseFloat(b));for(var tt=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(tt=parseFloat(b)),new ri(x,E,z,tt)}return new ri}function hd(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Mt.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(hr)?"None":this.D(Dr)?"TopLeft":this.D(Js)?"Top":this.D(Nl)?"TopRight":this.D(sa)?"Left":this.D(po)?"Center":this.D(hu)?"Right":this.D(Gs)?"BottomLeft":this.D(bs)?"Bottom":this.D(Ws)?"BottomRight":this.D(Tl)?"TopSide":this.D(vl)?"LeftSide":this.D(Ks)?"RightSide":this.D(aa)?"BottomSide":this.D(Kl)?"TopBottomSides":this.D(Du)?"LeftRightSides":this.D(hs)?"TopLeftSides":this.D(xh)?"TopRightSides":this.D($l)?"BottomLeftSides":this.D(du)?"BottomRightSides":this.D($a)?"NotTopSide":this.D(Qs)?"NotLeftSide":this.D(qn)?"NotRightSide":this.D(li)?"NotBottomSide":this.D(Vi)?"AllSides":this.D(wi)?"Default":"None"},Mt.D=function(a){return a instanceof ri?(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},Mt.gv=function(){return new ri(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Mt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Hi))a=vl;else if(a.D(Fo))a=Ks;else if(a.D(lr))a=Tl;else if(a.D(fr))a=aa;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Mt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Mt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Mt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Mt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Mt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},ri.alloc=function(){var a=Ph.pop();return a===void 0?new ri:a},ri.free=function(a){Ph.push(a)},ri.prototype.isDefault=ri.prototype.Xb,ri.prototype.isNone=ri.prototype.ys,ri.prototype.isSide=ri.prototype.$c,ri.prototype.isNoSpot=ri.prototype.Mc,ri.prototype.isSpot=ri.prototype.sb,ri.prototype.includesSide=ri.prototype.Hf,ri.prototype.opposite=ri.prototype.gv,ri.prototype.equals=ri.prototype.D,ri.prototype.set=ri.prototype.set,ri.prototype.setTo=ri.prototype.sg;var Ph=[];ri.className="Spot",ri.parse=Bu,ri.stringify=hd,ri.None=hr=Cr(new ri(0,0,0,0),0).ja(),ri.Default=wi=Cr(new ri(0,0,-1,0),-1).ja(),ri.TopLeft=Dr=new ri(0,0,0,0).ja(),ri.TopCenter=Js=new ri(.5,0,0,0).ja(),ri.TopRight=Nl=new ri(1,0,0,0).ja(),ri.LeftCenter=sa=new ri(0,.5,0,0).ja(),ri.Center=po=new ri(.5,.5,0,0).ja(),ri.RightCenter=hu=new ri(1,.5,0,0).ja(),ri.BottomLeft=Gs=new ri(0,1,0,0).ja(),ri.BottomCenter=bs=new ri(.5,1,0,0).ja(),ri.BottomRight=Ws=new ri(1,1,0,0).ja(),ri.MiddleTop=gr=Js,ri.MiddleLeft=Sr=sa,ri.MiddleRight=xr=hu,ri.MiddleBottom=yr=bs,ri.Top=lr=Js,ri.Left=Hi=sa,ri.Right=Fo=hu,ri.Bottom=fr=bs,ri.TopSide=Tl=Cr(new ri(0,0,1,1),1).ja(),ri.LeftSide=vl=Cr(new ri(0,0,1,2),1).ja(),ri.RightSide=Ks=Cr(new ri(0,0,1,4),1).ja(),ri.BottomSide=aa=Cr(new ri(0,0,1,8),1).ja(),ri.TopBottomSides=Kl=Cr(new ri(0,0,1,9),1).ja(),ri.LeftRightSides=Du=Cr(new ri(0,0,1,6),1).ja(),ri.TopLeftSides=hs=Cr(new ri(0,0,1,3),1).ja(),ri.TopRightSides=xh=Cr(new ri(0,0,1,5),1).ja(),ri.BottomLeftSides=$l=Cr(new ri(0,0,1,10),1).ja(),ri.BottomRightSides=du=Cr(new ri(0,0,1,12),1).ja(),ri.NotTopSide=$a=Cr(new ri(0,0,1,14),1).ja(),ri.NotLeftSide=Qs=Cr(new ri(0,0,1,13),1).ja(),ri.NotRightSide=qn=Cr(new ri(0,0,1,11),1).ja(),ri.NotBottomSide=li=Cr(new ri(0,0,1,7),1).ja(),ri.AllSides=Vi=Cr(new ri(0,0,1,15),1).ja(),Za=new ri(.156,.156).ja(),la=new ri(.844,.844).ja(),ri.parse=Bu,ri.stringify=hd;function eo(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}eo.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},eo.prototype.setTransform=function(a,y,x,b,E,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=z,this},eo.prototype.copy=function(){var a=new eo;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},eo.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},eo.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},eo.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},eo.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},eo.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},eo.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,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*z,E=this.m12*E+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},eo.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),z=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=z,this},eo.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,z=this.m11*-b+this.m21*a,tt=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Mt=eo.prototype,Mt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Mt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Mt.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)},Mt.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))},Mt.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))},Mt.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,z=this.m11,tt=this.m12,ot=this.m21,rt=this.m22,lt=this.dx,ut=this.dy,gt=y*z+x*ot+lt,St=y*tt+x*rt+ut,Ct=b*z+x*ot+lt,bt=b*tt+x*rt+ut;return x=y*z+E*ot+lt,y=y*tt+E*rt+ut,z=b*z+E*ot+lt,b=b*tt+E*rt+ut,E=Math.min(gt,Ct),gt=Math.max(gt,Ct),Ct=Math.min(St,bt),St=Math.max(St,bt),E=Math.min(E,x),gt=Math.max(gt,x),Ct=Math.min(Ct,y),St=Math.max(St,y),E=Math.min(E,z),gt=Math.max(gt,z),Ct=Math.min(Ct,b),St=Math.max(St,b),a.h(E,Ct,gt-E,St-Ct),a},eo.alloc=function(){var a=Qf.pop();return a===void 0?new eo:a},eo.free=function(a){Qf.push(a)},eo.prototype.transformRect=eo.prototype.pp,eo.prototype.transformPoint=eo.prototype.Ga,eo.prototype.scale=eo.prototype.scale,eo.prototype.translate=eo.prototype.translate,eo.prototype.rotate=eo.prototype.rotate,eo.prototype.invert=eo.prototype.Vj,eo.prototype.multiplyInverted=eo.prototype.bv,eo.prototype.multiply=eo.prototype.multiply,eo.prototype.reset=eo.prototype.reset,eo.prototype.isIdentity=eo.prototype.ws,eo.prototype.equals=eo.prototype.D,eo.prototype.setTransform=eo.prototype.setTransform,eo.prototype.set=eo.prototype.set;var Qf=[];eo.className="Transform",eo.xF="54a702f3e53909c447824c6706603faf4c";var Te={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Te.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Te.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,z,tt){if(0>=E&&(E=1e-6),a<x)var ot=a,rt=x;else ot=x,rt=a;if(y<b)var lt=y,ut=b;else lt=b,ut=y;if(a===x)return lt<=tt&&tt<=ut&&a-E<=z&&z<=a+E;if(y===b)return ot<=z&&z<=rt&&y-E<=tt&&tt<=y+E;if(rt+=E,ot-=E,ot<=z&&z<=rt&&(ut+=E,lt-=E,lt<=tt&&tt<=ut))if(rt-ot>ut-lt)if(a-x>E||x-a>E){if(z=(b-y)/(x-a)*(z-a)+y,z-E<=tt&&tt<=z+E)return!0}else return!0;else if(y-b>E||b-y>E){if(tt=(x-a)/(b-y)*(tt-y)+a,tt-E<=z&&z<=tt+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,z,tt,ot,rt,lt,ut,gt){if(Te.Yb(a,y,tt,ot,gt,x,b)&&Te.Yb(a,y,tt,ot,gt,E,z))return Te.Yb(a,y,tt,ot,gt,lt,ut);var St=(a+x)/2,Ct=(y+b)/2,bt=(x+E)/2,Bt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(St+bt)/2,x=(Ct+Bt)/2,bt=(bt+E)/2,Bt=(Bt+z)/2;var Yt=(b+bt)/2,Gt=(x+Bt)/2;return Te.cs(a,y,St,Ct,b,x,Yt,Gt,rt,lt,ut,gt)||Te.cs(Yt,Gt,bt,Bt,E,z,tt,ot,rt,lt,ut,gt)},ax:function(a,y,x,b,E,z,tt,ot,rt){var lt=(x+E)/2,ut=(b+z)/2;return rt.h((((a+x)/2+lt)/2+(lt+(E+tt)/2)/2)/2,(((y+b)/2+ut)/2+(ut+(z+ot)/2)/2)/2),rt},My:function(a,y,x,b,E,z,tt,ot){var rt=(x+E)/2,lt=(b+z)/2;return Pi(((a+x)/2+rt)/2,((y+b)/2+lt)/2,(rt+(E+tt)/2)/2,(lt+(z+ot)/2)/2)},Dl:function(a,y,x,b,E,z,tt,ot,rt,lt){if(Te.Yb(a,y,tt,ot,rt,x,b)&&Te.Yb(a,y,tt,ot,rt,E,z))bo(lt,a,y,0,0),bo(lt,tt,ot,0,0);else{var ut=(a+x)/2,gt=(y+b)/2,St=(x+E)/2,Ct=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(ut+St)/2,x=(gt+Ct)/2,St=(St+E)/2,Ct=(Ct+z)/2;var bt=(b+St)/2,Bt=(x+Ct)/2;Te.Dl(a,y,ut,gt,b,x,bt,Bt,rt,lt),Te.Dl(bt,Bt,St,Ct,E,z,tt,ot,rt,lt)}return lt},Qe:function(a,y,x,b,E,z,tt,ot,rt,lt){if(Te.Yb(a,y,tt,ot,rt,x,b)&&Te.Yb(a,y,tt,ot,rt,E,z))lt.length===0&&(lt.push(a),lt.push(y)),lt.push(tt),lt.push(ot);else{var ut=(a+x)/2,gt=(y+b)/2,St=(x+E)/2,Ct=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(ut+St)/2,x=(gt+Ct)/2,St=(St+E)/2,Ct=(Ct+z)/2;var bt=(b+St)/2,Bt=(x+Ct)/2;Te.Qe(a,y,ut,gt,b,x,bt,Bt,rt,lt),Te.Qe(bt,Bt,St,Ct,E,z,tt,ot,rt,lt)}return lt},jv:function(a,y,x,b,E,z,tt,ot,rt,lt){if(Te.Yb(a,y,E,z,lt,x,b))return Te.Yb(a,y,E,z,lt,ot,rt);var ut=(a+x)/2,gt=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var St=(ut+x)/2,Ct=(gt+b)/2;return Te.jv(a,y,ut,gt,St,Ct,tt,ot,rt,lt)||Te.jv(St,Ct,x,b,E,z,tt,ot,rt,lt)},OA:function(a,y,x,b,E,z,tt){return tt.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+z)/2)/2),tt},iv:function(a,y,x,b,E,z,tt,ot){if(Te.Yb(a,y,E,z,tt,x,b))bo(ot,a,y,0,0),bo(ot,E,z,0,0);else{var rt=(a+x)/2,lt=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ut=(rt+x)/2,gt=(lt+b)/2;Te.iv(a,y,rt,lt,ut,gt,tt,ot),Te.iv(ut,gt,x,b,E,z,tt,ot)}return ot},ep:function(a,y,x,b,E,z,tt,ot){if(Te.Yb(a,y,E,z,tt,x,b))ot.length===0&&(ot.push(a),ot.push(y)),ot.push(E),ot.push(z);else{var rt=(a+x)/2,lt=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ut=(rt+x)/2,gt=(lt+b)/2;Te.ep(a,y,rt,lt,ut,gt,tt,ot),Te.ep(ut,gt,x,b,E,z,tt,ot)}return ot},Eo:function(a,y,x,b,E,z,tt,ot,rt,lt,ut,gt,St,Ct){if(Te.Yb(a,y,tt,ot,St,x,b)&&Te.Yb(a,y,tt,ot,St,E,z))return!Te.Rl(a,y,tt,ot,rt,lt,ut,gt)||(St=(a-tt)*(lt-gt)-(y-ot)*(rt-ut),St===0)?!1:(Ct.h(((a*ot-y*tt)*(rt-ut)-(a-tt)*(rt*gt-lt*ut))/St,((a*ot-y*tt)*(lt-gt)-(y-ot)*(rt*gt-lt*ut))/St),!0);var bt=(a+x)/2,Bt=(y+b)/2,Yt=(x+E)/2,Gt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(bt+Yt)/2,x=(Bt+Gt)/2,Yt=(Yt+E)/2,Gt=(Gt+z)/2;var se=(b+Yt)/2,ae=(x+Gt)/2,he=1/0,be=!1,$e=0,Un=0;return Te.Eo(a,y,bt,Bt,b,x,se,ae,rt,lt,ut,gt,St,Ct)&&(a=(Ct.x-rt)*(Ct.x-rt)+(Ct.y-lt)*(Ct.y-lt),a<he&&(he=a,be=!0,$e=Ct.x,Un=Ct.y)),Te.Eo(se,ae,Yt,Gt,E,z,tt,ot,rt,lt,ut,gt,St,Ct)&&(Ct.x-rt)*(Ct.x-rt)+(Ct.y-lt)*(Ct.y-lt)<he&&(be=!0,$e=Ct.x,Un=Ct.y),be&&(Ct.x=$e,Ct.y=Un),be},Fo:function(a,y,x,b,E,z,tt,ot,rt,lt,ut,gt,St){var Ct=0;if(Te.Yb(a,y,tt,ot,St,x,b)&&Te.Yb(a,y,tt,ot,St,E,z)){if(St=(a-tt)*(lt-gt)-(y-ot)*(rt-ut),St===0)return Ct;var bt=((a*ot-y*tt)*(rt-ut)-(a-tt)*(rt*gt-lt*ut))/St,Bt=((a*ot-y*tt)*(lt-gt)-(y-ot)*(rt*gt-lt*ut))/St;if(bt>=ut)return Ct;if((rt>ut?rt-ut:ut-rt)<(lt>gt?lt-gt:gt-lt)){if(y<ot?(rt=y,a=ot):(rt=ot,a=y),Bt<rt||Bt>a)return Ct}else if(a<tt?(rt=a,a=tt):rt=tt,bt<rt||bt>a)return Ct;0<St?Ct++:0>St&&Ct--}else{bt=(a+x)/2,Bt=(y+b)/2;var Yt=(x+E)/2,Gt=(b+z)/2;E=(E+tt)/2,z=(z+ot)/2,b=(bt+Yt)/2,x=(Bt+Gt)/2,Yt=(Yt+E)/2,Gt=(Gt+z)/2;var se=(b+Yt)/2,ae=(x+Gt)/2;Ct+=Te.Fo(a,y,bt,Bt,b,x,se,ae,rt,lt,ut,gt,St),Ct+=Te.Fo(se,ae,Yt,Gt,E,z,tt,ot,rt,lt,ut,gt,St)}return Ct},qh:function(a,y,x,b,E,z,tt){return Te.$(a,x)?(y<b?(x=y,y=b):x=b,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):Te.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(tt.h(b,y),!1):E>a?(tt.h(a,y),!1):(tt.h(E,y),!0)):(E=((a-E)*(a-x)+(y-z)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(tt.h(a,y),!1):1.000005<E?(tt.h(x,b),!1):(tt.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,z,tt,ot,rt){return Te.B(a,x)&&Te.B(y,b)?(rt.h(a,y),!1):Te.$(E,tt)?Te.$(a,x)?(Te.qh(a,y,x,b,E,z,rt),!1):Te.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,rt):(ot=(ot-z)/(tt-E),Te.$(a,x)?(x=ot*(a-E)+z,y<b?(E=y,y=b):E=b,x<E?(rt.h(a,E),!1):x>y?(rt.h(a,y),!1):(rt.h(a,x),!0)):(tt=(b-y)/(x-a),Te.$(ot,tt)?(Te.qh(a,y,x,b,E,z,rt),!1):(E=(tt*a-ot*E+z-y)/(tt-ot),Te.$(tt,0)?(a<x?(b=a,a=x):b=x,E<b?(rt.h(b,y),!1):E>a?(rt.h(a,y),!1):(rt.h(E,y),!0)):Te.qh(a,y,x,b,E,tt*(E-a)+y,rt))))},MA:function(a,y,x,b,E){return Te.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,z,tt,ot,rt,lt){function ut(Yt,Gt){var se=(Yt-a)*(Yt-a)+(Gt-y)*(Gt-y);se<gt&&(gt=se,rt.h(Yt,Gt))}var gt=1/0;ut(rt.x,rt.y);var St=0,Ct=0,bt=0,Bt=0;if(E<tt?(St=E,Ct=tt):(St=tt,Ct=E),z<ot?(bt=E,Bt=tt):(bt=tt,Bt=E),St=(Ct-St)/2+lt,lt=(Bt-bt)/2+lt,E=(E+tt)/2,z=(z+ot)/2,St===0||lt===0)return rt;if(.5>(x>a?x-a:a-x)){if(St=1-(x-E)*(x-E)/(St*St),0>St)return rt;St=Math.sqrt(St),b=-lt*St+z,ut(x,lt*St+z),ut(x,b)}else{if(x=(b-y)/(x-a),b=1/(St*St)+x*x/(lt*lt),ot=2*x*(y-x*a)/(lt*lt)-2*x*z/(lt*lt)-2*E/(St*St),St=ot*ot-4*b*(2*x*a*z/(lt*lt)-2*y*z/(lt*lt)+z*z/(lt*lt)+E*E/(St*St)-1+(y-x*a)*(y-x*a)/(lt*lt)),0>St)return rt;St=Math.sqrt(St),lt=(-ot+St)/(2*b),ut(lt,x*lt-x*a+y),St=(-ot-St)/(2*b),ut(St,x*St-x*a+y)}return rt},Ff:function(a,y,x,b,E,z,tt,ot,rt){var lt=1e21,ut=a,gt=y;if(Te.Ve(a,y,a,b,E,z,tt,ot,rt)){var St=(rt.x-E)*(rt.x-E)+(rt.y-z)*(rt.y-z);St<lt&&(lt=St,ut=rt.x,gt=rt.y)}return Te.Ve(x,y,x,b,E,z,tt,ot,rt)&&(St=(rt.x-E)*(rt.x-E)+(rt.y-z)*(rt.y-z),St<lt&&(lt=St,ut=rt.x,gt=rt.y)),Te.Ve(a,y,x,y,E,z,tt,ot,rt)&&(y=(rt.x-E)*(rt.x-E)+(rt.y-z)*(rt.y-z),y<lt&&(lt=y,ut=rt.x,gt=rt.y)),Te.Ve(a,b,x,b,E,z,tt,ot,rt)&&(a=(rt.x-E)*(rt.x-E)+(rt.y-z)*(rt.y-z),a<lt&&(lt=a,ut=rt.x,gt=rt.y)),rt.h(ut,gt),1e21>lt},us:function(a,y,x){return Te.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,z,tt,ot){var rt=a+x,lt=y+b;return E===tt?(z<ot?(tt=z,z=ot):tt=ot,a<=E&&E<=rt&&tt<=lt&&z>=y):z===ot?(E<tt?(ot=E,E=tt):ot=tt,y<=z&&z<=lt&&ot<=rt&&E>=a):!!(Ao(a,y,x,b,E,z)||Ao(a,y,x,b,tt,ot)||Te.Rl(a,y,rt,y,E,z,tt,ot)||Te.Rl(rt,y,rt,lt,E,z,tt,ot)||Te.Rl(rt,lt,a,lt,E,z,tt,ot)||Te.Rl(a,lt,a,y,E,z,tt,ot))},Rl:function(a,y,x,b,E,z,tt,ot){return a===x&&y===b&&E===tt&&z===ot?a===E&&y===z:0>=Te.Fl(a,y,x,b,E,z)*Te.Fl(a,y,x,b,tt,ot)&&0>=Te.Fl(E,z,tt,ot,a,y)*Te.Fl(E,z,tt,ot,x,b)},Fl:function(a,y,x,b,E,z){return x-=a,b-=y,a=E-a,y=z-y,z=a*b-y*x,z===0&&(z=a*x+y*b,0<z&&(z=(a-x)*x+(y-b)*b,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,z){var tt=Math.PI;z||(b*=tt/180,E*=tt/180);var ot=b>E?-1:1;z=[];var rt=tt/2,lt=b;if(b=Math.min(2*tt,Math.abs(E-b)),1e-5>b)return rt=lt+ot*Math.min(b,rt),ot=a+x*Math.cos(lt),lt=y+x*Math.sin(lt),a+=x*Math.cos(rt),y+=x*Math.sin(rt),x=(ot+a)/2,rt=(lt+y)/2,z.push([ot,lt,x,rt,x,rt,a,y]),z;for(;1e-5<b;)E=lt+ot*Math.min(b,rt),z.push(Te.Vy(x,lt,E,a,y)),b-=Math.abs(E-lt),lt=E;return z},Vy:function(a,y,x,b,E){var z=(x-y)/2,tt=a*Math.cos(z),ot=a*Math.sin(z),rt=-ot,lt=tt*tt+rt*rt,ut=lt+tt*tt+rt*ot;return lt=4/3*(Math.sqrt(2*lt*ut)-ut)/(tt*ot-rt*tt),ot=tt-lt*rt,tt=rt+lt*tt,rt=-tt,lt=z+y,z=Math.cos(lt),lt=Math.sin(lt),[b+a*Math.cos(y),E+a*Math.sin(y),b+ot*z-tt*lt,E+ot*lt+tt*z,b+ot*z-rt*lt,E+ot*lt+rt*z,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,z,tt){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/z)*z+b;var ot=x;return x+E-a<E/2&&(ot=x+E),a=b,b+z-y<z/2&&(a=b+z),tt.h(ot,a),tt},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,z=0>b;if(a<y)var tt=1,ot=0;else tt=0,ot=1;var rt=tt===0?a:y,lt=tt===0?x:b;return(tt===0?E:z)&&(lt=-lt),tt=ot,x=tt===0?x:b,(tt===0?E:z)&&(x=-x),Te.az(rt,tt===0?a:y,lt,x,0,0)},az:function(a,y,x,b,E,z){if(0<b)if(0<x){E=a*a,z=y*y,a*=x;var tt=y*b,ot=-z+tt,rt=-z+Math.sqrt(a*a+tt*tt);y=ot;for(var lt=0;9999999999>lt&&(y=.5*(ot+rt),!(y===ot||y===rt));++lt){var ut=a/(y+E),gt=tt/(y+z);if(ut=ut*ut+gt*gt-1,0<ut)ot=y;else if(0>ut)rt=y;else break}x=E*x/(y+E)-x,b=z*b/(y+z)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,z=a*x,z<b?(b=z/b,z=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new Ge,um:new Ge,Mf:new Ge,Nf:0,vm:100};Te.za=Te.AA;function Kn(a){Ci(this),this.l=2,a===void 0&&(a=Kn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Kn.o?this.ee=new qe:(Kn.V===null&&(Kn.V=new qe().freeze()),this.ee=Kn.V),this.aq=this.ee.Ja,this.Ip=new sn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Dr,this.gg=Ws,this.Rk=this.Sk=NaN,this.Uf=Fn}Kn.prototype.copy=function(){var a=new Kn;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===Kn.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},Kn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Kn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Kn.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},Kn.prototype.ka=function(){if(Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Kn.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},Kn.prototype.Xa=function(a){if(!(a instanceof Kn))return!1;if(this.type!==a.type)return this.type===Kn.j&&a.type===Kn.o?Dp(this,a):a.type===Kn.j&&this.type===Kn.o?Dp(a,this):!1;if(this.type===Kn.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 Te.B(this.startX,a.startX)&&Te.B(this.startY,a.startY)&&Te.B(this.endX,a.endX)&&Te.B(this.endY,a.endY)};function Dp(a,y){return a.type!==Kn.j||y.type!==Kn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Te.B(a.startX,y.startX)&&Te.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Zo&&Te.B(a.endX,y.endX)&&Te.B(a.endY,y.endY))))}Kn.ia=function(a){return a.toString()},Kn.prototype.qb=function(a){a.classType===Kn&&(this.type=a)},Kn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Kn.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 Kn.u:var y=new sn(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 Kn.F:if(y=new sn(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 Kn.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var z=x[E];0<E&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},Kn.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},Kn.parse=function(a,y){function x(){return Bt>=he-1?!0:lt[Bt+1].match(be)!==null}function b(){return Bt++,lt[Bt]}function E(Gi){var Oi=parseFloat(b()),wo=parseFloat(b());Yt===Yt.toLowerCase()&&(Oi=ae.x+Oi,wo=ae.y+wo),Gi.h(Oi,wo)}function z(){return E(ae),ae}function tt(){return E(se),se}function ot(){var Gi=Gt.toLowerCase();return Gi!=="c"&&Gi!=="s"&&Gi!=="q"&&Gi!=="t"?ae:new zt(2*ae.x-se.x,2*ae.y-se.y)}y===void 0&&(y=!1);var rt=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(rt,"$1 $2"),a=a.replace(rt,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var lt=a.split(" ");for(a=0;a<lt.length;a++){var ut=lt[a];if(ut.match(/(\.[0-9]*)(\.)/gm)!==null){rt=rn();for(var gt="",St=!1,Ct=0;Ct<ut.length;Ct++){var bt=ut[Ct];bt!=="."||St?bt==="."?(rt.push(gt),gt="."):gt+=bt:(St=!0,gt+=bt)}for(rt.push(gt),lt.splice(a,1),ut=0;ut<rt.length;ut++)lt.splice(a+ut,0,rt[ut]);a+=rt.length-1,bn(rt)}}var Bt=-1,Yt="",Gt="";rt=new zt(0,0);var se=new zt(0,0),ae=new zt(0,0),he=lt.length;a=D1(null),St=gt=ut=!1,Ct=!0,bt=null;for(var be=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Bt>=he-1);)if(Gt=Yt,Yt=b(),Yt!=="")switch(Yt.toUpperCase()){case"X":Ct=!0,gt=ut=!1;break;case"M":for(bt=z(),a.mc===null||Ct===!0?(Lf(a,bt.x,bt.y,ut,!gt,St),Ct=!1):a.moveTo(bt.x,bt.y),rt.assign(ae);!x();)bt=z(),a.lineTo(bt.x,bt.y);break;case"L":for(;!x();)bt=z(),a.lineTo(bt.x,bt.y);break;case"H":for(;!x();)ae=new zt((Yt===Yt.toLowerCase()?ae.x:0)+parseFloat(b()),ae.y),a.lineTo(ae.x,ae.y);break;case"V":for(;!x();)ae=new zt(ae.x,(Yt===Yt.toLowerCase()?ae.y:0)+parseFloat(b())),a.lineTo(ae.x,ae.y);break;case"C":for(;!x();){bt=new zt,E(bt);var $e=tt(),Un=z();nh(a,bt.x,bt.y,$e.x,$e.y,Un.x,Un.y)}break;case"S":for(;!x();)bt=ot(),$e=tt(),Un=z(),nh(a,bt.x,bt.y,$e.x,$e.y,Un.x,Un.y);break;case"Q":for(;!x();)bt=tt(),$e=z(),Rm(a,bt.x,bt.y,$e.x,$e.y);break;case"T":for(;!x();)se=bt=ot(),$e=z(),Rm(a,bt.x,bt.y,$e.x,$e.y);break;case"B":for(;!x();){bt=parseFloat(b()),$e=parseFloat(b()),Un=parseFloat(b());var oi=parseFloat(b()),ti=parseFloat(b()),jn=ti,wn=!1;x()||(jn=parseFloat(b()),x()||(wn=parseFloat(b())!==0)),Yt===Yt.toLowerCase()&&(Un+=ae.x,oi+=ae.y),a.arcTo(bt,$e,Un,oi,ti,jn,wn)}break;case"A":for(;!x();)bt=Math.abs(parseFloat(b())),$e=Math.abs(parseFloat(b())),Un=parseFloat(b()),ti=oi=!1,wn=jn=0,jn=b(),jn.length===1?(oi=!!parseFloat(jn),ti=!!parseFloat(b()),jn=parseFloat(b())):jn.length===2?(oi=!!parseFloat(jn[0]),ti=!!parseFloat(jn[1]),jn=parseFloat(b())):(oi=!!parseFloat(jn[0]),ti=!!parseFloat(jn[1]),jn=parseFloat(jn.slice(2))),wn=parseFloat(b()),Yt===Yt.toLowerCase()&&(jn=ae.x+jn,wn=ae.y+wn),ae.h(jn,wn),Nx(a,bt,$e,Un,oi,ti,jn,wn);break;case"Z":kx(a),ae.assign(rt);break;case"F":for(bt="",$e=1;lt[Bt+$e];)if(lt[Bt+$e]==="0")St=!0,$e++;else if(lt[Bt+$e].match(/[Uu]/)!==null)$e++;else if(lt[Bt+$e].match(be)===null)$e++;else{bt=lt[Bt+$e];break}bt.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(bt="",$e=1;lt[Bt+$e];)if(lt[Bt+$e].match(/[Ff]/)!==null)$e++;else if(lt[Bt+$e].match(be)===null)$e++;else{bt=lt[Bt+$e];break}bt.match(/[Mm]/)?gt=!0:a.mc.isShadowed=!1}if(rt=a.os,jm=a,y)for(y=rt.figures.iterator;y.next();)y.value.isFilled=!0;return rt},Kn.Ha=function(a,y){for(var x=a.length,b=zt.alloc(),E=0;E<x;E++){var z=a[E];b.x=z[0],b.y=z[1],y.Ga(b),z[0]=b.x,z[1]=b.y,b.x=z[2],b.y=z[3],y.Ga(b),z[2]=b.x,z[3]=b.y,b.x=z[4],b.y=z[5],y.Ga(b),z[4]=b.x,z[5]=b.y,b.x=z[6],b.y=z[7],y.Ga(b),z[6]=b.x,z[7]=b.y}zt.free(b)},Kn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Kn.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},Kn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Kn.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 z=0;z<E;z++){var tt=b[z];tt._isInvalidBounds=!1,tt.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Bp(this,a,!1),bo(a,0,0,0,0),a.freeze()},Kn.prototype.ix=function(){var a=new sn;return Bp(this,a,!0),a};function Bp(a,y,x){switch(a.type){case Kn.j:case Kn.u:case Kn.F:x?y.h(a.od,a.pd,0,0):bo(y,a.od,a.pd,0,0),bo(y,a.Dc,a.Ec,0,0);break;case Kn.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var z=a[E];x&&E===0?y.h(z.startX,z.startY,0,0):bo(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,ot=tt.length,rt=z.startX,lt=z.startY,ut=0;ut<ot;ut++){var gt=tt[ut];switch(gt.type){case Zo:case Kr:rt=gt.endX,lt=gt.endY,bo(y,rt,lt,0,0);break;case rs:Te.Dl(rt,lt,gt.point1X,gt.point1Y,gt.point2X,gt.point2Y,gt.endX,gt.endY,.5,y),rt=gt.endX,lt=gt.endY;break;case Pa:Te.iv(rt,lt,gt.point1X,gt.point1Y,gt.endX,gt.endY,.5,y),rt=gt.endX,lt=gt.endY;break;case Tr:case Fa:var St=gt.type===Tr?ua(gt,z):_a(gt,z,rt,lt),Ct=St.length;if(Ct===0){rt=gt.type===Tr?gt.centerX:gt.endX,lt=gt.type===Tr?gt.centerY:gt.endY,bo(y,rt,lt,0,0);break}gt=null;for(var bt=0;bt<Ct;bt++)gt=St[bt],Te.Dl(gt[0],gt[1],gt[2],gt[3],gt[4],gt[5],gt[6],gt[7],.5,y);gt!==null&&(rt=gt[6],lt=gt[7]);break;default:le("Unknown Segment type: "+gt.type)}}}break;default:le("Unknown Geometry type: "+a.type)}}Kn.prototype.normalize=function(){this._isFrozen&&mn(this);var a=this.ix();return this.offset(-a.x,-a.y),new zt(-a.x,-a.y)},Kn.prototype.offset=function(a,y){return this._isFrozen&&mn(this),this.transform(1,0,0,1,a,y),this},Kn.prototype.scale=function(a,y){return this._isFrozen&&mn(this),this.transform(a,0,0,y,0,0),this},Kn.prototype.rotate=function(a,y,x){this._isFrozen&&mn(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=eo.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),eo.free(b),this},Mt=Kn.prototype,Mt.transform=function(a,y,x,b,E,z){switch(this.type){case Kn.j:case Kn.u:case Kn.F:var tt=this.od,ot=this.pd;this.od=tt*a+ot*x+E,this.pd=tt*y+ot*b+z,tt=this.Dc,ot=this.Ec,this.Dc=tt*a+ot*x+E,this.Ec=tt*y+ot*b+z;break;case Kn.o:for(var rt=this.figures.s,lt=rt.length,ut=0;ut<lt;ut++){var gt=rt[ut];tt=gt.startX,ot=gt.startY,gt.startX=tt*a+ot*x+E,gt.startY=tt*y+ot*b+z,gt=gt.segments.s;for(var St=gt.length,Ct=0;Ct<St;Ct++){var bt=gt[Ct];switch(bt.type){case Zo:case Kr:tt=bt.endX,ot=bt.endY,bt.endX=tt*a+ot*x+E,bt.endY=tt*y+ot*b+z;break;case rs:tt=bt.point1X,ot=bt.point1Y,bt.point1X=tt*a+ot*x+E,bt.point1Y=tt*y+ot*b+z,tt=bt.point2X,ot=bt.point2Y,bt.point2X=tt*a+ot*x+E,bt.point2Y=tt*y+ot*b+z,tt=bt.endX,ot=bt.endY,bt.endX=tt*a+ot*x+E,bt.endY=tt*y+ot*b+z;break;case Pa:tt=bt.point1X,ot=bt.point1Y,bt.point1X=tt*a+ot*x+E,bt.point1Y=tt*y+ot*b+z,tt=bt.endX,ot=bt.endY,bt.endX=tt*a+ot*x+E,bt.endY=tt*y+ot*b+z;break;case Tr:tt=bt.centerX,ot=bt.centerY,bt.centerX=tt*a+ot*x+E,bt.centerY=tt*y+ot*b+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),bt.startAngle+=tt),0>a&&(bt.startAngle=180-bt.startAngle,bt.sweepAngle=-bt.sweepAngle),0>b&&(bt.startAngle=-bt.startAngle,bt.sweepAngle=-bt.sweepAngle),bt.radiusX*=Math.sqrt(a*a+x*x),bt.radiusY!==void 0&&(bt.radiusY*=Math.sqrt(y*y+b*b));break;case Fa:if(tt=bt.endX,ot=bt.endY,bt.endX=tt*a+ot*x+E,bt.endY=tt*y+ot*b+z,bt.radiusX===0||bt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),bt.xAxisRotation+=tt),0>a&&(bt.xAxisRotation=180-bt.xAxisRotation,bt.isClockwiseArc=!bt.isClockwiseArc),0>b&&(bt.xAxisRotation=-bt.xAxisRotation,bt.isClockwiseArc=!bt.isClockwiseArc),bt.radiusX*=Math.sqrt(a*a+x*x),bt.radiusY*=Math.sqrt(y*y+b*b);break;default:le("Unknown Segment type: "+bt.type)}}}}return this._isInvalidBounds=!0,this},Mt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,z=this.Ec;switch(this.type){case Kn.j:return Te.Yb(x,b,E,z,y,a.x,a.y);case Kn.u:var tt=sn.allocAt(Math.min(x,E)-y,Math.min(b,z)-y,Math.abs(E-x)+2*y,Math.abs(z-b)+2*y);return a=tt.ca(a),sn.free(tt),a;case Kn.F:tt=Math.min(x,E)-y;var ot=Math.min(b,z)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(z-b)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),ot=a.y-(ot+y),1>=tt*tt/(x*x)+ot*ot/(y*y));case Kn.o:return cu(this,a,y,!0,!1);default:return!1}};function cu(a,y,x,b,E){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,ot=0,rt,lt,ut,gt,St=a.figures.s,Ct=St.length,bt=0;bt<Ct;bt++){var Bt=St[bt],Yt=!Bt.isEvenOdd;if(Bt.isFilled){if(b&&Bt.ca(z,y,x))return!0;var Gt=Bt.segments;rt=Bt.startX,lt=Bt.startY;for(var se=rt,ae=lt,he=Gt.s,be=0;be<=Gt.length;be++){var $e=void 0;if(be!==Gt.length){$e=he[be];var Un=$e.type;a=$e.endX,gt=$e.endY}else Un=Zo,a=se,gt=ae;switch(Un){case Kr:if(se=fu(z,y,tt,y,rt,lt,se,ae),isNaN(se))return!0;ot+=se,se=a,ae=gt;break;case Zo:if(rt=fu(z,y,tt,y,rt,lt,a,gt),isNaN(rt))return!0;ot+=rt;break;case rs:ut=Te.Fo(rt,lt,$e.point1X,$e.point1Y,$e.point2X,$e.point2Y,a,gt,tt,y,z,y,.5),ot+=ut;break;case Pa:ut=Te.Fo(rt,lt,(rt+2*$e.point1X)/3,(lt+2*$e.point1Y)/3,(2*$e.point1X+a)/3,(2*$e.point1Y+gt)/3,a,gt,tt,y,z,y,.5),ot+=ut;break;case Tr:case Fa:Un=$e.type===Tr?ua($e,Bt):_a($e,Bt,rt,lt);var oi=Un.length;if(oi===0){if(rt=fu(z,y,tt,y,rt,lt,$e.type===Tr?$e.centerX:$e.endX,$e.type===Tr?$e.centerY:$e.endY),isNaN(rt))return!0;ot+=rt;break}$e=null;for(var ti=0;ti<oi;ti++){if($e=Un[ti],ti===0){if(ut=fu(z,y,tt,y,rt,lt,$e[0],$e[1]),isNaN(ut))return!0;ot+=ut}ut=Te.Fo($e[0],$e[1],$e[2],$e[3],$e[4],$e[5],$e[6],$e[7],tt,y,z,y,.5),ot+=ut}$e!==null&&(a=$e[6],gt=$e[7]);break;default:le("Unknown Segment type: "+$e.type)}rt=a,lt=gt}if(Yt){if(ot!==0)return!0}else if(ot%2!==0)return!0;ot=0}else if(Bt.ca(z,y,E?x:x+2))return!0}return!1}function fu(a,y,x,b,E,z,tt,ot){if(Te.Yb(E,z,tt,ot,.05,a,y))return NaN;var rt=(a-x)*(z-ot);if(rt===0)return 0;var lt=((a*b-y*x)*(E-tt)-(a-x)*(E*ot-z*tt))/rt;if(y=(a*b-y*x)*(z-ot)/rt,lt>=a)return 0;if((E>tt?E-tt:tt-E)<(z>ot?z-ot:ot-z)){if(z<ot){if(y<z||y>ot)return 0}else if(y<ot||y>z)return 0}else if(E<tt){if(lt<E||lt>tt)return 0}else if(lt<tt||lt>E)return 0;return 0<rt?1:-1}function wh(a,y,x,b){a=a.figures.s;for(var E=a.length,z=0;z<E;z++)if(a[z].ca(y,x,b))return!0;return!1}Mt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new zt),this.type===Kn.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,z=this.flattenedTotalLength*a,tt=0,ot=0;ot<E;ot++){var rt=b[ot],lt=rt.length;for(a=0;a<lt;a++){var ut=rt[a];if(tt+ut>=z)return b=z-tt,b=ut===0?0:b/ut,x=x[ot],ot=x[2*a],E=x[2*a+1],y.h(ot+(x[2*a+2]-ot)*b,E+(x[2*a+3]-E)*b),y;tt+=ut}}return y},Mt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Kn.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,z=0,tt=0;tt<b;tt++){var ot=x[tt],rt=ot.length;for(a=0;a<rt;a++){var lt=ot[a];if(z+lt>=E)return E=y[tt],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;z+=lt}}return NaN},Mt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Kn.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,z=this.flattenedTotalLength*a,tt=0,ot=0;ot<E;ot++){var rt=b[ot],lt=rt.length;for(a=0;a<lt;a++){var ut=rt[a];if(tt+ut>=z)return b=z-tt,b=ut===0?0:b/ut,ut=x[ot],x=ut[2*a],ot=ut[2*a+1],E=ut[2*a+2],a=ut[2*a+3],y[0]=x+(E-x)*b,y[1]=ot+(a-ot)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-ot)?0:1>Math.abs(E-x)?0<=a-ot?90:270:1>Math.abs(a-ot)?0<=E-x?0:180:180*Math.atan2(a-ot,E-x)/Math.PI,y;tt+=ut}}return y},Mt.xx=function(a){if(this.type===Kn.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var z=a.x;if(a=a.y,y===b){if(x<E){var tt=x;b=E}else tt=E,b=x;return a<=tt?tt===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-tt)}if(x===E)return y<b?tt=y:(tt=b,b=y),z<=tt?tt===y?0:1:z>=b?b===y?0:1:Math.abs(z-y)/(b-tt);tt=(b-y)*(b-y)+(E-x)*(E-x);var ot=zt.alloc();return Te.qh(y,x,b,E,z,a,ot),a=ot.x,z=ot.y,zt.free(ot),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===Kn.u){tt=this.startX,ot=this.startY;var rt=this.endX;if(E=this.endY,tt!==rt||ot!==E){y=rt-tt,x=E-ot,z=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,tt),rt),a=Math.min(Math.max(a,ot),E),tt=Math.abs(b-tt),rt=Math.abs(b-rt),ot=Math.abs(a-ot),E=Math.abs(a-E);var lt=Math.min(tt,rt,ot,E);if(lt===ot)return b/z;if(lt===rt)return(y+a)/z;if(lt===E)return(2*y+x-b)/z;if(lt===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,b=zt.alloc(),E=1/0,ot=tt=0,rt=y.length;for(var ut=lt=0,gt=0;gt<rt;gt++)for(var St=y[gt],Ct=x[gt],bt=St.length,Bt=0;Bt<bt;Bt+=2){var Yt=St[Bt],Gt=St[Bt+1];if(Bt!==0){Te.qh(lt,ut,Yt,Gt,a.x,a.y,b);var se=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);se<E&&(E=se,tt=ot,tt+=Math.sqrt((b.x-lt)*(b.x-lt)+(b.y-ut)*(b.y-ut))),ot+=Ct[(Bt-2)/2]}lt=Yt,ut=Gt}return zt.free(b),a=tt/z,0>a?0:1<a?1:a}return 0};function zc(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Kn.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===Kn.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===Kn.F){var z=new Wr;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new Po(Tr);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=ua(tt,z),E=a.length,E===0)b.push(tt.centerX),b.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var ot=0;ot<E;ot++){var rt=a[ot];Te.Qe(tt,z,rt[2],rt[3],rt[4],rt[5],rt[6],rt[7],.5,b),tt=rt[6],z=rt[7]}}y.push(b),x.push(Vd(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),tt=E.startX,z=E.startY,ot=tt,rt=z;for(var lt=E.segments.s,ut=lt.length,gt=0;gt<ut;gt++){var St=lt[gt];switch(St.type){case Kr:4<=b.length&&(y.push(b),x.push(Vd(b))),b=[],b.push(St.endX),b.push(St.endY),tt=St.endX,z=St.endY,ot=tt,rt=z;break;case Zo:b.push(St.endX),b.push(St.endY),tt=St.endX,z=St.endY;break;case rs:Te.Qe(tt,z,St.point1X,St.point1Y,St.point2X,St.point2Y,St.endX,St.endY,.5,b),tt=St.endX,z=St.endY;break;case Pa:Te.ep(tt,z,St.point1X,St.point1Y,St.endX,St.endY,.5,b),tt=St.endX,z=St.endY;break;case Tr:var Ct=ua(St,E),bt=Ct.length;if(bt===0){b.push(St.centerX),b.push(St.centerY),tt=St.centerX,z=St.centerY;break}for(var Bt=0;Bt<bt;Bt++){var Yt=Ct[Bt];Te.Qe(tt,z,Yt[2],Yt[3],Yt[4],Yt[5],Yt[6],Yt[7],.5,b),tt=Yt[6],z=Yt[7]}break;case Fa:if(Ct=_a(St,E,tt,z),bt=Ct.length,Bt=St.endX,Yt=St.endY,bt===0){b.push(Bt),b.push(Yt),tt=Bt,z=Yt;break}for(Bt=0;Bt<bt;Bt++)Yt=Ct[Bt],Te.Qe(tt,z,Yt[2],Yt[3],Yt[4],Yt[5],Yt[6],Yt[7],.5,b),tt=Yt[6],z=Yt[7];break;default:le("Segment not of valid type: "+St.type)}St.isClosed&&(b.push(ot),b.push(rt))}4<=b.length&&(y.push(b),x.push(Vd(b)))}}}function Vd(a){for(var y=[],x=0,b=0,E=a.length,z=0;z<E;z+=2){var tt=a[z],ot=a[z+1];z!==0&&y.push(Math.sqrt(uo(x,b,tt,ot))),x=tt,b=ot}return y}Mt.add=function(a){return this.ee.add(a),this},Mt.pm=function(a,y,x,b,E,z,tt,ot){return this._isFrozen&&mn(this),this.fg=new ri(a,y,E,z).freeze(),this.gg=new ri(x,b,tt,ot).freeze(),this},_t.Object.defineProperties(Kn.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 zc(this),this.tk}},flattenedLengths:{get:function(){return zc(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Kn.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===Kn.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],z=E.length,tt=0;tt<z;tt++)a+=E[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&mn(this,a),this.na=a,a===Kn.o?this.ee=new qe:(Kn.V===null&&(Kn.V=new qe().freeze()),this.ee=Kn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&mn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&mn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&mn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&mn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&mn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&mn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&mn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&mn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Kn.prototype.setSpots=Kn.prototype.pm,Kn.prototype.add=Kn.prototype.add,Kn.prototype.getFractionForPoint=Kn.prototype.xx,Kn.prototype.getPointAndAngleAlongPath=Kn.prototype.Qu,Kn.prototype.getAngleAlongPath=Kn.prototype.wx,Kn.prototype.getPointAlongPath=Kn.prototype.Pu,Kn.prototype.containsPoint=Kn.prototype.ca,Kn.prototype.transform=Kn.prototype.transform,Kn.prototype.rotate=Kn.prototype.rotate,Kn.prototype.scale=Kn.prototype.scale,Kn.prototype.offset=Kn.prototype.offset,Kn.prototype.normalize=Kn.prototype.normalize,Kn.prototype.computeBoundsWithoutOrigin=Kn.prototype.ix,Kn.prototype.equalsApprox=Kn.prototype.Xa,Kn.className="Geometry",Kn.j=new nn(Kn,"Line",0),Kn.u=new nn(Kn,"Rectangle",1),Kn.F=new nn(Kn,"Ellipse",2),Kn.o=new nn(Kn,"Path",3),Kn.V=null,Kn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Kn.className="Geometry",Kn.stringify=Kn.ia,Kn.fillPath=Kn.nb,Kn.parse=Kn.parse,Kn.Line=Kn.j,Kn.Rectangle=Kn.u,Kn.Ellipse=Kn.F,Kn.Path=Kn.o;function Wr(a,y,x,b,E){Ci(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 qe,this.sr=this.pl.Ja,this.fw=null}Wr.prototype.copy=function(){var a=new Wr;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 z=y[E].copy();b.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Mt=Wr.prototype,Mt.Xa=function(a){if(!(a instanceof Wr&&Te.B(this.startX,a.startX)&&Te.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},Mt.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},Mt.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},Mt.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},Mt.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},Mt.add=function(a){return this.pl.add(a),this},Mt.ca=function(a,y,x){for(var b=this.startX,E=this.startY,z=b,tt=E,ot=this.segments.s,rt=ot.length,lt=0;lt<rt;lt++){var ut=ot[lt];switch(ut.type){case Kr:z=ut.endX,tt=ut.endY,b=ut.endX,E=ut.endY;break;case Zo:if(Te.Yb(b,E,ut.endX,ut.endY,x,a,y))return!0;b=ut.endX,E=ut.endY;break;case rs:if(Te.cs(b,E,ut.point1X,ut.point1Y,ut.point2X,ut.point2Y,ut.endX,ut.endY,.5,a,y,x))return!0;b=ut.endX,E=ut.endY;break;case Pa:if(Te.jv(b,E,ut.point1X,ut.point1Y,ut.endX,ut.endY,.5,a,y,x))return!0;b=ut.endX,E=ut.endY;break;case Tr:case Fa:var gt=ut.type===Tr?ua(ut,this):_a(ut,this,b,E),St=gt.length,Ct=ut.type===Tr?ut.centerX:ut.endX,bt=ut.type===Tr?ut.centerY:ut.endY;if(St===0){if(Te.Yb(b,E,Ct,bt,x,a,y))return!0;b=Ct,E=bt;break}for(Ct=null,bt=0;bt<St;bt++)if(Ct=gt[bt],bt===0&&Te.Yb(b,E,Ct[0],Ct[1],x,a,y)||Te.cs(Ct[0],Ct[1],Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7],.5,a,y,x))return!0;Ct!==null&&(b=Ct[6],E=Ct[7]);break;default:le("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(b!==z||E!==tt)&&Te.Yb(b,E,z,tt,x,a,y))return!0}return!1},_t.Object.defineProperties(Wr.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&&mn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&mn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&mn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&mn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&mn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&mn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Wr.prototype.add=Wr.prototype.add,Wr.prototype.equalsApprox=Wr.prototype.Xa,Wr.className="PathFigure";function Po(a,y,x,b,E,z,tt,ot){Ci(this),a===void 0&&(a=Zo),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),z===void 0&&(z=0),tt===void 0&&(tt=0),a===Fa?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),ot&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===Tr&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===Tr&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Po.prototype.copy=function(){var a=new Po;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},Mt=Po.prototype,Mt.Xa=function(a){if(!(a instanceof Po)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Kr:case Zo:return Te.B(this.endX,a.endX)&&Te.B(this.endY,a.endY);case rs:return Te.B(this.endX,a.endX)&&Te.B(this.endY,a.endY)&&Te.B(this.point1X,a.point1X)&&Te.B(this.point1Y,a.point1Y)&&Te.B(this.point2X,a.point2X)&&Te.B(this.point2Y,a.point2Y);case Pa:return Te.B(this.endX,a.endX)&&Te.B(this.endY,a.endY)&&Te.B(this.point1X,a.point1X)&&Te.B(this.point1Y,a.point1Y);case Tr:return Te.B(this.startAngle,a.startAngle)&&Te.B(this.sweepAngle,a.sweepAngle)&&Te.B(this.centerX,a.centerX)&&Te.B(this.centerY,a.centerY)&&Te.B(this.radiusX,a.radiusX)&&Te.B(this.radiusY,a.radiusY);case Fa:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Te.B(this.xAxisRotation,a.xAxisRotation)&&Te.B(this.endX,a.endX)&&Te.B(this.endY,a.endY)&&Te.B(this.radiusX,a.radiusX)&&Te.B(this.radiusY,a.radiusY);default:return!1}},Mt.qb=function(a){a.classType===Po&&(this.type=a)},Mt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Kr:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Zo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case rs: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 Pa: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 Tr: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 Fa: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":"")},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.close=function(){return this.isClosed=!0,this};function ua(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,z=Te.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var tt=eo.alloc();tt.reset(),x<b?tt.scale(1,b/x):tt.scale(x/b,1),Kn.Ha(z,tt),eo.free(tt)}for(x=z.length,b=0;b<x;b++)tt=z[b],tt[0]+=y,tt[1]+=E,tt[2]+=y,tt[3]+=E,tt[4]+=y,tt[5]+=E,tt[6]+=y,tt[7]+=E;return a.ae=z,a.ae}function _a(a,y,x,b){function E(Bt,Yt,Gt,se){return(Bt*se<Yt*Gt?-1:1)*Math.acos((Bt*Gt+Yt*se)/(Math.sqrt(Bt*Bt+Yt*Yt)*Math.sqrt(Gt*Gt+se*se)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,ot=a.isLargeArc,rt=a.isClockwiseArc,lt=a.Dc,ut=a.Ec,gt=Math.cos(tt),St=Math.sin(tt),Ct=gt*(x-lt)/2+St*(b-ut)/2;tt=-St*(x-lt)/2+gt*(b-ut)/2;var bt=Ct*Ct/(y*y)+tt*tt/(z*z);return 1<bt&&(y*=Math.sqrt(bt),z*=Math.sqrt(bt)),bt=(ot===rt?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*Ct*Ct)/(y*y*tt*tt+z*z*Ct*Ct)),isNaN(bt)&&(bt=0),ot=bt*y*tt/z,bt=bt*-z*Ct/y,isNaN(ot)&&(ot=0),isNaN(bt)&&(bt=0),x=(x+lt)/2+gt*ot-St*bt,b=(b+ut)/2+St*ot+gt*bt,ut=E(1,0,(Ct-ot)/y,(tt-bt)/z),gt=(Ct-ot)/y,lt=(tt-bt)/z,Ct=(-Ct-ot)/y,ot=(-tt-bt)/z,tt=E(gt,lt,Ct,ot),Ct=(gt*Ct+lt*ot)/(Math.sqrt(gt*gt+lt*lt)*Math.sqrt(Ct*Ct+ot*ot)),-1>=Ct?tt=Math.PI:1<=Ct&&(tt=0),!rt&&0<tt&&(tt-=2*Math.PI),rt&&0>tt&&(tt+=2*Math.PI),rt=y>z?1:y/z,Ct=y>z?z/y:1,y=Te.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=eo.alloc(),z.reset(),z.translate(x,b),z.rotate(a.Ne,0,0),z.scale(rt,Ct),Kn.Ha(y,z),eo.free(z),a.ae=y,a.ae}_t.Object.defineProperties(Po.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&&mn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&mn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&mn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&mn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&mn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&mn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&mn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&mn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&mn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Gn(a,">= zero",Po,"radiusX"),this._isFrozen&&mn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Gn(a,">= zero",Po,"radiusY"),this._isFrozen&&mn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&mn(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&&mn(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&&mn(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&&mn(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&&mn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Po.prototype.equalsApprox=Po.prototype.Xa;var Kr=new nn(Po,"Move",0),Zo=new nn(Po,"Line",1),rs=new nn(Po,"Bezier",2),Pa=new nn(Po,"QuadraticBezier",3),Tr=new nn(Po,"Arc",4),Fa=new nn(Po,"SvgArc",4);Po.className="PathSegment",Po.Move=Kr,Po.Line=Zo,Po.Bezier=rs,Po.QuadraticBezier=Pa,Po.Arc=Tr,Po.SvgArc=Fa;function ms(){this.H=null,this.xu=new zt(0,0).freeze(),this.mt=new zt(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}ms.prototype.copy=function(){var a=new ms;return this.clone(a)},ms.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},ms.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},ms.prototype.So=function(a,y){var x=this.diagram;return x===null||vg(x,a,y),y},ms.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(vg(x,a,y),y.assign(x.Ps(y))),y},_t.Object.defineProperties(ms.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}}}),ms.prototype.getMultiTouchDocumentPoint=ms.prototype.Bz,ms.prototype.getMultiTouchViewPoint=ms.prototype.So,ms.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},_t.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 ir(){this.Fm=tr,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}ir.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},ir.prototype.copy=function(){var a=new ir;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=Re(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Re(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Re(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Re(y)&&typeof y.J=="function"?y.J():y,a},ir.prototype.qb=function(a){a.classType===ir&&(this.change=a)},ir.prototype.toString=function(){var a="";return a=this.change===ha?a+"* ":this.change===tr?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===ha?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=On(this.object)),this.oldValue!==null&&(a+=" old: "+On(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+On(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},ir.prototype.I=function(a){return a?this.oldValue:this.newValue},ir.prototype.Dz=function(a){return a?this.oldParam:this.newParam},ir.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},ir.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},ir.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},ir.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},_t.Object.defineProperties(ir.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===ha&&(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}}}),ir.prototype.redo=ir.prototype.redo,ir.prototype.canRedo=ir.prototype.canRedo,ir.prototype.undo=ir.prototype.undo,ir.prototype.canUndo=ir.prototype.canUndo,ir.prototype.getParam=ir.prototype.Dz,ir.prototype.getValue=ir.prototype.I,ir.prototype.clear=ir.prototype.clear;var ha=new nn(ir,"Transaction",-1),tr=new nn(ir,"Property",0),br=new nn(ir,"Insert",1),zr=new nn(ir,"Remove",2);ir.className="ChangedEvent",ir.Transaction=ha,ir.Property=tr,ir.Insert=br,ir.Remove=zr;function Vr(){this.o=new qe().freeze(),this.xa="",this.j=!1}Vr.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},Vr.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()},Vr.prototype.canUndo=function(){return this.isComplete},Vr.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()}},Vr.prototype.canRedo=function(){return this.isComplete},Vr.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()}},Vr.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Yn,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===tr&&b.object){var E=y.get(b.object);E||(E=new Yn,y.set(b.object,E));var z=E.get(b.propertyName);z===null?E.set(b.propertyName,-1):(0<z&&a.cd(z,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()}},_t.Object.defineProperties(Vr.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}}}),Vr.prototype.optimize=Vr.prototype.ak,Vr.prototype.redo=Vr.prototype.redo,Vr.prototype.canRedo=Vr.prototype.canRedo,Vr.prototype.undo=Vr.prototype.undo,Vr.prototype.canUndo=Vr.prototype.canUndo,Vr.prototype.clear=Vr.prototype.clear,Vr.className="Transaction";function or(){this.Pt=new tn,this.Jd=!1,this.u=new qe().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new qe().freeze(),this.hl=new qe,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}or.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},or.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},or.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Mt=or.prototype,Mt.Xw=function(a){this.Pt.add(a)},Mt.Rx=function(a){this.Pt.remove(a)},Mt.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},Mt.eb=function(a){return a===void 0&&(a=""),Ch(this,!0,a)},Mt.Kf=function(){return Ch(this,!1,"")};function Ch(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&si("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 z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(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&&(z=y.M(0),z!==null&&z.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=z,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}Mt.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()}},or.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},or.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){si("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},or.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},or.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){si("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},or.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new ir;for(b.change=ha,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},or.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Vr);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||si("Change not within a transaction: "+x.toString()))}},or.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},_t.Object.defineProperties(or.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}}}),or.prototype.handleChanged=or.prototype.Tu,or.prototype.redo=or.prototype.redo,or.prototype.undo=or.prototype.undo,or.prototype.canUndo=or.prototype.canUndo,or.prototype.discardHistoryAfterIndex=or.prototype.lx,or.prototype.rollbackTransaction=or.prototype.Kf,or.prototype.commitTransaction=or.prototype.eb,or.prototype.startTransaction=or.prototype.Ea,or.prototype.removeModel=or.prototype.Rx,or.prototype.addModel=or.prototype.Xw,or.prototype.clear=or.prototype.clear,or.className="UndoManager";function yo(){Ci(this),this.H=Vl,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ms,this.Zr=-1}yo.prototype.toString=function(){return this.name!==""?this.name+" Tool":xn(this.constructor)},yo.prototype.updateAdornments=function(){},yo.prototype.canStart=function(){return this.isEnabled},yo.prototype.doStart=function(){},yo.prototype.doActivate=function(){this.isActive=!0},yo.prototype.doDeactivate=function(){this.isActive=!1},yo.prototype.doStop=function(){},yo.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},yo.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},yo.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},yo.prototype.doMouseMove=function(){},yo.prototype.doMouseUp=function(){this.stopTool()},yo.prototype.doMouseWheel=function(){},yo.prototype.canStartMultiTouch=function(){return!0},yo.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,zt.allocAt(NaN,NaN)),b=y.So(1,zt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,z=b.y-x.y;a.Jw=Math.sqrt(E*E+z*z),y.bubbles=!1}zt.free(x),zt.free(b)},yo.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,zt.allocAt(NaN,NaN)),b=y.So(1,zt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,z=b.y-x.y;z=Math.sqrt(E*E+z*z)/a.Jw,E=new zt((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),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var ot=a.zoomPoint;a.zoomPoint=E,tt.resetZoom(z),a.zoomPoint=ot}y.bubbles=!1}zt.free(x),zt.free(b)},yo.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},yo.prototype.doKeyUp=function(){},yo.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},yo.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},yo.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(ji?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||(ji?y.meta:y.control)||y.shift||a.clearSelection()}},yo.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,Ap(a,b,x),b.handled};function Ap(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)}}}yo.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 z=a.Ck,tt=z;for(a.Ck=b,this.doCurrentObjectChanged(z,b),y.handled=!1;z!==null;){var ot=z.mouseLeave;if(ot!==null&&(b===z||b!==null&&b.rg(z)||(ot(y,z,b),E=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;b!==null&&(tt=b.mouseEnter,!(tt!==null&&(z===b||z!==null&&z.rg(b)||(tt(y,b,z),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(z=b,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=b;z!==null&&(b=z.mouseOver,!(b!==null&&(b(y,z),E=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},yo.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},yo.prototype.doCurrentObjectChanged=function(){},yo.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===Ud&&!y.shift||E===dd&&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===Ud&&y.shift||E===dd&&!y.control){b=a.position.copy();var z=y.event;E=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var ot="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(ot,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(ot,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:ot="pixel";break;case 1:ot="line";break;case 2:ot="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(ot,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(ot,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,b,y)}}},yo.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},yo.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Nn(function(){x.doWaitAfter(b)},a)},yo.prototype.cancelWaitAfter=function(){this.Zr!==-1&&ie.clearTimeout(this.Zr),this.Zr=-1},yo.prototype.doWaitAfter=function(){},yo.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof So);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},yo.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},_t.Object.defineProperties(yo.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Ze&&(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}}}),yo.prototype.startTransaction=yo.prototype.Ea,yo.className="Tool";function qo(){yo.call(this),this.name="ToolManager",this.hb=new qe,this.ob=new qe,this.Hb=new qe,this.F=this.V=850,this.o=new Wn(2,2).ja(),this.Ha=5e3,this.ia=dd,this.u=Hc,this.Mp=this.j=null,this.zj=-1}Be(qo,yo),qo.prototype.initializeStandardTools=function(){},qo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof So&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},qo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===gu&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===bh){y.bubbles=!0;return}if(this.gestureBehavior===gu)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===dd?this.mouseWheelBehavior=Ud:this.mouseWheelBehavior===Ud&&(this.mouseWheelBehavior=dd)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},qo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===bh){y.bubbles=!0;return}if(this.gestureBehavior===gu)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,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}}Ip(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Ip(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}qo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof So&&(y===a||y.rg(a))||this.hideToolTip()},qo.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()))},qo.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)},qo.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 So)||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()},qo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof So){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 Ol&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(ie.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Nn(function(){E.hideToolTip()},a)}},qo.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}},qo.prototype.hideToolTip=function(){this.zj!==-1&&(ie.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof So?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ol&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},qo.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()},qo.prototype.doMouseWheel=function(){this.standardMouseWheel()},qo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},qo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},qo.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},qo.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},qo.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)},_t.Object.defineProperties(qo.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 So?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}}}),qo.prototype.replaceStandardTool=qo.prototype.gb;var dd=new nn(qo,"WheelScroll",0),Ud=new nn(qo,"WheelZoom",1),qf=new nn(qo,"WheelNone",2),Hc=new nn(qo,"GestureZoom",3),gu=new nn(qo,"GestureCancel",4),bh=new nn(qo,"GestureNone",5);qo.className="ToolManager",qo.WheelScroll=dd,qo.WheelZoom=Ud,qo.WheelNone=qf,qo.GestureZoom=Hc,qo.GestureCancel=gu,qo.GestureNone=bh;function rr(){yo.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 zt(NaN,NaN),this.Fr=new zt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new tn().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Zl;Be(rr,yo),rr.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},rr.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},rr.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,(ji?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},rr.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),ts=null,this.isActive=!0,this.tl.set(a.position),Gc(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&&$s(a),of(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,ts=this,Hu=this.diagram,this.doSimulatedDragOut()))};function Gc(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Hn?(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 wa,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}rr.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},rr.prototype.Pd=function(a){return a===void 0?new xu(Ai):this.isGridSnapEnabled?new xu(new zt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new xu(a.copy())},rr.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Lh(this),Rh(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Zl.count){for(var y=Zl,x=y.length,b=0;b<x;b++){var E=y.M(b);Iu(E),ol(E),Lh(E),E.diagram.ug()}y.clear()}Iu(this),this.tl.h(NaN,NaN),Hu!==null&&(Hu.currentCursor=""),ts=Hu=null,ol(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),ac(a,!0)},rr.prototype.stopTransaction=function(){var a=this.diagram,y=yo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Lh(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,eg(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function tg(){var a=ts;ol(a),Ru(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}rr.prototype.doCancel=function(){ol(this),Ru(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},rr.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},rr.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function pu(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):Ru(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new Yn,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var z=y.I(E);z!==null&&(z.location=E.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof Hn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,Gc(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,rh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function ol(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 Hn&&(x.value.point=new zt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Iu(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function Fl(a,y,x){var b=a.diagram,E=a.startPoint,z=zt.alloc();z.assign(b.lastInput.documentPoint),a.moveParts(y,z.re(E),x),zt.free(z),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&($s(b),b.hk())}rr.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Ih(b,a,y,this.dragOptions,x)};function Ru(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof Hn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),rh(b,-E.x,-E.y)}y.bd()}}function Wc(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),ju(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=eg(a,E,b),!a.isActive&&ts===null)return;var ot=b!==null?b.part:null;if(ot===null||x.handlesDragDropForTopLevelParts&&ot.isTopLevel&&!(ot instanceof Ki)){var rt=x.mouseDragOver;rt!==null&&(rt(E),tt=!0)}if(!a.isActive&&ts===null||(a.doDragOver(y,b),!a.isActive&&ts===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}rr.prototype.findDragOverObject=function(a){var y=this;return Ul(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof So||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},rr.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 eg(a,y,x){var b=!1,E=a.Cg.length,z=0<E?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<E;tt++){var ot=a.Cg[tt],rt=ot.mouseDragLeave;if(rt!==null&&(rt(y,ot,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&ts===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=ng(E);for(E=a.Cg.length,x=0;x<E&&(tt=a.Cg[x],ot=tt.mouseDragEnter,ot===null||(ot(y,tt,z),b=!0,!y.handled));x++);return b}function ng(a){var y=a.panel;return y!==null?y:a instanceof vi&&!(a instanceof Ki)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Rp(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(lt){return b.findValidLinkablePort(lt,x)});a=zt.alloc();var z=1/0,tt=null;for(E=E.iterator;E.next();){var ot=E.value;if(ot.part!==null){var rt=ot.ga(po,a);rt=y.Bf(rt),rt<z&&(tt=ot,z=rt)}}return zt.free(a),tt}function ju(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 z=null,tt=null;x.fromNode===null&&(z=Rp(a,x.i(0),!1),z!==null&&(tt=z.part));var ot=null,rt=null;x.toNode===null&&(ot=Rp(a,x.i(x.pointsCount-1),!0),ot!==null&&(rt=ot.part)),E.isValidLink(tt,z,rt,ot)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=rt,ot!==null&&(x.toPortId=ot.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):Kc(E,tt,z,rt,ot):Kc(E,null,null,null,null)}}}}rr.prototype.doDragOver=function(){};function zu(a,y){var x=a.diagram;a.dragsLink&&ju(a,!0),Lh(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var z=b;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(E,z),E.handled))break;Q0(a,E,z),z=ng(z)}}else z=x.mouseDrop,z!==null&&z(E);if(a.isActive||ts!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)z=E.key,z instanceof Xn&&z.linksConnected.each(function(ot){ot.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||ts!==null){for(a=sn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Xn&&q0(x,b,a);sn.free(a)}}}function Q0(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Ki||(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 Hn},!0,function(E){return E instanceof Hn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}rr.prototype.doDropOnto=function(){},rr.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()?(pu(this,!1),of(a,this.copiedParts),Fl(this,this.copiedParts,!1),Rh(a,this.copiedParts)):this.mayMove()?(ol(this),Fl(this,this.draggedParts,!0)):this.mayDragOut()?(pu(this,!1),Fl(this,this.copiedParts,!1)):ol(this),Wc(this,a.lastInput.documentPoint))}},rr.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?(ol(this),pu(this,!0),of(a,this.copiedParts),Fl(this,this.copiedParts,!1),Rh(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,ol(this),this.mayMove()&&(Fl(this,this.draggedParts,!0),Wc(this,a.lastInput.documentPoint))),this.Ym=!0,zu(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&tv(this),a.Ya(),Rh(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},rr.prototype.simulatedMouseMove=function(a,y,x){if(ts===null)return!1;var b=ts.diagram;x instanceof Ze||(x=null);var E=Hu;return x!==E&&(E!==null&&E!==b&&(E.ug(),ts.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Hu=x,x!==null&&x!==b&&(tg(),E=x.toolManager.findTool("Dragging"),E!==null&&(Zl.contains(E)||Zl.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)},rr.prototype.simulatedMouseUp=function(a,y,x){if(ts===null)return!1;var b=Hu,E=ts.diagram;if(x===null)return ts.doCancel(),!0;if(x!==b){var z=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&z!==null)return b.ug(),ts.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;Hu=x,b=x.toolManager.findTool("Dragging"),b!==null&&(tg(),Zl.contains(b)||Zl.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 zt),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=ts,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function tv(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Xn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}rr.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(ji?!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())},rr.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())},rr.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())},rr.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},rr.prototype.Az=function(){return ts},rr.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ts;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},rr.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ba(a),a.animationManager.Cc(),a=ts,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},rr.prototype.doSimulatedDragLeave=function(){var a=ts;a!==null&&a.doSimulatedDragOut(),this.doCancel()},rr.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ts;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;jp(this,y.draggedParts.Lf(),!1,a.firstInput),Fl(this,this.copiedParts,!1),Wc(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},rr.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ts;if(y!==null){var x=y.diagram;if(y.Ym=!0,ol(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),jp(this,y.draggedParts.Lf(),!0,a.lastInput),Fl(this,this.copiedParts,!1);var b=new tn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),zu(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function jp(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 z=sn.alloc();E=b=1/0;for(var tt=-1/0,ot=-1/0,rt=y.iterator;rt.next();){var lt=rt.value;if(lt.isVisible()){var ut=lt.location;lt=ut.x,ut=ut.y,isNaN(lt)||isNaN(ut)||(lt<b&&(b=lt),ut<E&&(E=ut),lt>tt&&(tt=lt),ut>ot&&(ot=ut))}}for(b===1/0?z.h(0,0,0,0):z.h(b,E,tt-b,ot-E),b=z.x+z.width/2,E=z.y+z.height/2,sn.free(z),z=a.Fr,tt=new Yn,ot=zt.alloc(),rt=y.iterator;rt.next();)lt=rt.value,lt instanceof Hn&<.canCopy()&&(ut=x.I(lt),ut!==null&&(ut.points=lt.points,rh(ut,z.x-b,z.y-E),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)lt=y.value,lt.Zc()&<.canCopy()&&(rt=x.I(lt),rt!==null&&(lt=lt.location,ot.h(z.x-(b-lt.x),z.y-(E-lt.y)),rt.location=ot,rt.Va(),tt.add(rt,a.Pd(ot))));zt.free(ot),a.copiedParts=tt,Gc(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,rh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}rr.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},rr.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new zt},_t.Object.defineProperties(rr.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}}}),rr.prototype.getDraggingSource=rr.prototype.Az;var ts=null,Hu=null;rr.className="DraggingTool",Zl=new qe,yi("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),qo.prototype.doCancel=function(){ts!==null&&ts.doCancel(),yo.prototype.doCancel.call(this)};function pr(){yo.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Hn,y=new Xi;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Xi,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Xn,y=new Xi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=xo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Xn,y=new Xi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=xo,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 Yn,this.Of=this.gj=this.Pf=null}Be(pr,yo),pr.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},pr.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var z=y.Df(),tt=Wn.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,b.desiredSize=tt,Wn.free(tt),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=po,z=zt.alloc(),x.location=y.ga(po,z),zt.free(z),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},pr.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=xo,y.fromSpot=hr,y.toSpot=hr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},pr.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},pr.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Xn){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)}},pr.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Xn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Xn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},pr.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,z=y.og(x,b,function(gt){return E.findValidLinkablePort(gt,a)},null,!0);for(b=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,ot=tt.part;if(ot instanceof Xn){var rt=tt.ga(po,zt.alloc()),lt=x.x-rt.x,ut=x.y-rt.y;zt.free(rt),rt=lt*lt+ut*ut,rt<b&&(lt=this.validPortsCache.I(tt),lt!==null?lt&&(y=tt,b=rt):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,ot,tt)||!a&&this.isValidLink(ot,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,b=rt):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof Xn&&(x.layer===null||x.layer.allowLink))?y:null},pr.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},pr.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},pr.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},pr.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Xn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Xn))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},pr.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)},pr.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 tn;return b.add(a),vs(this,x,y,b)};function vs(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),vs(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),vs(a,y.labeledLink,x,b))))}pr.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!==cc){if(b===Dg){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!Ls(this,a,y,x,!0)}if(b===Bg){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!Ls(this,a,y,x,!0)}if(b===Tg)return a===y?a=!0:(b=new tn,b.add(y),a=Ms(this,b,a,y,x)),!a;if(b===Fg)return!Ls(this,a,y,x,!1);if(b===Og)return a===y?a=!0:(b=new tn,b.add(y),a=cd(this,b,a,y,x)),!a}return!0};function Ls(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==b&&(!E||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&Ls(a,tt,x,b,E)))return!0}return!1}function Ms(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 z=x.linksConnected;z.next();){var tt=z.value;if(tt!==E&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&Ms(a,y,tt,b,E)))return!0}return!1}function cd(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 z=x.linksConnected;z.next();){var tt=z.value;if(tt!==E){var ot=tt.fromNode;if(tt=tt.toNode,ot=ot===x?tt:ot,ot!==x&&cd(a,y,ot,b,E))return!0}}return!1}_t.Object.defineProperties(pr.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}}}),pr.className="LinkingBaseTool";function Es(){pr.call(this),this.name="Linking",this.V={},this.F=null,this.K=Mh,this.Xd=null}Be(Es,pr),Es.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},Es.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 Xn)))return null;var x=this.direction;if(x===Mh||x===zp){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===Mh||x===Hp)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Es.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 Xn&&(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 Xn&&(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)},Es.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()},Es.prototype.doStop=function(){pr.prototype.doStop.call(this),this.startObject=null},Es.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var ot=tt.part;ot instanceof Xn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=ot,E=tt):(y=ot,x=tt,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?(z=this.insertLink(y,x,b,E),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Es.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Hn)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)},Es.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Es.prototype.doNoLink=function(){},_t.Object.defineProperties(Es.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 Mh=new nn(Es,"Either",0),zp=new nn(Es,"ForwardsOnly",0),Hp=new nn(Es,"BackwardsOnly",0);Es.className="LinkingTool",Es.Either=Mh,Es.ForwardsOnly=zp,Es.BackwardsOnly=Hp;function wa(){pr.call(this),this.name="Relinking";var a=new Xi;a.figure="Diamond",a.desiredSize=Uo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Xi,a.figure="Diamond",a.desiredSize=Uo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new sn}Be(wa,pr),wa.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Hn){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)}},wa.prototype.makeAdornment=function(a,y){var x=new So;return x.type=Dn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},wa.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},wa.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 So&&x.adornedPart instanceof Hn))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=zi),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=zi),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},wa.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===kf||x===sh)&&(x=Bs),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}},wa.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()},wa.prototype.doStop=function(){pr.prototype.doStop.call(this),this.handle=null},wa.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,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof Xn&&(this.isForwards?(b=tt,E=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},wa.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},wa.prototype.doNoRelink=function(){};function Kc(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)}_t.Object.defineProperties(wa.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 So))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),wa.className="RelinkingTool",yi("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),yi("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Lr(){yo.call(this),this.name="LinkReshaping";var a=new Xi;a.figure="Rectangle",a.desiredSize=Ko,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Xi,a.figure="Diamond",a.desiredSize=Uo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new zt,this.Yq=new qe}Be(Lr,yo),Lr.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:ig},Lr.prototype.om=function(a,y){a.reshapingBehavior=y},Lr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Hn){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)}},Lr.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new So,E.type=Dn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=b?1:0;if(y.resegmentable&&y.computeCurve()!==Ea)for(var ot=x+tt;ot<z-tt;ot++){var rt=this.makeResegmentHandle(a,ot);rt!==null&&(rt.segmentIndex=ot,rt.segmentFraction=.5,rt.fromMaxLinks=999,E.add(rt))}for(tt=x+1;tt<z;tt++)if(ot=this.makeHandle(a,tt),ot!==null){if(ot.segmentIndex=tt,tt!==x)if(tt===x+1&&b){rt=y.i(x);var lt=y.i(x+1);Te.B(rt.x,lt.x)&&Te.B(rt.y,lt.y)&&(lt=y.i(x-1)),Te.B(rt.x,lt.x)?(this.om(ot,Ku),ot.cursor="n-resize"):Te.B(rt.y,lt.y)&&(this.om(ot,Wu),ot.cursor="w-resize")}else tt===z-1&&b?(rt=y.i(z-1),lt=y.i(z),Te.B(rt.x,lt.x)&&Te.B(rt.y,lt.y)&&(rt=y.i(z+1)),Te.B(rt.x,lt.x)?(this.om(ot,Ku),ot.cursor="n-resize"):Te.B(rt.y,lt.y)&&(this.om(ot,Wu),ot.cursor="w-resize")):tt!==z&&(this.om(ot,$c),ot.cursor="move");E.add(ot)}E.adornedObject=a}return E},Lr.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Lr.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Lr.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},Lr.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 Hn){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}}},Lr.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Lr.prototype.stopTransaction=function(){var a=this.diagram,y=yo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Lr.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Lr.prototype.getResegmentingPoint=function(){return this.handle.ga(po)},Lr.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Lr.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),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(Gu(this,tt,b,E,z,!0)||Gu(this,tt,b,E,z,!1))){var ot=y.points.copy();Gu(this,tt,b,E,z,!0)?(ot.cd(x-2,new zt(tt.x,(z.y+tt.y)/2)),ot.cd(x+1,new zt(z.x,(z.y+tt.y)/2))):(ot.cd(x-2,new zt((z.x+tt.x)/2,tt.y)),ot.cd(x+1,new zt((z.x+tt.x)/2,z.y))),ot.mb(x),ot.mb(x-1),y.points=ot,y.Wb()}else tt=y.i(x+2),Math.abs(E.x-z.x)<this.resegmentingDistance&&Math.abs(E.y-z.y)<this.resegmentingDistance&&(Gu(this,b,E,z,tt,!0)||Gu(this,b,E,z,tt,!1))&&(ot=y.points.copy(),Gu(this,b,E,z,tt,!0)?(ot.cd(x-1,new zt(b.x,(b.y+tt.y)/2)),ot.cd(x+2,new zt(tt.x,(b.y+tt.y)/2))):(ot.cd(x-1,new zt((b.x+tt.x)/2,b.y)),ot.cd(x+2,new zt((b.x+tt.x)/2,tt.y))),ot.mb(x+1),ot.mb(x),y.points=ot,y.Wb())}}else tt=zt.alloc(),Te.qh(b.x,b.y,z.x,z.y,E.x,E.y,tt)&&tt.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),zt.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Gu(a,y,x,b,E,z){return z?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}Lr.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===Ku?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Wu&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,b===Ku?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Wu&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),z=y.i(b-1),tt=y.i(b+1);Te.B(z.x,E.x)&&Te.B(E.y,tt.y)?(Te.B(z.x,y.i(b-2).x)&&!Te.B(z.y,y.i(b-2).y)?(y.m(b,a.x,z.y),x++,b++):y.L(b-1,a.x,z.y),Te.B(tt.y,y.i(b+2).y)&&!Te.B(tt.x,y.i(b+2).x)?y.m(b+1,tt.x,a.y):y.L(b+1,tt.x,a.y)):Te.B(z.y,E.y)&&Te.B(E.x,tt.x)?(Te.B(z.y,y.i(b-2).y)&&!Te.B(z.x,y.i(b-2).x)?(y.m(b,z.x,a.y),x++,b++):y.L(b-1,z.x,a.y),Te.B(tt.x,y.i(b+2).x)&&!Te.B(tt.y,y.i(b+2).y)?y.m(b+1,a.x,tt.y):y.L(b+1,a.x,tt.y)):Te.B(z.x,E.x)&&Te.B(E.x,tt.x)?(Te.B(z.x,y.i(b-2).x)&&!Te.B(z.y,y.i(b-2).y)?(y.m(b,a.x,z.y),x++,b++):y.L(b-1,a.x,z.y),Te.B(tt.x,y.i(b+2).x)&&!Te.B(tt.y,y.i(b+2).y)?y.m(b+1,a.x,tt.y):y.L(b+1,a.x,tt.y)):Te.B(z.y,E.y)&&Te.B(E.y,tt.y)&&(Te.B(z.y,y.i(b-2).y)&&!Te.B(z.x,y.i(b-2).x)?(y.m(b,z.x,a.y),x++,b++):y.L(b-1,z.x,a.y),Te.B(tt.y,y.i(b+2).y)&&!Te.B(tt.x,y.i(b+2).x)?y.m(b+1,tt.x,a.y):y.L(b+1,tt.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&&(z=b.findVisibleNode(),z!==null&&z!==b&&(b=z,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(z=E.ga(po,zt.alloc()),b=y.getLinkPointFromPoint(b,E,z,a,!0,zt.alloc()),y.L(0,b.x,b.y),zt.free(z),zt.free(b)),b=y.toNode,E=y.toPort,b!==null&&(z=b.findVisibleNode(),z!==null&&z!==b&&(b=z,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(po,zt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,zt.alloc()),y.L(y.pointsCount-1,a.x,a.y),zt.free(x),zt.free(a));y.zf()},Lr.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case $c:return a;case Ku:return new zt(y.i(x).x,a.y);case Wu:return new zt(a.x,y.i(x).y);default:case ig:return y.i(x)}},_t.Object.defineProperties(Lr.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 So))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}}}),Lr.prototype.setReshapingBehavior=Lr.prototype.om,Lr.prototype.getReshapingBehavior=Lr.prototype.Ru;var ig=new nn(Lr,"None",0),Wu=new nn(Lr,"Horizontal",1),Ku=new nn(Lr,"Vertical",2),$c=new nn(Lr,"All",3);Lr.className="LinkReshapingTool",Lr.None=ig,Lr.Horizontal=Wu,Lr.Vertical=Ku,Lr.All=$c,yi("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function ds(){yo.call(this),this.name="Resizing",this.o=new Wn(1,1).freeze(),this.j=new Wn(9999,9999).freeze(),this.yg=new Wn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Xi;a.alignmentFocus=po,a.figure="Rectangle",a.desiredSize=Ko,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new zt,this.Dw=new Wn,this.Tn=new zt,this.rt=new Wn(0,0),this.qt=new Wn(1/0,1/0),this.pt=new Wn(1,1)}Be(ds,yo),ds.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Hn)){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(),Kh(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},ds.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new So,y.type=Dn.Spot,y.locationSpot=po;var x=new Ds;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Dr)),y.add(this.makeHandle(a,Nl)),y.add(this.makeHandle(a,Ws)),y.add(this.makeHandle(a,Gs)),y.add(this.makeHandle(a,gr)),y.add(this.makeHandle(a,xr)),y.add(this.makeHandle(a,yr)),y.add(this.makeHandle(a,Sr))}else if(Qa(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ds.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},ds.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=po),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Dn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ds.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},ds.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))},ds.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ds.prototype.stopTransaction=function(){var a=this.diagram,y=yo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ds.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ds.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,zt.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),a.bd(),zt.free(E)}},ds.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,zt.alloc()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),zt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ds.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 Ki){var b=new qe;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new st;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()}},ds.prototype.computeResize=function(a,y,x,b,E,z){y.Mc()&&(y=po);var tt=this.adornedObject.naturalBounds,ot=tt.x,rt=tt.y,lt=tt.x+tt.width,ut=tt.y+tt.height,gt=1;if(!z){gt=tt.width;var St=tt.height;0>=gt&&(gt=1),0>=St&&(St=1),gt=St/gt}return St=zt.alloc(),Te.No(a.x,a.y,ot,rt,E.width,E.height,St),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(St.x,lt-b.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.y=Math.max(St.y,ut-b.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(gt*a.width,b.height),x.height),a.width=a.height/gt):(a.width=Math.max(Math.min(a.height/gt,b.width),x.width),a.height=gt*a.width),a.x=lt-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(St.x,lt-b.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.height=Math.max(Math.min(St.y-rt,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(gt*a.width,b.height),x.height),a.width=a.height/gt):(a.width=Math.max(Math.min(a.height/gt,b.width),x.width),a.height=gt*a.width),a.x=lt-a.width)):(a.x=Math.max(St.x,lt-b.width),a.x=Math.min(a.x,lt-x.width),a.width=lt-a.x,z||(a.height=Math.max(Math.min(gt*a.width,b.height),x.height),a.width=a.height/gt,a.y=rt+.5*(ut-rt-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(St.x-ot,b.width),x.width),a.y=Math.max(St.y,ut-b.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(gt*a.width,b.height),x.height),a.width=a.height/gt):(a.width=Math.max(Math.min(a.height/gt,b.width),x.width),a.height=gt*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(St.x-ot,b.width),x.width),a.height=Math.max(Math.min(St.y-rt,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(gt*a.width,b.height),x.height),a.width=a.height/gt):(a.width=Math.max(Math.min(a.height/gt,b.width),x.width),a.height=gt*a.width))):(a.width=Math.max(Math.min(St.x-ot,b.width),x.width),z||(a.height=Math.max(Math.min(gt*a.width,b.height),x.height),a.width=a.height/gt,a.y=rt+.5*(ut-rt-a.height))):0>=y.y?(a.y=Math.max(St.y,ut-b.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-a.y,z||(a.width=Math.max(Math.min(a.height/gt,b.width),x.width),a.height=gt*a.width,a.x=ot+.5*(lt-ot-a.width))):1<=y.y&&(a.height=Math.max(Math.min(St.y-rt,b.height),x.height),z||(a.width=Math.max(Math.min(a.height/gt,b.width),x.width),a.height=gt*a.width,a.x=ot+.5*(lt-ot-a.width))),zt.free(St),a},ds.prototype.computeReshape=function(){var a=Mn;return this.adornedObject instanceof Xi&&(a=Mv(this.adornedObject)),!(a===hi||this.diagram.lastInput.shift)},ds.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},ds.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},ds.prototype.computeCellSize=function(){var a=new Wn(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},_t.Object.defineProperties(ds.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 So))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 So)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}}}),ds.className="ResizingTool",yi("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function ks(){yo.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new zt,this.ue=null;var a=new Xi;a.figure="Ellipse",a.desiredSize=Uo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new zt(NaN,NaN),this.u=0,this.F=50}Be(ks,yo),ks.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)}},ks.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new So,y.type=Dn.Position,y.locationSpot=po;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Qa(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ks.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},ks.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)},ks.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(po)},ks.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)},ks.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new zt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},ks.prototype.stopTransaction=function(){var a=this.diagram,y=yo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ks.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},ks.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},ks.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()},ks.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()}},ks.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},_t.Object.defineProperties(ks.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 So))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 So)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}}}),ks.className="RotatingTool",yi("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Eh(){yo.call(this),this.name="ClickSelecting"}Be(Eh,yo),Eh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Eh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Eh.className="ClickSelectingTool";function Va(){yo.call(this),this.name="Action",this.pk=null}Be(Va,yo),Va.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},Va.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()},Va.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))}},Va.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()},Va.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())},Va.prototype.doStop=function(){this.pk=null},Va.className="ActionTool";function $u(){yo.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new zt(0,0)}Be($u,yo),$u.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)},$u.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},$u.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 vi)x.Zc()&&(Qa(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Re(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var z=zt.allocAt(a.x,a.y);this.isGridSnapEnabled&&nf(this.diagram,b,a,z),b.location=z,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),zt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},_t.Object.defineProperties($u.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}}}),$u.className="ClickCreatingTool";function Oa(){yo.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new vi;a.layerName="Tool",a.selectable=!1;var y=new Xi;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Be(Oa,yo),Oa.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))},Oa.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Oa.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Oa.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=Wn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Wn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Oa.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()},Oa.prototype.computeBoxBounds=function(){var a=this.diagram;return new sn(a.firstInput.documentPoint,a.lastInput.documentPoint)},Oa.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),ji?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 qe,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)}},_t.Object.defineProperties(Oa.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}}}),Oa.className="DragSelectingTool";function ss(){yo.call(this),this.name="Panning",this.Xt=new zt,this.xy=new zt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(ie.document,"scroll",a.Kw,!1),a.stopTool()}}Be(ss,yo),ss.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())},ss.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(ie.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},ss.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},ss.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},ss.prototype.doMouseMove=function(){this.move()},ss.prototype.doMouseUp=function(){this.move(),this.stopTool()},ss.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)}},_t.Object.defineProperties(ss.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),ss.className="PanningTool",yi("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),yi("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),yi("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),yi("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),yi("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Ol(){this.F=this.u=this.j=this.o=null}_t.Object.defineProperties(Ol.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}}}),Ol.className="HTMLInfo";function Ua(a,y,x){this.text=a,this.hx=y,this.visible=x}Ua.className="ContextMenuButtonInfo";function Ns(){yo.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new zt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Be(Ns,yo);function rl(a){var y=new Ol;y.show=function(E,z,tt){tt.showDefaultContextMenu()},y.hide=function(E,z){z.hideDefaultContextMenu()},kh=y,a.tu=function(){a.stopTool()},y=_n("div");var x=_n("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=_n("style");ie.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",Mr,!1),b.addEventListener(y,"selectstart",Mr,!1),b.addEventListener(x,"contextmenu",Mr,!1)),y.className="goCXforeground",x.className="goCXbackground",ie.document.body&&(ie.document.body.appendChild(y),ie.document.body.appendChild(x)),Yd=y,fd=x,Xd=!0}function Mr(a){return a.preventDefault(),!1}Ns.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)},Ns.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Ns.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Ns.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Ze||(a instanceof Me?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},Ns.prototype.doActivate=function(){},Ns.prototype.doMouseDown=function(){if(yo.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof So){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&yl(this)},Ns.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof So){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}yl(this)};function yl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Ol||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(mu(a,!0),a.isActive||a.stopTool())}Ns.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function mu(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=kh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Me?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof So&&!a.currentContextMenu.visible&&a.stopTool()}}Ns.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Ns.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof So){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 Ol&&a.show(y,x,this);this.currentContextMenu=a},Ns.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}},Ns.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof So?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ol&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Zu(a){var y=new qe;return y.add(new Ua("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Ua("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Ua("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Ua("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Ua("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Ua("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Ua("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Ua("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Ua("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Ua("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Ua("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Ua("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Ua("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Ns.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Zu(this)),Yd.innerHTML="",fd.addEventListener("pointerdown",this.tu,!1);var y=this,x=_n("ul");x.className="goCXul",Yd.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,z=E.visible;if(typeof E.hx=="function"&&(typeof z!="function"||z(a))){z=_n("li"),z.className="goCXli";var tt=_n("a");tt.className="goCXa",tt.href="#",tt.ky=E.hx,tt.addEventListener("pointerdown",function(ot){return this.ky(a),y.stopTool(),ot.preventDefault(),!1},!1),tt.textContent=E.text,z.appendChild(tt),x.appendChild(z)}}Yd.style.display="block",fd.style.display="block"},Ns.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===kh){Yd.style.display="none",fd.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(fd,"pointerdown",this.tu,!1),this.currentContextMenu=null}},_t.Object.defineProperties(Ns.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof So?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Xd===!1&&kh===null&&dr&&rl(this),kh},set:function(a){a===null&&(Xd=!0),kh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var kh=null,Xd=!1,fd=null,Yd=null;Ns.className="ContextMenuTool",yi("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function _o(){yo.call(this),this.name="TextEditing",this.Zh=new Go,this.ia=null,this.V=gd,this.vj=null,this.qa=pd,this.u=1,this.F=!0,this.o=null,this.j=new Ol,this.kt=null,Jd(this,this.j)}Be(_o,yo);function Jd(a,y){if(dr){var x=_n("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(Qd)):E==="Tab"?(a.acceptText(_c),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==pd){var b=a.kt;a.qa===qd&&(a.qa=tc),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==pd){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,z){if(b instanceof Go&&z instanceof _o)if(z.state===ec)x.style.border="3px solid red",x.focus();else{var tt=b.ga(po),ot=E.position,rt=E.scale,lt=b.Df()*rt;lt<z.minimumEditorScale&&(lt=z.minimumEditorScale);var ut=b.naturalBounds.width*lt+6,gt=b.naturalBounds.height*lt+2,St=(tt.x-ot.x)*rt;tt=(tt.y-ot.y)*rt,ot=b.verticalAlignment,rt=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*lt,gt=ot.y*gt-ot.y*rt+ot.offsetY-(.5*gt-.5*rt)-rt/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*lt+"%",x.style.lineHeight="normal",x.style.width=ut+"px",x.style.left=(St-ut/2|0)-1+"px",x.style.top=(tt+gt|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=lt,x.className="goTXarea",E.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}_o.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||_u&&_u!==this&&(_u.acceptText(Dl),_u&&_u!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Go&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===gd&&!y.isSelected||this.starting===Vc&&2>a.lastInput.clickCount)):!1},_o.prototype.doStart=function(){_u=this,this.textBlock!==null&&this.doActivate()},_o.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 Go&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=qd;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new sn(this.textBlock.ga(Dr),this.textBlock.ga(Ws));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},_o.prototype.doCancel=function(){this.stopTool()},_o.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},_o.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Dl)},_o.prototype.acceptText=function(a){switch(a){case Dl:this.qa===md?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===qd||this.qa===ec||this.qa===tc)&&(this.qa=rg,og(this));break;case Zc:case Qd:case _c:(Qd!==a||this.textBlock.isMultiline!==!0)&&(this.qa===qd||this.qa===ec||this.qa===tc)&&(this.qa=rg,og(this))}};function og(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,z="";b.valueFunction!==null&&(z=b.valueFunction()),a.isValidText(y,E,z)?(a.Ea(a.name),a.qa=md,a.transactionResult=a.name,y.text=z,a.doSuccess(E,z),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=ec,a.doError(E,z))}}_o.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)},_o.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},_o.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=pd,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},_o.prototype.doStop=function(){_u=null},_o.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)))},_o.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},_t.Object.defineProperties(_o.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)}}}),_o.prototype.measureTemporaryTextBlock=_o.prototype.Lx;var Zc=new nn(_o,"LostFocus",0),Dl=new nn(_o,"MouseDown",1),_c=new nn(_o,"Tab",2),Qd=new nn(_o,"Enter",3),ev=new nn(_o,"SingleClick",0),gd=new nn(_o,"SingleClickSelected",1),Vc=new nn(_o,"DoubleClick",2),pd=new nn(_o,"StateNone",0),qd=new nn(_o,"StateActive",1),tc=new nn(_o,"StateEditing",2),rg=new nn(_o,"StateValidating",3),ec=new nn(_o,"StateInvalid",4),md=new nn(_o,"StateValidated",5),_u=null;_o.className="TextEditingTool",_o.LostFocus=Zc,_o.MouseDown=Dl,_o.Tab=_c,_o.Enter=Qd,_o.SingleClick=ev,_o.SingleClickSelected=gd,_o.DoubleClick=Vc,_o.StateNone=pd,_o.StateActive=qd,_o.StateEditing=tc,_o.StateValidating=rg,_o.StateInvalid=ec,_o.StateValidated=md,yi("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function da(a){ic||(sg(),ic=!0),this.H=Vl,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=yu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new tn,this.ce=new as,this.ce.Yd=this,this.Ei=new tn,this.pu=new tn,this.Sr=new tn,this.pr=new tn,a&&Object.assign(this,a)}da.prototype.Xe=function(a){this.H=a},da.prototype.canStart=function(){return!0};function _l(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ls(a.H),a.zb=!0)}function Uc(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===yu?(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===ag&&y.vc.clear(),a.Qw=!!(a.Pk===oc&&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(),rc(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==ys&&b!==null&&(delete b.start.scale,delete b.end.scale),ie.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&$s(x),cg(x),a.zb=!1,y.start(),y.bc&&(Vu(a),x.Ya(),lg(y,0),Ba(x,!0),Nh(a),x.R("AnimationStarting",a)))}))}}function vu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Xc(a,y,x,b){a.isTicking||vu(a)||y instanceof Hn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Mt=da.prototype,Mt.fv=function(a){return this.ce.fv(a)},Mt.Xu=function(a){return this.ce.Xu(a)};function Yc(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 z=E.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var ot=!0;else{for(ot=tt.vc.iterator;ot.next();){var rt=ot.key;if(rt instanceof Me&&rt.diagram!==null||rt instanceof Ze){ot=!0;break t}}ot=!1}ot?sc(tt,!1):tt.Xk=!0}}E.pu.clear(),E.bc!==!1&&(Vu(E),Ba(E.H),Nh(E)),ie.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),ie.requestAnimationFrame(function(){x()}))}function Gp(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Vu(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 Nh(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Mt.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(),rc(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),rc(y,this.H)},Mt.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))},Mt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),qs(this,a))},Mt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Uu(this.ce,y,"position",y.position,y.position),qs(this,a))};function Wp(a,y,x){!a.zb||y.D(x)||vu(a)||(a.H.pi||(y=x.copy()),Uu(a.ce,a.H,"position",y,x))}function Jc(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function qs(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Th(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],ot=a[2];a=a[3];var rt=y[0],lt=y[1],ut=y[2];return y=y[3],ot===0||ot===100?(z=rt,tt=lt):(ut===0||ut===100)&&(rt=z,lt=tt),180<Math.abs(rt-z)&&(rt>z?z+=360:rt+=360),z=E(x,z,rt-z,b)%360,tt=E(x,tt,lt-tt,b),ot=E(x,ot,ut-ot,b),x=E(x,a,y-a,b),"hsla("+z+", "+tt+"%, "+ot+"%, "+x+")"}function sg(){function a(x,b,E,z,tt,ot){x.position=new zt(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot))}var y=new Yn;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,z,tt,ot){tt<ot?x.mm(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot),!1):x.position=new zt(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot))}),y.add("location",function(x,b,E,z,tt,ot){tt<ot?x.mm(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot),!0):x.location=new zt(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot))}),y.add("position:placeholder",function(x,b,E,z,tt,ot){tt<ot?x.mm(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot),!1):x.position=new zt(z(tt,b.x,E.x-b.x,ot),z(tt,b.y,E.y-b.y,ot))}),y.add("position:nodeCollapse",function(x,b,E,z,tt,ot){var rt=x.actualBounds,lt=E.actualBounds;E=lt.x+lt.width/2-rt.width/2,rt=lt.y+lt.height/2-rt.height/2,tt<ot?x.mm(z(tt,b.x,E-b.x,ot),z(tt,b.y,rt-b.y,ot),!1):x.position=new zt(z(tt,b.x,E-b.x,ot),z(tt,b.y,rt-b.y,ot))}),y.add("desiredSize",function(x,b,E,z,tt,ot){x.desiredSize=new sn(z(tt,b.width,E.width-b.width,ot),z(tt,b.height,E.height-b.height,ot))}),y.add("width",function(x,b,E,z,tt,ot){x.width=z(tt,b,E-b,ot)}),y.add("height",function(x,b,E,z,tt,ot){x.height=z(tt,b,E-b,ot)}),y.add("fill",function(x,b,E,z,tt,ot){x.fill=Th(b,E,tt,ot,z)}),y.add("stroke",function(x,b,E,z,tt,ot){x.stroke=Th(b,E,tt,ot,z)}),y.add("strokeWidth",function(x,b,E,z,tt,ot){x.strokeWidth=z(tt,b,E-b,ot)}),y.add("strokeDashOffset",function(x,b,E,z,tt,ot){x.strokeDashOffset=z(tt,b,E-b,ot)}),y.add("background",function(x,b,E,z,tt,ot){x.background=Th(b,E,tt,ot,z)}),y.add("areaBackground",function(x,b,E,z,tt,ot){x.areaBackground=Th(b,E,tt,ot,z)}),y.add("opacity",function(x,b,E,z,tt,ot){x.opacity=z(tt,b,E-b,ot)}),y.add("scale",function(x,b,E,z,tt,ot){x.scale=z(tt,b,E-b,ot)}),y.add("angle",function(x,b,E,z,tt,ot){x.angle=z(tt,b,E-b,ot)}),nc=y}_t.Object.defineProperties(da.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&&Gn(a,">= 1",da,"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}}}),da.prototype.stopAnimation=da.prototype.Cc;var nc=null,ic=!1,yu=new nn(da,"Default",1),oc=new nn(da,"AnimateLocations",2),ag=new nn(da,"None",3);da.className="AnimationManager",da.defineAnimationEffect=function(a,y){ic||(sg(),ic=!0),nc.add(a,y)},da.Default=yu,da.AnimateLocations=oc,da.None=ag;function as(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=vd,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Ai,this.vc=new Yn,this.Tt=new Yn,this.yl=new tn,this.Ut=new tn,this.dw=Ju,a&&Object.assign(this,a)}as.prototype.suspend=function(){this.Xk=!0},as.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,sc(this,!0),Vu(this.Yd),Ba(this.H),Nh(this.Yd),this.H.redraw()};function rc(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}Mt=as.prototype,Mt.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 Ze?a=x:x instanceof Me&&(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===yu&&this===y.defaultAnimation&&(this.Lp=Kp,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=fc),Vu(y),this.yl.each(function(b){b.data=null,a.add(b)}),Nh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Yc(y,this),this)},Mt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Mt.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Ze?this.H=a:a instanceof Me&&a.diagram!==null&&(this.H=a.diagram)),a instanceof vi){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Uu(this,a,y,x,b,E),this};function Uu(a,y,x,b,E,z){var tt=a.vc;if(y instanceof Ze&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(wu(b),lv(),b=[Ma.j,Ma.u,Ma.o,Ma.F],wu(E),lv(),E=[Ma.j,Ma.u,Ma.o,Ma.F]),tt.contains(y)){var ot=tt.I(y),rt=ot.start,lt=ot.end;rt[x]===void 0&&(rt[x]=Fh(b)),lt[x]=Fh(E)}else rt={},lt={},rt[x]=Fh(b),lt[x]=Fh(E),ot=rt.position,y instanceof Me&&ot instanceof zt&&!ot.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&ot.assign(lt.position),ot=new Oh(rt,lt,z),tt.add(y,ot);tt=rt[x],tt instanceof zt&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof vi?ot.Ku.location=Fh(y.location):z&&(ot.Ku[x]=Fh(b))}function Fh(a){return a instanceof zt||a instanceof Wn?a.copy():a}Mt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Mt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function sc(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),Vu(x),lg(a,E),Ba(a.H,!0),Nh(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 lg(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var z=b.key;if(!(z instanceof Me&&z.diagram===null)){var tt=b.value,ot=E?tt.end:tt.start;tt=E?tt.start:tt.end;var rt=nc,lt;for(lt in tt)lt==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||rt.get(lt)===null||rt.get(lt)(z,ot[lt],tt[lt],a.Lp,y,x,a)}}}Mt.stop=function(){return this.bc?(this.Ml(!0),this):this},Mt.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,Vu(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 z=nc;b.next();){var tt=b.key,ot=b.value,rt=E?ot.end:ot.start,lt=E?ot.start:ot.end,ut=ot.Ku,gt;for(gt in lt)if(z.get(gt)!==null){var St=gt;!ot.Hu||St!=="position:nodeCollapse"&&St!=="position:placeholder"||(St="position"),z.get(St)(tt,rt[gt],ut[gt]!==void 0?ut[gt]:ot.Hu?rt[gt]:lt[gt],this.Lp,this.Gd,this.Gd,this)}ot.Hu&&ut.location!==void 0&&tt instanceof vi&&(tt.location=ut.location),ot.nv&&tt instanceof vi&&tt.Zb(!1)}if(y.As.clear(),ac(y,!1),y.Ya(),y.N(),Ba(y,!0),x.defaultAnimation===this){for(gt=x.pr.iterator;gt.next();)E=gt.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Ba(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Nh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),rc(this,null),x.Ml(this),y.$b())}},Mt.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Ki&&(b=y.placeholder),b!==null?(x=b.ga(Dr),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new zt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Ki)for(a=a.memberParts;a.next();)b=a.value,b instanceof Xn&&this.Cj(b,y)},Mt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Ki&&(x=y.placeholder),x!==null){var b=x.ga(Dr);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 Ki)for(a=a.memberParts;a.next();)b=a.value,b instanceof Xn&&this.Aj(b,y)}},Mt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},_t.Object.defineProperties(as.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Gn(a,">= 1",as,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0<a?this.cu=a:le("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),as.prototype.getTemporaryState=as.prototype.Ez,as.prototype.stop=as.prototype.stop,as.prototype.add=as.prototype.add,as.prototype.addTemporaryPart=as.prototype.Iy;function vd(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Kp(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}as.className="Animation",as.EaseLinear=function(a,y,x,b){return x*a/b+y},as.EaseInOutQuad=vd,as.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},as.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},as.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},as.EaseOutExpo=Kp;function Oh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Oh.className="AnimationState";function sl(a,y,x){this.xd=null,this.rf=a,this.so=x||ug,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Dh))}sl.prototype.copy=function(){var a=new sl(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 $p(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))}_t.Object.defineProperties(sl.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 ug=new nn(sl,"Default",1),Dh=new nn(sl,"Immediate",2),yd=new nn(sl,"Bundled",3);sl.className="AnimationTrigger",sl.Default=ug,sl.Immediate=Dh,sl.Bundled=yd;function Yr(a){Ci(this),this.H=null,this.Pa=new qe,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)}Mt=Yr.prototype,Mt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,gs(x)}a.clear(),this.Zq.length=0},Mt.Xe=function(a){this.H=a},Mt.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,z=0,tt=0,ot=this.Pa.iterator;ot.next();){var rt=ot.value;rt instanceof Ki?E++:rt instanceof Xn?b++:rt instanceof Hn?z++:rt instanceof So?tt++:x++}if(ot="",0<x&&(ot+=x+" Parts "),0<b&&(ot+=b+" Nodes "),0<E&&(ot+=E+" Groups "),0<z&&(ot+=z+" Links "),0<tt&&(ot+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,ot+=`
|
|
|
`+x.toString(),b=x.data,b!==null&&$i(b)&&(ot+=" #"+$i(b)),x instanceof Xn?ot+=" "+On(b):x instanceof Hn&&(ot+=" "+On(x.fromNode)+" "+On(x.toNode));return y+" "+this.Pa.count+": "+ot},Mt.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=zt.alloc(),z=this.Pa.s,tt=z.length;tt--;){var ot=z[tt];if((b!==!0||Kh(ot)!==!1)&&ot.isVisible()&&(E.assign(a),Mi(E,ot.oe),ot=ot.ic(E,y,x),ot!==null&&(y!==null&&(ot=y(ot)),ot!==null&&(x===null||x(ot)))))return zt.free(E),ot}return zt.free(E),null},Mt.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof qe||b instanceof tn||(b=new tn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var z=zt.alloc(),tt=this.Pa.s,ot=tt.length;ot--;){var rt=tt[ot];if((E!==!0||Kh(rt)!==!1)&&rt.isVisible()){z.assign(a),Mi(z,rt.oe);var lt=rt;rt.ji(z,y,x,b)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||b.add(lt))}}return zt.free(z),b},Mt.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 qe||E instanceof tn||(E=new tn),this.Uh===!1)return E;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,ot=tt.length;ot--;){var rt=tt[ot];if((z!==!0||Kh(rt)!==!1)&&rt.isVisible()){var lt=rt;rt.Cf(a,y,x,b,E)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||E.add(lt))}}return E},Mt.Nu=function(a,y,x,b,E,z,tt){if(this.Uh===!1)return E;for(var ot=this.Pa.s,rt=ot.length;rt--;){var lt=ot[rt];if((tt!==!0||Kh(lt)!==!1)&&z(lt)&<.isVisible()){var ut=lt;lt.Cf(a,y,x,b,E)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||E.add(ut))}}return E},Mt.og=function(a,y,x,b,E,z){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof qe||E instanceof tn)&&(z=E),E=!0),z instanceof qe||z instanceof tn||(z=new tn),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var ot=zt.alloc(),rt=zt.alloc(),lt=this.Pa.s,ut=lt.length;ut--;){var gt=lt[ut];if((tt!==!0||Kh(gt)!==!1)&>.isVisible()){ot.assign(a),Mi(ot,gt.oe),rt.h(a.x+y,a.y),Mi(rt,gt.oe);var St=gt;gt.og(ot,rt,x,b,E,z)&&(x!==null&&(St=x(St)),St===null||b!==null&&!b(St)||z.add(St))}}return zt.free(ot),zt.free(rt),z},Mt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=rn();for(var E=rn(),z=0;z<b;z++){var tt=x[z];if(tt.vw=z,tt instanceof Hn){if(tt.fd===!1)continue}else if(tt instanceof So&&tt.adornedPart!==null)continue;var ot=tt.actualBounds;tt.isVisible()&&Xo(ot,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&E.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],Rv(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++)Rv(E[y]);bn(a),bn(E)}}};function Su(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Mt.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=Su(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,ot=sn.alloc(),rt=0;rt<b;rt++)this.Oj(a,x[rt],y,z,tt,ot,!0);if(sn.free(ot),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Zp(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var z=E.length;if(z!==0){var tt=Su(a,y),ot=a.Zq;ot.length=0;for(var rt=x.scale,lt=sn.alloc(),ut=0;ut<z;ut++){var gt=E[ut];b.contains(gt)&&a.Oj(y,gt,x,ot,rt,lt,!1)}sn.free(lt),y.globalAlpha=tt}}}Mt.Oj=function(a,y,x,b,E,z,tt){if(tt&&!Kh(y))a.Hs(y);else{if(b!==null&&y instanceof Hn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,b=y.containingGroup;b!==null;)tt?b.tb!==null&&z.Ex(b.tb):b.tb!==null&&(tt=!0,z.assign(b.tb)),b=b.containingGroup;var ot=y.actualBounds;if(b=!1,tt&&y.isVisible()){if(!z.Yc(ot)){a.Hs(y);return}b=!z.Re(ot)}b&&(a.save(),a instanceof ca?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),ot.width*E>x.Oq||ot.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,z=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(cr(y,a,y.areaBackground,!0,!0,z,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(cr(y,a,"rgba(0,0,0,0.3)",!0,!1,z,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),cr(y,a,y.background,!0,!1,z,E),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),b&&(a.restore(),a.Vc(!0))}},Mt.g=function(a,y,x,b,E){var z=this.diagram;z!==null&&z.cb(tr,a,this,y,x,b,E)},Mt.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&gs(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)),Qc(this,a,y),a},Mt.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,gs(y),a};function Qc(a,y,x){if(y=_p(a,y,x),x instanceof Ki&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,z=E.length,tt=0;tt<z;tt++){var ot=E[tt];if(ot===x&&(y=tt,0<=b)||0>b&&ot.containingGroup===x&&(b=tt,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&Qc(a,-1,y)}x.svg!==null&&x.svg.remove()}function _p(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 z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var ot=y+1,rt=NaN;ot<E&&(rt=a.M(ot).zOrder,!!isNaN(rt));)ot++;if(!isNaN(tt)&&tt>b)for(;;){if(z===-1||tt<=b){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(rt)&&rt<b)for(;;){if(ot===E||rt>=b){if(ot--,ot===y)break;return a.mb(y),a.Gb(ot,x),ot}for(rt=NaN;++ot<E&&(rt=a.M(ot).zOrder,isNaN(rt)););}return y}_t.Object.defineProperties(Yr.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&le("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&le("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Gn(a,"0 <= value <= 1",Yr,"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))}}}),Yr.prototype.findObjectsNear=Yr.prototype.og,Yr.prototype.findObjectsIn=Yr.prototype.Cf,Yr.prototype.findObjectsAt=Yr.prototype.ji,Yr.prototype.findObjectAt=Yr.prototype.ic,Yr.className="Layer";function Ze(a,y){if(sm||(cs(),sm=!0),Ci(this),Vl=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,dr){var x=this,b=function(){x.removeEventListener(ie.document,"DOMContentLoaded",b,!1),x.setRTL()};ie.document.body!==null?this.setRTL():x.addEventListener(ie.document,"DOMContentLoaded",b,!1)}this.ol=null,hf.add("Model",Oo);var E=this;return this.Hb=function(z){var tt=E.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var ot=z.change;z.modelChange===""&&ot===tr&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){E.partManager.doModelChanged(z)},this.hu=this.ku=null,Vp(this),this.model=cy(),this.Wg=!0,Xp(this),this.layout=new Jo,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 am,a!==void 0&&(typeof a=="string"||ie.Element&&a instanceof Element?dg(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Bh,Vl;function Vp(a){a.Yd=new da,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new qe,a.pj=new Yn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new zt(NaN,NaN).freeze(),a.du=new zt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new zt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new eo,a.zu=new zt(NaN,NaN).freeze(),a.ut=new sn(NaN,NaN,NaN,NaN).freeze(),a.rj=new mi(0,0,0,0).freeze(),a.sj=Ju,a.nu=!1,a.Zt=null,a.fu=null,a.yh=ys,a.zk=wi,a.Fg=ys,a.pq=wi,a.yt=Dr,a.Bt=Dr,a.Fc=!0,a.pn=!1,a.De=new tn,a.Eh=new Yn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new mi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new ms,a.bq.diagram=a,a.Qg=new ms,a.Qg.diagram=a,a.cj=new ms,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,iv(a),a.ai=new tn,a.Ht=!0,a.uu=Qu,a.pw=!1,a.wu=cc,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 Yn,a.Xn=new qe,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 mi(5).freeze(),a.Hw=new tn().freeze(),a.Nt=999999999,a.nw=new tn().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 tn,a.ow=new tn,a.Xh=null,a.aw=new Wn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new zt,bounds:new sn,Py:new Wn,bA:new Wn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new sn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Wn(NaN,NaN).freeze(),a.Sp=new sn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Yn;var y=new Xn,x=new Go;x.bind(new Er("text","",On)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Xn,x=new Go,x.stroke="brown",x.bind(new Er("text","",On)),y.add(x),a.Lg.add("Comment",y),y=new Xn,y.selectable=!1,y.avoidable=!1,x=new Xi,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Wn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Yn,y=new Ki,y.selectionObjectName="GROUPPANEL",y.type=Dn.Vertical,x=new Go,x.font="bold 12pt sans-serif",x.bind(new Er("text","",On)),y.add(x),x=new Dn(Dn.Auto),x.name="GROUPPANEL";var b=new Xi;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Ds,b.padding=new mi(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Yn,y=new Hn,x=new Xi,x.isPanelMain=!0,y.add(x),x=new Xi,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Hn,x=new Xi,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new So,y.type=Dn.Auto,x=new Xi,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ds,x.margin=new mi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new So,y.type=Dn.Link,x=new Xi,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 Oo,a.toolManager=new qo,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new st,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Up(),a.eq=null,a.fq=Ho,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 zt,a.zy=500,a.wp=new zt,a.wq=!1}Ze.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Ld=null,zh="",hg(this,!1),this.Xn.clear(),Cf(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function hg(a,y){a.animationManager.Cc(!0),a.Hw=new tn().freeze(),a.nw=new tn().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 z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var ot=a.Wa.s[y].parts;ot.next();){var rt=ot.value;rt!==E&&rt.data===null&&z.push(rt)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),Cf(),a.Og.clear(),Ei=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),z}function Up(){return null}Ze.prototype.reset=function(){this.clear(),this.vb=!0,Vp(this),Al(this),this.Wg=!0,Xp(this),this.layout=new Jo,this.Wg=!1,this.model=cy(),this.model.undoManager=new or,this.vb=this.rn=!1,this.N()},Ze.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=ie.document.body);var y=_n("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},Ze.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=ie.document.body);var y=0;if(dr){var x=rm;y=Bh,x===null&&(x=rm=_n("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Bh=_n("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||ji||(y=11)}this.Db=y,this.Gw=!0},Ze.prototype.qb=function(a){a.classType===Ze&&(this.autoScale=a)},Ze.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 dg(a,y){if(dr){if(y!=null||le("Diagram setup requires an argument DIV."),a.Ka!==null&&le("Diagram has already completed setup."),typeof y=="string"?a.Ka=ie.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:le("No DIV or DIV id supplied: "+y),a.Ka===null&&le("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&le("Invalid div id; div already has a Diagram associated with it."),!a.ol&&ie.ResizeObserver){var x=yn(function(){a.$b()},250);a.ol=new ie.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}ie.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=ie.go;var E=new Ja(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",ie.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),Sg(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Ja(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,dr){E=_n("div");var z=_n("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",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(E),E.appendChild(z),E.onscroll=Jp,E.addEventListener("pointerdown",Qp),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=z}a.hk=yn(function(){a.Yh=null,a.N()},300),a.Ov=yn(function(){cg(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var ot=Da(a,tt,!0);ot.bubbles=!0;var rt=0,lt=0;ot.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(rt=0<tt.deltaX?1:-1),tt.deltaY!==0&&(lt=0<tt.deltaY?1:-1),ot.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-rt:-lt):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(rt=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(lt=0<tt.wheelDeltaY?-1:1),ot.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-rt:-lt):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(ot.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),al(ot,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,Da(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var ot=a.Yt;ot[tt.pointerId]===void 0&&(ot[tt.pointerId]=tt),ot=a.oj;var rt=!1;if(ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType)if(ot[1]!==null&&ot[1].pointerId===tt.pointerId)ot[1]=tt,rt=!0;else if(ot[0]===null)ot[0]=tt;else if(ot[1]===null)ot[1]=tt,rt=!0;else{tt.preventDefault();return}else ot[0]=tt;(ot=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var lt=rt;rt=mg(a,tt,!0,!1,!0,lt),xd(a,tt,rt),rt.targetDiagram=pg(tt,tt.target),rt.targetObject=null,lt||rt.clone(a.bq),lt=a.uw,ot=ot?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(lt.x-tt.screenX)>ot||Math.abs(lt.y-tt.screenY)>ot)?a.yq++:a.yq=1,rt.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():al(rt,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var ot=a.oj;if(ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType){if(ot[1]!==null&&ot[1].pointerId===tt.pointerId){ot[1]=tt;return}if(ot[0]===null)ot[0]=tt;else return}else ot[0]=tt;if(ot[0].pointerId===tt.pointerId){ot=mg(a,tt,!1,!1,!1,ot[1]!==null);var rt=ie.document.elementFromPoint(tt.clientX,tt.clientY)||null;rt!==null&&rt.shadowRoot!==void 0&&rt.shadowRoot!==null&&(rt=rt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var lt=a,ut=tt;rt&&rt.H&&(ut=tt,lt=rt.H),ot.targetDiagram=lt,xd(a,ut,ot),ot.targetObject=null,a.doMouseMove(),al(ot,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var ot=tt.pointerType==="touch"||tt.pointerType==="pen",rt=a.Yt;if(ot&&a.qu)delete rt[tt.pointerId],tt.preventDefault();else if(rt=a.oj,rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType)rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null);else{rt[0]=null,rt=mg(a,tt,!1,!0,!0,!1);var lt=ie.document.elementFromPoint(tt.clientX,tt.clientY)||null;lt!==null&<.shadowRoot!==void 0&<.shadowRoot!==null&&(lt=lt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),lt!==null&<.H instanceof Ze&<.H!==a&&xd(lt.H,tt,rt),lt===null&&(lt=tt.target),xd(a,tt,rt),rt.clickCount=a.yq,rt.targetDiagram=pg(tt,lt),rt.targetObject=null,a.doMouseUp(),al(rt,tt),ot&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var ot=a.Yt;ot[tt.pointerId]&&delete ot[tt.pointerId],ot=a.oj,ot[0]!==null&&ot[0].pointerId===tt.pointerId&&(ot[0]=null),ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var ot=a.oj;ot[0]!==null&&ot[0].pointerId===tt.pointerId?(ot[0]=null,a.wq=!1):ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null)},a.Vp=b.Z["d"+pc[1]+pc[2]+"wI"+Ed.slice(1,5)]["b"+zx.slice(1,y)](b.Z,gc,y,y),b.Vc(!0),nv(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Ze.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Ze.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function nv(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(ie,"resize",a.Ov,!1)}function $s(a){30<a.Sq&&(a.Yh=1)}function ac(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Oe&&Oe.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Ze.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:ie.devicePixelRatio||1},Ze.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Ze.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Ze.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Ze.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Ze.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Ze.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Ze.prototype.doFocus=function(){this.focus()},Ze.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=ie.scrollX||ie.pageXOffset,y=ie.scrollY||ie.pageYOffset;this.ta.focus(),ie.scrollTo(a,y)}},Ze.prototype.Oy=function(){this.H.R("GainedFocus")},Ze.prototype.Ny=function(){this.H.R("LostFocus")};function cg(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===ys&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Xp(a){var y=new Yr;y.name="Background",a.Al(y),y=new Yr,y.name="",a.Al(y),y=new Yr,y.name="Foreground",a.Al(y),y=new Yr,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Yr,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Yr,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Yp(a){var y=new Dn(Dn.Grid);y.name="GRID";var x=new Xi;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Xi,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Xi,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Xi,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Xi,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Xi,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new vi,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 Jp(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Cd(this.H)}function Qp(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Cd(this.H)}Ze.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,z=this.rj,tt=b.x-z.left,ot=b.y-z.top,rt=b.width+z.left+z.right,lt=b.height+z.top+z.bottom,ut=b.right+z.right;z=b.bottom+z.bottom;var gt=E.x;b=E.y;var St=E.width,Ct=E.height,bt=E.right,Bt=E.bottom;E=this.scale;var Yt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Yt=Yt+a.scrollWidth-a.clientWidth;break;case"reverse":Yt=a.scrollWidth-Yt-a.clientWidth}var Gt=Yt;St<rt||Ct<lt?(Yt=zt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Gt&&(Yt.x=Gt/E+tt,this.ju=Gt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Yt.y=a.scrollTop/E+ot,this.lu=a.scrollTop),this.position=Yt,zt.free(Yt),this.Ee=this.qr=!1):(Yt=zt.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<gt&&(this.position=Yt.h(Gt+tt,this.position.y)),ut>bt&&(this.position=Yt.h(-(y.scrollWidth-this.Aa)+Gt-this.Aa/E+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(ot<b&&(this.position=Yt.h(this.position.x,a.scrollTop+ot)),z>Bt&&(this.position=Yt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+z))),zt.free(Yt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ut=b.right,bt=E.right,z=b.bottom,Bt=E.bottom,tt=b.x,gt=E.x,ot=b.y,b=E.y,St>=rt&&tt>=gt&&ut<=bt&&(x.style.width="1px"),Ct>=lt&&ot>=b&&z<=Bt&&(x.style.height="1px"))}},Ze.prototype.computeBounds=function(a){return a===void 0&&(a=new sn),ls(this),fg(this,a)};function fg(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,z=0;z<E;z++){var tt=b[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var ot=tt.length,rt=0;rt<ot;rt++){var lt=tt[rt];lt.isInDocumentBounds&<.isVisible()&&(lt=lt.actualBounds,lt.w()&&(x?(x=!1,y.assign(lt)):y.ed(lt)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Ze.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(fn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Hn||(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 Hn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new sn(NaN,NaN,0,0):x};function Xa(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=zt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=sn.allocAt(0,0,b.width,b.height);var E=zt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,sn.free(b),zt.free(E),zt.free(x)}x=a.yh,y&&a.Fg!==ys&&(x=a.Fg);var z=x!==ys?Sd(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/z;var tt=a.ya/z,ot=a.zk,rt=a.pq;y&&!ot.sb()&&(rt.sb()||rt.Xb())&&(ot=rt.Xb()?po:rt),gg(a,a.documentBounds,E,tt,ot,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,Te.B(z.x,x)&&Te.B(z.y,b)&&Te.B(z.width,E)&&Te.B(z.height,tt)||a.onViewportBoundsChanged(new sn(x,b,E,tt),z,y,!1)}}function Sd(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 z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),ot=z/E,rt=tt/b;return y===Ca?(y=Math.min(rt,ot),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Hh?(y=rt>ot?(tt-a.Db)/b:(z-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Ze.prototype.zoomToFit=function(){var a=this.sj;this.sj=Ju,this.scale=Sd(this,Ca),a!==Ju&&(Xa(this,!1),gg(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Mt=Ze.prototype,Mt.BA=function(a,y){y===void 0&&(y=Ca);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Ca||y===Hh)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 z=this.ya;E=y===Hh?z/b>E/x?(z-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(z/b,E/x)}this.scale=E,this.position=new zt(a.x,a.y)}},Mt.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new zt(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))},Mt.zz=function(a){if(a instanceof Me){this.eq=a;var y=zt.alloc();this.fq=this.op(a.ga(Dr,y)),zt.free(y)}else this.eq=null,this.fq=Ho};function gg(a,y,x,b,E,z){var tt=zt.allocAt(a.pa.x,a.pa.y),ot=tt.x,rt=tt.y;if(a.eq!==null){var lt=zt.alloc();lt=a.eq.ga(Dr,lt),ot=lt.x-a.fq.x/a.scale,rt=lt.y-a.fq.y/a.scale,E=hr,zt.free(lt)}(z||a.scrollMode===Ju)&&(E.sb()&&(x>y.width&&(ot=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(rt=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,z=x-y.width,x<y.width+E.left+E.right?(ot=Math.min(ot+x/2,y.right+Math.max(z,E.right)-x/2),ot=Math.max(ot,y.left-Math.max(z,E.left)+x/2),ot-=x/2):ot>y.left?ot=y.left:ot<y.right-x&&(ot=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(rt=Math.min(rt+b/2,y.bottom+Math.max(x,E.bottom)-b/2),rt=Math.max(rt,y.top-Math.max(x,E.top)+b/2),rt-=b/2):rt>y.top?rt=y.top:rt<y.bottom-b&&(rt=y.bottom-b)),tt.x=isFinite(ot)?ot:-a.yb.left,tt.y=isFinite(rt)?rt:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),Wp(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),Al(a),zt.free(tt)}Mt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Ul(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof vi)return a}else if(a=Ul(this,a,function(x){return x.part}),a instanceof vi)return a;return null},Mt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ls(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 Ul(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),ls(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}Mt.lz=function(a,y,x){return y===void 0&&(y=!0),lc(this,a,function(b){return b.part},y?function(b){return b instanceof vi&&b.canSelect()}:null,x)};function lc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof qe||E instanceof tn||(E=new tn),ls(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,b,E)}return E}Mt.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof qe||b instanceof tn||(b=new tn),ls(this);for(var E=this.Wa.iteratorBackwards;E.next();){var z=E.value;z.visible&&z.ji(a,y,x,b)}return b},Mt.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),qc(this,a,function(E){return E instanceof vi&&(!x||E.canSelect())},y,b)},Mt.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof qe||E instanceof tn||(E=new tn),ls(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,b,E)}return E},Mt.Nu=function(a,y,x,b,E,z){var tt=new tn;ls(this);for(var ot=this.Wa.iteratorBackwards;ot.next();){var rt=ot.value;rt.visible&&rt.Nu(a,y,x,b,tt,E,z)}return tt};function qc(a,y,x,b,E){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof qe||E instanceof tn||(E=new tn),ls(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,b,E)}return E}Mt.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),uc(this,a,y,function(z){return z instanceof vi&&(!b||z.canSelect())},x,E)},Mt.og=function(a,y,x,b,E,z){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof qe||E instanceof tn)&&(z=E),E=!0),z instanceof qe||z instanceof tn||(z=new tn),ls(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var ot=tt.value;ot.visible&&ot.og(a,y,x,b,E,z)}return z};function uc(a,y,x,b,E,z){var tt=null;for(tt===void 0&&(tt=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof qe||E instanceof tn)&&(z=E),E=!0),z instanceof qe||z instanceof tn||(z=new tn),ls(a),a=a.Wa.iteratorBackwards;a.next();){var ot=a.value;ot.visible&&!ot.isTemporary&&ot.og(y,x,tt,b,E,z)}return z}Ze.prototype.acceptEvent=function(a){return Da(this,a,a instanceof MouseEvent)};function Da(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?xd(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),ji&&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=pg(y,y.target),b.targetObject=null,b}function pg(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 mg(a,y,x,b,E,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,ji&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=b,tt.handled=!1,tt.bubbles=E,tt.isMultiTouch=z,tt}function al(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Ze.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Da(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(),al(x,a)},Ze.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Da(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(),al(x,a)},Ze.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Da(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),al(x,a)},Ze.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Da(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),al(x,a)},Ze.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new zt(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?Mi(new zt(y,a),this.Ab):new zt(y,a)};function xd(a,y,x){var b=a.ta,E=a.Aa,z=a.ya,tt=0,ot=0;b!==null&&(b=b.getBoundingClientRect(),tt=y.clientX-E/b.width*b.left,ot=y.clientY-z/b.height*b.top),x.viewPoint.h(tt,ot),a.Ab!==null?(y=zt.allocAt(tt,ot),a.Ab.Cd(y),x.documentPoint.assign(y),zt.free(y)):x.documentPoint.h(tt,ot)}function vg(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))}}Ze.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qp(a){a.ld||ls(a),a.Va()}Ze.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Mt=Ze.prototype,Mt.Pz=function(){return this.kg},Mt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ba(this),this.hf=!1,this.du=new zt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Nn(function(){b.ld=!1,_l(y,"Model"),a(b)},1)},Mt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;ie.requestAnimationFrame(function(){y.kg&&y.bd()})}},Mt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ba(this))};function Ah(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Cd(a)||(y&&ls(a),x&&Xa(a,!1))}function Ba(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,z=E.length,tt=0;tt<z;tt++){var ot=E[tt];Ar(ot,!1),ot.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(rt){rt.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||cg(a),Ah(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Bl(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),ls(a),z=!1,(!a.hf||a.xh)&&(a.hf?Eg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Eg(a,!1)),z=!0),a.Jk=!1,ls(a),a.ou||qp(a),Ah(a,!0,!1),tt=!1,z?(x=sn.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,yg(a)),a.R("LayoutCompleted"),Ah(a,!0,!1),sn.free(x)):x.Ok&&x.Qw&&(a.Fg!==ys?a.scale=Sd(a,a.Fg):a.yh!==ys?a.scale=Sd(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Xa(a,!0)),z&&tt&&a.eb("Initial Layout"),ls(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function yg(a){if(a.Fg!==ys)a.scale=Sd(a,a.Fg);else if(a.yh!==ys)a.scale=Sd(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Xa(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Bl(a)}function ls(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 tn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Ki&&b.U&65536&&(b.U=b.U^65536)})}}Mt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Ki||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Ki&&x.isVisible()&&hc(this,x);for(a.reset();a.next();)x=a.value,x instanceof Hn&&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 So&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function hc(a,y){for(var x=rn(),b=rn(),E=y.memberParts;E.next();){var z=E.value;z.isVisible()&&(z instanceof Ki?(La(z)||Fs(z)||Wh(z))&&hc(a,z):z instanceof Hn?z.fromNode===y||z.toNode===y?b.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,E=0;E<a;E++)z=x[E],z.measure(1/0,1/0),z.arrange();for(bn(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();bn(b)}Mt.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},Mt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&le("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){wd(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,z=Math.round(y.x*E)/E,tt=Math.round(y.y*E)/E,ot=this.Ab;for(ot.reset(),E!==1&&ot.scale(E),y.x===0&&y.y===0||ot.translate(-z,-tt),a.ti=null,Jy(a,ot.m11,ot.m12,ot.m21,ot.m22,ot.dx,ot.dy),this.pb!==1&&(a.globalAlpha=this.pb),Xu(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?kd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(eo.prototype.Cd=eo.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,wd(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&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,ot=this.pa;var rt=this.Ca,lt=Math.round(ot.x*rt)/rt,ut=Math.round(ot.y*rt)/rt;for(rt!==1&&z.scale(rt),ot.x===0&&ot.y===0||z.translate(-lt,-ut),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Xu(this,a),ot=0;ot<E;ot++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[ot].gc(a,this);if(y=!1,this.Yf?kd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(eo.prototype.Cd=eo.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Oe&&Oe.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 tf(a,y,x,b,E,z,tt,ot,rt,lt){if(a.Ka!==null){a.ta===null&&le("No canvas specified"),tt===void 0&&(tt=null),ot===void 0&&(ot=null),rt===void 0&&(rt=!1),lt===void 0&&(lt=!1),wd(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ut=a.Ca;a.Ca=E;var gt=a.Wa.s,St=gt.length;try{var Ct=new sn(z.x,z.y,b.width/E,b.height/E),bt=Ct.copy();bt.Co(x),Bl(a,bt),ls(a),a.Fd(gt,St,a,Ct),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),ot!==null&&ot!==""&&(y.fillStyle=ot,y.ox(0,0,b.width,b.height));var Bt=a.Mb;y.scale(Bt,Bt);var Yt=eo.alloc();Yt.reset(),Yt.translate(x.left,x.top),Yt.scale(E),z.x===0&&z.y===0||Yt.translate(-z.x,-z.y),y.setTransform(Yt.m11,Yt.m12,Yt.m21,Yt.m22,Yt.dx,Yt.dy),y.yc(),y instanceof ca&&Jy(y,Yt.m11,Yt.m12,Yt.m21,Yt.m22,Yt.dx,Yt.dy),eo.free(Yt),Xu(a,y),y.globalAlpha=a.pb;var Gt=a.Qj("Grid");if(tt){var se=new tn,ae=tt.iterator;for(ae.reset();ae.next();){var he=ae.value;he instanceof vi&&(lt||he.layer!==Gt)&&(he.Gj(),se.add(he))}for(lt=0;lt<St;lt++)Zp(gt[lt],y,a,se,rt);se.each(function($e){return $e.Gj()})}else for(se=0;se<St;se++){var be=gt[se];be===Gt?lt&&be.gc(y,a,!0):be.gc(y,a,rt)}a.$i=!1,a.Yf&&kd(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(gt,St,a,a.viewportBounds),Bl(a),a.ib instanceof ca&&(a.ib.Nj.PA(),a.redraw())}}}Mt.Gf=function(a){return this.Rg[a]},Mt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Mt.Tx=function(){this.Rg=new Ge,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(ji||Li),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Xu(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Mt.Ql=function(a){return this.on[a]},Mt.sA=function(a,y){this.on[a]=y},Mt.Sx=function(){this.on=new Ge,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Mt.set=function(a){return Object.assign(this,a),this},Mt.Du=function(a){return this.nm(a)},Mt.nm=function(a){return Pd(this,a),this};function Pd(a,y){var x=a instanceof Dn,b=a instanceof Ze,E;for(E in y){E===""&&le("Setting properties requires non-empty property names");var z=a,tt=E;if(x||b){var ot=E.indexOf(".");if(0<ot){var rt=E.substring(0,ot);x?z=a.fb(rt):(z=a[rt],z==null&&(z=a.toolManager[rt])),Re(z)?tt=E.substr(ot+1):le("Unable to find object named: "+rt+" in "+a.toString()+" when trying to set property: "+E)}}if(tt[0]!=="_"&&!zn(z,tt))if(b&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(b&&tt==="Changed"){a.Pe(y[tt]);continue}else if(b&&zn(a.toolManager,tt))z=a.toolManager;else if(b&&nm(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof ci&&tt==="Changed"){a.Pe(y[tt]);continue}else le('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[E],tt[0]==="_"&&z instanceof Me&&z.Vw(tt)}}Mt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Yn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Mt.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")},Ze.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!==fc&&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),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*b&&0<Math.max(0,z-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=sn.alloc(),Mg(this,this.computeBounds(b)),sn.free(b)),b=this.ta,b===null||b instanceof Il)))){var tt=this.Mb;E=this.Aa*tt;var ot=this.ya*tt,rt=this.scale*tt;z=Math.round(Math.round(y.x*rt)-Math.round(a.x*rt)),y=Math.round(Math.round(y.y*rt)-Math.round(a.y*rt)),rt=this.jw,a=this.oy,rt.width!==E&&(rt.width=E),rt.height!==ot&&(rt.height=ot),a.clearRect(0,0,E,ot),rt=190*tt;var lt=70*tt,ut=Math.max(z,0),gt=Math.max(y,0),St=Math.floor(E-ut),Ct=Math.floor(ot-gt);a.drawImage(b.Oa,ut,gt,St,Ct,0,0,St,Ct),kd(this.Yf,this)&&a.clearRect(0,0,rt,lt),b=rn(),a=rn(),Ct=Math.abs(z),St=Math.abs(y);var bt=ut===0?0:E-Ct;ut=zt.allocAt(bt,0),Ct=zt.allocAt(Ct+bt,ot),a.push(new sn(Math.min(ut.x,Ct.x),Math.min(ut.y,Ct.y),Math.abs(ut.x-Ct.x),Math.abs(ut.y-Ct.y)));var Bt=this.Ab;if(Bt.reset(),Bt.scale(tt,tt),this.Ca!==1&&Bt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Bt.translate(-tt.x,-tt.y),Mi(ut,Bt),Mi(Ct,Bt),b.push(new sn(Math.min(ut.x,Ct.x),Math.min(ut.y,Ct.y),Math.abs(ut.x-Ct.x),Math.abs(ut.y-Ct.y))),bt=gt===0?0:ot-St,ut.h(0,bt),Ct.h(E,St+bt),a.push(new sn(Math.min(ut.x,Ct.x),Math.min(ut.y,Ct.y),Math.abs(ut.x-Ct.x),Math.abs(ut.y-Ct.y))),Mi(ut,Bt),Mi(Ct,Bt),b.push(new sn(Math.min(ut.x,Ct.x),Math.min(ut.y,Ct.y),Math.abs(ut.x-Ct.x),Math.abs(ut.y-Ct.y))),kd(this.Yf,this)&&(E=0<z?0:-z,ot=0<y?0:-y,ut.h(E,ot),Ct.h(rt+E,lt+ot),a.push(new sn(Math.min(ut.x,Ct.x),Math.min(ut.y,Ct.y),Math.abs(ut.x-Ct.x),Math.abs(ut.y-Ct.y))),Mi(ut,Bt),Mi(Ct,Bt),b.push(new sn(Math.min(ut.x,Ct.x),Math.min(ut.y,Ct.y),Math.abs(ut.x-Ct.x),Math.abs(ut.y-Ct.y)))),zt.free(ut),zt.free(Ct),Ah(this,!1,!0),this.Ka===null&&le("No div specified"),this.ta===null&&le("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(wd(this),ot=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*ot,this.ya*ot),E.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,rt=Math.round(z.x*tt)/tt,lt=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-rt,-lt),E.save(),E.beginPath(),z=a.length,tt=0;tt<z;tt++)rt=a[tt],rt.width!==0&&rt.height!==0&&E.rect(Math.floor(rt.x),Math.floor(rt.y),Math.ceil(rt.width),Math.ceil(rt.height));for(E.clip(),E.setTransform(ot,0,0,ot,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),Xu(this,E),E.globalAlpha=this.pb,ot=0;ot<z;ot++)if(tt=y[ot],rt=b,tt.visible&&tt.pb!==0){lt=Su(tt,E),gt=tt.Zq,gt.length=0,ut=this.scale,St=sn.alloc(),Ct=tt.Pa.s,Bt=Ct.length,bt=rt.length;for(var Yt=0;Yt<Bt;Yt++){var Gt=Ct[Yt],se=Ad(Gt,Gt.actualBounds);t:{for(var ae=2/ut,he=4/ut,be=0;be<bt;be++){var $e=rt[be];if($e.width!==0&&$e.height!==0&&se.Vu($e.x-ae,$e.y-ae,$e.width+he,$e.height+he)){se=!0;break t}}se=!1}se&&tt.Oj(E,Gt,this,gt,ut,St,!0)}sn.free(St),E.globalAlpha=lt}E.restore(),E.Vc(!0),this.Yf&&kd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}bn(b),bn(a),this.ld=!1}}else this.bd();x&&($s(this),this.bd(),ac(this,!0))}else x?($s(this),this.bd(),ac(this,!0)):this.bd()}};function wd(a){a.pn!==!1&&(a.pn=!1,Sg(a,a.Aa,a.ya))}function Sg(a,y,x){Al(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Cd(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,z=!1,tt=a.gf?a.Db:0,ot=a.Be?a.Db:0,rt=E.clientWidth||x+tt,lt=E.clientHeight||b+ot,ut=a.viewportBounds;E=ut.x;var gt=ut.y,St=ut.width,Ct=ut.height;if((rt!==x+tt||lt!==b+ot)&&(a.gf=!1,a.Be=!1,ot=tt=0,a.Aa=rt,a.ya=lt,z=a.pn=!0,Al(a)),!a.hf||!a.viewportBounds.w())return!0;var bt=a.ku,Bt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Yt=a.documentBounds,Gt=0,se=0,ae=0,he=0,be=ut.width,$e=ut.height,Un=a.rj;a.contentAlignment.sb()?(Yt.width>be&&(Gt=Un.left,se=Un.right),Yt.height>$e&&(ae=Un.top,he=Un.bottom)):(Gt=Un.left,se=Un.right,ae=Un.top,he=Un.bottom);var oi=Yt.width+Gt+se,ti=Yt.height+ae+he;Un=a.scale;var jn=oi>rt/Un,wn=ti>lt/Un;if(!(z||a.gf||a.Be||jn||wn))return!0;Gt=Yt.x-Gt,rt=ut.x,se=Yt.right+se,lt=ut.right+tt,ae=Yt.y-ae;var Gi=ut.y;Yt=Yt.bottom+he,ut=ut.bottom+ot;var Oi="1px";if(he="1px",a.scrollMode===Ju&&(jn||wn)&&(jn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(jn=1,Gt+1<rt&&(jn=Math.max((rt-Gt)*Un+a.Aa,jn)),se>lt+1&&(jn=Math.max((se-lt)*Un+a.Aa,jn)),be+tt+1<oi&&(jn=Math.max((oi-be)*Un+a.Aa,jn)),Oi=jn.toString()+"px"),wn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(jn=1,ae+1<Gi&&(jn=Math.max((Gi-ae)*Un+a.ya,jn)),Yt>ut+1&&(jn=Math.max((Yt-ut)*Un+a.ya,jn)),$e+ot+1<ti&&(jn=Math.max((ti-$e)*Un+a.ya,jn)),he=jn.toString()+"px")),jn=Oi!=="1px",wn=he!=="1px",jn&&wn||!jn&&!wn||(wn&&(lt-=a.Db),jn&&(ut-=a.Db),oi<be+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Gt+1<rt&&(tt=Math.max((rt-Gt)*Un+a.Aa,tt)),se>lt+1&&(tt=Math.max((se-lt)*Un+a.Aa,tt)),be+1<oi&&(tt=Math.max((oi-be)*Un+a.Aa,tt)),Oi=tt.toString()+"px"),jn=Oi!=="1px",tt=a.ya,jn!==a.Be&&(tt=jn?a.ya-a.Db:a.ya+a.Db),ti<$e+ot||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ot=1,ae+1<Gi&&(ot=Math.max((Gi-ae)*Un+tt,ot)),Yt>ut+1&&(ot=Math.max((Yt-ut)*Un+tt,ot)),$e+1<ti&&(ot=Math.max((ti-$e)*Un+tt,ot)),he=ot.toString()+"px"),wn=he!=="1px"),a.qr&&jn===a.Be&&wn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(jn!==a.Be&&(Oi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=jn,Bt.style.width=Oi,wn!==a.gf&&(he==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(ot=zt.alloc(),wn?(y.style.left=a.Db+"px",a.position=ot.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=ot.h(a.pa.x-a.Db/a.scale,a.pa.y)),zt.free(ot))),z&&Al(a),a.gf=wn,Bt.style.height=he,a.gu=!0,z&&(a.pn=!0),y=bt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(be+1<oi?y=(a.position.x-Gt)*Un:Gt+1<rt?y=bt.scrollWidth-bt.clientWidth:se>lt+1&&(y=a.position.x*Un)),a.tn)switch(a.bu){case"negative":y=-(bt.scrollWidth-y-bt.clientWidth);break;case"reverse":y=bt.scrollWidth-y-bt.clientWidth}return bt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&($e+1<ti?bt.scrollTop=(a.position.y-ae)*Un:ae+1<Gi?bt.scrollTop=bt.scrollHeight-bt.clientHeight:Yt>ut+1&&(bt.scrollTop=a.position.y*Un)),rt=a.Aa,lt=a.ya,bt.style.width=rt+(a.gf?a.Db:0)+"px",bt.style.height=lt+(a.Be?a.Db:0)+"px",x!==rt||b!==lt||a.animationManager.zb?(x=sn.allocAt(E,gt,St,Ct),a.onViewportBoundsChanged(x,a.viewportBounds,Un,z),sn.free(x),!1):!0}Mt=Ze.prototype,Mt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&le("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&le('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(br,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Mt.oi=function(a){this.partManager.oi(a);var y=this;Od(a,function(x){bd(y,x)}),(a instanceof So||a instanceof Ki&&a.placeholder!==null)&&a.v(),a.data!==null&&Od(a,function(x){uy(y.partManager,x)}),Fs(a)!==!0&&Wh(a)!==!0||this.De.add(a),H1(a,!0,this),W1(a)?(a.actualBounds.w()&&this.N(Ad(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Ad(a,a.actualBounds)),this.$b()},Mt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Od(a,function(x){hy(y.partManager,x,y)}),this.De.remove(a),W1(a)?(a.actualBounds.w()&&this.N(Ad(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Ad(a,a.actualBounds)),this.$b()},Mt.remove=function(a){xg(this,a,!0)};function xg(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(zr,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}Mt.Is=function(a,y){if(y===void 0&&(y=!1),fn(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 tn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Mt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Ze.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=ef(this)),this.toolManager!==null){var E=new Yn;if(a!==null)if(fn(a))for(var z=0;z<a.length;z++)Xl(this,E,a[z],x,b);else for(a=a.iterator;a.next();)Xl(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Xl(this,E,a.value,x,b);for(a=this.nodes;a.next();)Xl(this,E,a.value,x,b);for(a=this.links;a.next();)Xl(this,E,a.value,x,b)}Ih(this,E,y,b,x)}};function Xl(a,y,x,b,E,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!b||z||x.canMove()||x.canCopy()))if(E===void 0&&(E=ef(a)),x instanceof Xn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Ki&&(x.placeholder!==null||E.dragsMembers))for(z=x.memberParts;z.next();)Xl(a,y,z.value,b,E,E.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var ot=tt.fromNode,rt=tt.toNode;ot!==null&&y.contains(ot)&&rt!==null&&y.contains(rt)&&Xl(a,y,tt,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Xl(a,y,x.value,b,E)}else if(x instanceof Hn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Xl(a,y,x.value,b,E);else x instanceof So||y.add(x,a.Pd(E,x,x.location))}function Ih(a,y,x,b,E){if(y!==null&&y.count!==0){var z=zt.alloc(),tt=zt.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||of(a,y);for(var ot=rn(),rt=rn(),lt=y.iterator,ut=zt.alloc();lt.next();){var gt=lt.key,St=lt.value;if(gt.Zc()){var Ct=Pg(a,gt,y);Ct!==null?ot.push(new it(gt,St,Ct)):(!E||gt.canMove())&&(Ct=St.point,z.assign(Ct),a.computeMove(gt,z.add(tt),b,ut),gt.location=ut,St.shifted===void 0&&(St.shifted=new zt),St.shifted.assign(ut.re(Ct)))}else lt.key instanceof Hn&&rt.push(lt.sa)}for(zt.free(ut),E=ot.length,lt=0;lt<E;lt++)gt=ot[lt],z.assign(gt.info.point),gt.Su.shifted===void 0&&(gt.Su.shifted=new zt),gt.node.location=z.add(gt.Su.shifted);for(E=zt.alloc(),lt=zt.alloc(),gt=rt.length,St=0;St<gt;St++){var bt=rt[St];if(Ct=bt.key,Ct instanceof Hn)if(Ct.suspendsRouting){Ct.Tg=null,ut=Ct.fromNode;var Bt=Ct.toNode;if(a.draggedLink!==null&&b.dragsLink)if(Bt=bt.value.point,Ct.dragComputation===null)y.add(Ct,a.Pd(b,Ct,tt)),rh(Ct,tt.x-Bt.x,tt.y-Bt.y);else{bt=zt.allocAt(0,0),(ut=Ct.i(0))&&ut.w()&&bt.assign(ut);var Yt=ut=zt.alloc().assign(bt).add(tt);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Yt=zt.alloc(),nf(a,Ct,ut,Yt,b)),ut.assign(Ct.dragComputation(Ct,ut,Yt)).re(bt),y.add(Ct,a.Pd(b,Ct,ut)),rh(Ct,ut.x-Bt.x,ut.y-Bt.y),zt.free(bt),zt.free(ut),Yt!==ut&&zt.free(Yt)}else ut!==null&&(E.assign(ut.location),Yt=y.I(ut),Yt!==null&&E.re(Yt.point)),Bt!==null&&(lt.assign(Bt.location),Yt=y.I(Bt),Yt!==null&<.re(Yt.point)),ut!==null&&Bt!==null?E.Xa(lt)?(ut=bt.value.point,Bt=z,Bt.assign(E),Bt.re(ut),y.add(Ct,a.Pd(b,Ct,E)),rh(Ct,Bt.x,Bt.y)):(Ct.suspendsRouting=!1,Ct.bb()):(bt=bt.value.point,ut=ut!==null?E:Bt!==null?lt:tt,y.add(Ct,a.Pd(b,Ct,ut)),rh(Ct,ut.x-bt.x,ut.y-bt.y))}else(Ct.fromNode===null||Ct.toNode===null)&&(ut=bt.value.point,y.add(Ct,a.Pd(b,Ct,tt)),rh(Ct,tt.x-ut.x,tt.y-ut.y))}zt.free(z),zt.free(tt),zt.free(E),zt.free(lt),bn(ot),bn(rt),x||(ls(a),Rh(a,y))}}Ze.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new zt),b.assign(y),a===null)return b;var E=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=zt.alloc(),nf(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var tt=a.minLocation,ot=tt.x;isNaN(ot)&&(ot=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var rt=a.maxLocation,lt=rt.x;return isNaN(lt)&&(lt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),rt=rt.y,isNaN(rt)&&(rt=z?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(ot,Math.min(x.x,lt)),Math.max(tt,Math.min(x.y,rt))),E!==y&&zt.free(E),b};function ef(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function nf(a,y,x,b,E){if(E===void 0&&(E=ef(a)),b.assign(x),y!==null){var z=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var tt=E.gridSnapOrigin,ot=tt.x;if(tt=tt.y,E=E.gridSnapCellSpot,z!==null){var rt=z.gridCellSize;isNaN(a)&&(a=rt.width),isNaN(y)&&(y=rt.height),z=z.gridOrigin,isNaN(ot)&&(ot=z.x),isNaN(tt)&&(tt=z.y)}z=zt.allocAt(0,0),z.yi(0,0,a,y,E),Te.No(x.x,x.y,ot+z.x,tt+z.y,a,y,b),zt.free(z)}}function of(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Hn&&(y.suspendsRouting=!0)}function Rh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Hn&&(x.suspendsRouting=!1,Xv(x)&&x.bb())}a.Mr=!1}}function Pg(a,y,x){return y=y.containingGroup,y!==null&&(a=Pg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Mt=Ze.prototype,Mt.Pd=function(a,y,x){if(x===void 0)return new xu(Ai);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new xu(new zt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new xu(x.copy())};function wg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&le("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&le("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&le("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&le("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&le("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Mt.Al=function(a){wg(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(br,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Mt.Ww=function(a,y){wg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(zr,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;z<E;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(br,"layers",this,null,a,null,z),this.N(),0>b&&this.Ya(),this},Mt.Cy=function(a,y){wg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(zr,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;z<E;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(br,"layers",this,null,a,null,z+1),this.N(),0>b&&this.Ya(),this},Mt.kA=function(a){if(a.diagram!==this&&le("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(zr,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Mt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Mt.Yw=function(a){return this.pf===null&&(this.pf=new qe),this.pf.add(a),this.model.Pe(a),this},Mt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Mt.Pe=function(a){return this.zg===null&&(this.zg=new qe),this.zg.add(a),this},Mt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Mt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ha&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},Mt.cb=function(a,y,x,b,E,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var ot=new ir;ot.diagram=this,ot.change=a,ot.propertyName=y,ot.object=x,ot.oldValue=b,ot.oldParam=z,ot.newValue=E,ot.newParam=tt,this.ds(ot)},Mt.g=function(a,y,x,b,E){this.cb(tr,a,this,y,x,b,E)},Ze.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===tr){var E=a.object;if(Yo(E,a.propertyName,a.I(y)),E instanceof Me){var z=E.part;z!==null&&z.Wb()}this.isModified=!0}else if(b===br){var tt=a.object,ot=a.newParam,rt=a.newValue;if(tt instanceof Dn)if(typeof ot=="number"&&rt instanceof Me){y?tt.pc(ot):tt.Gb(ot,rt);var lt=tt.part;lt!==null&<.Wb()}else typeof ot=="number"&&rt instanceof Ir&&(rt.isRow?f1(tt,ot,y?void 0:rt):g1(tt,ot,y?void 0:rt));else if(tt instanceof Yr){var ut=a.oldParam===!0;typeof ot=="number"&&rt instanceof vi&&(y?(rt.isSelected=!1,rt.isHighlighted=!1,rt.Wb(),tt.pc(ut?ot:-1,rt,ut)):tt.oi(ot,rt,ut))}else tt instanceof Ze?typeof ot=="number"&&rt instanceof Yr&&(y?this.Wa.mb(ot):(rt.Xe(this),this.Wa.Gb(ot,rt))):le("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===zr){var gt=a.object,St=a.oldParam,Ct=a.oldValue;if(gt instanceof Dn)typeof St=="number"&&Ct instanceof Me?y?gt.Gb(St,Ct):gt.pc(St):typeof St=="number"&&Ct instanceof Ir&&(Ct.isRow?f1(gt,St,y?Ct:void 0):g1(gt,St,y?Ct:void 0));else if(gt instanceof Yr){var bt=a.newParam===!0;typeof St=="number"&&Ct instanceof vi&&(y?0>gt.Pa.indexOf(Ct)&>.oi(St,Ct,bt):(Ct.isSelected=!1,Ct.isHighlighted=!1,Ct.Wb(),gt.pc(bt?St:-1,Ct,bt)))}else gt instanceof Ze?typeof St=="number"&&Ct instanceof Yr&&(y?(Ct.Xe(this),this.Wa.Gb(St,Ct)):this.Wa.mb(St)):le("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==ha&&le("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Ze.prototype.Ea=function(a){return this.undoManager.Ea(a)},Ze.prototype.eb=function(a){return this.undoManager.eb(a)},Ze.prototype.Kf=function(){return this.undoManager.Kf()},Ze.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}},Ze.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Ze.prototype.rp=function(){this.partManager.rp()};function Cg(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Al(a),a.N(),a.Ee=!0,b.zb&&(vu(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Al(a);else{a.vb=!0;var E=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,ot=a.zoomPoint.x,rt=a.zoomPoint.y,lt=a.contentAlignment;isNaN(ot)&&(lt.$c()?lt.Hf(vl)?ot=0:lt.Hf(Ks)&&(ot=z-1):ot=lt.sb()?lt.x*(z-1):z/2),isNaN(rt)&&(lt.$c()?lt.Hf(Tl)?rt=0:lt.Hf(aa)&&(rt=tt-1):rt=lt.sb()?lt.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=zt.allocAt(a.pa.x+ot/y-ot/x,a.pa.y+rt/y-rt/x),a.position=z,zt.free(z),a.Ca=x,Al(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Xa(a,!1),b.zb&&(vu(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Ze.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!==ys||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof qo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Ip(E,this)),this.vb||this.invalidateViewport(a,y),Bl(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(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Bl(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Wn.alloc(),E=1,z=1,tt=x.O.s,ot=tt.length,rt=0;rt<ot;rt++){var lt=tt[rt],ut=Math.abs(lt.interval);2>ut||(vv(lt.figure)?z=z*ut/Te.vx(z,ut):E=E*ut/Te.vx(E,ut))}if(tt=x.gridCellSize,b.h(z*tt.width,E*tt.height),y!==void 0)E=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=sn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){sn.free(y);return}E=y.width,z=y.height,a=y.x,tt=y.y,sn.free(y)}x.width=E+2*b.width,x.height=z+2*b.height,y=zt.alloc(),Te.No(a,tt,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Wn.free(b),x.part.location=y,zt.free(y)}}Ze.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)}},Ze.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))},Ze.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),fn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof vi||le("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 vi||le("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Ze.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()}},Mt=Ze.prototype,Mt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Mt.Jz=function(a){a=new tn().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 vi||le("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Mt.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,z=zt.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=z.h(x.x,E.y):y==="left"?this.position=z.h(E.x,x.y):y==="down"?this.position=z.h(x.x,E.bottom-x.height):y==="right"&&(this.position=z.h(E.right-x.width,x.y)),zt.free(z);return}le("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-E):y==="down"?this.position=z.h(x.x,x.y+E):y==="left"?this.position=z.h(x.x-E,x.y):y==="right"?this.position=z.h(x.x+E,x.y):le("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),zt.free(z)},Mt.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)},Mt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Mt.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)},Mt.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,z=b+a.height,tt=y.m11,ot=y.m12,rt=y.m21,lt=y.m22,ut=y.dx,gt=y.dy,St=x*tt+b*rt+ut;y=x*ot+b*lt+gt;var Ct=E*tt+b*rt+ut;return a=E*ot+b*lt+gt,b=x*tt+z*rt+ut,x=x*ot+z*lt+gt,tt=E*tt+z*rt+ut,E=E*ot+z*lt+gt,z=Math.min(St,Ct),St=Math.max(St,Ct),Ct=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,b),St=Math.max(St,b),Ct=Math.min(Ct,x),y=Math.max(y,x),z=Math.min(z,tt),St=Math.max(St,tt),Ct=Math.min(Ct,E),y=Math.max(y,E),new sn(z,Ct,St-z,y-Ct)},Mt.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),Mi(a.copy(),this.Ab)};function tm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function bg(a){return a=hf.get(a),a!==null?new a:new Oo}Ze.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===ha&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(rt){return rt.diagram=E}),a.mouseMoveTools.each(function(rt){return rt.diagram=E}),a.mouseUpTools.each(function(rt){return rt.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===ha){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ls(this));var z=this.animationManager;b==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Uc(z),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 tt=a.isTransactionFinished;if(tt&&(tm(this),this.As.clear(),Gp(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var ot=this;Nn(function(){ot.currentTool.standardMouseOver(),ot.Rt=!1},10)}}}finally{this.aa=!0}}}};function bd(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)jh(a,y[b])}function jh(a,y){if(y instanceof Us){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof tn&&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 Lg(a,y){if(y instanceof Us){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 z=0;z<E.length;z++)if(E[z]===y){E.splice(z,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 tn&&x.Bg.remove(a),Cf(b));break}}}}}Ze.prototype.Wd=function(){this.partManager.Wd()},Ze.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Ze.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Ze.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Ze.prototype.Vb=function(a){return this.partManager.Vb(a)},Ze.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Mt=Ze.prototype,Mt.Lc=function(a){return this.partManager.Lc(a)},Mt.ii=function(a){return this.partManager.ii(a)},Mt.Kc=function(a){return this.partManager.Kc(a)},Mt.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:Wi(Ii(y)))},Mt.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:Wi(Ii(y)))};function Al(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 Mg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Xa(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Mt.Va=function(){if(this.Zi){var a=sn.alloc();Mg(this,this.computeBounds(a)),sn.free(a)}},Mt.rz=function(){for(var a=new tn,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},Mt.qz=function(){return this.ai.iterator},Mt.Uz=function(a){ls(this),a&&rf(this,!0),this.ld?Eg(this,!1):(this.Jk=!0,Ba(this))};function rf(a,y){for(var x=a.ai.iterator;x.next();)em(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function em(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)em(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Eg(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,z=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||_l(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)kg(a,tt.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),ls(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||Uc(z),a.aa=x}}}function kg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)kg(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),hc(a,y),E.isValidLayout=!0):a.xh=!0)}}Mt.yz=function(){for(var a=new qe,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function iv(a){function y(E){var z=E.toLowerCase(),tt=new qe;x.add(E,tt),x.add(z,tt),b.add(E,E),b.add(z,E)}var x=new Yn,b=new Yn;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 sf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;le("Unknown DiagramEvent name: "+y)}Mt.Bj=function(a,y){return a=sf(this,a),a!==null&&a.add(y),this},Mt.am=function(a,y){a=sf(this,a),a!==null&&a.remove(y)},Mt.R=function(a,y,x){var b=sf(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 af(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Mt.Yj=function(a,y){return lf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Ze.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?fg(this,a):a.assign(this.documentBounds)};function lf(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new ip(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=im(a,x)),x===null){y=sn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,ot=tt.layer;ot!==null&&ot.visible&&!ot.isTemporary&&uf(a,tt,b,y)}sn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=sn.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof Xn&&uf(a,tt,b,y);sn.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&aS(E);return E}function im(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?im(a,y.containingGroup):null}function uf(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,z=y.y;if(Nf(a,E,z))for(x=(z-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(z=a.ac[E],z.fill)z.fill(ah,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=ah}else if(y instanceof Ki)for(y=y.memberParts;y.next();)E=y.value,E instanceof Xn&&uf(a,E,x,b)}}function Yu(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Ze.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Ng(this)};function Ng(a){a.vk===-1&&(a.vk=Nn(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=sn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Mg(a,y),sn.free(y),a.Fc=!0,a.bd(),Ng(a))}},a.vp))}Ze.prototype.ug=function(){this.vk!==-1&&(ie.clearTimeout(this.vk),this.vk=-1)},Ze.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=sn.allocAt(0,0,b.width*E,b.height*E);var z=zt.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<b.x+x.left/2&&(z.x-=tt),a.x<b.x+x.left/4&&(z.x-=4*tt)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>b.x+b.width-x.right/2&&(z.x+=tt),a.x>b.x+b.width-x.right/4&&(z.x+=4*tt));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<b.y+x.top/2&&(z.y-=tt),a.y<b.y+x.top/4&&(z.y-=4*tt)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>b.y+b.height-x.bottom/2&&(z.y+=tt),a.y>b.y+b.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(Ai)||(y=new zt(y.x+z.x/E,y.y+z.y/E)),sn.free(b),zt.free(z),y},Mt=Ze.prototype,Mt.Cs=function(){return null},Mt.av=function(){return null},Mt.bs=function(a,y){this.pj.add(a,y)},Mt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Ki&&(y.$p=null)})};function dc(a,y,x){function b(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-lt>rt?y(x,E,ot):ie.requestAnimationFrame(b)}for(var E=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof E!="function"||z)return y(x,E,a);var ot=a,rt=x.callbackTimeout||300,lt=+new Date;return ie.requestAnimationFrame(function(){b()}),null}Mt.Wz=function(a){return dr?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Mt.Jx=function(a){return a===void 0&&(a={}),dc(this,this.Xz,a)},Mt.Xz=function(a,y,x){var b=om(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 Ed+"data":E=b.getImageData(0,0,x.width,x.height);break;case Ed:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&le('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function om(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&le("properties argument must be an Object.");var E=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new Wn(1/0,1/0):new Wn(2e3,2e3));var ot=y.position||null,rt=y.parts||null,lt=y.padding===void 0?1:y.padding,ut=y.background||null,gt=y.omitTemporary;gt===void 0&&(gt=!0);var St=y.document||document,Ct=y.elementFinished||null,bt=y.showTemporary;bt===void 0&&(bt=!gt),y=y.showGrid,y===void 0&&(y=bt),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof lt=="number"?lt=new mi(lt):lt instanceof mi||le("MakeImage padding must be a Margin or a number."),lt.left=Math.max(lt.left,0),lt.right=Math.max(lt.right,0),lt.top=Math.max(lt.top,0),lt.bottom=Math.max(lt.bottom,0),a.ib.Vc(!0),gt=new Ja(null,St,void 0,!0);var Bt=gt.context;if(!(E||z||rt||ot))return gt.width=a.Aa+Math.ceil(lt.left+lt.right),gt.height=a.ya+Math.ceil(lt.top+lt.bottom),x==="SVG"?b===null?null:(b.resize(gt.width,gt.height,gt.width,gt.height),b.ownerDocument=St,b.hs=Ct,tf(a,b.context,lt,new Wn(gt.width,gt.height),a.Ca,a.pa,rt,ut,bt,y),b.context):(a.Xm=!1,tf(a,Bt,lt,new Wn(gt.width,gt.height),a.Ca,a.pa,rt,ut,bt,y),a.Xm=!0,gt.context);var Yt=a.Pp,Gt=a.documentBounds.copy();if(Gt.Fv(a.yb),bt)for(var se=a.Wa.s,ae=se.length,he=0;he<ae;he++){var be=se[he];if(be.visible&&be.isTemporary){be=be.Pa.s;for(var $e=be.length,Un=0;Un<$e;Un++){var oi=be[Un];oi.isInDocumentBounds&&oi.isVisible()&&(oi=oi.actualBounds,oi.w()&&Gt.ed(oi))}}}if(se=new zt(Gt.x,Gt.y),rt!==null){for(ae=new sn(0,0,0,0),he=!0,be=rt.iterator,be.reset();be.next();)$e=be.value,$e instanceof vi&&(Un=$e.layer,Un!==null&&!Un.visible||Un!==null&&!bt&&Un.isTemporary||!$e.isVisible()||($e=$e.actualBounds,$e.w()&&(he?(he=!1,ae.assign($e)):ae.ed($e))));Gt.width=ae.width,Gt.height=ae.height,se.x=ae.x,se.y=ae.y}return ot!==null&&ot.w()&&(se=ot,z||(z=Yt)),ae=ot=0,lt!==null&&(ot=lt.left+lt.right,ae=lt.top+lt.bottom),he=be=0,E!==null&&(be=E.width,he=E.height,isFinite(be)&&(be=Math.max(0,be-ot)),isFinite(he)&&(he=Math.max(0,he-ae))),E!==null&&z!==null?(z==="NaN"&&(z=Yt),E.w()?(E=be,Gt=he):isNaN(he)?(E=be,Gt=Gt.height*z):(E=Gt.width*z,Gt=he)):E!==null?E.w()?(z=Math.min(be/Gt.width,he/Gt.height),E=be,Gt=he):isNaN(he)?(z=be/Gt.width,E=be,Gt=Gt.height*z):(z=he/Gt.height,E=Gt.width*z,Gt=he):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-ot)/Gt.width,(tt.height-ae)/Gt.height),z>Yt?(z=Yt,E=Gt.width,Gt=Gt.height):(E=tt.width,Gt=tt.height)):(E=Gt.width*z,Gt=Gt.height*z):(z=Yt,E=Gt.width,Gt=Gt.height),lt!==null?(E+=ot,Gt+=ae):lt=new mi(0),tt!==null&&(Yt=tt.width,tt=tt.height,isNaN(Yt)&&(Yt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Yt)&&(E=Math.min(E,Yt)),isFinite(tt)&&(Gt=Math.min(Gt,tt))),gt.width=Math.ceil(E),gt.height=Math.ceil(Gt),x==="SVG"?b===null?null:(b.resize(gt.width,gt.height,gt.width,gt.height),b.ownerDocument=St,b.hs=Ct,tf(a,b.context,lt,new Wn(Math.ceil(E),Math.ceil(Gt)),z,se,rt,ut,bt,y),b.context):(a.Xm=!1,tf(a,Bt,lt,new Wn(Math.ceil(E),Math.ceil(Gt)),z,se,rt,ut,bt,y),a.Xm=!0,gt.context)}_t.Object.defineProperties(Ze.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof pt||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Il(this,ie.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 Il(this,ie.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(ie,"resize",this.Ov,!1),this.removeEventListener(ie,"wheel",this.$j,!0),Vl===this&&(Vl=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),dg(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)&&Gn(a,"0 <= value <= 1",Ze,"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),Xa(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),Xa(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),Xa(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),Xa(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Gn(a,">= 0",Ze,"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&&Gn(a,">= 0",Ze,"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 Gn(a,">= 0",Ze,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||tm(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&le("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=hg(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,_l(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=bg(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(z){return a.Pe(z)}),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(ie,"pointermove",this.dk,!0),this.addEventListener(ie,"pointerdown",this.ui,!0),this.addEventListener(ie,"pointerup",this.fk,!0),this.addEventListener(ie,"pointerout",this.ek,!0),this.addEventListener(ie,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(ie,"wheel",this.$j,!0),this.addEventListener(ie,"selectstart",this.preventDefault,!1)):(this.removeEventListener(ie,"pointermove",this.dk,!0),this.removeEventListener(ie,"pointerdown",this.ui,!0),this.removeEventListener(ie,"pointerup",this.fk,!0),this.removeEventListener(ie,"pointerout",this.ek,!0),this.removeEventListener(ie,"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(ie,"wheel",this.$j,!0),this.removeEventListener(ie,"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=zt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Wp(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Al(this):(this.vb=!0,a=this.scale,gg(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)}zt.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=Yp(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Yp(this)),a.type!==Dn.Grid&&le("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),Bl(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),Al(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||le("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new mi(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===Ju&&Xa(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,Xa(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,Cg(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&&Cg(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!==ys&&Xa(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||le("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||le("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):Gn(a,"> 0",Ze,"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)):Gn(a,"> 0",Ze,"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),Xa(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 mi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&le("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Vg(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Qu&&a!==Br&&a!==df&&le("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new Wn(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 mi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),_t.Object.defineProperties(Ze,{licenseKey:{get:function(){return Ag.jc()},set:function(a){Ag.add(a.replace(/\s/g,""))}},version:{get:function(){return Md}}}),Ze.prototype.makeImageData=Ze.prototype.Jx,Ze.prototype.makeImage=Ze.prototype.Wz,Ze.prototype.cacheGroupExternalLinks=Ze.prototype.Fu,Ze.prototype.addRenderer=Ze.prototype.bs,Ze.prototype.makeSVG=Ze.prototype.av,Ze.prototype.makeSvg=Ze.prototype.Cs,Ze.prototype.stopAutoScroll=Ze.prototype.ug,Ze.prototype.doAutoScroll=Ze.prototype.gs,Ze.prototype.isUnoccupied=Ze.prototype.Yj,Ze.prototype.raiseDiagramEvent=Ze.prototype.R,Ze.prototype.removeDiagramListener=Ze.prototype.am,Ze.prototype.addDiagramListener=Ze.prototype.Bj,Ze.prototype.findTreeRoots=Ze.prototype.yz,Ze.prototype.layoutDiagram=Ze.prototype.Uz,Ze.prototype.findTopLevelGroups=Ze.prototype.qz,Ze.prototype.findTopLevelNodesAndLinks=Ze.prototype.rz,Ze.prototype.ensureBounds=Ze.prototype.Va,Ze.prototype.findLinksByExample=Ze.prototype.ls,Ze.prototype.findNodesByExample=Ze.prototype.ms,Ze.prototype.findLinkForData=Ze.prototype.Kc,Ze.prototype.findNodeForData=Ze.prototype.ii,Ze.prototype.findPartForData=Ze.prototype.Lc,Ze.prototype.findLinkForKey=Ze.prototype.findLinkForKey,Ze.prototype.findNodeForKey=Ze.prototype.Vb,Ze.prototype.findPartForKey=Ze.prototype.findPartForKey,Ze.prototype.rebuildParts=Ze.prototype.Wd,Ze.prototype.transformViewToDoc=Ze.prototype.Ps,Ze.prototype.transformRectDocToView=Ze.prototype.zA,Ze.prototype.transformDocToView=Ze.prototype.op,Ze.prototype.centerRect=Ze.prototype.es,Ze.prototype.scrollToRect=Ze.prototype.tv,Ze.prototype.scroll=Ze.prototype.scroll,Ze.prototype.highlightCollection=Ze.prototype.Jz,Ze.prototype.highlight=Ze.prototype.Iz,Ze.prototype.selectCollection=Ze.prototype.rA,Ze.prototype.select=Ze.prototype.select,Ze.prototype.updateAllRelationshipsFromData=Ze.prototype.rp,Ze.prototype.updateAllTargetBindings=Ze.prototype.updateAllTargetBindings,Ze.prototype.commit=Ze.prototype.commit,Ze.prototype.rollbackTransaction=Ze.prototype.Kf,Ze.prototype.commitTransaction=Ze.prototype.eb,Ze.prototype.startTransaction=Ze.prototype.Ea,Ze.prototype.raiseChanged=Ze.prototype.g,Ze.prototype.raiseChangedEvent=Ze.prototype.cb,Ze.prototype.removeChangedListener=Ze.prototype.ik,Ze.prototype.addChangedListener=Ze.prototype.Pe,Ze.prototype.removeModelChangedListener=Ze.prototype.mA,Ze.prototype.addModelChangedListener=Ze.prototype.Yw,Ze.prototype.findLayer=Ze.prototype.Qj,Ze.prototype.removeLayer=Ze.prototype.kA,Ze.prototype.addLayerAfter=Ze.prototype.Cy,Ze.prototype.addLayerBefore=Ze.prototype.Ww,Ze.prototype.addLayer=Ze.prototype.Al,Ze.prototype.moveParts=Ze.prototype.moveParts,Ze.prototype.copyParts=Ze.prototype.Kj,Ze.prototype.removeParts=Ze.prototype.Is,Ze.prototype.remove=Ze.prototype.remove,Ze.prototype.add=Ze.prototype.add,Ze.prototype.clearDelayedGeometries=Ze.prototype.bx,Ze.prototype.setProperties=Ze.prototype.nm,Ze.prototype.attach=Ze.prototype.Du,Ze.prototype.set=Ze.prototype.set,Ze.prototype.resetInputOptions=Ze.prototype.Sx,Ze.prototype.setInputOption=Ze.prototype.sA,Ze.prototype.getInputOption=Ze.prototype.Ql,Ze.prototype.resetRenderingHints=Ze.prototype.Tx,Ze.prototype.setRenderingHint=Ze.prototype.Xx,Ze.prototype.getRenderingHint=Ze.prototype.Gf,Ze.prototype.maybeUpdate=Ze.prototype.bd,Ze.prototype.requestUpdate=Ze.prototype.$b,Ze.prototype.delayInitialization=Ze.prototype.Xy,Ze.prototype.isUpdateRequested=Ze.prototype.Pz,Ze.prototype.invalidateDocumentBounds=Ze.prototype.Ya,Ze.prototype.findObjectsNear=Ze.prototype.og,Ze.prototype.findPartsNear=Ze.prototype.mz,Ze.prototype.findObjectsIn=Ze.prototype.Cf,Ze.prototype.findPartsIn=Ze.prototype.ux,Ze.prototype.findObjectsAt=Ze.prototype.ji,Ze.prototype.findPartsAt=Ze.prototype.lz,Ze.prototype.findObjectAt=Ze.prototype.ic,Ze.prototype.findPartAt=Ze.prototype.Ol,Ze.prototype.focusObject=Ze.prototype.zz,Ze.prototype.alignDocument=Ze.prototype.Jy,Ze.prototype.zoomToRect=Ze.prototype.BA,Ze.prototype.zoomToFit=Ze.prototype.zoomToFit,Ze.prototype.diagramScroll=Ze.prototype.kx,Ze.prototype.focus=Ze.prototype.focus;var hf=new Yn,rm=null,dr=ie.document!==void 0,Ld=null,zh="",ys=new nn(Ze,"None",0),Ca=new nn(Ze,"Uniform",1),Hh=new nn(Ze,"UniformToFill",2),cc=new nn(Ze,"CycleAll",10),Tg=new nn(Ze,"CycleNotDirected",11),Fg=new nn(Ze,"CycleNotDirectedFast",12),Og=new nn(Ze,"CycleNotUndirected",13),Dg=new nn(Ze,"CycleDestinationTree",14),Bg=new nn(Ze,"CycleSourceTree",15),Ju=new nn(Ze,"DocumentScroll",1),fc=new nn(Ze,"InfiniteScroll",2),Qu=new nn(Ze,"TreeParentCollapsed",21),Br=new nn(Ze,"AllParentsCollapsed",22),df=new nn(Ze,"AnyParentsCollapsed",23),Ag=new qe,Md="2.3.10",Ed="image",gc=null,sm=!1;function cs(){if(dr){var a=ie.document.createElement("canvas"),y=a.getContext("2d"),x=Xe("7ca11abfd022028846");y[x]=Xe("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Qe.Dx+"4ae6247590da4bb21c324ba3a84e385776",eo.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Te.za],E=1;5>E;E++)y[Xe("7ca11abfd7330390")](Xe(b[E-1]),10,15*E);for(y[x]=Xe("39f046ebb36e4b"),x=1;5>x;x++)y[Xe("7ca11abfd7330390")](Xe(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(eo.prototype.Cd=eo.prototype.Eu),gc=a}}Ze.className="Diagram",Ze.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=ie.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Ze?y.H:null},Ze.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},Ze.useDOM=function(a){dr=a?ie.document!==void 0:!1},Ze.isUsingDOM=function(){return dr},Ze.None=ys,Ze.Uniform=Ca,Ze.UniformToFill=Hh,Ze.CycleAll=cc,Ze.CycleNotDirected=Tg,Ze.CycleNotDirectedFast=Fg,Ze.CycleNotUndirected=Og,Ze.CycleDestinationTree=Dg,Ze.CycleSourceTree=Bg,Ze.DocumentScroll=Ju,Ze.InfiniteScroll=fc,Ze.TreeParentCollapsed=Qu,Ze.AllParentsCollapsed=Br,Ze.AnyParentsCollapsed=df;function am(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function kd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=ie[Xe("76a715b2f73f148a")][Xe("72ba13b5")]||"";if(a.Rc=!0,dr){var b=Ze[Xe("76a115b6ed251eaf4692")];if(b)for(var E=Ag.iterator;E.next()&&(b=E.value,b=Xe(b).split(Xe("39e9")),!(6>b.length));){var z=Xe(b[1]).split(".");if(b[4]!=="7da71ca0")break;var tt=Xe(Qe[Xe("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var ot=ie[Xe("74a900bae4370f8b51")][Xe("6fbb13a1c2311e8a57")].toLowerCase();if(tt=ot[Xe("73a612b6fb191d")](Xe("3aad1ab6e022098b4dc4")),z=Xe(b[2]),-1<tt&&(ot=ot[Xe("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<ot&&ot<tt),!a.Rc))break;for(tt=x[Xe("76ad18b4f73e")],ot=x[Xe("73a612b6fb191d")](Xe("35e7"))+2;ot<tt;ot++)y+=x[ot];if(tt=y[Xe("73a612b6fb191d")](z),0>tt&&z!==Xe("7da71ca0ad381e90")&&(tt=y[Xe("73a612b6fb191d")](Xe("76a715b2ef3e149757"))),0>tt&&(tt=y[Xe("73a612b6fb191d")](Xe("76a715b2ef3e149757"))),0>tt&&(tt=y[Xe("73a612b6fb191d")](Xe("2bfa41fdb3784bca12"))),0>tt&&(tt=x[Xe("73a612b6fb191d")](Xe("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[Xe("73a612b6fb191d")](Xe("35"))||y[Xe("73a612b6fb191d")](Xe("35"))===-1),!a.Rc||x[Xe("73a612b6fb191d")](Xe("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Xe("73a612b6fb191d")](z)),!a.Rc)||(tt=ie[Xe("76a715b2f73f148a")][Xe("69ad17a1e03e")],ot=tt[Xe("73a612b6fb191d")](Xe("7fb002b6ed25128b4da25b2e")),-1<ot&&(a.Rc=!(tt[Xe("73a612b6fb191d")](z)>ot),!a.Rc)))break;if(z[0]==="#"){tt=ie.document.createElement("div");for(var rt=b[0].replace(/[A-Za-z]/g,"");4>rt.length;)rt+="9";if(ot=rt,rt=rt.substr(rt.length-4),b="",b+=["gsh","gsf"][parseInt(rt.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(rt.substr(0,1),10)%4],tt[Xe("79a417a0f0181a8946")]=b,ie.document[Xe("78a712aa")]){ie.document[Xe("78a712aa")][Xe("7bb806b6ed32388c4a875b")](tt),rt=ie.getComputedStyle(tt).getPropertyValue(Xe("78a704b7e62456904c9b12701b6532a8"));var lt=ie.getComputedStyle(tt).getPropertyValue(Xe("75b817b0ea2202"));if(ie.document[Xe("78a712aa")][Xe("68ad1bbcf533388c4a875b")](tt),rt){if(tt=ie[Xe("77a902b0eb1b1e804a8a")],lt==="0."+parseInt(ot,10)%100||rt.indexOf(parseInt(z[1]+z[2],16))!==-1&&rt.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(Xe("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ut in tt)if(b===tt[ut].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(ut=x[Xe("76ad18b4f73e")],E=x[Xe("73a612b6fb191d")](Xe("35e7"))+2;E<ut;E++)y+=x[E];x=y[Xe("73a612b6fb191d")](Xe("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Xe("73a612b6fb191d")](Xe("35")))}}}return 0<a.Rc&&a!==a.wy}am.className="DiagramHelper";function xu(a){this.j=a===void 0?new zt:a,this.o=new zt}_t.Object.defineProperties(xu.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 pc="DraggingInfo";xu.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function st(){this.reset()}st.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Wn(NaN,NaN).freeze(),this.gridSnapCellSpot=Dr,this.gridSnapOrigin=new zt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},st.className="DraggingOptions";function ct(a,y){if(typeof a=="string"||ie.Element&&a instanceof Element)var x=Ze.call(this,a)||this;else x=Ze.call(this)||this,y=a;return dt(x),y&&x.nm(y),x}Be(ct,Ze);function dt(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Js,a.layout=new ns}ct.prototype.reset=function(){Ze.prototype.reset.call(this),dt(this)},ct.className="Palette";function pt(a,y){if(typeof a=="string"||ie.Element&&a instanceof Element)var x=Ze.call(this,a)||this;else x=Ze.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 vi;var E=new Xi;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 mi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Qt,x.toolManager.mouseMoveTools),x.click=function(){var z=b.observed;if(z!==null){var tt=z.viewportBounds,ot=b.lastInput.documentPoint;z.position=new zt(ot.x-tt.width/2,ot.y-tt.height/2)}},x.Pf=function(){b.Ya(),Rt(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&&Rt(b)},x.autoScale=Ca,x.vb=!1,y&&Object.assign(x,y),x}Be(pt,Ze),pt.prototype.computePixelRatio=function(){return 1},pt.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(wd(this),this.ql===null){var x=new Ja(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),kt(this)}finally{this.ta=a,this.ib=y}}}Ze.prototype.redraw.call(this)},pt.prototype.gc=function(){if(this.Ka===null&&le("No div specified"),this.ta===null&&le("No canvas specified"),!(this.ta instanceof Il)&&(Rv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){wd(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?kt(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 kt(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=sn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Bl(y,E),sn.free(E),ls(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),E.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var ot=y[tt],rt=a;if(ot.visible&&ot.opacity!==0){var lt=ot.diagram.grid.part;if(!x&&ot.isTemporary)b&<.layer===ot&&(ot=Su(ot,E),lt.gc(E,rt),E.globalAlpha=ot);else{for(var ut=Su(ot,E),gt=rt.scale,St=sn.alloc(),Ct=ot.Pa.s,bt=Ct.length,Bt=0;Bt<bt;Bt++){var Yt=Ct[Bt];(b||Yt!==lt)&&ot.Oj(E,Yt,rt,null,gt,St,!1)}sn.free(St),E.globalAlpha=ut}}}}}function Rt(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=Wn.alloc();E.h(x.width,x.height),b.desiredSize=E,Wn.free(E),a=2/a.scale,b instanceof Xi&&(b.strokeWidth=a),y.location=new zt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}pt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return no;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},pt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},pt.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Rt(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))},_t.Object.defineProperties(pt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof pt&&le("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,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),Rt(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),Rt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),pt.className="Overview";function Qt(){rr.call(this),this.j=null}Be(Qt,rr),Qt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new zt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new zt(a.x-this.j.x,a.y-this.j.y)),!0)},Qt.prototype.doActivate=function(){this.j=null,rr.prototype.doActivate.call(this)},Qt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Qt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new zt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new zt(a.x-this.j.x,a.y-this.j.y)}}},Qt.className="OverviewDraggingTool";function Xt(){Ci(this),this.H=Vl,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=no,this.hb=!0,this.cg=null,this.ob=200}Xt.prototype.toString=function(){return"CommandHandler"},Xt.prototype.Xe=function(a){this.H=a},Xt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=ji?y.meta:y.control,b=y.shift,E=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||b&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||b&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||E&&b&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||E&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():b&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Xt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Xt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof qo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Xt.prototype.canStopCommand=function(){return!0},Xt.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=""}},Xt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Xt.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 tn,x=a.selection.iterator;x.next();)$h(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=""}},Xt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Xt.prototype.copySelection=function(){var a=this.diagram,y=new tn;for(a=a.selection.iterator;a.next();)$h(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Xt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Xt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Xt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Xt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Ld=null,zh="";else{x=y.model;var b=!1,E=!1,z=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new qe,x.addAll(z),Ld=x,zh=y.model.dataFormat}}y.R("ClipboardChanged",x)},Xt.prototype.pasteFromClipboard=function(){var a=new tn,y=Ld;if(y===null)return a;var x=this.diagram;if(zh!==x.model.dataFormat)return a;var b=x.model,E=!1,z=!1,tt=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(z=b.Ij,b.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=z),y=tt.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},Xt.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 z=this.computeEffectiveCollection(y.selection,y.Wm);Ih(y,z,new zt(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=""}},Xt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Ld===null||Ld.count===0||zh!==a.model.dataFormat)},Xt.prototype.undo=function(){this.diagram.undoManager.undo()},Xt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Xt.prototype.redo=function(){this.diagram.undoManager.redo()},Xt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Xt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===ys&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Xt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==ys?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Xt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===ys&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Xt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==ys?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Xt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Xt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Xt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;_l(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=no):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Uc(y)},Xt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Xt.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(rt){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;_l(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=ge(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var rt=E.pop();0<E.length&&rt instanceof Xn&&rt.isTreeExpanded&&(!(rt instanceof Ki)||rt.isSubGraphExpanded);)rt=E.pop();0<E.length?(rt instanceof vi&&y.tv(rt.actualBounds),rt instanceof Xn&&!rt.isTreeExpanded&&(rt.isTreeExpanded=!0),rt instanceof Ki&&!rt.isSubGraphExpanded&&(rt.isSubGraphExpanded=!0)):(rt instanceof vi&&y.es(rt.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){Nn(z,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",tt),z()}}else{var ot=y.position.copy();y.es(a.actualBounds),ot.Xa(y.position)&&x.Cc()}}};function ge(a,y,x){if(y.isVisible())return x;if(y instanceof So)ge(a,y.adornedPart,x);else if(y instanceof Hn){var b=y.fromNode;b!==null&&ge(a,b,x),y=y.toNode,y!==null&&ge(a,y,x)}else y instanceof Xn&&(b=y.labeledLink,b!==null&&ge(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),ge(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),ge(a,y,x));return x}Xt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof vi)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Xt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),_l(y.animationManager,"Collapse Tree");var x=new qe;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 Xn&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Xt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Xn&&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 Xn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Xt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),_l(y.animationManager,"Expand Tree");var x=new qe;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 Xn&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Xt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Xn)||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 Xn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Xt.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 qe,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&E.add(tt)}for(var ot=new qe,rt=E.iterator;rt.next();){var lt=rt.value;z=!1;for(var ut=E.iterator;ut.next();)if(lt.Td(ut.value)){z=!0;break}z||ot.add(lt)}if(0<ot.count){var gt=ot.first().containingGroup;if(gt!==null)for(;gt!==null;){E=!1;for(var St=ot.iterator;St.next();)if(!St.value.Td(gt)){E=!0;break}if(E)gt=gt.containingGroup;else break}if(x instanceof Ki)Qa(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ct=y.copyNodeData(x);Re(Ct)&&(y.xf(Ct),b=a.ii(Ct))}if(b!==null){gt!==null&&this.isValidMember(gt,b)&&(b.containingGroup=gt);for(var bt=ot.iterator;bt.next();){var Bt=bt.value;this.isValidMember(b,Bt)&&(Bt.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Xt.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=rn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Hn||y.push(x)}a=new tn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],z=!0,tt=0;tt<x;tt++)if(E.Td(y[tt])){z=!1;break}z&&a.add(E)}return bn(y),a}Xt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Hn)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},Xt.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 qe;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var z=E.value;z instanceof Ki&&z.canUngroup()&&b.add(z)}var tt=new qe;if(0<b.count){y.clearSelection(!0);for(var ot=b.iterator;ot.next();){var rt=ot.value;rt.expandSubGraph();var lt=rt.containingGroup,ut=lt!==null&<.data!==null?x.wa(lt.data):void 0;tt.addAll(rt.memberParts);for(var gt=tt.iterator;gt.next();){var St=gt.value;if(St.isSelected=!0,!(St instanceof Hn)){var Ct=St.data;Ct!==null?x.mp(Ct,ut):St.containingGroup=lt}}y.remove(rt)}}y.R("SelectionUngrouped",b,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Xt.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 Ki))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ki&&y.canUngroup())return!0;return!1},Xt.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},Xt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),_l(y.animationManager,"Collapse SubGraph");var x=new qe;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 Ki&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Xt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Ki&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ki&&y.isSubGraphExpanded)return!0;return!1},Xt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),_l(y.animationManager,"Expand SubGraph");var x=new qe;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 Ki&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Xt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Ki&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ki&&!y.isSubGraphExpanded)return!0;return!1},Xt.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(z){return z instanceof Go&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Xt.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 Go))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 Go&&x.editable}),a!==null))return!0;return!1},Xt.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 Me?E=a.ga(po):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new zt(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,mu(x,!1,a)}},Xt.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)},Xt.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 Yn,a===null)return b;for(var z=a.iterator;z.next();)Xl(x,b,z.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(z=a.iterator;z.next();)a=z.value,a instanceof Hn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},_t.Object.defineProperties(Xt.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||le("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),Xt.className="CommandHandler",Up=function(){return new Xt};function Me(){Ci(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new zt(NaN,NaN).freeze(),this.jd=Ro,this.Ab=new eo,this.wh=new eo,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=jr,this.uc=new sn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new sn(NaN,NaN,NaN,NaN).freeze(),this.dc=new sn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=wi,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var Fn,Mn,hi,gi,bi,_i,ho,qi,mo,Io;Me.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=He(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Me.prototype.Vw=function(a){var y=this.Dh;if(fn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Me.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Me.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},Me.prototype.copy=function(){return this.clone()},Mt=Me.prototype,Mt.qb=function(a){a.classType===Hn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:le("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Me&&(this.stretch=a)},Mt.toString=function(){return xn(this.constructor)+"#"+$i(this)},Mt.th=function(){this.A!==null&&(this.A.nc=!0)};function Ji(a){a.A===null?a.A=new vc:a.A.nc&&(a.A=a.A.copy())}Mt.Xc=function(){if(this.ba===null){var a=new Ig;a.Xi=hr,a.yj=hr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Mt.cb=function(a,y,x,b,E,z,tt){var ot=this.part;if(ot!==null&&(ot.gk(a,y,x,b,E,z,tt),x===this&&a===tr&&os(this)&&Vo(this,ot,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new Yn),tt=z.undoManager.transactionLevel===0,a.startCondition===Dh?tt=!0:a.startCondition===yd&&(tt=!1),tt?(z=new as,$p(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,b,E),z.start()):(_l(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Dn&&x===ot&&(ot.l&16777216)!==0&&ot.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)ot=x[E],ot instanceof Dn&&Od(ot,function(rt){rt.data!==null&&rt.l&16777216&&rt.La(y)})};function Vo(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var z=E.value,tt=null;if(z.sourceName!==null){if(tt=NS(z,b,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,ot.model.modelData,x,b)}else{if(ot=b.data,ot===null)continue;var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,ot,x,b)}tt===a&&(ot=b.ks(z.Ai),ot!==null&&z.Mv(ot,tt,x))}}Mt.ks=function(a){return this.bindingId===a?this:null},Mt.g=function(a,y,x){this.cb(tr,a,this,y,x)},Mt.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 eo);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),z.pp(E)}};function $r(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}Mt.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?co(a.x,a.y,0,0,0,b.height)<=y||co(a.x,a.y,0,b.height,b.width,b.height)<=y||co(a.x,a.y,b.width,b.height,b.width,0)<=y||co(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},Mt.se=function(){return!0},Mt.ca=function(a){var y=zt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return zt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),z=b.Ql("extraTouchArea"),tt=z/2,ot=this.naturalBounds;b=this.Df()*b.scale;var rt=1/b;if(ot.width*b<E&&ot.height*b<E)return a=Ao(x.x-tt*rt,x.y-tt*rt,x.width+z*rt,x.height+z*rt,y.x,y.y),zt.free(y),a}return E=!1,(this instanceof So||this instanceof Xi?Ao(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),zt.free(y),E},Mt.gh=function(a){var y=this.naturalBounds;return Ao(0,0,y.width,y.height,a.x,a.y)},Mt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=sn.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=zt.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)))),zt.free(E),sn.free(y),b},Mt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=zt.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)))),zt.free(E),b},Mt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=zt.allocAt(0,0),E=zt.allocAt(0,x.height),z=zt.allocAt(x.width,x.height),tt=zt.allocAt(x.width,0),ot=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))ot=!0;else{x=sn.allocAt(0,0,x.width,x.height);var rt=zt.allocAt(a.x,a.y);x.ca(y.Cd(rt))?ot=!0:(rt.h(a.x,a.bottom),x.ca(y.Cd(rt))?ot=!0:(rt.h(a.right,a.bottom),x.ca(y.Cd(rt))?ot=!0:(rt.h(a.right,a.y),x.ca(y.Cd(rt))&&(ot=!0)))),zt.free(rt),sn.free(x),!ot&&(Te.us(a,b,E)||Te.us(a,E,z)||Te.us(a,z,tt)||Te.us(a,tt,b))&&(ot=!0)}return zt.free(b),zt.free(E),zt.free(z),zt.free(tt),ot},Mt.ga=function(a,y){if(y===void 0&&(y=new zt),a instanceof ri){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},Mt.mi=function(a){a===void 0&&(a=new sn);var y=this.naturalBounds,x=this.oe,b=zt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),bo(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),bo(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),bo(a,b.x,b.y,0,0),zt.free(b),a},Mt.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},Mt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Mt.qs=function(a,y){return y===void 0&&(y=new zt),y.assign(a),this.oe.Cd(y),y},Mt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Mt.Sj=function(a,y,x,b,E){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),ot=z.m22*tt,rt=-z.m12*tt,lt=-z.m21*tt,ut=z.m11*tt,gt=tt*(z.m21*z.dy-z.m22*z.dx),St=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,Te.Ff(z.left,z.top,z.right,z.bottom,a,y,x,b,E)):(tt=a*ot+y*lt+gt,a=a*rt+y*ut+St,y=x*ot+b*lt+gt,x=x*rt+b*ut+St,E.h(0,0),b=this.naturalBounds,x=Te.Ff(0,0,b.width,b.height,tt,a,y,x,E),E.transform(z),x)},Me.prototype.measure=function(a,y,x,b){if(La(this)!==!1){var E=this.Kg,z=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-z,0),y=Math.max(y-E,0),x=Math.max((x||0)-z,0),b=Math.max((b||0)-E,0),z=this.angle,E=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(E.height)?E.height+tt:a,y=isFinite(E.width)?E.width+tt:y):(a=isFinite(E.width)?E.width+tt:a,y=isFinite(E.height)?E.height+tt:y),E=x||0,tt=b||0;var ot=this instanceof Dn;switch(_s(this,!0)){case Mn:tt=E=0,ot&&(y=a=1/0);break;case Fn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(tt=y);break;case gi:isFinite(a)&&a>x&&(E=a),tt=0,ot&&(y=1/0);break;case bi:isFinite(y)&&y>b&&(tt=y),E=0,ot&&(a=1/0)}ot=this.maxSize;var rt=this.minSize;E>ot.width&&rt.width<ot.width&&(E=ot.width),tt>ot.height&&rt.height<ot.height&&(tt=ot.height),x=Math.max(E,rt.width),b=Math.max(tt,rt.height),ot.width<x&&(x=Math.min(rt.width,x)),ot.height<b&&(b=Math.min(rt.height,b)),a=Math.min(ot.width,a),y=Math.min(ot.height,y),a=Math.max(x,a),y=Math.max(b,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=b,b=z),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||le("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Ar(this,!1)}},Me.prototype.Wl=function(){},Me.prototype.Dd=function(){return!1},Me.prototype.arrange=function(a,y,x,b,E){this.Uk();var z=sn.alloc();z.assign(this.Ib),this.Ib.ka(),Fs(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&&eh(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 Go&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||le("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Yl(this,!1),sn.free(z)},Mt=Me.prototype,Mt.eh=function(){};function Ss(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,b+=y,E+=tt,y=_s(a,!0),x===b&&z===E&&(y=Mn),y){case Mn:(x>b||z>E)&&(Ar(a,!0),a.measure(x>b?b:x,z>E?E:z,0,0));break;case Fn:Ar(a,!0),a.measure(b,E,0,0);break;case gi:Ar(a,!0),a.measure(b,z,0,0);break;case bi:Ar(a,!0),a.measure(x,E,0,0)}}}Mt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||Hv(x,!0),this.N(),jo(a,y)||(x.oh(),this.Pn(x)))},Mt.Pn=function(a){this.portId!==null&&(Hv(a,!0),a instanceof Xn&&_1(a,this))},Mt.gc=function(a,y){if(!Aa(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 z=this instanceof Dn&&eh(this),tt=this.Ib;if(z){var ot=this.Ib,rt=this.dc,lt=this.areaBackground,ut=this.Ma;lt===null&&ut===null||a.yc(),lt!==null&&(cr(this,a,lt,!0,!0,rt,ot),lt instanceof To&<.type===ja?(a.beginPath(),a.rect(ot.x,ot.y,ot.width,ot.height),a.ng(lt)):a.fillRect(ot.x,ot.y,ot.width,ot.height)),ut!==null&&(cr(this,a,ut,!0,!1,rt,ot),ut instanceof To&&ut.type===ja?(a.beginPath(),a.rect(ot.x,ot.y,ot.width,ot.height),a.ng(ut)):a.fillRect(ot.x,ot.y,ot.width,ot.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,ot=this.panel,this.l&4096&&es(this),lt=this.part,rt=!1;var gt=0;lt&&y.Gf("drawShadows")&&(rt=lt.isShadowed)&&(ut=lt.shadowOffset,gt=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var St;if(!(St=y.$i||!ut)){var Ct=this.naturalBounds;St=this.wh;var bt=St.m11,Bt=St.m21,Yt=St.dx,Gt=St.m12,se=St.m22,ae=St.dy,he,be=he=0;St=he*bt+be*Bt+Yt;var $e=he*Gt+be*se+ae;he=Ct.width+gt,be=0;var Un=he*bt+be*Bt+Yt;he=he*Gt+be*se+ae,be=Math.min(St,Un);var oi=Math.min($e,he),ti=Math.max(St+0,Un)-be,jn=Math.max($e+0,he)-oi;St=be,$e=oi,he=Ct.width+gt,be=Ct.height+gt,Un=he*bt+be*Bt+Yt,he=he*Gt+be*se+ae,be=Math.min(St,Un),oi=Math.min($e,he),ti=Math.max(St+ti,Un)-be,jn=Math.max($e+jn,he)-oi,St=be,$e=oi,he=0,be=Ct.height+gt,Un=he*bt+be*Bt+Yt,he=he*Gt+be*se+ae,be=Math.min(St,Un),oi=Math.min($e,he),ti=Math.max(St+ti,Un)-be,jn=Math.max($e+jn,he)-oi,St=be,$e=oi,gt=y.viewportBounds,Ct=gt.x,bt=gt.y,St=!(St>gt.width+Ct||Ct>ti+St||$e>gt.height+bt||bt>jn+$e)}if(St){if(St=(this.l&256)!==0,a.clipInsteadOfFill&&(St=!1),this instanceof Go&&(a.font=this.font),St){if($e=ot.se()?ot.naturalBounds:ot.actualBounds,ti=Math.max(tt.x,$e.x),jn=Math.max(tt.y,$e.y),gt=Math.min(tt.right,$e.right)-ti,Ct=Math.min(tt.bottom,$e.bottom)-jn,bt=this.tb,bt!==null&&(ti=bt.x,jn=bt.y,gt=bt.width,Ct=bt.height),ti>tt.width+tt.x||tt.x>$e.width+$e.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(ti,jn,gt,Ct),a.clip()}if(ut){if(!lt.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}rt&&($e=lt.shadowOffset,a.Ev($e.x*y.scale*this.scale*y.Mb,$e.y*y.scale*this.scale*y.Mb,lt.shadowBlur),Pu(a),a.shadowColor=lt.shadowColor)}rt&&this.shadowVisible===!0?Pu(a):rt&&this.shadowVisible===!1&&Jl(a),lt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),ba(this,a,lt,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),rt&&Jr(this,ot)&&this.shadowVisible===null&&Jl(a),this.Ma!==null&&(a.yc(),ta(this,a,lt,tt)),rt&&(this.Ma!==null||this.areaBackground!==null||Jr(this,ot))?(ll(this,!0),this.shadowVisible===null&&Jl(a)):ll(this,!1),this.hh(a,y),rt&&this.l&512&&Pu(a),ut&&rt&&Jl(a),St&&(a.restore(),a.Vc(this instanceof Dn)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function Jr(a,y){return y===null?!1:(eh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Dn.Auto||y.type===Dn.Spot)&&y.Pb()!==a)}Mt.Dv=function(){};function ba(a,y,x,b){cr(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof To&&a.areaBackground.type===ja?(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 ta(a,y,x,b){var E=a.kq(),z=x.x,tt=x.y,ot=x.width+E,rt=x.height+E;cr(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof To&&a.Ma.type===ja?(y.beginPath(),y.rect(z-E/2,tt-E/2,ot,rt),y.ng(a.Ma)):y.fillRect(z-E/2,tt-E/2,ot,rt)}function fs(a,y,x){for(var b=y.O.s,E=b.length,z=-1,tt=0;tt<E;tt++)if(b[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Dn.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 Aa(a,y,x){if(!(y instanceof ca))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&&fs(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),Pu(y),y.shadowColor=a.shadowColor}a instanceof Go&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof Dn;var ot=a instanceof Dn?eh(a):!1;a.l&4096&&es(a);var rt=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,z&&ot?(Rg(y,1,0,0,1,0,0),a.svg=y.ad):z?(Rg(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Rg(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var lt=tt.copy().Vj();y.rb.ha=[lt.m11,lt.m12,lt.m21,lt.m22,lt.dx,lt.dy],ba(a,y,E,rt),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(ot&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),ta(a,y,E,rt),ot&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],ta(a,y,E,rt)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,E=a.part,ot=!1,E&&x.Gf("drawShadows")&&(ot=E.isShadowed),y.clipInsteadOfFill&&(ot=!1),a.Dd()&&ot&&Pu(y),ot&&a.shadowVisible===!0?Pu(y):ot&&a.shadowVisible===!1&&Jl(y),E=a.panel,ot&&Jr(a,E)&&a.shadowVisible===null&&Jl(y),y.Il&&(lt=x.computePixelRatio(),lt="drop-shadow("+y.shadowOffsetX/lt+"px "+y.shadowOffsetY/lt+"px "+y.shadowBlur/lt/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",lt),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",lt)),ot&&(a.Ma!==null||a.areaBackground!==null||Jr(a,E))?(ll(a,!0),a.shadowVisible===null&&Jl(y)):ll(a,!1),E=ot,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,ot=z?a.svg:y.yd,lt=a.svg,!z&<!==null&&ot!==lt&<.parentNode===a.panel.svg?(a.svg.replaceWith(ot),a.svg=ot,ot!==null&&a.$o(y,b,rt,ot),Zs(y,lt),!0):(a.svg=ot,tt!==null&&ot===null&&(um(y),y.nh.pop()),ot===null||(a.$o(y,b,rt,ot),y.Il&&(x=x.computePixelRatio(),a.Dv(ot,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Pu(y),a.Dd()&&Jl(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&ot.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&ot.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(ot):y.Nj.prepend(ot),y.ti=ot):b!==null&&fs(a,b,ot),tt!==null&&tt(a,ot)),!0)}Mt.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),E=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-E,z=this.tb,z!==null&&(y=z.x,E=z.y,tt=z.width,x=z.height),z=b.getAttribute("clip-path");var ot=null;z!==null&&(ot=a.svg.getElementById(z.split("#")[1].slice(0,-1))),ot===null?(z="CLIP"+Co++,ot=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:E,width:tt,height:x}),this instanceof Dn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),ot.appendChild(y),a.svg.appendChild(ot),b.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=ot.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),Zs(a,b)};function Zs(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function gs(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Ii(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()}}Mt.hh=function(){},Mt.lv=function(){this.Uc=!0},Mt.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 Dn?eh(this):!1;if(!(this instanceof Dn&&E))if(this instanceof Us){var z=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],z!==null&&Qy(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",qy(a)):y.setAttributeNS(null,"transform",qy(a))}else if(!x||this instanceof Dn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Xi){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].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 z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=b.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],ba(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&hm(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(hm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Dn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),ta(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),z&&hm(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Mt.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 cr(a,y,x,b,E,z,tt){if(x!==null){var ot=1,rt=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===th)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var lt=a.kq();if(ot=z.width,rt=z.height,E?(ot=tt.width,rt=tt.height):b||(ot+=lt,rt+=lt),(z=y instanceof Fd)&&x.xe&&(x.type===yf||x.yk===ot&&x.ft===rt))var ut=x.xe;else{var gt=0,St=0,Ct=0,bt=0,Bt=0,Yt=0;if(Yt=Bt=0,E?(Bt=tt.x,Yt=tt.y):b||(Bt-=lt/2,Yt-=lt/2),gt=x.start.x*ot+x.start.offsetX,St=x.start.y*rt+x.start.offsetY,Ct=x.end.x*ot+x.end.offsetX,bt=x.end.y*rt+x.end.offsetY,gt+=Bt,Ct+=Bt,St+=Yt,bt+=Yt,x.type===Cu)ut=y.createLinearGradient(gt,St,Ct,bt);else if(x.type===ja)Yt=isNaN(x.endRadius)?Math.max(ot,rt)/2:x.endRadius,isNaN(x.startRadius)?(Bt=0,Yt=Math.max(ot,rt)/2):Bt=x.startRadius,ut=y.createRadialGradient(gt,St,Bt,Ct,bt,Yt);else if(x.type===yf)try{ut=y.createPattern(x.pattern,"repeat")}catch(se){ut=null}if(x.type!==yf&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ut.addColorStop(E.key,E.value);if(z&&(x.xe=ut,ut!==null&&(x.yk=ot,x.ft=rt),ut===null&&x.type===yf&&x.yk!==-1)){x.yk=-1;var Gt=a.diagram;Gt!==null&&x.yk===-1&&Nn(function(){Gt.redraw()},600)}}b?y.fillStyle=ut:y.strokeStyle=ut}}}Mt.rg=function(a){if(a instanceof Dn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Mt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Mt.If=function(){for(var a=this instanceof Dn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function es(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Ya(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)}Ya(a,!1),Ia(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ia(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,Ia(a,!1)))}Mt.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=zt.alloc();z.yi(y,x,b,E,po),a.rotate(this.Kb,z.x,z.y),zt.free(z)}},Mt.v=function(a){if(!La(this)){a===void 0&&(a=!1),Ar(this,!0),Yl(this,!0);var y=this.panel;y===null||a||y.v()}},Mt.Uj=function(){La(this)||(Ar(this,!0),Yl(this,!0))};function Ts(a){if(!Fs(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Xn&&a.Bd(),y.$b())),Yl(a,!0)}}Mt.Uk=function(){!(this.l&2048)&&(Ya(this,!0),Ia(this,!0))},Mt.Wu=function(){Ia(this,!0)},Mt.N=function(){var a=this.part;a!==null&&a.N()};function _s(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Dn.Table?Sl(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Dn.Auto&&b.Pb()===a?Qr(a,Fn,y):x===_i?b!==null?b.type===Dn.Spot&&b.Pb()===a?Qr(a,Fn,y):(x=b.defaultStretch,x===_i?Qr(a,Mn,y):Qr(a,x,y)):Qr(a,Mn,y):Qr(a,x,y)}function Sl(a,y,x,b){var E=a.stretch;if(E!==_i)return Qr(a,E,b);var z=E=null;switch(y.stretch){case bi:z=!0;break;case Fn:z=!0}switch(x.stretch){case gi:E=!0;break;case Fn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===gi||y===Fn),z===null&&(z=y===bi||y===Fn),E===!0&&z===!0?Qr(a,Fn,b):E===!0?Qr(a,gi,b):z===!0?Qr(a,bi,b):Qr(a,Mn,b)}function Qr(a,y,x){if(x)return y;if(y===Mn||(x=a.desiredSize,x.w()))return Mn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===gi)return Mn;if(y===Fn)return bi}else{if(y===bi)return Mn;if(y===Fn)return gi}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===bi)return Mn;if(y===Fn)return gi}else{if(y===gi)return Mn;if(y===Fn)return bi}return y}function ll(a,y){a.l=y?a.l|512:a.l&-513}function os(a){return(a.l&1024)!==0}function mc(a,y){a.l=y?a.l|1024:a.l&-1025}function Ya(a,y){a.l=y?a.l|2048:a.l&-2049}function Ia(a,y){a.l=y?a.l|4096:a.l&-4097}function La(a){return(a.l&8192)!==0}function Ar(a,y){a.l=y?a.l|8192:a.l&-8193}function Fs(a){return(a.l&16384)!==0}function Yl(a,y){a.l=y?a.l|16384:a.l&-16385}Mt.Gj=function(){this.svg=null},Mt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Mt.Av=function(){},Mt.zv=function(a){return this.pa=a,Ts(this),!0},Mt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Mt.kq=function(){return 0};function Nd(a){var y=a.part;if(y instanceof Xn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||_1(y,a)}}function Yy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Dn?a instanceof Xn?a.Bd():a.qm(a,function(x){Nd(x)}):Nd(a))}Mt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Er(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&p1(a)&&le("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new qe),this.localBindings.add(E),this},Mt.set=function(a){return Object.assign(this,a),this},Mt.Du=function(a){return ov(this,a),this},Mt.apply=function(a){return a(this),this},Mt.nm=function(a){return Pd(this,a),this},Mt.pz=function(){return this.ih()},Mt.ih=function(){for(var a=this instanceof Dn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Mt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Yn),this.animationTriggers.add(a.propertyName,a),this};function Ra(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 z=cf.I(a);typeof z=="function"?(x=He(arguments),b=z(x),Re(b)||le('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=ie.go[a]}if(b===null&&(E!=null&&E.constructor||le("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 Ze&&1<x.length){z=b;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(dg(z,tt),E++)}for(;E<x.length;E++)z=x[E],z===void 0?le("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):ov(b,z);return b}function ov(a,y){if(typeof y=="string")if(a instanceof Go)a.text=y;else if(a instanceof Xi)a.figure=y;else if(a instanceof Us)a.source=y;else if(a instanceof Dn)y=ul.I(y),y!==null&&(a.type=y);else if(a instanceof To){var x=Vn(To,y);x!==null?a.type=x:le("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Kn?(y=Vn(Kn,y),y!==null&&(a.type=y)):a instanceof Po&&(y=Vn(Po,y),y!==null&&(a.type=y));else if(y instanceof Me)a instanceof Dn||le("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Ir){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 Ir?Mm(b,y):le("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof nn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Hr)a.type=y;else if(y instanceof Er)a instanceof Me||a instanceof Ir?a.bind(y):le("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof sl)a instanceof Me?a.Jv(y):le("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Wr)a instanceof Kn&&a.type===Kn.o?a.figures.add(y):le("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Po)a instanceof Wr?a.segments.add(y):le("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Jo)a instanceof Ze||a instanceof Ki?a.layout=y:le("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)ov(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof To){x=new Ge;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Pd(a,x)}else if(a instanceof Ir){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&le("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)&&le("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new Ge;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Pd(a,E)}else Pd(a,y);else le('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function qu(a,y){cf.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}_t.Object.defineProperties(Me.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new vc),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 vc),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 vc),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Ji(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&&(Ji(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Bs},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Gh),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Bs&&(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 Gh),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 Gh),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Ai},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Gh),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:_i},set:function(a){var y=this.stretch;y!==a&&(Ji(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&&(Ji(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)&&Gn(a,"0 <= value <= 1",Me,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Ad(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(Ad(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(),Yy(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&&Sc(a,"GraphObject.areaBackground"),a instanceof To&&a.freeze(),Ji(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&&Sc(a,"GraphObject.background"),a instanceof To&&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 vi)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 zt(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&&le("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Yy(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,z=b.height;(E===y||isNaN(E)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Xi&&this.qc(),this.g("desiredSize",b,a),os(this)&&(a=this.part,a!==null&&(Vo(this,a,"width"),Vo(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 Wn(a,this.jd.height).freeze(),this.v(),this instanceof Xi&&this.qc(),this.g("desiredSize",y,a),os(this)&&(a=this.part,a!==null&&Vo(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 Wn(this.jd.width,a).freeze(),this.v(),this instanceof Xi&&this.qc(),this.g("desiredSize",y,a),os(this)&&(a=this.part,a!==null&&Vo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:zi},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(),Ji(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:ar},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(),Ji(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 mi(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&&es(this),this.Ab}},oe:{get:function(){return this.l&4096&&es(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Ji(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Mn},set:function(a){this.reshapingBehavior!==a&&(Ji(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&le("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Ts(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Gn(a,">= 0",Me,"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&&Gn(a,">= 1",Me,"columnSpan"),Ji(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&&Gn(a,">= 0",Me,"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&&Gn(a,">= 1",Me,"rowSpan"),Ji(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&&(Ji(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 Xn||le("Cannot set portID on a Link: "+a),y!==null&&x!==null&&$v(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,X1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:hr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Nd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Gn(a,">= 0",Me,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Nd(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),Nd(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&&Gn(a,">= 0",Me,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:hr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Nd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Gn(a,">= 0",Me,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Nd(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),Nd(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&&Gn(a,">= 0",Me,"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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(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&&(Ji(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Me.prototype.trigger=Me.prototype.Jv,Me.prototype.findBindingPanel=Me.prototype.ih,Me.prototype.findTemplateBinder=Me.prototype.pz,Me.prototype.setProperties=Me.prototype.nm,Me.prototype.apply=Me.prototype.apply,Me.prototype.attach=Me.prototype.Du,Me.prototype.set=Me.prototype.set,Me.prototype.isEnabledObject=Me.prototype.If,Me.prototype.isVisibleObject=Me.prototype.Ed,Me.prototype.isContainedBy=Me.prototype.rg,Me.prototype.getNearestIntersectionPoint=Me.prototype.rs,Me.prototype.getLocalPoint=Me.prototype.qs,Me.prototype.getDocumentScale=Me.prototype.Df,Me.prototype.getDocumentAngle=Me.prototype.li,Me.prototype.getDocumentBounds=Me.prototype.mi,Me.prototype.getDocumentPoint=Me.prototype.ga,Me.prototype.intersectsRect=Me.prototype.Yc,Me.prototype.containedInRect=Me.prototype.fh,Me.prototype.containsRect=Me.prototype.Re,Me.prototype.containsPoint=Me.prototype.ca,Me.prototype.raiseChanged=Me.prototype.g,Me.prototype.raiseChangedEvent=Me.prototype.cb,Me.prototype.addCopyProperty=Me.prototype.Vw;var cf=null;Me.className="GraphObject",cf=new Yn,qu("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=Ra(Dn,Dn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Dn){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"},Ra(Xi,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new ri(0,0,2.76142374915397,2.761423749153969),spot2:new ri(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 Dn&&(x=b.fb("ButtonBorder"),x instanceof Xi)){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 Dn&&(x=b.fb("ButtonBorder"),x instanceof Xi&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Xi){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=tt,tt=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Xi){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Xi){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Xi))){var z=E.skipsUndoManager;E.skipsUndoManager=!0;var tt=b._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=b._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),E.skipsUndoManager=z}}},y}),qu("TreeExpanderButton",function(){var a=Ra("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Ra(Xi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Uo},new Er("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Er("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof So&&(x=x.adornedPart),x instanceof Xn){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}),qu("SubGraphExpanderButton",function(){var a=Ra("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Ra(Xi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Uo},new Er("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 So&&(x=x.adornedPart),x instanceof Ki){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}),qu("ToolTip",function(){return Ra(So,Dn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new zt(0,3),shadowBlur:5},Ra(Xi,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new ri(0,0,4,6),spot2:new ri(1,1,-4,-4)}))}),qu("ContextMenu",function(){return Ra(So,Dn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new zt(0,3),shadowBlur:5},new Er("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),qu("ContextMenuButton",function(){var a=Ra("Button");a.stretch=gi;var y=a.fb("ButtonBorder");return y instanceof Xi&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new ri(0,0,2,3),y.spot2=new ri(1,1,-2,-2)),a}),qu("PanelExpanderButton",function(a){var y=lm(a,"COLLAPSIBLE"),x=Ra("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},Ra(Xi,{name:"ButtonIcon",strokeWidth:2},new Er("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Xi&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var z=E.diagram;if(z!==null&&!z.isReadOnly){var tt=E.ih();tt===null&&(tt=E.part),tt!==null&&(E=tt.fb(y),E!==null&&(b.handled=!0,z.Ea("Collapse/Expand Panel"),E.visible=!E.visible,z.eb("Collapse/Expand Panel")))}},x}),qu("CheckBoxButton",function(a){var y=lm(a);return a=Ra("Button",{desiredSize:new Wn(14,14)},Ra(Xi,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Fn,geometryStretch:hi,visible:!1},y!==""?new Er("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Dn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var z=b.fb("ButtonIcon");E.Ea("checkbox"),z.visible=!z.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),qu("CheckBox",function(a){a=lm(a),a=Ra("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new mi(0,1,0,0)});var y=Ra(Dn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new mi(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}),Me.None=Mn=new nn(Me,"None",0),Me.Default=_i=new nn(Me,"Default",0),Me.Vertical=bi=new nn(Me,"Vertical",4),Me.Horizontal=gi=new nn(Me,"Horizontal",5),Me.Fill=Fn=new nn(Me,"Fill",3),Me.Uniform=hi=new nn(Me,"Uniform",1),Me.UniformToFill=ho=new nn(Me,"UniformToFill",2),Me.FlipVertical=qi=new nn(Me,"FlipVertical",1),Me.FlipHorizontal=mo=new nn(Me,"FlipHorizontal",2),Me.FlipBoth=Io=new nn(Me,"FlipBoth",3),Me.make=Ra,Me.getBuilders=function(){var a=new Yn,y;for(y in cf)if(y!==y.toLowerCase()){var x=cf.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Me.defineBuilder=qu,Me.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=cf.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof Me))return y&&b.set(y),b;le('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Me.takeBuilderArgument=lm;function vc(){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=zi,this.o=ar,this.hg=_i,this.ob=this.Bi=1,this.Pf=Mn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}vc.prototype.copy=function(){var a=new vc;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 Gh(){this.u=-1/0,this.o=0,this.F=Ai,this.rr=Bs,this.j=this.V="None"}Gh.prototype.copy=function(){var a=new Gh;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},Gh.className="LinkElementSettings";function Ig(){this.yj=this.Xi=wi,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Ig.prototype.copy=function(){var a=new Ig;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},Ig.className="LinkSettings";function Td(){this.ha=[1,0,0,1,0,0]}Td.prototype.copy=function(){var a=new Td;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},Td.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},Td.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Td.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,z=this.ha[0]*-b+this.ha[2]*a,tt=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]=z,this.ha[3]=tt,this.translate(-y,-x)}},Td.className="STransform";function yc(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}yc.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},yc.className="SGradient";function Il(a,y,x){this.ownerDocument=a=y===void 0?ie.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 ca(this,x)}Il.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},Il.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Re(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},Il.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Il.prototype.focus=function(){this.Oa.focus()},Il.prototype.mx=function(){this.ownerDocument=null},_t.Object.defineProperties(Il.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}}}),Il.className="SVGSurface";function ca(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 Td,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Co++,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 Jy(a,y,x,b,E,z,tt){a.Nj===void 0?Rg(a,y,x,b,E,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+z+", "+tt+")")}Mt=ca.prototype,Mt.arc=function(a,y,x,b,E,z,tt,ot){var rt=2*Math.PI,lt=rt-1e-6,ut=x*Math.cos(b),gt=x*Math.sin(b),St=a+ut,Ct=y+gt,bt=z?0:1;b=z?b-E:E-b,(1e-6<Math.abs(tt-St)||1e-6<Math.abs(ot-Ct))&&this.path.push(["L",St,+Ct]),0>b&&(b=b%rt+rt),b>lt?(this.path.push(["A",x,x,0,1,bt,a-ut,y-gt]),this.path.push(["A",x,x,0,1,bt,St,Ct])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),bt,a+x*Math.cos(E),y+x*Math.sin(E)])},Mt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Mt.Se=function(a){this.addPath(this.path,this.rb,a||0)},Mt.bezierCurveTo=function(a,y,x,b,E,z){this.path.push(["C",a,y,x,b,E,z])},Mt.clearRect=function(){},Mt.clip=function(){this.Yl.clipPath=!0},Mt.closePath=function(){this.path.push(["z"])},Mt.createLinearGradient=function(a,y,x,b){var E=new yc("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},Mt.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"+Co++,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(Ed,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},Mt.createRadialGradient=function(a,y,x,b,E,z){var tt=new yc("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=b,tt.y2=E,tt.r2=z,tt};function Qy(a,y,x,b,E,z,tt,ot,rt){b=ot/b,E=rt/E,z===0&&tt===0||a.rb.translate(z,tt),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}Mt.drawImage=function(a,y,x,b,E,z,tt,ot,rt){var lt="";a instanceof HTMLCanvasElement&&(lt=a.toDataURL()),a instanceof HTMLImageElement&&(lt=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(z=y,tt=x,ot=b=ut,rt=E=a),b=b||0,E=E||0,ot=ot||0,rt=rt||0,Qy(this,y,x,b,E,z||0,tt||0,ot,rt),z={x:0,y:0,width:ut||b,height:a||E,href:lt},Te.$(b,ot)&&Te.$(E,rt)?lt.toLowerCase().indexOf(".svg")===-1&<.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||b!==ut||E!==a)&&(b+=y,E+=x,z["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),ff(this,Ed,z,this.rb),this.addElement(Ed,z)},Mt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(this,this.Yl)},Mt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Mt.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},ff(this,"fill",a,this.rb),this.addElement("rect",a)},Mt.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},ff(this,"fill",a,this.rb),rv(this,a),this.svg.prepend(this.Ud("rect",a))},Mt.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},ff(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Mt.lineTo=function(a,y){this.path.push(["L",a,y])},Mt.moveTo=function(a,y){this.path.push(["M",a,y])},Mt.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},Mt.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"])},Mt.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},Mt.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())},Mt.setTransform=function(a,y,x,b,E,z){a===1&&y===0&&x===0&&b===1&&E===0&&z===0||Rg(this,a,y,x,b,E,z)};function qy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Mt.scale=function(a,y){this.rb.scale(a,y)},Mt.translate=function(a,y){this.rb.translate(a,y)},Mt.transform=function(){},Mt.yc=function(){},Mt.stroke=function(){e1(this,this.Yl)},Mt.jk=function(){this.clipInsteadOfFill||this.stroke()},Mt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Mt.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 ff(a,y,x,b){y==="fill"?rv(a,x):y==="stroke"&&e1(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function rv(a,y){a.fillStyle instanceof yc?y.fill=sv(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 t1(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof yc?y.setAttributeNS(null,"fill",sv(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 e1(a,y){if(a.strokeStyle instanceof yc)y.stroke=sv(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 sv(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"+Co++,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 z=[],tt=0;tt<y;tt++){var ot=E[tt],rt=ot.color;ot={offset:ot.offset,"stop-color":rt},/^rgba\(/.test(rt)&&(rt=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(rt),ot["stop-color"]="rgb("+rt[1]+","+rt[2]+","+rt[3]+")",ot["stop-opacity"]=rt[4]),z.push(ot)}for(z.sort(function(lt,ut){return lt.offset>ut.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",z[E]));return a.svg.appendChild(x),"url(#"+b+")"}Mt.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var z=He(a[E]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());b.push(tt.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,ff(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var ot in a)ot!=="transform"&&y.setAttributeNS(null,ot,a[ot]);else{ot=y.getElementsByTagName("path");for(var rt in a)rt!=="transform"&&ot[x].setAttributeNS(null,rt,a[rt])}else this.addElement("path",a)};function Rg(a,y,x,b,E,z,tt){var ot=new Td;ot.ha=[y,x,b,E,z,tt],y={},ff(a,"g",y,ot),ot=a.addElement("g",y),a.nh.push(ot)}function um(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Mt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Jl(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Pu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Mt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Mt.fs=function(){this.Ct=!1},Mt.Vc=function(){},Mt.Wx=function(){},ca.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},ca.prototype.getImageData=function(){return null},ca.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()))}ca.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},ca.className="SVGContext",Ze.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Il(this,ie.document));var y=new Il(this,ie.document,!0);a===void 0&&(a=new Ge);var x=this;return dc(this,function(b,E){return b=om(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Ze.prototype.makeSvg=Ze.prototype.Cs,Ze.prototype.av=function(a){return this.Cs(a)},Ze.prototype.makeSVG=Ze.prototype.av;function Ja(a,y,x,b){this.ownerDocument=y=y===void 0?ie.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Fd(y,x,b),y.H=a}Ja.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},Ja.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Ja.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Ja.prototype.focus=function(){this.Oa.focus()},Ja.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},_t.Object.defineProperties(Ja.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}}}),Ja.className="CanvasSurface";function Fd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&le("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new eo,this.isTemporary=!!x}Mt=Fd.prototype,Mt.Wx=function(a){this.Z.imageSmoothingEnabled=a},Mt.arc=function(a,y,x,b,E,z){this.Z.arc(a,y,x,b,E,z)},Mt.beginPath=function(){this.Z.beginPath()},Mt.Se=function(){},Mt.bezierCurveTo=function(a,y,x,b,E,z){this.Z.bezierCurveTo(a,y,x,b,E,z)},Mt.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},Mt.clip=function(){this.Z.clip()},Mt.closePath=function(){this.Z.closePath()},Mt.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},Mt.createPattern=function(a,y){return this.Z.createPattern(a,y)},Mt.createRadialGradient=function(a,y,x,b,E,z){return this.Z.createRadialGradient(a,y,x,b,E,z)},Mt.drawImage=function(a,y,x,b,E,z,tt,ot,rt){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,z,tt,ot,rt)},Mt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Mt.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Mt.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Mt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Mt.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},Mt.lineTo=function(a,y){this.Z.lineTo(a,y)},Mt.measureText=function(a){return this.Z.measureText(a)},Mt.moveTo=function(a,y){this.Z.moveTo(a,y)},Mt.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},Mt.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},Mt.restore=function(){this.Z.restore()},Mt.save=function(){this.yc(),this.Z.save()},Fd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Mt=Fd.prototype,Mt.setTransform=function(a,y,x,b,E,z){this.El.setTransform(a,y,x,b,E,z)},Mt.scale=function(a,y){this.El.scale(a,y)},Mt.translate=function(a,y){this.El.translate(a,y)},Mt.stroke=function(){this.Z.stroke()},Mt.transform=function(a,y,x,b,E,z){if(a!==1||y!==0||x!==0||b!==1||E!==0||z!==0){var tt=this.El,ot=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*b,x=tt.m12*x+tt.m22*b,tt.dx=tt.m11*E+tt.m21*z+tt.dx,tt.dy=tt.m12*E+tt.m22*z+tt.dy,tt.m11=ot,tt.m12=a,tt.m21=y,tt.m22=x}},Mt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Mt.ng=function(a,y){if(a instanceof To&&a.type===ja){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)},Mt.jk=function(){this.Hm||this.stroke()},Mt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Mt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Mt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(Cx),a.lineDashOffset=0)},Mt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Mt.Hs=function(){},_t.Object.defineProperties(Fd.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 Cx=Object.freeze([]);Fd.className="CanvasSurfaceContext";function jg(){this.F=this.o=this.u=this.j=0}jg.className="ColorNumbers";function To(a,y){vf||(cv(),vf=!0),Ci(this),this._isFrozen=!1,a===void 0?(this.na=th,this.xk="black"):typeof a=="string"?(this.na=th,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Cu?(this.Qd=Js,this.Lk=bs):this.Lk=a===ja?this.Qd=po:this.Qd=hr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}To.prototype.copy=function(){var a=new To;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},Mt=To.prototype,Mt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Mt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Mt.qb=function(a){a.classType===To&&(this.type=a)},Mt.toString=function(){var a="Brush(";if(this.type===th)a+=this.color;else if(a=this.type===Cu?a+"Linear ":this.type===ja?a+"Radial ":this.type===yf?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+")"},Mt.addColorStop=function(a,y){return this._isFrozen&&mn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Gn(a,"0 <= loc <= 1",To,"addColorStop:loc"),this.we===null&&(this.we=new Yn),this.we.add(a,y),this.na===th&&(this.type=Cu),this.xe=null,this},Mt.Vz=function(a,y){if(this._isFrozen&&mn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Sf:y,this.type===th)wu(this.color),this.color=pf(a,y);else if((this.type===Cu||this.type===ja)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)wu(x.value),this.addColorStop(x.key,pf(a,y));return this};function n1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Sf:x,wu(a),pf(y,x)}Mt.Wy=function(a,y){if(this._isFrozen&&mn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Sf:y,this.type===th)wu(this.color),this.color=pf(-a,y);else if((this.type===Cu||this.type===ja)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)wu(x.value),this.addColorStop(x.key,pf(-a,y));return this};function i1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Sf:x,wu(a),pf(-y,x)}function av(a,y,x){wu(a),a=$o.j;var b=$o.u,E=$o.o,z=$o.F;return wu(y),x===void 0&&(x=.5),"rgba("+Math.round(($o.j-a)*x+a)+", "+Math.round(($o.u-b)*x+b)+", "+Math.round(($o.o-E)*x+E)+", "+Math.round(($o.F-z)*x+z)+")"}Mt.Gx=function(){if(this.type===th)return gf(this.color);if((this.type===Cu||this.type===ja)&&this.colorStops!==null){var a=this.colorStops;if(this.type===ja)return gf(a.first().value);if(a.get(.5)!==null)return gf(a.get(.5));if(a.count===2)return a=a.Fa(),gf(av(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,z=1;y.next();){var tt=y.key,ot=Math.abs(.5-y.key);E>z&&ot<E?(x=tt,E=ot):z>=E&&ot<z&&(b=tt,z=ot)}return x>b&&(z=x,x=b,b=z,z=E),E=b-x,gf(av(a.get(x),a.get(b),1-z/E))}return!1};function gf(a){return a?a instanceof To?a.Gx():(wu(a),128>(299*$o.j+587*$o.u+114*$o.o)/1e3):!1}function pf(a,y){switch(y){case Sf:y=100*uv($o.j);var x=100*uv($o.u),b=100*uv($o.o);return Os.j=.4124564*y+.3575761*x+.1804375*b,Os.u=.2126729*y+.7151522*x+.072175*b,Os.o=.0193339*y+.119192*x+.9503041*b,Os.F=$o.F,y=dv(Os.j/mf[0]),x=dv(Os.u/mf[1]),b=dv(Os.o/mf[2]),Ql.j=116*x-16,Ql.u=500*(y-x),Ql.o=200*(x-b),Ql.F=Os.F,Ql.j=Math.min(100,Math.max(0,Ql.j+100*a)),a=(Ql.j+16)/116,y=a-Ql.o/200,Os.j=mf[0]*o1(Ql.u/500+a),Os.u=mf[1]*(Ql.j>dm*fv?Math.pow(a,3):Ql.j/dm),Os.o=mf[2]*o1(y),Os.F=Ql.F,a=-.969266*Os.j+1.8760108*Os.u+.041556*Os.o,y=.0556434*Os.j+-.2040259*Os.u+1.0572252*Os.o,$o.j=255*hv((3.2404542*Os.j+-1.5371385*Os.u+-.4985314*Os.o)/100),$o.u=255*hv(a/100),$o.o=255*hv(y/100),$o.F=Os.F,$o.j=Math.round($o.j),255<$o.j?$o.j=255:0>$o.j&&($o.j=0),$o.u=Math.round($o.u),255<$o.u?$o.u=255:0>$o.u&&($o.u=0),$o.o=Math.round($o.o),255<$o.o?$o.o=255:0>$o.o&&($o.o=0),"rgba("+$o.j+", "+$o.u+", "+$o.o+", "+$o.F+")";case r1:return lv(),Ma.o=Math.min(100,Math.max(0,Ma.o+100*a)),"hsla("+Ma.j+", "+Ma.u+"%, "+Ma.o+"%, "+Ma.F+")";default:le("Unknown color space: "+y)}}function wu(a){vf||(cv(),vf=!0);var y=gv;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,$o.j=a[0],$o.u=a[1],$o.o=a[2],$o.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,$o.j=0,$o.u=0,$o.o=0,$o.F=1)}}function lv(){var a=$o.j/255,y=$o.u/255,x=$o.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),z=b-E;if(E=(b+E)/2,z===0)var tt=a=0;else{switch(b){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*E-1))}Ma.j=Math.round(tt),Ma.u=Math.round(100*a),Ma.o=Math.round(100*E),Ma.F=$o.F}function uv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function hv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function dv(a){return a>fv?Math.pow(a,1/3):(dm*a+16)/116}function o1(a){var y=a*a*a;return y>fv?y:(116*a-16)/dm}function Sc(a,y){typeof a!="string"&&(a instanceof To||le("Value for "+y+" must be a color string or a Brush, not "+a))}function cv(){gv=dr?new Ja(null,void 0,{willReadFrequently:!0}).context:null}_t.Object.defineProperties(To.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&mn(this,a),this.na=a,this.start.Mc()&&(a===Cu?this.start=Js:a===ja&&(this.start=po)),this.end.Mc()&&(a===Cu?this.end=bs:a===ja&&(this.end=po)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&mn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&mn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&mn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&mn(this,a),0>a&&Gn(a,">= zero",To,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&mn(this,a),0>a&&Gn(a,">= zero",To,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&mn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&mn(this,a),this.cr=a,this.xe=null}}}),To.prototype.isDark=To.prototype.Gx,To.prototype.darkenBy=To.prototype.Wy,To.prototype.lightenBy=To.prototype.Vz,To.prototype.addColorStop=To.prototype.addColorStop;var fv=216/24389,dm=24389/27,mf=[95.047,100,108.883],gv=null,$o=new jg,Ma=new jg,Os=new jg,Ql=new jg,vf=!1;To.className="Brush";var th;To.Solid=th=new nn(To,"Solid",0);var Cu;To.Linear=Cu=new nn(To,"Linear",1);var ja;To.Radial=ja=new nn(To,"Radial",2);var yf;To.Pattern=yf=new nn(To,"Pattern",4);var Sf;To.Lab=Sf=new nn(To,"Lab",5);var r1;To.HSL=r1=new nn(To,"HSL",6),To.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},To.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;vf||(cv(),vf=!0);var y=gv;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)},To.lighten=function(a){return n1(a)},To.lightenBy=n1,To.darken=function(a){return i1(a)},To.darkenBy=i1,To.mix=av,To.isDark=gf;function Hr(){this.xa="Base"}Hr.prototype.measure=function(){},Hr.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Hr.prototype.arrange=function(){},Hr.prototype.Ly=function(a,y,x,b,E,z){a.arrange(y,x,b,E,z)},Hr.prototype.iA=function(a){a.Uj()},Hr.prototype.gc=function(){},_t.Object.defineProperties(Hr.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Dn}}}),Hr.prototype.remeasureObject=Hr.prototype.iA,Hr.prototype.arrangeElement=Hr.prototype.Ly,Hr.prototype.measureElement=Hr.prototype.Yz,Hr.className="PanelLayout";function cm(){this.xa="Base"}Be(cm,Hr),cm.prototype.measure=function(a,y,x,b,E,z,tt){var ot=b.length;a=bu(a);for(var rt=0;rt<ot;rt++){var lt=b[rt];if(lt.visible||lt===a){var ut=lt.margin,gt=ut.right+ut.left;ut=ut.top+ut.bottom,lt.measure(y,x,z,tt);var St=lt.measuredBounds;gt=Math.max(St.width+gt,0),ut=Math.max(St.height+ut,0),St=lt.position.x;var Ct=lt.position.y;isFinite(St)||(St=0),isFinite(Ct)||(Ct=0),lt instanceof Xi&<.isGeometryPositioned&&(lt=lt.strokeWidth/2,St-=lt,Ct-=lt),bo(E,St,Ct,gt,ut)}}},cm.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 z=y[E],tt=z.measuredBounds,ot=z.margin,rt=z.position.x,lt=z.position.y;if(rt=isNaN(rt)?-a:rt-a,lt=isNaN(lt)?-x:lt-x,z instanceof Xi&&z.isGeometryPositioned){var ut=z.strokeWidth/2;rt-=ut,lt-=ut}z.visible&&z.arrange(rt+ot.left,lt+ot.top,tt.width,tt.height)}};function fm(){this.xa="Base"}Be(fm,Hr),fm.prototype.measure=function(a,y,x,b,E,z,tt){var ot=b.length;y=rn(),z=bu(a);for(var rt=0;rt<ot;rt++){var lt=b[rt];if(lt.visible||lt===z){var ut=_s(lt,!1);if(ut!==Mn&&ut!==gi)y.push(lt);else{lt.measure(1/0,x,0,tt),ut=lt.margin,lt=lt.measuredBounds;var gt=Math.max(lt.height+ut.top+ut.bottom,0);E.width+=Math.max(lt.width+ut.right+ut.left,0),E.height=Math.max(E.height,gt)}}}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++)rt=y[a],(rt.visible||rt===z)&&(ut=rt.margin,ot=ut.right+ut.left,ut=ut.top+ut.bottom,rt.measure(1/0,x,0,tt),rt=rt.measuredBounds,ut=Math.max(rt.height+ut,0),E.width+=Math.max(rt.width+ot,0),E.height=Math.max(E.height,ut));bn(y)},fm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.top,tt=a.isOpposite,ot=tt?x.width:E.left,rt=0;rt<b;rt++){var lt=z,ut=y[rt];if(ut.visible){var gt=ut.measuredBounds,St=ut.margin,Ct=St.top+St.bottom,bt=z+E.bottom,Bt=gt.height,Yt=_s(ut,!1);(isNaN(ut.desiredSize.height)&&Yt===Fn||Yt===bi)&&(Bt=Math.max(x.height-Ct-bt,0)),Ct=Bt+Ct+bt,bt=ut.alignment,bt.Xb()&&(bt=a.defaultAlignment),bt.sb()||(bt=po),tt&&(ot-=gt.width+St.left+St.right),ut.arrange(ot+bt.offsetX+St.left,lt+bt.offsetY+St.top+(x.height*bt.y-Ct*bt.y),gt.width,Bt),tt||(ot+=gt.width+St.left+St.right)}}};function gm(){this.xa="Base"}Be(gm,Hr),gm.prototype.measure=function(a,y,x,b,E,z){var tt=b.length;x=rn();for(var ot=bu(a),rt=0;rt<tt;rt++){var lt=b[rt];if(lt.visible||lt===ot){var ut=_s(lt,!1);if(ut!==Mn&&ut!==bi)x.push(lt);else{var gt=lt.margin;ut=gt.right+gt.left,gt=gt.top+gt.bottom,lt.measure(y,1/0,z,0),lt=lt.measuredBounds,wr(E,Math.max(E.width,Math.max(lt.width+ut,0)),E.height+Math.max(lt.height+gt,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++)rt=x[a],(rt.visible||rt===ot)&&(lt=rt.margin,tt=lt.right+lt.left,lt=lt.top+lt.bottom,rt.measure(y,1/0,z,0),rt=rt.measuredBounds,lt=Math.max(rt.height+lt,0),E.width=Math.max(E.width,Math.max(rt.width+tt,0)),E.height+=lt);bn(x)}},gm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.left,tt=a.isOpposite,ot=tt?x.height:E.top,rt=0;rt<b;rt++){var lt=z,ut=y[rt];if(ut.visible){var gt=ut.measuredBounds,St=ut.margin,Ct=St.left+St.right,bt=z+E.right,Bt=gt.width,Yt=_s(ut,!1);(isNaN(ut.desiredSize.width)&&Yt===Fn||Yt===gi)&&(Bt=Math.max(x.width-Ct-bt,0)),Ct=Bt+Ct+bt,bt=ut.alignment,bt.Xb()&&(bt=a.defaultAlignment),bt.sb()||(bt=po),tt&&(ot-=gt.height+St.bottom+St.top),ut.arrange(lt+bt.offsetX+St.left+(x.width*bt.x-Ct*bt.x),ot+bt.offsetY+St.top,Bt,gt.height),tt||(ot+=gt.height+St.bottom+St.top)}}};function pm(){this.xa="Base"}Be(pm,Hr),pm.prototype.measure=function(a,y,x,b,E,z,tt){var ot=b.length,rt=a.Pb(),lt=rt.margin,ut=lt.right+lt.left,gt=lt.top+lt.bottom;rt.measure(y,x,z,tt);var St=rt.measuredBounds;z=St.width,tt=St.height;var Ct=Math.max(z+ut,0),bt=Math.max(tt+gt,0),Bt=a.isClipping,Yt=sn.allocAt(-lt.left,-lt.top,Ct,bt),Gt=sn.allocAt(0,0,z,tt);pv(rt,Gt,!0),z=Gt.width,tt=Gt.height;for(var se=!0,ae=bu(a),he=0;he<ot;he++){var be=b[he];St=y;var $e=x;if(be!==rt&&(be.visible||be===ae)){lt=be.margin;var Un=lt.left,oi=lt.top;switch(Ct=lt.right+lt.left,bt=lt.top+lt.bottom,lt=_s(be,!1),lt){case Fn:St=z,$e=tt,oi=Un=bt=Ct=0;break;case gi:St=z,Un=Ct=0;break;case bi:$e=tt,oi=bt=0}be.measure(St,$e,0,0),St=be.measuredBounds,Ct=Math.max(St.width+Ct,0),bt=Math.max(St.height+bt,0),lt=be.alignment,lt.Xb()&&(lt=a.defaultAlignment),lt.sb()||(lt=po);var ti=be.alignmentFocus;if(ti.Xb()&&(ti=po),$e=null,be instanceof Dn&&be.$e!==""&&($e=be.fb(be.$e),$e===be&&($e=null)),Un=Gt.x-Un,oi=Gt.y-oi,$e!==null){for(be.arrange(0,0,St.width,St.height),St=$e.actualBounds,St=zt.allocAt(St.x+(ti.x*St.width-ti.offsetX),St.y+(ti.y*St.height-ti.offsetY)),$e=$e.panel;$e!==be;)$e.transform.Ga(St),$e=$e.panel;Un+=lt.x*z+lt.offsetX-St.x,oi+=lt.y*tt+lt.offsetY-St.y,zt.free(St)}else Un+=lt.x*z+lt.offsetX-(ti.x*St.width+ti.offsetX),oi+=lt.y*tt+lt.offsetY-(ti.y*St.height+ti.offsetY);se?(se=!1,E.h(Un,oi,Ct,bt)):bo(E,Un,oi,Ct,bt)}}switch(se?E.assign(Yt):Bt?E.Uu(Gt.x,Gt.y,Gt.width,Gt.height):bo(E,Yt.x,Yt.y,Yt.width,Yt.height),sn.free(Yt),sn.free(Gt),lt=rt.stretch,lt===_i&&(lt=_s(rt,!1)),lt){case Mn:return;case Fn:if(!isFinite(y)&&!isFinite(x))return;break;case gi:if(!isFinite(y))return;break;case bi:if(!isFinite(x))return}for(St=rt.measuredBounds,z=St.width,tt=St.height,Ct=Math.max(z+ut,0),bt=Math.max(tt+gt,0),lt=rt.margin,Gt=sn.allocAt(-lt.left,-lt.top,Ct,bt),pv(rt,Gt,!0),z=Gt.width,tt=Gt.height,y=0;y<ot;y++)x=b[y],x===rt||!x.visible&&x!==ae||(lt=x.margin,Ct=lt.right+lt.left,bt=lt.top+lt.bottom,St=x.measuredBounds,Ct=Math.max(St.width+Ct,0),bt=Math.max(St.height+bt,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=po),x=x.alignmentFocus,x.Xb()&&(x=po),se?(se=!1,E.h(ut.x*z+ut.offsetX-(x.x*St.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*St.height+x.offsetY)-lt.top,Ct,bt)):bo(E,ut.x*z+ut.offsetX-(x.x*St.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*St.height+x.offsetY)-lt.top,Ct,bt));se?E.assign(Yt):Bt?E.Uu(Gt.x,Gt.y,Gt.width,Gt.height):bo(E,Yt.x,Yt.y,Yt.width,Yt.height),sn.free(Gt)},pm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),z=E.measuredBounds,tt=z.width,ot=z.height,rt=a.padding;z=rt.left,rt=rt.top;var lt=z-x.x,ut=rt-x.y;for(E.arrange(lt,ut,tt,ot),tt=sn.allocAt(0,0,tt,ot),pv(E,tt,!1),ot=0;ot<b;ot++){var gt=y[ot];if(gt!==E){lt=gt.measuredBounds;var St=lt.width,Ct=lt.height;ut=gt.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=po);var bt=gt.alignmentFocus;if(bt.Xb()&&(bt=po),lt=null,gt instanceof Dn&>.$e!==""&&(lt=gt.fb(gt.$e),lt===gt&&(lt=null)),lt!==null){var Bt=lt.actualBounds;for(bt=zt.allocAt(Bt.x+(bt.x*Bt.width-bt.offsetX),Bt.y+(bt.y*Bt.height-bt.offsetY)),lt=lt.panel;lt!==gt;)lt.transform.Ga(bt),lt=lt.panel;lt=ut.x*tt.width+ut.offsetX-bt.x,ut=ut.y*tt.height+ut.offsetY-bt.y,zt.free(bt)}else lt=ut.x*tt.width+ut.offsetX-(bt.x*St+bt.offsetX),ut=ut.y*tt.height+ut.offsetY-(bt.y*Ct+bt.offsetY);lt+=tt.x-x.x,ut+=tt.y-x.y,gt.visible&>.arrange(z+lt,rt+ut,St,Ct)}}sn.free(tt)};function pv(a,y,x){var b=null;if(a instanceof Dn&&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"}Be(mm,Hr),mm.prototype.measure=function(a,y,x,b,E,z,tt){var ot=b.length,rt=a.Pb(),lt=rt.margin,ut=y,gt=x,St=lt.right+lt.left,Ct=lt.top+lt.bottom;rt.measure(y,x,z,tt),lt=rt.measuredBounds;var bt=0,Bt=null;rt instanceof Xi&&(Bt=rt,bt=Bt.strokeWidth*Bt.scale);var Yt=Math.max(lt.width+St,0);lt=Math.max(lt.height+Ct,0);var Gt=Sv(rt),se=Gt.x*Yt+Gt.offsetX;Gt=Gt.y*lt+Gt.offsetY;var ae=xv(rt),he=ae.x*Yt+ae.offsetX;for(ae=ae.y*lt+ae.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(se-he)-bt,0)),isFinite(x)&&(gt=Math.max(Math.abs(Gt-ae)-bt,0)),bt=Wn.alloc(),bt.h(0,0),a=bu(a),ae=0;ae<ot;ae++)Gt=b[ae],Gt===rt||!Gt.visible&&Gt!==a||(lt=Gt.margin,Yt=lt.right+lt.left,se=lt.top+lt.bottom,Gt.measure(ut,gt,0,0),lt=Gt.measuredBounds,Yt=Math.max(lt.width+Yt,0),lt=Math.max(lt.height+se,0),bt.h(Math.max(Yt,bt.width),Math.max(lt,bt.height)));if(ot===1)E.width=Yt,E.height=lt,Wn.free(bt);else{switch(Gt=Sv(rt),ae=xv(rt),ot=b=0,ae.x!==Gt.x&&ae.y!==Gt.y&&(b=bt.width/Math.abs(ae.x-Gt.x),ot=bt.height/Math.abs(ae.y-Gt.y)),Wn.free(bt),bt=0,Bt!==null&&(bt=Bt.strokeWidth*Bt.scale,Mv(Bt)===hi&&(b=ot=Math.max(b,ot))),b+=Math.abs(Gt.offsetX)+Math.abs(ae.offsetX)+bt,ot+=Math.abs(Gt.offsetY)+Math.abs(ae.offsetY)+bt,Bt=rt.stretch,Bt===_i&&(Bt=_s(rt,!1)),Bt){case Mn:tt=z=0;break;case Fn:isFinite(y)&&(b=y),isFinite(x)&&(ot=x);break;case gi:isFinite(y)&&(b=y),tt=0;break;case bi:z=0,isFinite(x)&&(ot=x)}rt.Uj(),rt.measure(b,ot,z,tt),E.width=rt.measuredBounds.width+St,E.height=rt.measuredBounds.height+Ct}},mm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,z=sn.alloc();z.h(0,0,1,1);var tt=b.margin,ot=tt.left;tt=tt.top;var rt=a.padding,lt=rt.left;rt=rt.top,b.arrange(lt+ot,rt+tt,E.width,E.height);var ut=Sv(b),gt=xv(b),St=ut.y*E.height+ut.offsetY,Ct=gt.x*E.width+gt.offsetX;for(gt=gt.y*E.height+gt.offsetY,z.x=ut.x*E.width+ut.offsetX,z.y=St,bo(z,Ct,gt,0,0),z.x+=ot+lt,z.y+=tt+rt,E=0;E<x;E++)ot=y[E],ot!==b&&(lt=ot.measuredBounds,tt=ot.margin,rt=Math.max(lt.width+tt.right+tt.left,0),ut=Math.max(lt.height+tt.top+tt.bottom,0),St=ot.alignment,St.Xb()&&(St=a.defaultAlignment),St.sb()||(St=po),rt=z.width*St.x+St.offsetX-rt*St.x+tt.left+z.x,tt=z.height*St.y+St.offsetY-ut*St.y+tt.top+z.y,ot.visible&&(Ao(z.x,z.y,z.width,z.height,rt,tt,lt.width,lt.height)?ot.arrange(rt,tt,lt.width,lt.height):ot.arrange(rt,tt,lt.width,lt.height,new sn(z.x,z.y,z.width,z.height))));sn.free(z)};function vm(){this.xa="Base",this.name="Table"}Be(vm,Hr),vm.prototype.measure=function(a,y,x,b,E){for(var z=b.length,tt=rn(),ot=rn(),rt=0;rt<z;rt++){var lt=b[rt],ut=lt instanceof Dn?lt:null;if(ut!==null&&eh(ut)&<.visible){ot.push(ut);for(var gt=ut.O.s,St=gt.length,Ct=0;Ct<St;Ct++){var bt=gt[Ct];ut.type===Dn.TableRow?bt.row=lt.row:ut.type===Dn.TableColumn&&(bt.column=lt.column),tt.push(bt)}}else tt.push(lt)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Bt=[],Yt=0;Yt<z;Yt++){var Gt=tt[Yt];Gt.visible&&(Ar(Gt,!0),Yl(Gt,!0),Bt[Gt.row]||(Bt[Gt.row]=[]),Bt[Gt.row][Gt.column]||(Bt[Gt.row][Gt.column]=[]),Bt[Gt.row][Gt.column].push(Gt))}bn(tt);var se=rn(),ae=rn(),he=rn(),be={count:0},$e={count:0},Un=y,oi=x,ti=a.rowDefs,jn=a.colDefs,wn=null;z=ti.length;for(var Gi=0;Gi<z;Gi++)wn=ti[Gi],wn!==void 0&&(wn.actual=0);z=jn.length;for(var Oi=0;Oi<z;Oi++)wn=jn[Oi],wn!==void 0&&(wn.actual=0);for(var wo=Bt.length,zo=0,Zr=0;Zr<wo;Zr++)Bt[Zr]&&(zo=Math.max(zo,Bt[Zr].length));var Xr=Math.min(a.topIndex,wo-1),xs=Math.min(a.leftIndex,zo-1),_r=0;wo=Bt.length;for(var dh=bu(a),kr=0;kr<wo;kr++)if(Bt[kr]){zo=Bt[kr].length;var bl=a.Fb(kr);bl.actual=0;for(var Ps=bl.oc=0;Ps<zo;Ps++)if(Bt[kr][Ps]){var ch=a.Eb(Ps);se[Ps]===void 0&&(ch.actual=0,ch.oc=0,se[Ps]=!0);for(var Na=Bt[kr][Ps],el=Na.length,pa=0;pa<el;pa++){var na=Na[pa];if(na.visible||na===dh){var ed=1<na.rowSpan||1<na.columnSpan;ed&&(kr<Xr||Ps<xs||ae.push(na));var Ll=na.margin,Wf=Ll.right+Ll.left,ma=Ll.top+Ll.bottom,ws=Sl(na,bl,ch,!1),Lp=na.desiredSize,Fc=!isNaN(Lp.height),zl=!isNaN(Lp.width)&&Fc;if(ed||ws===Mn||zl||kr<Xr||Ps<xs||(be[Ps]!==void 0||ws!==Fn&&ws!==gi||(be[Ps]=-1,be.count++),$e[kr]!==void 0||ws!==Fn&&ws!==bi||($e[kr]=-1,$e.count++),he.push(na)),na.measure(1/0,1/0,0,0),!(kr<Xr||Ps<xs)){var ia=na.measuredBounds,Hd=Math.max(ia.width+Wf,0),va=Math.max(ia.height+ma,0);if(na.rowSpan===1&&(ws===Mn||ws===gi)){wn=a.Fb(kr);var nd=wn.Wc();_r=Math.max(va-wn.actual,0),_r+nd>oi&&(_r=Math.max(oi-nd,0));var H0=wn.oa===0;wn.oc=wn.oc+_r,wn.actual=wn.oa+_r,oi=Math.max(oi-(_r+(H0?nd:0)),0)}if(na.columnSpan===1&&(ws===Mn||ws===bi)){wn=a.Eb(Ps);var Mp=wn.Wc();_r=Math.max(Hd-wn.actual,0),_r+Mp>Un&&(_r=Math.max(Un-Mp,0));var Wy=wn.oa===0;wn.oc=wn.oc+_r,wn.actual=wn.oa+_r,Un=Math.max(Un-(_r+(Wy?Mp:0)),0)}ed&&na.Uj()}}}}}bn(se);var au=0,Eu=0;z=a.columnCount;for(var Oc=0;Oc<z;Oc++){var id=jn[Oc];id!==void 0&&(au+=isNaN(id.Hc)?id.oc:id.Hc,id.oc!==0&&(au+=id.Wc()))}z=a.rowCount;for(var Kf=0;Kf<z;Kf++){var od=ti[Kf];od!==void 0&&(Eu+=isNaN(od.Hc)?od.oc:od.Hc,od.oc!==0&&(Eu+=od.Wc()))}Un=Math.max(y-au,0);var lu=oi=Math.max(x-Eu,0),fh=Un;z=he.length;for(var oa=0;oa<z;oa++){var Hl=he[oa],G0=a.Fb(Hl.row),ku=a.Eb(Hl.column),$f=Hl.measuredBounds,Ml=Hl.margin,Gd=Ml.right+Ml.left,Gl=Ml.top+Ml.bottom;be[Hl.column]=ku.oc===0&&be[Hl.column]!==void 0?Math.max($f.width+Gd,be[Hl.column]):null,$e[Hl.row]=G0.oc===0&&$e[Hl.row]!==void 0?Math.max($f.height+Gl,$e[Hl.row]):null}var Dc=0,Zf=0,pl;for(pl in $e)pl!=="count"&&(Dc+=$e[pl]);for(pl in be)pl!=="count"&&(Zf+=be[pl]);for(var is=Wn.alloc(),Ep=0;Ep<z;Ep++){var zs=he[Ep];if(zs.visible||zs===dh){var Nr=a.Fb(zs.row),Hs=a.Eb(zs.column),Nu=0;isFinite(Hs.width)?Nu=Hs.width:(isFinite(Un)&&be[zs.column]!==null?Zf===0?Nu=Hs.actual+Un:Nu=be[zs.column]/Zf*fh:be[zs.column]!==null?Nu=Un:Nu=Hs.actual||Un,Nu=Math.max(0,Nu-Hs.Wc()));var gh=0;switch(isFinite(Nr.height)?gh=Nr.height:(isFinite(oi)&&$e[zs.row]!==null?Dc===0?gh=Nr.actual+oi:gh=$e[zs.row]/Dc*lu:$e[zs.row]!==null?gh=oi:gh=Nr.actual||oi,gh=Math.max(0,gh-Nr.Wc())),is.h(Math.max(Hs.minimum,Math.min(Nu,Hs.maximum)),Math.max(Nr.minimum,Math.min(gh,Nr.maximum))),ws=Sl(zs,Nr,Hs,!1),ws){case gi:is.height=Math.max(is.height,Nr.actual+oi);break;case bi:is.width=Math.max(is.width,Hs.actual+Un)}var Wd=zs.margin,Ky=Wd.right+Wd.left,W0=Wd.top+Wd.bottom;zs.Uj(),zs.measure(is.width,is.height,Hs.minimum,Nr.minimum);var _f=zs.measuredBounds,Kd=Math.max(_f.width+Ky,0),Bc=Math.max(_f.height+W0,0);isFinite(Un)&&(Kd=Math.min(Kd,is.width)),isFinite(oi)&&(Bc=Math.min(Bc,is.height));var ra=0;ra=Nr.actual,Nr.actual=Math.max(Nr.actual,Bc),Nr.oc=Math.max(Nr.oc,Bc),_r=Nr.actual-ra,oi=Math.max(oi-_r,0),$e[zs.row]===null&&(lu=Math.max(lu-_r,0)),ra=Hs.actual,Hs.actual=Math.max(Hs.actual,Kd),Hs.oc=Math.max(Hs.oc,Kd),_r=Hs.actual-ra,Un=Math.max(Un-_r,0),be[zs.column]===null&&(fh=Math.max(fh-_r,0))}}bn(he);var Tu=Wn.alloc(),El=rn(),Ka=rn();if(z=ae.length,z!==0){for(var rd=0;rd<wo;rd++)if(Bt[rd]){zo=Bt[rd].length;var Vf=a.Fb(rd);El[rd]=Vf.actual;for(var sd=0;sd<zo;sd++)if(Bt[rd][sd]){var K0=a.Eb(sd);Ka[sd]=K0.actual}}}for(var Uf=0;Uf<z;Uf++){var mr=ae[Uf];if(mr.visible||mr===dh){var ml=a.Fb(mr.row),nl=a.Eb(mr.column);switch(is.h(Math.max(nl.minimum,Math.min(y,nl.maximum)),Math.max(ml.minimum,Math.min(x,ml.maximum))),ws=Sl(mr,ml,nl,!1),ws){case Fn:Ka[nl.index]!==0&&(is.width=Math.min(is.width,Ka[nl.index])),El[ml.index]!==0&&(is.height=Math.min(is.height,El[ml.index]));break;case gi:Ka[nl.index]!==0&&(is.width=Math.min(is.width,Ka[nl.index]));break;case bi:El[ml.index]!==0&&(is.height=Math.min(is.height,El[ml.index]))}isFinite(nl.width)&&(is.width=nl.width),isFinite(ml.height)&&(is.height=ml.height),Tu.h(0,0);for(var $0=nl.minimum,ya=ml.minimum,ph=1;ph<mr.rowSpan&&!(mr.row+ph>=a.rowCount);ph++)wn=a.Fb(mr.row+ph),_r=0,_r=ws===Fn||ws===bi?Math.max(wn.minimum,El[mr.row+ph]===0?wn.maximum:Math.min(El[mr.row+ph],wn.maximum)):Math.max(wn.minimum,isNaN(wn.Hc)?wn.maximum:Math.min(wn.Hc,wn.maximum)),Tu.height+=_r,ya+=wn.minimum;for(var il=1;il<mr.columnSpan&&!(mr.column+il>=a.columnCount);il++)wn=a.Eb(mr.column+il),_r=0,_r=ws===Fn||ws===gi?Math.max(wn.minimum,Ka[mr.column+il]===0?wn.maximum:Math.min(Ka[mr.column+il],wn.maximum)):Math.max(wn.minimum,isNaN(wn.Hc)?wn.maximum:Math.min(wn.Hc,wn.maximum)),Tu.width+=_r,$0+=wn.minimum;is.width+=Tu.width,is.height+=Tu.height;var Xf=mr.margin,ad=Xf.right+Xf.left,kp=Xf.top+Xf.bottom;mr.measure(is.width,is.height,$0,ya);for(var Yf=mr.measuredBounds,Wl=Math.max(Yf.width+ad,0),$d=Math.max(Yf.height+kp,0),ld=0,Jf=0;Jf<mr.rowSpan&&!(mr.row+Jf>=a.rowCount);Jf++)wn=a.Fb(mr.row+Jf),ld+=wn.total||0;if(ld<$d){var mh=$d-ld,uu=$d-ld;if(mr.spanAllocation!==null)for(var vh=mr.spanAllocation,Fu=0;Fu<mr.rowSpan&&!(0>=mh)&&!(mr.row+Fu>=a.rowCount);Fu++){wn=a.Fb(mr.row+Fu);var yh=wn.oa||0,Zd=vh(mr,wn,uu);wn.actual=Math.min(wn.maximum,yh+Zd),wn.oa!==yh&&(mh-=wn.oa-yh)}for(;0<mh;){var kl=wn.oa||0;if(isNaN(wn.height)&&wn.maximum>kl&&(wn.actual=Math.min(wn.maximum,kl+mh),wn.oa!==kl&&(mh-=wn.oa-kl)),wn.index===0)break;wn=a.Fb(wn.index-1)}}for(var Ac=0,Sh=0;Sh<mr.columnSpan&&!(mr.column+Sh>=a.columnCount);Sh++)wn=a.Eb(mr.column+Sh),Ac+=wn.total||0;if(Ac<Wl){var Ic=Wl-Ac,$y=Wl-Ac;if(mr.spanAllocation!==null)for(var Ou=mr.spanAllocation,_d=0;_d<mr.columnSpan&&!(0>=Ic)&&!(mr.column+_d>=a.columnCount);_d++){wn=a.Eb(mr.column+_d);var Np=wn.oa||0,Zy=Ou(mr,wn,$y);wn.actual=Math.min(wn.maximum,Np+Zy),wn.oa!==Np&&(Ic-=wn.oa-Np)}for(;0<Ic;){var Z0=wn.oa||0;if(isNaN(wn.width)&&wn.maximum>Z0&&(wn.actual=Math.min(wn.maximum,Z0+Ic),wn.oa!==Z0&&(Ic-=wn.oa-Z0)),wn.index===0)break;wn=a.Eb(wn.index-1)}}}}bn(ae),Wn.free(Tu),Wn.free(is),El!==void 0&&bn(El),Ka!==void 0&&bn(Ka);var Rc=0,jc=0,_0=a.desiredSize,vx=a.maxSize;ws=_s(a,!0);var Tp=Eu=au=0,Fp=0;z=a.columnCount;for(var V0=0;V0<z;V0++)jn[V0]!==void 0&&(wn=a.Eb(V0),isFinite(wn.width)?(Tp+=wn.width,Tp+=wn.Wc()):Em(wn)===Wg?(Tp+=wn.oa,Tp+=wn.Wc()):wn.oa!==0&&(au+=wn.oa,au+=wn.Wc()));isFinite(_0.width)?Rc=Math.min(_0.width,vx.width):Rc=ws!==Mn&&isFinite(y)?y:au,Rc=Math.max(Rc,a.minSize.width),Rc=Math.max(Rc-Tp,0);for(var oP=au===0?1:Math.max(Rc/au,1),U0=0;U0<z;U0++)jn[U0]!==void 0&&(wn=a.Eb(U0),isFinite(wn.width)||Em(wn)===Wg||(wn.actual=wn.oa*oP),wn.position=E.width,wn.oa!==0&&(E.width+=wn.oa,E.width+=wn.Wc()));z=a.rowCount;for(var X0=0;X0<z;X0++)ti[X0]!==void 0&&(wn=a.Fb(X0),isFinite(wn.height)?(Fp+=wn.height,Fp+=wn.Wc()):Em(wn)===Wg?(Fp+=wn.oa,Fp+=wn.Wc()):wn.oa!==0&&(Eu+=wn.oa,Eu+=wn.Wc()));isFinite(_0.height)?jc=Math.min(_0.height,vx.height):jc=ws!==Mn&&isFinite(x)?x:Eu,jc=Math.max(jc,a.minSize.height),jc=Math.max(jc-Fp,0);for(var rP=Eu===0?1:Math.max(jc/Eu,1),Y0=0;Y0<z;Y0++)ti[Y0]!==void 0&&(wn=a.Fb(Y0),isFinite(wn.height)||Em(wn)===Wg||(wn.actual=wn.oa*rP),wn.position=E.height,wn.oa!==0&&(E.height+=wn.oa,E.height+=wn.Wc()));z=ot.length;for(var _y=0;_y<z;_y++){var Op=ot[_y],Vy=0,Uy=0;Op.type===Dn.TableRow?(Vy=E.width,wn=a.Fb(Op.row),Uy=wn.actual):(wn=a.Eb(Op.column),Vy=wn.actual,Uy=E.height),Op.measuredBounds.h(0,0,Vy,Uy),Ar(Op,!1)}bn(ot),a.inRowsCols=Bt},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,z=E.left;E=E.top;var tt=a.inRowsCols;if(tt!==null){for(var ot,rt,lt=tt.length,ut=0,gt=0;gt<lt;gt++)tt[gt]&&(ut=Math.max(ut,tt[gt].length));rt=a.rowDefs,ot=a.colDefs;var St=gt=0,Ct=Math.min(a.topIndex,lt-1);if(0<rt.length){for(;Ct!==lt&&(rt[Ct]===void 0||rt[Ct].oa===0);)Ct++;Ct=Math.max(Math.min(Ct,lt-1),0),gt=-rt[Ct].position}var bt=Math.min(a.leftIndex,ut-1);if(0<ot.length){for(;bt!==ut&&(ot[bt]===void 0||ot[bt].oa===0);)bt++;bt=Math.max(Math.min(bt,ut-1),0),St=-ot[bt].position}for(var Bt=0,Yt=0;Bt!==lt&&rt[Bt]===void 0;)Bt++;for(;Yt!==lt&&ot[Yt]===void 0;)Yt++;ut=a.part,a.Fb(Bt),a.Eb(Yt);for(var Gt=0;Gt<y.length;Gt++){var se=y[Gt];if(se instanceof Dn&&se.visible&&eh(se)){if(se.type===Dn.TableRow){ot=a.Fb(se.row);var ae=a.Eb(Yt)}else ot=a.Fb(Bt),ae=a.Eb(se.column);rt=ot.position+gt+E,ot.oa!==0&&(rt+=ot.Io(Math.max(Bt,Ct))),ot=ae.position+St+z,ae.oa!==0&&(ot+=ae.Io(Math.max(Yt,bt))),ae=se.measuredBounds,se.Uk(),se.actualBounds.ka();var he=se.actualBounds,be=sn.allocAt(he.x,he.y,he.width,he.height);he.x=se.type===Dn.TableRow?z:ot,he.y=se.type===Dn.TableColumn?E:rt,he.width=ae.width,he.height=ae.height,se.actualBounds.freeze(),Yl(se,!1),jo(be,he)||ut===null||(ut.oh(),se.Pn(ut)),sn.free(be)}}for(Gt=Wn.alloc(),se=0;se<lt;se++)if(tt[se]){for(ut=tt[se].length,ae=a.Fb(se),rt=ae.position+gt+E,ae.oa!==0&&(rt+=ae.Io(Math.max(Bt,Ct))),he=0;he<ut;he++)if(tt[se][he]){be=a.Eb(he),ot=be.position+St+z,be.oa!==0&&(ot+=be.Io(Math.max(Yt,bt)));for(var $e=tt[se][he],Un=$e.length,oi=0;oi<Un;oi++){var ti=$e[oi],jn=ti.measuredBounds;Gt.h(0,0);for(var wn=1;wn<ti.rowSpan&&!(se+wn>=a.rowCount);wn++){var Gi=a.Fb(se+wn);Gi.oa!==0&&(Gt.height+=Gi.total)}for(wn=1;wn<ti.columnSpan&&!(he+wn>=a.columnCount);wn++)Gi=a.Eb(he+wn),Gi.oa!==0&&(Gt.width+=Gi.total);var Oi=be.oa+Gt.width,wo=ae.oa+Gt.height;wn=ot,Gi=rt;var zo=Oi,Zr=wo,Xr=ot,xs=rt,_r=Oi,dh=wo;ot+Oi>x.width&&(_r=Math.max(x.width-ot,0)),rt+wo>x.height&&(dh=Math.max(x.height-rt,0));var kr=ti.alignment;if(kr.Xb()){kr=a.defaultAlignment,kr.sb()||(kr=po);var bl=kr.x,Ps=kr.y,ch=kr.offsetX;kr=kr.offsetY;var Na=be.alignment,el=ae.alignment;Na.sb()&&(bl=Na.x,ch=Na.offsetX),el.sb()&&(Ps=el.y,kr=el.offsetY)}else bl=kr.x,Ps=kr.y,ch=kr.offsetX,kr=kr.offsetY;(isNaN(bl)||isNaN(Ps))&&(Ps=bl=.5,kr=ch=0),Na=jn.width,el=jn.height;var pa=ti.margin,na=pa.left+pa.right,ed=pa.top+pa.bottom,Ll=Sl(ti,ae,be,!1);!isNaN(ti.desiredSize.width)||Ll!==Fn&&Ll!==gi||(Na=Math.max(Oi-na,0)),!isNaN(ti.desiredSize.height)||Ll!==Fn&&Ll!==bi||(el=Math.max(wo-ed,0)),Oi=ti.maxSize,wo=ti.minSize,Na=Math.min(Oi.width,Na),el=Math.min(Oi.height,el),Na=Math.max(wo.width,Na),el=Math.max(wo.height,el),Oi=el+ed,wn+=zo*bl-(Na+na)*bl+ch+pa.left,Gi+=Zr*Ps-Oi*Ps+kr+pa.top,ti.visible&&(Ao(Xr,xs,_r,dh,wn,Gi,jn.width,jn.height)?ti.arrange(wn,Gi,Na,el):ti.arrange(wn,Gi,Na,el,new sn(Xr,xs,_r,dh)))}}}for(Wn.free(Gt),a=0;a<b;a++)x=y[a],z=x instanceof Dn?x:null,z!==null&&eh(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function ym(){this.xa="Base"}Be(ym,Hr),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}Be(Sm,Hr),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}Be(xm,Hr),xm.prototype.measure=function(a,y,x,b,E,z,tt){1<b.length&&le("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,z,tt);var ot=b.measuredBounds,rt=b.margin,lt=rt.right+rt.left;if(rt=rt.top+rt.bottom,isFinite(y)||isFinite(x)){var ut=b.scale,gt=ot.width;ot=ot.height;var St=Math.max(y-lt,0),Ct=Math.max(x-rt,0),bt=1;a.viewboxStretch===hi?gt!==0&&ot!==0&&(bt=Math.min(St/gt,Ct/ot)):gt!==0&&ot!==0&&(bt=Math.max(St/gt,Ct/ot)),bt===0&&(bt=1e-4),b.Ca*=bt,ut!==b.scale&&(Ar(b,!0),b.measure(1/0,1/0,z,tt))}ot=b.measuredBounds,E.width=isFinite(y)?y:Math.max(ot.width+lt,0),E.height=isFinite(x)?x:Math.max(ot.height+rt,0)},xm.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,z=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=po),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-E*tt.y+tt.offsetY,b.width,b.height)};function zg(){this.xa="Base"}Be(zg,Hr),zg.prototype.measure=function(){},zg.prototype.arrange=function(){},zg.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 z=a.naturalBounds,tt=a.actualBounds,ot=z.width,rt=z.height,lt=Math.ceil(ot/E),ut=Math.ceil(rt/b),gt=a.gridOrigin,St=gt.x;gt=gt.y,y.save(),y.beginPath(),y.rect(0,0,ot,rt),y.clip(),y.Se();for(var Ct=[],bt=a.O.s,Bt=bt.length,Yt=0;Yt<Bt;Yt++){var Gt=bt[Yt],se=[];if(Ct.push(se),Gt.visible){var ae=Gt.interval;if(!(0>ae)){Gt=vv(Gt.figure);for(var he=0;he<Bt;he++)if(he!==Yt){var be=bt[he];be.visible&&vv(be.figure)===Gt&&(be=be.interval,be>ae&&se.push(be))}}}}for(bt=a.O.s,Bt=bt.length,Yt=0;Yt<Bt;Yt++){var $e=bt[Yt];if($e.visible&&(se=$e.interval||1,Gt=Math.abs(se),!(2>E*Gt*x))){if(ae=$e.segmentIndex,(!isFinite(ae)||isNaN(ae))&&(ae=0),0>ae&&(ae=Gt-Math.min(-ae,Gt)),ae=Math.round(ae%Gt),Gt=$e.opacity,he=1,Gt!==1){if(Gt===0)continue;he=y.globalAlpha,y.globalAlpha=he*Gt}be=Ct[Yt];var Un=!1,oi=$e.strokeDashArray;if(oi!==null&&(Un=!0,y.js(oi,$e.strokeDashOffset)),$e.figure==="LineV"&&$e.stroke!==null&&0<$e.strokeWidth){for(y.lineWidth=$e.strokeWidth,cr(a,y,$e.stroke,!1,!1,z,tt),y.beginPath(),oi=$e=Math.floor((St-E)/E);oi<=$e+lt;oi++){var ti=oi*E+St;0<=ti&&ti<=ot&&Pm(oi,se,ae,be)&&(y.moveTo(ti,0),y.lineTo(ti,rt))}y.stroke(),y.Se()}else if($e.figure==="LineH"&&$e.stroke!==null&&0<$e.strokeWidth){for(y.lineWidth=$e.strokeWidth,cr(a,y,$e.stroke,!1,!1,z,tt),y.beginPath(),oi=$e=Math.floor((gt-b)/b);oi<=$e+ut;oi++)ti=oi*b+gt,0<=ti&&ti<=rt&&Pm(oi,se,ae,be)&&(y.moveTo(0,ti),y.lineTo(ot,ti));y.stroke(),y.Se()}else if($e.figure==="BarV"&&$e.fill!==null)for(cr(a,y,$e.fill,!0,!1,z,tt),$e=$e.width,isNaN($e)&&($e=E),ti=oi=Math.floor((St-E)/E);ti<=oi+lt;ti++){var jn=ti*E+St;0<=jn+$e&&jn<=ot&&Pm(ti,se,ae,be)&&y.fillRect(jn,0,$e,rt)}else if($e.figure==="BarH"&&$e.fill!==null)for(cr(a,y,$e.fill,!0,!1,z,tt),$e=$e.height,isNaN($e)&&($e=b),ti=oi=Math.floor((gt-b)/b);ti<=oi+ut;ti++)jn=ti*b+gt,0<=jn+$e&&jn<=rt&&Pm(ti,se,ae,be)&&y.fillRect(0,jn,ot,$e);Un&&y.fs(),Gt!==1&&(y.globalAlpha=he)}}y.restore(),y.Vc(!1)};function Pm(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 wm(){this.xa="Base"}Be(wm,Hr),wm.prototype.measure=function(a,y,x,b,E){var z=b.length;if(a instanceof So||a instanceof Hn){var tt=null,ot=null;if(a instanceof Hn&&(tt=a),a instanceof So&&(ot=a,tt=ot.adornedPart,a.j===null&&(a.j=[])),tt instanceof Hn){var rt=tt;if(z===0)wr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var lt=a instanceof So?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ut=rt.points,gt=tt.pointsCount;ot!==null?ot.Ul(!1):tt!==null&&tt.Ul(!1),ot=y.width;var St=y.height,Ct=a.j;if(Ct.length=0,lt!==null){s1(a,ot,St,lt);var bt=lt.measuredBounds;x.ed(bt),Ct.push(bt)}bt=eo.alloc();for(var Bt=zt.alloc(),Yt=zt.alloc(),Gt=0;Gt<z;Gt++){var se=b[Gt];if(se!==lt)if(se.isPanelMain&&se instanceof Xi){s1(a,ot,St,se);var ae=se.measuredBounds;x.ed(ae),Ct.push(ae)}else if(2>gt)se.measure(1/0,1/0,0,0),ae=se.measuredBounds,x.ed(ae),Ct.push(ae);else{var he=se.segmentIndex,be=se.segmentFraction,$e=se.alignmentFocus;$e.Mc()&&($e=po);var Un=se.segmentOrientation,oi=se.segmentOffset;if(isNaN(he)){var ti=rt.ua;ae=rn(),ti.Qu(be,ae);var jn=zt.allocAt(ae[0],ae[1]);if(jn.add(rt.i(0)),ti.type===Kn.j?jn.offset(-ti.startX,-ti.startY):(ti=ti.figures.first(),ti!==null&&jn.offset(-ti.startX,-ti.startY)),ti=ae[2],Un!==Bs){var wn=rt.computeAngle(se,Un,ti);se.Kb=wn}wn=jn.x-y.x;var Gi=jn.y-y.y;zt.free(jn),bn(ae)}else if(he<-gt||he>=gt)ae=zt.alloc(),rt.vg(),rt.computeMidPoint(ae),ti=rt.midAngle,Un!==Bs&&(wn=rt.computeAngle(se,Un,ti),se.Kb=wn),wn=ae.x-y.x,Gi=ae.y-y.y,zt.free(ae);else{if(wn=0,0<=he?(Gi=ut.M(he),ae=he<gt-1?ut.M(he+1):Gi):(wn=gt+he,Gi=ut.M(wn),ae=0<wn?ut.M(wn-1):Gi),Gi.Xa(ae)){0<=he?(ti=0<he?ut.M(he-1):Gi,wn=he<gt-2?ut.M(he+2):ae):(ti=wn<gt-1?ut.M(wn+1):Gi,wn=1<wn?ut.M(wn-2):ae),jn=ti.Bf(Gi);var Oi=ae.Bf(wn);ti=jn>Oi+10?0<=he?ti.ab(Gi):Gi.ab(ti):Oi>jn+10?0<=he?ae.ab(wn):wn.ab(ae):0<=he?ti.ab(wn):wn.ab(ti)}else ti=0<=he?Gi.ab(ae):ae.ab(Gi);Un!==Bs&&(wn=rt.computeAngle(se,Un,ti),se.Kb=wn),wn=Gi.x+(ae.x-Gi.x)*be-y.x,Gi=Gi.y+(ae.y-Gi.y)*be-y.y}se.measure(1/0,1/0,0,0),ae=se.measuredBounds,jn=se.naturalBounds;var wo=0;se instanceof Xi&&(wo=se.strokeWidth),Oi=jn.width+wo;var zo=jn.height+wo;bt.reset(),bt.translate(-ae.x,-ae.y),bt.scale(se.scale,se.scale),bt.rotate(Un===Bs?se.angle:ti,Oi/2,zo/2),Un!==Qg&&Un!==tp||bt.rotate(90,Oi/2,zo/2),Un!==qg&&Un!==ep||bt.rotate(-90,Oi/2,zo/2),Un===Qm&&(45<ti&&135>ti||225<ti&&315>ti)&&bt.rotate(-ti,Oi/2,zo/2),jn=new sn(0,0,Oi,zo),Bt.xi(jn,$e),bt.Ga(Bt),$e=-Bt.x+wo/2*se.scale,se=-Bt.y+wo/2*se.scale,Yt.assign(oi),wo=isNaN(oi.x);var Zr=isNaN(oi.y);if(wo||Zr){Oi=Oi/2+3,zo=zo/2+3;var Xr=45<=ti&&135>=ti,xs=225<=ti&&315>=ti;Un===Bs&&(Xr||xs)?(Yt.x=Zr?Oi:oi.y,Yt.y=wo?zo:oi.x,Xr?0<=he||isNaN(he)&&.5>be||!wo||(Yt.y=-zo):xs&&((0<=he||isNaN(he)&&.5>be)&&wo&&(Yt.y=-zo),Zr&&(Yt.x=-Oi))):(wo&&(Yt.x=0<=he||isNaN(he)&&.5>be?Oi:-Oi),Zr&&(Yt.y=-zo),Yt.rotate(ti))}else Yt.rotate(ti);wn+=Yt.x,Gi+=Yt.y,jn.set(ae),jn.h(wn+$e,Gi+se,ae.width,ae.height),Ct.push(jn),x.ed(jn)}}if(tt!==null)for(b=tt.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),wr(E,x.width||0,x.height||0),eo.free(bt),zt.free(Bt),zt.free(Yt)}}}},wm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof So||a instanceof Hn){var b=a,E=null;a instanceof So&&(E=a,b=E.adornedPart);var z=a instanceof So?null:b.path,tt=a.j;if(tt.length!==0){var ot=0;if(z!==null&&ot<tt.length){var rt=tt[ot];ot++,z.arrange(rt.x-a.jg.x,rt.y-a.jg.y,rt.width,rt.height)}for(rt=0;rt<x;rt++){var lt=y[rt];if(lt!==z&&ot<tt.length){var ut=tt[ot];ot++,lt.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Hn)for(z=a.labelNodes;z.next();){var gt=a;tt=z.value,ot=tt.segmentIndex,rt=tt.segmentFraction;var St=tt.alignmentFocus;if(lt=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(ot)){var Ct=gt.ua,bt=rn();Ct.Qu(rt,bt);var Bt=zt.allocAt(bt[0],bt[1]);Bt.add(gt.i(0)),Ct.type===Kn.j||(Ct=Ct.figures.first()),Bt.offset(-Ct.startX,-Ct.startY),Ct=bt[2],lt!==Bs&&(gt=gt.computeAngle(tt,lt,Ct),tt.angle=gt),gt=Bt.x;var Yt=Bt.y;zt.free(Bt),bn(bt)}else if(ot<-x||ot>=x)bt=zt.alloc(),Ct=gt,Yt=bt,Ct.vg(),Ct.computeMidPoint(Yt),Ct=gt.midAngle,lt!==Bs&&(gt=gt.computeAngle(tt,lt,Ct),tt.angle=gt),gt=bt.x,Yt=bt.y,zt.free(bt);else{if(Bt=0,0<=ot?(bt=y.s[ot],Yt=ot<x-1?y.s[ot+1]:bt):(Bt=x+ot,bt=y.s[Bt],Yt=0<Bt?y.s[Bt-1]:bt),bt.Xa(Yt)){0<=ot?(Ct=0<ot?y.s[ot-1]:bt,Bt=ot<x-2?y.s[ot+2]:Yt):(Ct=Bt<x-1?y.s[Bt+1]:bt,Bt=1<Bt?y.s[Bt-2]:Yt);var Gt=Ct.Bf(bt),se=Yt.Bf(Bt);Ct=Gt>se+10?0<=ot?Ct.ab(bt):bt.ab(Ct):se>Gt+10?0<=ot?Yt.ab(Bt):Bt.ab(Yt):0<=ot?Ct.ab(Bt):Bt.ab(Ct)}else Ct=0<=ot?bt.ab(Yt):Yt.ab(bt);lt!==Bs&&(gt=gt.computeAngle(tt,lt,Ct),tt.angle=gt),gt=bt.x+(Yt.x-bt.x)*rt,Yt=bt.y+(Yt.y-bt.y)*rt}if(St.ys())tt.location=new zt(gt,Yt);else{St.Mc()&&(St=po),bt=eo.alloc(),bt.reset(),bt.scale(tt.scale,tt.scale),bt.rotate(tt.angle,0,0);var ae=tt.naturalBounds;Bt=sn.allocAt(0,0,ae.width,ae.height),Gt=zt.alloc(),Gt.xi(Bt,St),bt.Ga(Gt),St=-Gt.x,se=-Gt.y;var he=ae.width,be=ae.height;ae=zt.alloc(),ae.assign(ut);var $e=isNaN(ut.x),Un=isNaN(ut.y);if($e||Un){he=he/2+3,be=be/2+3;var oi=45<=Ct&&135>=Ct,ti=225<=Ct&&315>=Ct;lt===Bs&&(oi||ti)?(ae.x=Un?he:ut.y,ae.y=$e?be:ut.x,oi?0<=ot||isNaN(ot)&&.5>rt||!$e||(ae.y=-be):ti&&((0<=ot||isNaN(ot)&&.5>rt)&&$e&&(ae.y=-be),Un&&(ae.x=-he))):($e&&(ae.x=0<=ot||isNaN(ot)&&.5>rt?he:-he),Un&&(ae.y=-be),ae.rotate(Ct))}else ae.rotate(Ct);gt+=ae.x,Yt+=ae.y,bt.pp(Bt),St+=Bt.x,se+=Bt.y,ot=zt.allocAt(gt+St,Yt+se),tt.move(ot),zt.free(ot),zt.free(ae),zt.free(Gt),sn.free(Bt),eo.free(bt)}}E!==null?E.Ul(!1):b.Ul(!1),b=A1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),zt.free(b)}};function s1(a,y,x,b){if(La(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof So&&a.type===Dn.Link&&a.adornedObject instanceof Xi&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Hn&&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 So&&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),Ar(b,!1)}}function Hg(){this.xa="Base"}Be(Hg,Hr),Hg.prototype.measure=function(a,y,x,b,E,z,tt){var ot=a.Pb();a.graduatedBounds=[];var rt=ot.margin,lt=rt.right+rt.left,ut=rt.top+rt.bottom;ot.measure(y,x,z,tt);var gt=ot.measuredBounds,St=new sn(-rt.left,-rt.top,Math.max(gt.width+lt,0),Math.max(gt.height+ut,0));a.graduatedBounds.push(St),E.assign(St);for(var Ct=ot.geometry,bt=ot.strokeWidth,Bt=Ct.flattenedSegments,Yt=Ct.flattenedLengths,Gt=Ct.flattenedTotalLength,se=Bt.length,ae=0,he=0,be=rn(),$e=0;$e<se;$e++){var Un=Bt[$e],oi=[];he=ae=0;for(var ti=Un.length,jn=0;jn<ti;jn+=2){var wn=Un[jn],Gi=Un[jn+1];if(jn!==0){var Oi=180*Math.atan2(Gi-he,wn-ae)/Math.PI;0>Oi&&(Oi+=360),oi.push(Oi)}ae=wn,he=Gi}be.push(oi)}if(a.graduatedIntervals===null){for(var wo=[],zo=a.O.s,Zr=zo.length,Xr=0;Xr<Zr;Xr++){var xs=zo[Xr],_r=[];if(wo.push(_r),xs.visible){var dh=xs.interval;if(!(0>dh)){for(var kr=0;kr<Zr;kr++)if(kr!==Xr){var bl=zo[kr];if(bl.visible&&xs.constructor===bl.constructor){var Ps=bl.interval;Ps>dh&&_r.push(Ps)}}}}}a.graduatedIntervals=wo}var ch=a.graduatedIntervals,Na=a.O.s,el=Na.length,pa=0,na=0,ed=Gt;a.graduatedMarks=[];for(var Ll,Wf=0;Wf<el;Wf++){var ma=Na[Wf];if(Ll=[],ma.visible&&ma!==ot){var ws=Math.abs(ma.interval),Lp=a.graduatedTickUnit;if(!(2>Lp*ws*Gt/a.graduatedRange&&ma.graduatedSkip===null)){var Fc=Yt[0][0],zl=0,ia=0;na=Gt*ma.graduatedStart-1e-4,ed=Gt*ma.graduatedEnd+1e-4;var Hd=Lp*ws,va=a.graduatedTickBase;if(va<a.graduatedMin){var nd=(a.graduatedMin-va)/Hd;nd=nd%1===0?nd:Math.floor(nd+1),va+=nd*Hd}else va>a.graduatedMin+Hd&&(va-=Math.floor((va-a.graduatedMin)/Hd)*Hd);for(var H0=ch[Wf],Mp=va,Wy=1e-6*a.graduatedMax,au=1;va<=a.graduatedMax+Wy;au++){t:{for(var Eu=H0.length,Oc=0;Oc<Eu;Oc++){var id=(va-a.graduatedTickBase)%(H0[Oc]*a.graduatedTickUnit),Kf=1e-6*a.graduatedTickUnit;if(id<Kf&&id>-Kf){var od=!1;break t}}od=!0}if(od&&(va>a.graduatedMax&&(va=a.graduatedMax),ma.graduatedSkip===null||ma instanceof Go&&!ma.graduatedSkip(va,ma)||ma instanceof Xi&&!ma.graduatedSkip(va,ma))&&(pa=(va-a.graduatedMin)*Gt/a.graduatedRange,pa>Gt&&(pa=Gt),na<=pa&&pa<=ed)){for(var lu=be[zl][ia],fh=Yt[zl][ia];zl<Yt.length;){for(;pa>Fc&&ia<Yt[zl].length-1;)ia++,lu=be[zl][ia],fh=Yt[zl][ia],Fc+=fh;if(pa<=Fc)break;zl++,ia=0,lu=be[zl][ia],fh=Yt[zl][ia],Fc+=fh}var oa=Bt[zl],Hl=oa[2*ia],G0=oa[2*ia+1],ku=(pa-(Fc-fh))/fh,$f=new zt(Hl+(oa[2*ia+2]-Hl)*ku+bt/2-Ct.bounds.x,G0+(oa[2*ia+3]-G0)*ku+bt/2-Ct.bounds.y);$f.scale(ot.scale,ot.scale);t:{var Ml=lu,Gd=be[zl];if(!(.5005>ku&&.4995<ku)){var Gl=Ml;if(.5>ku?0<ia?Gl=Gd[ia-1]:Te.$(oa[0],oa[oa.length-2])&&Te.$(oa[1],oa[oa.length-1])&&(Gl=Gd[Gd.length-1]):.5<ku&&(ia+1<Gd.length?Gl=Gd[ia+1]:Te.$(oa[0],oa[oa.length-2])&&Te.$(oa[1],oa[oa.length-1])&&(Gl=Gd[0])),Ml!==Gl){var Dc=Math.abs(Ml-Gl);if(180<Dc&&(Ml<Gl?Ml+=360:Gl+=360,Dc=Math.abs(Ml-Gl)),5e-4>ku||.9995<ku){lu=(Ml+Gl)/2%360;break t}if(10>Dc){var Zf=1-Math.abs(.5-ku);lu=(Ml*Zf+Gl*(1-Zf))%360;break t}}}lu=Ml}if(ma instanceof Go){var pl="";ma.graduatedFunction!==null?(pl=ma.graduatedFunction(va,ma),pl=pl!=null?pl.toString():""):pl=(+va.toFixed(2)).toString(),pl!==""&&Ll.push({$l:$f,angle:lu,text:pl})}else Ll.push({$l:$f,angle:lu})}va=Mp+au*Hd}}}a.graduatedMarks.push(Ll)}bn(be);var is=a.graduatedMarks;if(is!==null)for(var Ep=b.length,zs=0;zs<Ep;zs++){var Nr=b[zs],Hs=is[zs];if(Nr.visible&&Nr!==ot&&Hs.length!==0){if(Nr instanceof Xi){var Nu=a,gh=E,Wd=Nr.alignmentFocus;Wd.Mc()&&(Wd=Js);var Ky=Nr.angle;Nr.Kb=0,Nr.measure(1/0,1/0,0,0),Nr.Kb=Ky;var W0=Nr.measuredBounds,_f=W0.width,Kd=W0.height,Bc=sn.allocAt(0,0,_f,Kd),ra=zt.alloc();ra.xi(Bc,Wd),sn.free(Bc);for(var Tu=-ra.x,El=-ra.y,Ka=new sn,rd=Hs.length,Vf=0;Vf<rd;Vf++)for(var sd=Hs[Vf],K0=sd.$l.x,Uf=sd.$l.y,mr=sd.angle,ml=0;4>ml;ml++){switch(ml){case 0:ra.h(Tu,El);break;case 1:ra.h(Tu+_f,El);break;case 2:ra.h(Tu,El+Kd);break;case 3:ra.h(Tu+_f,El+Kd)}ra.rotate(mr+Nr.angle),ra.offset(K0,Uf),Vf===0&&ml===0?Ka.h(ra.x,ra.y,0,0):Ka.Ye(ra),ra.offset(-K0,-Uf),ra.rotate(-mr-Nr.angle)}zt.free(ra),Nu.graduatedBounds!==null&&Nu.graduatedBounds.push(Ka),bo(gh,Ka.x,Ka.y,Ka.width,Ka.height)}else if(Nr instanceof Go){var nl=a,$0=E;nl.temporaryTextBlock===null&&(nl.temporaryTextBlock=new Go);var ya=nl.temporaryTextBlock;P1(ya,Nr);var ph=Nr.alignmentFocus;ph.Mc()&&(ph=Js);for(var il=Nr.segmentOrientation,Xf=Nr.segmentOffset,ad=new sn,kp=0,Yf=0,Wl=0,$d=0,ld=0,Jf=Hs.length,mh=0;mh<Jf;mh++){var uu=Hs[mh];kp=uu.$l.x,Yf=uu.$l.y,Wl=uu.angle,ld=$d=Nr.angle,il!==Bs&&(ld=il===Jg||il===Jm?Wl+Nr.angle:Wl,$d=Hn.computeAngle(il,ld)),ya.Kb=$d,ya.text=uu.text||"",ya.measure(1/0,1/0,0,0);var vh=ya.measuredBounds,Fu=ya.naturalBounds,yh=Fu.width,Zd=Fu.height,kl=eo.alloc();kl.reset(),kl.translate(-vh.x,-vh.y),kl.scale(ya.scale,ya.scale),kl.rotate(ld,yh/2,Zd/2),il!==Qg&&il!==tp||kl.rotate(90,yh/2,Zd/2),il!==qg&&il!==ep||kl.rotate(-90,yh/2,Zd/2),il===Qm&&(45<Wl&&135>Wl||225<Wl&&315>Wl)&&kl.rotate(-Wl,yh/2,Zd/2);var Ac=sn.allocAt(0,0,yh,Zd),Sh=zt.alloc();Sh.xi(Ac,ph),kl.Ga(Sh);var Ic=-Sh.x,$y=-Sh.y,Ou=zt.alloc();Ou.assign(Xf),isNaN(Ou.x)&&(Ou.x=yh/2+3),isNaN(Ou.y)&&(Ou.y=-(Zd/2+3)),Ou.rotate(Wl),kp+=Ou.x+Ic,Yf+=Ou.y+$y;var _d=new sn(kp,Yf,vh.width,vh.height),Np=new sn(vh.x,vh.y,vh.width,vh.height),Zy=new sn(Fu.x,Fu.y,Fu.width,Fu.height);uu.Sz=$d,uu.lineCount=ya.lineCount,uu.lines=[ya.Cb,ya.Ih,ya.df,ya.Le,ya.Qc,ya.Qb,ya.ze],uu.actualBounds=_d,uu.measuredBounds=Np,uu.naturalBounds=Zy,mh===0?ad.assign(_d):ad.ed(_d),zt.free(Ou),zt.free(Sh),sn.free(Ac),eo.free(kl)}nl.graduatedBounds!==null&&nl.graduatedBounds.push(ad),bo($0,ad.x,ad.y,ad.width,ad.height)}Ar(Nr,!1)}}},Hg.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var z=a.graduatedBounds,tt=0,ot=z[tt];tt++,b!==null&&b.arrange(ot.x-x.x,ot.y-x.y,ot.width,ot.height);for(var rt=y.length,lt=0;lt<rt;lt++){var ut=y[lt];ot=E[lt],ut.visible&&ut!==b&&ot.length!==0&&(ot=z[tt],tt++,ut.arrange(ot.x-x.x,ot.y-x.y,ot.width,ot.height))}a.graduatedBounds=null}}},Hg.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,z=E.width,tt=E.height;E=y instanceof ca,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var ot=z.actualBounds,rt=a.O.s,lt=a.graduatedMarks,ut=rt.length,gt=0;gt<ut;gt++){var St=rt[gt],Ct=lt[gt],bt=Ct.length;if(St.visible&&St!==z&&Ct.length!==0){if(St instanceof Xi){if(!(2>a.graduatedTickUnit*St.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&St.graduatedSkip===null)){var Bt=St.measuredBounds,Yt=St.strokeWidth*St.scale,Gt=St.alignmentFocus;Gt.Mc()&&(Gt=Js);for(var se=0;se<bt;se++){var ae=Ct[se].$l,he=Ct[se].angle,be=Gt,$e=St.Ab;$e.reset(),$e.translate(ae.x+ot.x,ae.y+ot.y),$e.rotate(he+St.angle,0,0),$e.translate(-Bt.width*be.x+be.offsetX+Yt/2,-Bt.height*be.y+be.offsetY+Yt/2),$e.scale(St.scale,St.scale),Ya(St,!1),St.wh.set(St.Ab),St.Kk=St.scale,Ia(St,!1),St.gc(y,x),E&&(a.svg.appendChild(St.svg),St.svg=null),St.Ab.reset()}}}else if(St instanceof Go)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Go),Bt=a.temporaryTextBlock,P1(Bt,St),Yt=0;Yt<bt;Yt++)Gt=Ct[Yt],Gt.actualBounds&&Gt.measuredBounds&&Gt.naturalBounds&&(Bt.ec=Gt.text||"",Bt.Kb=Gt.Sz||0,Bt.Gc=Gt.lineCount||0,se=Gt.lines,se!==void 0&&(Bt.Cb=se[0],Bt.Ih=se[1],Bt.df=se[2],Bt.Le=se[3],Bt.Qc=se[4],Bt.Qb=se[5],Bt.ze=se[6]),Gt.naturalBounds&&(Bt.dc=Gt.naturalBounds),Gt.actualBounds&&(se=Gt.actualBounds,Bt.arrange(se.x,se.y,se.width,se.height)),se=Gt.actualBounds,Bt.arrange(se.x,se.y,se.width,se.height),ae=Gt.measuredBounds,Gt=Gt.naturalBounds,he=Bt.Ab,he.reset(),he.translate(se.x+ot.x,se.y+ot.y),he.translate(-ae.x,-ae.y),Bt.no(he,Gt.x,Gt.y,Gt.width,Gt.height),Ya(Bt,!1),Bt.wh.set(Bt.Ab),Bt.Kk=Bt.scale,Ia(Bt,!1),Bt.Ng=St.part,Bt.Me=St.panel,Bt.gc(y,x),Bt.Me=null,Bt.Ng=null,E&&(a.svg.appendChild(Bt.svg),Bt.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Dn(a,y){if(Me.call(this),this.na=null,a===void 0)this.na=Dn.Position;else if(typeof a=="string"){var x=ul.I(a);x!==null&&(this.na=x)}else a instanceof Hr?this.na=a:a&&(this.na=Dn.Position,y=a);this.na===null&&le("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Dn.Grid?1048576:0),this.O=new qe,this.yb=jr,this.Tm=wi,this.Uf=_i,this.$g=null,this.$e="",this.jg=new sn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=hi,this.jn=Qo,this.kn=Ai,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Be(Dn,Me),Dn.prototype.cloneProtected=function(a){Me.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},Dn.prototype.Af=function(a){Me.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},Dn.prototype.copy=function(){var a=Me.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 z=a.O,tt=z.count;if(z.Gb(tt,E),z=a.part,z!==null){z.Rh=null,E.portId!==null&&z instanceof Xn&&(z.Te=!0);var ot=a.diagram;ot!==null&&ot.undoManager.isUndoingRedoing||z.cb(br,"elements",a,null,E,null,tt)}}return a}return null},Mt=Dn.prototype,Mt.toString=function(){return"Panel("+this.type.name+")#"+$i(this)},Mt.Pn=function(a){Me.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},Mt.hh=function(a,y){if(this.na===Dn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Dn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Dn.Table)if(a.yc(),a instanceof ca){var x=a.yd;a.yd=um(a,"gojs-ts"),mv(this,a),a.nh.pop(),a.yd=x}else mv(this,a);(x=this.isClipping&&this.na===Dn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,z=E.length,tt=0;tt<z;tt++){var ot=E[tt];x&&ot===b&&(a.clipInsteadOfFill=!0),ot.gc(a,y),x&&ot===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function mv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Cm(a,y,!0,x,!0),b!==null&&Cm(a,y,!1,b,!0),x!==null&&a1(a,y,!0,x),b!==null&&a1(a,y,!1,b),x!==null&&Cm(a,y,!0,x,!1),b!==null&&Cm(a,y,!1,b,!1)}function a1(a,y,x,b){for(var E=b.length,z=a.actualBounds,tt=a.naturalBounds,ot=!0,rt=0;rt<E;rt++){var lt=b[rt];if(lt!==void 0&<.actual!==0)if(ot)ot=!1;else{if(x){if(lt.position>tt.height)continue}else if(lt.position>tt.width)continue;var ut=lt.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var gt=lt.separatorStroke;if(gt===null&&(gt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&>!==null){cr(a,y,gt,!1,!1,tt,z),gt=!1;var St=lt.separatorDashArray;St===null&&(St=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),St!==null&&(gt=!0,y.js(St,0)),y.beginPath(),St=lt.position+ut,x?St>tt.height&&(ut-=St-tt.height):St>tt.width&&(ut-=St-tt.width),lt=lt.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(lt+=ut.top,St=tt.width-ut.right,y.moveTo(ut.left,lt),y.lineTo(St,lt)):(lt+=ut.left,St=tt.height-ut.bottom,y.moveTo(lt,ut.top),y.lineTo(lt,St)),y.stroke(),y.Se(),gt&&y.fs()}}}}function Cm(a,y,x,b,E){for(var z=b.length,tt=a.actualBounds,ot=a.naturalBounds,rt=l1(a,!0),lt=l1(a,!1),ut=0;ut<z;ut++){var gt=b[ut];if(gt!==void 0&>.background!==null&>.coversSeparators!==E&>.actual!==0){var St=x?tt.height:tt.width;if(!(gt.position>St)){var Ct=gt.Wc(),bt=gt.separatorStrokeWidth;isNaN(bt)&&(bt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Bt=gt.separatorStroke;Bt===null&&(Bt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Bt===null||gt.index===(x?rt:lt))&&(bt=0),Ct-=bt,bt=gt.position+bt,Ct+=gt.actual,bt+Ct>St&&(Ct=St-bt),0>=Ct||(St=a.yb,cr(a,y,gt.background,!0,!1,ot,tt),x?y.fillRect(St.left,bt+St.top,tt.width-(St.left+St.right),Ct):y.fillRect(bt+St.left,St.top,Ct,tt.height-(St.top+St.bottom)))}}}}function l1(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 vv(a){return a==="LineV"||a==="BarV"}Mt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Mt.kk=function(a,y,x){if(!Me.prototype.kk.call(this,a,y,x))return!1;if(this.type===Dn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,mv(this,a),a.yd=null;else if(this.na===Dn.Grid||this.na===Dn.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},Mt.nk=function(){return!0},Mt.$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,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var ot=y[tt].actualBounds;E=tt===0?ot.x:Math.min(ot.x,E),z=tt===0?ot.y:Math.min(ot.y,z)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Me.prototype.$o.call(this,a,y,x,b)},Mt.Sj=function(a,y,x,b,E){var z=this.se(),tt=this.transform,ot=1/(tt.m11*tt.m22-tt.m12*tt.m21),rt=tt.m22*ot,lt=-tt.m12*ot,ut=-tt.m21*ot,gt=tt.m11*ot,St=ot*(tt.m21*tt.dy-tt.m22*tt.dx),Ct=ot*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,Te.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,b,E);if(this.background!==null)return z=a*rt+y*ut+St,ot=a*lt+y*gt+Ct,a=x*rt+b*ut+St,rt=x*lt+b*gt+Ct,E.h(0,0),x=this.naturalBounds,z=Te.Ff(0,0,x.width,x.height,z,ot,a,rt,E),E.transform(tt),z;z||(rt=1,ut=lt=0,gt=1,Ct=St=0),ot=a*rt+y*ut+St,a=a*lt+y*gt+Ct,rt=x*rt+b*ut+St,x=x*lt+b*gt+Ct,E.h(rt,x),b=(rt-ot)*(rt-ot)+(x-a)*(x-a),lt=!1,gt=this.O.s,Ct=gt.length,ut=zt.alloc(),St=null,y=1/0;var bt=null,Bt=this.isClipping&&this.na===Dn.Spot;Bt&&(bt=zt.alloc(),St=this.Pb(),(lt=St.Sj(ot,a,rt,x,bt))&&(y=(ot-bt.x)*(ot-bt.x)+(a-bt.y)*(a-bt.y)));for(var Yt=0;Yt<Ct;Yt++){var Gt=gt[Yt];Gt.visible&&Gt!==St&&Gt.Sj(ot,a,rt,x,ut)&&(lt=!0,Gt=(ot-ut.x)*(ot-ut.x)+(a-ut.y)*(a-ut.y),Gt<b&&(b=Gt,E.set(ut)))}return Bt&&(y>b&&E.set(bt),zt.free(bt)),zt.free(ut),z&&E.transform(tt),lt},Mt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Me.prototype.Gj.call(this)},Mt.v=function(a){if(!La(this)){Me.prototype.v.call(this,a),a=null,(this.na===Dn.Auto||this.na===Dn.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 z=_s(E,!1);(E instanceof Ds||E instanceof Dn||E instanceof Go||z!==Mn)&&E.v(!0)}}}},Mt.Uj=function(){if(!La(this)){Ar(this,!0),Yl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Mt.Uk=function(){if(!(this.l&2048)){Ya(this,!0),Ia(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Mt.Wu=function(){Ia(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Mt.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,b=tt.height),x=Math.max(x,tt.width),b=Math.max(b,tt.height);var ot=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,ot.width)),isNaN(z.height)||(y=Math.min(z.height,ot.height)),a=Math.max(x,a),y=Math.max(b,y);var rt=this.yb;a=Math.max(a-rt.left-rt.right,0),y=Math.max(y-rt.top-rt.bottom,0);var lt=this.O.s;lt.length!==0&&this.na.measure(this,a,y,lt,E,x,b),a=E.width+rt.left+rt.right,rt=E.height+rt.top+rt.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(rt=z.height),a=Math.min(ot.width,a),rt=Math.min(ot.height,rt),a=Math.max(tt.width,a),rt=Math.max(tt.height,rt),a=Math.max(x,a),rt=Math.max(b,rt),wr(E,a,rt),wr(this.naturalBounds,a,rt),this.Ge(0,0,a,rt)},Mt.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function bu(a){return a.part!==null?a.part.locationObject:null}Mt.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=_s(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,ot=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===b&&(a=Mn),a){case Mn:(y>x||z>b)&&(this.v(),this.measure(y>x?x:y,z>b?b:z,0,0));break;case Fn:this.v(!0),this.measure(x+ot,b+tt,0,0);break;case gi:this.v(!0),this.measure(x+ot,z+tt,0,0);break;case bi:this.v(!0),this.measure(y+ot,b+tt,0,0)}}this.na.arrange(this,E,this.jg)}},Mt.gh=function(a){var y=this.naturalBounds,x=bu(this);if(Ao(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=zt.allocAt(0,0);b--;){var z=y[b];if((z.visible||z===x)&&(Mi(E.set(a),z.transform),z.ca(E)))return zt.free(E),!0}return zt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},Mt.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},Mt.qm=function(a,y){if(y(this,a),a instanceof Dn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Od(a,y){u1(a,a,y)}function u1(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=y[E];z instanceof Dn&&u1(a,z,x)}}function bx(a,y){h1(a,a,y)}function h1(a,y,x){if(x(y),y instanceof Dn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)h1(a,y[E],x)}}Mt.Nl=function(a){return d1(this,this,a)};function d1(a,y,x){if(x(y))return y;if(y instanceof Dn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=d1(a,y[E],x);if(z!==null)return z}}return null}Mt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Gg(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Dn){var z=E.fb(a);if(z!==null)return z}if(E.name===a)return E}return null};function c1(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof Dn?x=Math.max(x,c1(E)):E instanceof Xi&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}Mt.se=function(){return!(this.type===Dn.TableRow||this.type===Dn.TableColumn)};function eh(a){return a.type===Dn.TableRow||a.type===Dn.TableColumn}Mt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Fs(this)))return null;var b=this.naturalBounds,E=1/this.Df(),z=this.se(),tt=z?a:Mi(zt.allocAt(a.x,a.y),this.transform),ot=this.diagram,rt=10,lt=5;if(ot!==null&&(rt=ot.Ql("extraTouchArea"),lt=rt/2),Ao(-(lt*E),-(lt*E),b.width+rt*E,b.height+rt*E,tt.x,tt.y)){if(!this.isAtomic){E=this.O.s;var ut=E.length;if(ot=zt.alloc(),lt=(rt=this.isClipping&&this.na===Dn.Spot)?this.Pb():null,rt&&(lt.se()?Mi(ot.set(a),lt.transform):ot.set(a),!lt.ca(ot)))return zt.free(ot),z||zt.free(tt),null;for(var gt=bu(this);ut--;){var St=E[ut];if((St.visible||St===gt)&&(St.se()?Mi(ot.set(a),St.transform):ot.set(a),!rt||St!==lt)){var Ct=null;if(St instanceof Dn?Ct=St.ic(ot,y,x):St.pickable===!0&&St.ca(ot)&&(Ct=St),Ct!==null&&(y!==null&&(Ct=y(Ct)),Ct!==null&&(x===null||x(Ct))))return zt.free(ot),z||zt.free(tt),Ct}}zt.free(ot)}return this.background===null&&this.areaBackground===null?(z||zt.free(tt),null):(a=Ao(0,0,b.width,b.height,tt.x,tt.y)?this:null,z||zt.free(tt),a)}return z||zt.free(tt),null},Mt.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,z=this.se(),tt=z?a:Mi(zt.allocAt(a.x,a.y),this.transform);if(E=Ao(0,0,E.width,E.height,tt.x,tt.y),eh(this)||E){if(!this.isAtomic){for(var ot=this.O.s,rt=ot.length,lt=zt.alloc(),ut=bu(this);rt--;){var gt=ot[rt];if(gt.visible||gt===ut){gt.se()?Mi(lt.set(a),gt.transform):lt.set(a);var St=gt;gt=gt instanceof Dn?gt:null,(gt!==null?gt.ji(lt,y,x,b):St.ca(lt))&&St.pickable!==!1&&(y!==null&&(St=y(St)),St===null||x!==null&&!x(St)||b.add(St))}}zt.free(lt)}return z||zt.free(tt),E&&(this.background!==null||this.areaBackground!==null)}return z||zt.free(tt),!1},Mt.Cf=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=eo.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return yv(this,y,x,E),z===void 0&&eo.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var ot=bu(this),rt=this.O.s,lt=rt.length;lt--;){var ut=rt[lt];if(ut.visible||ut===ot){var gt=ut.actualBounds,St=this.naturalBounds;gt.x>St.width||gt.y>St.height||0>gt.x+gt.width||0>gt.y+gt.height||(gt=ut,ut=ut instanceof Dn?ut:null,St=eo.alloc(),St.set(tt),(ut!==null?ut.Cf(a,y,x,b,E,St):$r(gt,a,b,St))&&(y!==null&&(gt=y(gt)),gt===null||x!==null&&!x(gt)||E.add(gt)),eo.free(St))}}return z===void 0&&eo.free(tt),b}return z===void 0&&eo.free(tt),!1};function yv(a,y,x,b){for(var E=a.O.s,z=E.length;z--;){var tt=E[z];if(tt.visible){var ot=tt.actualBounds,rt=a.naturalBounds;ot.x>rt.width||ot.y>rt.height||0>ot.x+ot.width||0>ot.y+ot.height||(tt instanceof Dn&&yv(tt,y,x,b),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||b.add(tt))}}}Mt.og=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var tt=this.naturalBounds,ot=this.se(),rt=ot?a:Mi(zt.allocAt(a.x,a.y),this.transform),lt=ot?y:Mi(zt.allocAt(y.x,y.y),this.transform),ut=rt.Bf(lt),gt=0<rt.x&&rt.x<tt.width&&0<rt.y&&rt.y<tt.height||co(rt.x,rt.y,0,0,0,tt.height)<=ut||co(rt.x,rt.y,0,tt.height,tt.width,tt.height)<=ut||co(rt.x,rt.y,tt.width,tt.height,tt.width,0)<=ut||co(rt.x,rt.y,tt.width,0,0,0)<=ut;if(tt=rt.zd(0,0)<=ut&&rt.zd(0,tt.height)<=ut&&rt.zd(tt.width,0)<=ut&&rt.zd(tt.width,tt.height)<=ut,ot||(zt.free(rt),zt.free(lt)),gt){if(!this.isAtomic){rt=zt.alloc(),lt=zt.alloc(),ut=bu(this);for(var St=this.O.s,Ct=St.length;Ct--;){var bt=St[Ct];if(bt.visible||bt===ut){var Bt=bt.actualBounds,Yt=this.naturalBounds;(!ot||!(Bt.x>Yt.width||Bt.y>Yt.height||0>Bt.x+Bt.width||0>Bt.y+Bt.height))&&(bt.se()?(Bt=bt.transform,Mi(rt.set(a),Bt),Mi(lt.set(y),Bt)):(rt.set(a),lt.set(y)),Bt=bt,bt=bt instanceof Dn?bt:null,(bt!==null?bt.og(rt,lt,x,b,E,z):Bt.tx(rt,lt,E))&&(x!==null&&(Bt=x(Bt)),Bt===null||b!==null&&!b(Bt)||z.add(Bt)))}}zt.free(rt),zt.free(lt)}return E?gt:tt}return!1};function Sv(a){var y=null;return a instanceof Xi&&(y=a.spot1,y===wi&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Dr),y}function xv(a){var y=null;return a instanceof Xi&&(y=a.spot2,y===wi&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Ws),y}Mt.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},Mt.M=function(a){return this.O.M(a)},Mt.Gb=function(a,y){y instanceof vi&&le("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&le("Cannot make a Panel contain itself: "+this.toString()),le("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&le("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Dn.Grid||y instanceof Xi||le("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Dn.Graduated||y instanceof Xi||y instanceof Go||le("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 Yn),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var z=-1,tt=this.O.s,ot=tt.length,rt=0;rt<ot;rt++)if(tt[rt]===y){z=rt;break}if(z!==-1){if(z===a||z+1>=E.count&&a>=E.count)return;E.mb(z),b=z}else le("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),La(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Dn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Lm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Xn&&(x.Te=!0),x.Te&&x instanceof Xn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(zr,"elements",this,y,null,b,null),x.cb(br,"elements",this,null,y,null,a)))};function Pv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Mt.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)},Mt.mb=function(a){0<=a&&this.pc(a,!0)},Mt.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),Ar(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof Xn&&(b instanceof Dn?b.qm(b,function(tt,ot){$v(z,ot,y)}):$v(z,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(zr,"elements",this,b,null,a,null))},Mt.Fb=function(a){0>a&&Gn(a,">= 0",Dn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Ir;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(br,"rowdefs",this,null,x,null,a)}return y[a]},Mt.oA=function(a){if(0>a&&Gn(a,">= 0",Dn,"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(zr,"rowdefs",this,x,null,a,null),this.v()}}};function f1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Ir?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Mt.Eb=function(a){0>a&&Gn(a,">= 0",Dn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Ir;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(br,"coldefs",this,null,x,null,a)}return y[a]},Mt.jA=function(a){if(0>a&&Gn(a,">= 0",Dn,"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(zr,"coldefs",this,x,null,a,null),this.v()}}};function g1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Ir?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Mt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Mm(y,a),this},Mt.Hy=function(a,y){return(a=this.Fb(a))&&Mm(a,new Ir(y)),this},Mt.By=function(a,y){return(a=this.Eb(a))&&Mm(a,new Ir(y)),this},Mt.nz=function(a){if(0>a||this.type!==Dn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var z=x[E];if(z!==void 0&&(y+=z.total,a<y))break}return E},Mt.fz=function(a){if(0>a||this.type!==Dn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var z=x[E];if(z!==void 0&&(y+=z.total,a<y))break}return E},Mt.Fz=function(a,y){if(y===void 0&&(y=new zt(NaN,NaN)),this.type!==Dn.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)},Mt.Gz=function(a){if(this.type!==Dn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function p1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Qa(a){var y=a.allBindings;if(y===null)a.data!==null&&le("Template cannot have .data be non-null: "+a),a.allBindings=y=new qe;else if(y._isFrozen)return;var x=new qe;Pv(a,!1),a.qm(a,function(lt,ut){ut.th();var gt=ut.localBindings;if(gt!==null)for(mc(ut,!1),gt=gt.iterator;gt.next();){var St=gt.value;St.mode===up&&mc(ut,!0);var Ct=St.sourceName;Ct!==null&&(Ct==="/"&&Pv(lt,!0),Ct=NS(St,lt,ut),Ct!==null&&(x.add(Ct),Ct.srcBindings===null&&(Ct.srcBindings=new qe),Ct.srcBindings.add(St))),y.add(St)}if(ut instanceof Dn&&ut.type===Dn.Table){if(0<ut.rowCount){for(lt=ut.rowDefs,gt=lt.length,St=0;St<gt;St++)if(Ct=lt[St],Ct!==void 0&&Ct.be!==null)for(var bt=Ct.be.iterator;bt.next();){var Bt=bt.value;Bt.xd=Ct,Bt.to=2,Bt.wl=Ct.index,y.add(Bt)}}if(0<ut.columnCount){for(ut=ut.colDefs,lt=ut.length,gt=0;gt<lt;gt++)if(St=ut[gt],St!==void 0&&St.be!==null)for(Ct=St.be.iterator;Ct.next();)bt=Ct.value,bt.xd=St,bt.to=1,bt.wl=St.index,y.add(bt)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){mc(E,!0);for(var z=E.srcBindings.iterator;z.next();){var tt=z.value;E.localBindings===null&&(E.localBindings=new qe),E.localBindings.add(tt)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,z=E.xd,z!==null){E.xd=null;var ot=E.targetProperty,rt=ot.indexOf(".");0<rt&&z instanceof Dn&&(tt=ot.substring(0,rt),ot=ot.substr(rt+1),rt=z.fb(tt),rt!==null?(z=rt,E.targetProperty=ot):si('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+E.toString())),z instanceof Ir?(tt=$i(z.panel),E.Ai=tt===void 0?-1:tt,z.panel.bindingId=E.Ai):z instanceof Me?(tt=$i(z),E.Ai=tt===void 0?-1:tt,z.bindingId=E.Ai):le("Unknown type of binding target: "+z)}y.freeze(),a instanceof vi&&a.Zc()&&a.Va()}Mt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return bx(y,function(x){x instanceof Dn&&(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&&Qa(y),y},Mt.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 z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(E==="/"?b=z.part:E==="."?b=z:E===".."&&(b=z.panel),E=x.to,E!==0){if(!(z instanceof Dn))continue;E===1?z=z.Eb(x.wl):E===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,b)}}},Mt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Lx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,z=null;E<x&&(z=a[E],!(z instanceof Dn&&z.data!==null));)E++,z=a[E];if(x-E!==b)return!0;if(z===null)return 0<b;for(var tt=0;E<x&&tt<b;){if(z=a[E],!(z instanceof Dn)||z.data!==y[tt])return!0;E++,tt++}return!1}function Gg(a){if(a.type===Dn.Spot||a.type===Dn.Auto)return Math.min(a.O.length,1);if(a.type===Dn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Xi&&b.isPanelMain))break}return x}return a.type===Dn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Dn&&eh(a))?1:0}Mt.mv=function(){for(var a=Gg(this);this.O.length>a;)this.pc(this.O.length-1,!1);m1(this,this.itemArray)};function m1(a,y){var x=Gg(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++)bm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var z=y[E],tt=b<a.O.length?a.O.M(b):null;if(tt instanceof Dn){if(tt.data!==z){var ot=Cv(a,tt.data),rt=Cv(a,z),lt=rt!==ot;lt||(ot=bv(a,ot),lt=bv(a,rt)!==ot),lt?(a.pc(b,!1),bm(a,z,E,!1)):tt.data=z}}else bm(a,z,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,wv(a,x,0),La(a)||a.v(),a.graduatedIntervals=null,a.If()||Lm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Xn&&(y.Te=!0),y.Te&&y instanceof Xn&&(y.wc=null))}}function bm(a,y,x,b){if(!(y==null||0>x)){var E=Cv(a,y);if(E=bv(a,E),E!==null){if(Qa(E),E=E.copy(),E.l&16777216){var z=a.ih();z!==null&&Pv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Yn),a.ge.add(y,E)),z=x+Gg(a),a.Gb(z,E),b&&(E.ub=y,wv(a,z,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 Dn){var E=y,z=x;b.type===Dn.TableRow?b.row=E:b.type===Dn.TableColumn&&(b.column=E),b.itemIndex=z}y++,x++}}function Cv(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=Pr(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;le("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function 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&&(v1||(v1=!0,si('No item template Panel found for category "'+y+'" on '+a),si(" Using default item template."),a=new Dn,y=new Go,y.bind(new Er("text","",On)),a.add(y),y1=a),b=y1)),b}function Lm(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Dn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var z=y[E];x&&z instanceof Dn&&!z.isEnabled||Lm(a,z,x)}}}function Rl(a,y){y.name=a,ul.add(a,y)}_t.Object.defineProperties(Dn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Dn.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&&Gn(a,">= 0",Dn,"padding"),a=new mi(a)):(0>a.left&&Gn(a.left,">= 0",Dn,"padding:value.left"),0>a.right&&Gn(a.right,">= 0",Dn,"padding:value.right"),0>a.top&&Gn(a.top,">= 0",Dn,"padding:value.top"),0>a.bottom&&Gn(a.bottom,">= 0",Dn,"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:jr},set:function(a){typeof a=="number"&&(a=new mi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new za),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 To)&&(a instanceof To&&a.freeze(),this.T===null&&(this.T=new za),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 za),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 z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||le("defaultRowSeparatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new za),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 To)&&(a instanceof To&&a.freeze(),this.T===null&&(this.T=new za),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 za),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 z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||le("defaultColumnSeparatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new za),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 za),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||le("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Bl(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||le("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Bl(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 Lu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),os(this)&&(a=this.part,a!==null&&Vo(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 Lu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),os(this)&&(a=this.part,a!==null&&Vo(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 Lu),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 Lu),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 Lu,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 Lu,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 Lu,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 Lu,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 za),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new za),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:km},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new za),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:km},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new za),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&le("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new za),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&le("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new za),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 vi&&!(this instanceof So);Qa(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Hn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof vi&&(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 vc),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Lx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&hy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&uy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||m1(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 Yn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof vi||a.isPanelMain)&&le("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););Ji(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&&(Ji(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 Ki&&(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&&Lm(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))}}}),_t.Object.defineProperties(Dn,{Position:{get:function(){return ul.I("Position")}},Horizontal:{get:function(){return ul.I("Horizontal")}},Vertical:{get:function(){return ul.I("Vertical")}},Spot:{get:function(){return ul.I("Spot")}},Auto:{get:function(){return ul.I("Auto")}},Table:{get:function(){return ul.I("Table")}},Viewbox:{get:function(){return ul.I("Viewbox")}},TableRow:{get:function(){return ul.I("TableRow")}},TableColumn:{get:function(){return ul.I("TableColumn")}},Link:{get:function(){return ul.I("Link")}},Grid:{get:function(){return ul.I("Grid")}},Graduated:{get:function(){return ul.I("Graduated")}}}),Dn.prototype.rebuildItemElements=Dn.prototype.mv,Dn.prototype.findItemPanelForData=Dn.prototype.sx,Dn.prototype.updateTargetBindings=Dn.prototype.La,Dn.prototype.copyTemplate=Dn.prototype.Uy,Dn.prototype.graduatedValueForPoint=Dn.prototype.Gz,Dn.prototype.graduatedPointForValue=Dn.prototype.Fz,Dn.prototype.findColumnForLocalX=Dn.prototype.fz,Dn.prototype.findRowForLocalY=Dn.prototype.nz,Dn.prototype.addColumnDefinition=Dn.prototype.By,Dn.prototype.addRowDefinition=Dn.prototype.Hy,Dn.prototype.addRowColumnDefinition=Dn.prototype.Gy,Dn.prototype.removeColumnDefinition=Dn.prototype.jA,Dn.prototype.getColumnDefinition=Dn.prototype.Eb,Dn.prototype.removeRowDefinition=Dn.prototype.oA,Dn.prototype.getRowDefinition=Dn.prototype.Fb,Dn.prototype.removeAt=Dn.prototype.mb,Dn.prototype.remove=Dn.prototype.remove,Dn.prototype.insertAt=Dn.prototype.Gb,Dn.prototype.elt=Dn.prototype.M,Dn.prototype.add=Dn.prototype.add,Dn.prototype.findObject=Dn.prototype.fb,Dn.prototype.findInVisualTree=Dn.prototype.Nl,Dn.prototype.walkVisualTreeFrom=Dn.prototype.qm,Dn.prototype.findMainElement=Dn.prototype.Pb;var v1=!1,y1=null,ul=new Yn;Dn.className="Panel",Dn.definePanelLayout=Rl,Rl("Position",new cm),Rl("Vertical",new gm),Rl("Auto",new mm),Rl("Link",new wm);function Lu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Lu.prototype.copy=function(){var a=new Lu;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},Lu.className="GradPanelSettings";function za(){this.Pc=[],this.Oc=[],this.j=this.ob=km,this.hb=this.Hb=0,this.Qp=jr,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}za.prototype.copy=function(a){for(var y=new za,x=this.Pc,b=x.length,E=y.Pc,z=0;z<b;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),E[z]=tt}for(x=this.Oc,b=x.length,E=y.Oc,z=0;z<b;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),E[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},za.className="TablePanelSettings";function Ir(a){Ci(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=wi,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Lv,this.hg=_i,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))}Ir.prototype.copy=function(){var a=new Ir;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=He(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Mm(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=He(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Mt=Ir.prototype,Mt.qb=function(a){a.classType===Ir&&(this.sizing=a)},Mt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+$i(this)},Mt.wi=function(a){this.Me=a},Mt.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)},Mt.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Dn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,z=0;z<E;z++){var tt=b?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=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)},Mt.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(tr,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 Em(a){if(a.sizing===Lv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Mt.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Er(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&p1(y)&&le("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new qe),this.be.add(E),this},_t.Object.defineProperties(Ir.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&&Gn(a,">= 0",Ir,"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&&Gn(a,">= 0",Ir,"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))&&Gn(a,">= 0",Ir,"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&&Gn(a,">= 0",Ir,"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 mi(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&&Sc(a,"RowColumnDefinition.separatorStroke"),a instanceof To&&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 z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||le("separatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}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&&Sc(a,"RowColumnDefinition.background"),a instanceof To&&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}}}),Ir.prototype.computeEffectiveSpacing=Ir.prototype.Wc,Ir.prototype.computeEffectiveSpacingTop=Ir.prototype.Io;var Lv=new nn(Ir,"Default",0),Wg=new nn(Ir,"None",1),km=new nn(Ir,"ProportionalExtra",2);Ir.className="RowColumnDefinition",Ir.Default=Lv,Ir.None=Wg,Ir.ProportionalExtra=km;function Xi(a,y){Me.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)}Be(Xi,Me),Xi.prototype.cloneProtected=function(a){Me.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=He(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 Dd(a){a.Na===null?a.Na=new kv:a.Na.nc&&(a.Na=a.Na.copy())}Mt=Xi.prototype,Mt.th=function(){Me.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Mt.qb=function(a){a===Mn||a===hi||a===ho||a===_i?this.geometryStretch=a:Me.prototype.qb.call(this,a)},Mt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+$i(this)};function xf(a,y,x,b){var E=x.length;if(!(4>E)){var z=b.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var ot=x[0],rt=x[1],lt,ut,gt,St,Ct,bt,Bt=0,Yt=rn(),Gt=2;Gt<E;Gt+=2)lt=x[Gt],ut=x[Gt+1],gt=lt-ot,ot=ut-rt,gt===0&&(gt=.001),St=ot/gt,Ct=Math.atan2(ot,gt),bt=Math.sqrt(gt*gt+ot*ot),Yt.push([gt,Ct,St,bt]),Bt+=bt,ot=lt,rt=ut;ot=x[0],rt=x[1],gt=b.measuredBounds.width,b instanceof Xi&&(gt-=b.strokeWidth),1>gt&&(gt=1),E=x=gt,lt=tt/2,ut=lt!==0,Gt=0,bt=Yt[Gt],gt=bt[0],Ct=bt[1],St=bt[2],bt=bt[3];for(var se=0;.1<=Bt;){if(se===0&&(ut?(E=x,E-=lt,Bt-=lt,ut=!1):E=x,E===0&&(E=1)),E>Bt){bn(Yt);return}E>bt?(se=E-bt,E=bt):se=0;var ae=Math.sqrt(E*E/(1+St*St));if(0>gt&&(ae=-ae),ot+=ae,rt+=St*ae,a.translate(ot,rt),a.rotate(Ct),a.translate(-(tt/2),-(z/2)),se===0&&b.hh(a,y),a.translate(tt/2,z/2),a.rotate(-Ct),a.translate(-ot,-rt),Bt-=E,bt-=E,se!==0){if(Gt++,Gt===Yt.length){bn(Yt);return}bt=Yt[Gt],gt=bt[0],Ct=bt[1],St=bt[2],bt=bt[3],E=se}}bn(Yt)}}Mt.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 z=this.actualBounds,tt=this.naturalBounds;b!==null&&cr(this,a,b,!0,!1,tt,z);var ot=this.part,rt=this.ig;if(x===null||rt!==0||ot===null||!this.isPanelMain&&ot.Pb()!==this||(rt=ot.type===Dn.Link&&ot instanceof So&&ot.category==="Selection"&&ot.adornedObject instanceof Xi&&ot.adornedPart.Pb()===ot.adornedObject?ot.adornedObject.strokeWidth:0),rt===0&&(x=null),x!==null&&rt!==0&&(cr(this,a,x,!1,!1,tt,z),a.lineWidth=rt,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,ot&&y.Gf("drawShadows")&&(z=ot.isShadowed),a.Il===!1&&(z=!1),ot=!0,x===null||b!==null&&b!=="transparent"||(ot=!1),tt=!1,rt=this.strokeDashArray,rt!==null&&(tt=!0,a.js(rt,this.strokeDashOffset)),E.type===Kn.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===Kn.u){var lt=E.startX;rt=E.startY;var ut=E.endX,gt=E.endY;E=Math.min(lt,ut);var St=Math.min(rt,gt);lt=Math.abs(ut-lt),rt=Math.abs(gt-rt),a.beginPath(),a.rect(E,St,lt,rt),b!==null&&a.ng(b),x!==null&&(ot&&z&&Jl(a),a.jk(),ot&&z&&Pu(a)),a.Se()}else if(E.type===Kn.F)lt=E.startX,rt=E.startY,ut=E.endX,gt=E.endY,E=Math.abs(ut-lt)/2,St=Math.abs(gt-rt)/2,lt=Math.min(lt,ut)+E,rt=Math.min(rt,gt)+St,a.beginPath(),a.moveTo(lt,rt-St),a.bezierCurveTo(lt+Te.wg*E,rt-St,lt+E,rt-Te.wg*St,lt+E,rt),a.bezierCurveTo(lt+E,rt+Te.wg*St,lt+Te.wg*E,rt+St,lt,rt+St),a.bezierCurveTo(lt-Te.wg*E,rt+St,lt-E,rt+Te.wg*St,lt-E,rt),a.bezierCurveTo(lt-E,rt-Te.wg*St,lt-Te.wg*E,rt-St,lt,rt-St),a.closePath(),b!==null&&a.ng(b),x!==null&&(ot&&z&&Jl(a),a.jk(),ot&&z&&Pu(a)),a.Se();else if(E.type===Kn.o)for(E=E.figures,rt=E.length,St=0;St<rt;St++){lt=E.s[St],a.beginPath(),a.moveTo(lt.startX,lt.startY),ut=lt.segments.s,gt=ut.length;for(var Ct=null,bt=0;bt<gt;bt++){var Bt=ut[bt];switch(Bt.type){case Kr:a.moveTo(Bt.endX,Bt.endY);break;case Zo:a.lineTo(Bt.endX,Bt.endY);break;case rs:a.bezierCurveTo(Bt.point1X,Bt.point1Y,Bt.point2X,Bt.point2Y,Bt.endX,Bt.endY);break;case Pa:a.quadraticCurveTo(Bt.point1X,Bt.point1Y,Bt.endX,Bt.endY);break;case Tr:if(Bt.radiusX===Bt.radiusY){var Yt=Math.PI/180;a.arc(Bt.point1X,Bt.point1Y,Bt.radiusX,Bt.startAngle*Yt,(Bt.startAngle+Bt.sweepAngle)*Yt,0>Bt.sweepAngle,Ct!==null?Ct.endX:lt.startX,Ct!==null?Ct.endY:lt.startY)}else if(Ct=ua(Bt,lt),Yt=Ct.length,Yt===0)a.lineTo(Bt.centerX,Bt.centerY);else for(var Gt=0;Gt<Yt;Gt++){var se=Ct[Gt];Gt===0&&a.lineTo(se[0],se[1]),a.bezierCurveTo(se[2],se[3],se[4],se[5],se[6],se[7])}break;case Fa:if(Gt=Yt=0,Ct!==null&&Ct.type===Tr){if(Ct=ua(Ct,lt),se=Ct.length,se===0){a.lineTo(Bt.endX,Bt.endY);break}Ct=Ct[se-1]||null,Ct!==null&&(Yt=Ct[6],Gt=Ct[7])}else Yt=Ct!==null?Ct.endX:lt.startX,Gt=Ct!==null?Ct.endY:lt.startY;if(Ct=_a(Bt,lt,Yt,Gt),Yt=Ct.length,Yt===0){a.lineTo(Bt.endX,Bt.endY);break}for(Gt=0;Gt<Yt;Gt++)se=Ct[Gt],a.bezierCurveTo(se[2],se[3],se[4],se[5],se[6],se[7]);break;default:le("Segment not of valid type: "+Bt.type)}Bt.isClosed&&a.closePath(),Ct=Bt}ut=lt.isFilled,z?lt.isShadowed?(ut===!0&&b!=="transparent"&&b!==null&&a.ng(b,lt.isEvenOdd),x!==null&&(ut&&ot&&Jl(a),a.jk(),ut&&ot&&Pu(a))):(Jl(a),ut&&b!=="transparent"&&b!==null&&a.ng(b,lt.isEvenOdd),x!==null&&a.jk(),Pu(a)):(ut&&b!==null&&a.ng(b,lt.isEvenOdd),x!==null&&a.jk()),a.Se(St)}if(tt&&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),z=this.geometry,a.save(),a.beginPath(),b=rn(),z.type===Kn.j)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.endY),xf(a,y,b,x);else if(z.type===Kn.o)for(z=z.figures.iterator;z.next();){for(ot=z.value,b.length=0,b.push(ot.startX),b.push(ot.startY),tt=ot.startX,E=ot.startY,rt=tt,St=E,lt=ot.segments.s,ut=lt.length,gt=0;gt<ut;gt++){switch(bt=lt[gt],bt.type){case Kr:xf(a,y,b,x),b.length=0,b.push(bt.endX),b.push(bt.endY),tt=bt.endX,E=bt.endY,rt=tt,St=E;break;case Zo:b.push(bt.endX),b.push(bt.endY),tt=bt.endX,E=bt.endY;break;case rs:Te.Qe(tt,E,bt.point1X,bt.point1Y,bt.point2X,bt.point2Y,bt.endX,bt.endY,.5,b),tt=bt.endX,E=bt.endY;break;case Pa:Te.ep(tt,E,bt.point1X,bt.point1Y,bt.endX,bt.endY,.5,b),tt=bt.endX,E=bt.endY;break;case Tr:if(Bt=ua(bt,ot),Ct=Bt.length,Ct===0){b.push(bt.centerX),b.push(bt.centerY),tt=bt.centerX,E=bt.centerY;break}for(Yt=0;Yt<Ct;Yt++)Gt=Bt[Yt],Te.Qe(tt,E,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,b),tt=Gt[6],E=Gt[7];break;case Fa:if(Bt=_a(bt,ot,tt,E),Ct=Bt.length,Ct===0){b.push(bt.endX),b.push(bt.endY),tt=bt.endX,E=bt.endY;break}for(Yt=0;Yt<Ct;Yt++)Gt=Bt[Yt],Te.Qe(tt,E,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,b),tt=Gt[6],E=Gt[7];break;default:le("Segment not of valid type: "+bt.type)}bt.isClosed&&(b.push(rt),b.push(St),xf(a,y,b,x))}xf(a,y,b,x)}else if(z.type===Kn.u)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.startY),b.push(z.endX),b.push(z.endY),b.push(z.startX),b.push(z.endY),b.push(z.startX),b.push(z.startY),xf(a,y,b,x);else if(z.type===Kn.F){if(E=new Wr,E.startX=z.endX,E.startY=(z.startY+z.endY)/2,tt=new Po(Tr),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,E.add(tt),z=ua(tt,E),ot=z.length,ot===0)b.push(tt.centerX),b.push(tt.centerY);else for(tt=E.startX,E=E.startY,rt=0;rt<ot;rt++)St=z[rt],Te.Qe(tt,E,St[2],St[3],St[4],St[5],St[6],St[7],.5,b),tt=St[6],E=St[7];xf(a,y,b,x)}bn(b),a.restore(),a.Vc(!1)}}}},Mt.kk=function(a,y,x){return!Me.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)},Mt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Me.prototype.nk.call(this,a)},Mt.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)}},Mt.ga=function(a,y){if(y===void 0&&(y=new zt),a instanceof ri){a.Mc()&&le("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},Mt.mi=function(a){a===void 0&&(a=new sn);var y=this.naturalBounds,x=this.oe;y=sn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=zt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),bo(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),bo(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),bo(a,b.x,b.y,0,0),sn.free(y),zt.free(b),a},Mt.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!==Kn.j||y||(E+=2);var z=sn.alloc();if(z.assign(b),z.Bc(E+2,E+2),!z.ca(a))return sn.free(z),!1;if(b=E+1e-4,x.type===Kn.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:(sn.free(z),Te.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Kn.u){y=x.startX;var tt=x.startY,ot=x.endX;if(x=x.endY,z.x=Math.min(y,ot),z.y=Math.min(tt,x),z.width=Math.abs(ot-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-b,-b),z.ca(a))return sn.free(z),!1;z.Bc(b,b)}return this.stroke!==null&&z.Bc(E,E),a=z.ca(a),sn.free(z),a}if(x.type===Kn.F){tt=x.startX,E=x.startY,ot=x.endX;var rt=x.endY;if(x=Math.min(tt,ot),y=Math.min(E,rt),tt=Math.abs(ot-tt)/2,E=Math.abs(rt-E)/2,x=a.x-(x+tt),y=a.y-(y+E),this.fill===null){if(tt-=b,E-=b,0>=tt||0>=E||1>=x*x/(tt*tt)+y*y/(E*E))return sn.free(z),!1;tt+=b,E+=b}return this.stroke!==null&&(tt+=b,E+=b),sn.free(z),0>=tt||0>=E?!1:1>=x*x/(tt*tt)+y*y/(E*E)}if(x.type===Kn.o)return sn.free(z),this.fill===null?wh(x,a.x,a.y,E):cu(x,a,E,1<this.strokeWidth,y);le("Unknown Geometry type: "+x.type)},Mt.Wl=function(a,y,x,b){var E=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var ot=this.figure,rt=Ev[ot];if(rt===void 0){var lt=Te.Ze[ot];typeof lt=="string"&&(lt=Te.Ze[lt]),typeof lt=="function"?(rt=lt(null,100,100),Ev[ot]=rt):le("Unsupported Figure: "+ot)}tt=rt.bounds}ot=tt.width,rt=tt.height,lt=tt.width;var ut=tt.height;switch(_s(this,!0)){case Mn:b=x=0;break;case Fn:lt=Math.max(a-z,0),ut=Math.max(y-z,0);break;case gi:lt=Math.max(a-z,0),b=0;break;case bi:x=0,ut=Math.max(y-z,0)}isFinite(E.width)&&(lt=E.width),isFinite(E.height)&&(ut=E.height);var gt=this.maxSize,St=this.minSize;switch(x=Math.max(x-z,St.width),b=Math.max(b-z,St.height),lt=Math.min(gt.width,lt),ut=Math.min(gt.height,ut),lt=isFinite(lt)?Math.max(x,lt):Math.max(ot,x),ut=isFinite(ut)?Math.max(b,ut):Math.max(rt,b),x=Mv(this),x){case Mn:break;case Fn:ot=lt,rt=ut;break;case hi:x=Math.min(lt/ot,ut/rt),isFinite(x)||(x=1),ot*=x,rt*=x;break;default:le(x+" is not a valid geometryStretch.")}this.Rd!==null?(ot===0&&(ot=.001),rt===0&&(rt=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,b=ot/tt.width,tt=rt/tt.height,isFinite(b)||(b=1),isFinite(tt)||(tt=1),this.ua=b===1&&tt===1?x:x.copy().scale(b,tt)):this.ua!==null&&Te.$(this.ua.Sk,a-z)&&Te.$(this.ua.Rk,y-z)||(this.ua=Xi.makeGeometry(this,ot,rt)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&ot===0?0:tt.width+z,y===0&&rt===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),lt+z,ut+z),E.w()?(lt=E.width,ut=E.height,lt=Math.min(gt.width,lt),ut=Math.min(gt.height,ut),lt=Math.max(St.width,lt),ut=Math.max(St.height,ut),this.dc.h(0,0,lt,ut)):this.dc.assign(tt)};function Mv(a){var y=a.geometryStretch;return a.Rd!==null?y===_i?Fn:y:y===_i?Ev[a.figure].defaultStretch:y}Mt.eh=function(a,y,x,b){Ss(this,a,y,x,b)},Mt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Mt.Sj=function(a,y,x,b,E){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),ot=z.m22*tt,rt=-z.m12*tt,lt=-z.m21*tt,ut=z.m11*tt,gt=tt*(z.m21*z.dy-z.m22*z.dx),St=tt*(z.m12*z.dx-z.m11*z.dy);z=a*ot+y*lt+gt,tt=a*rt+y*ut+St,ot=x*ot+b*lt+gt,rt=x*rt+b*ut+St,gt=this.ig/2,lt=this.ua,lt===null&&(this.measure(1/0,1/0),lt=this.ua);var Ct=lt.bounds;if(ut=!1,lt.type===Kn.j)if(1.5>=this.strokeWidth)ut=Te.Ve(lt.startX,lt.startY,lt.endX,lt.endY,z,tt,ot,rt,E);else{if(lt.startX===lt.endX?(b=gt,ut=0):(y=(lt.endY-lt.startY)/(lt.endX-lt.startX),ut=gt/Math.sqrt(1+y*y),b=ut*y),y=rn(),a=new zt,Te.Ve(lt.startX+b,lt.startY+ut,lt.endX+b,lt.endY+ut,z,tt,ot,rt,a)&&y.push(a),a=new zt,Te.Ve(lt.startX-b,lt.startY-ut,lt.endX-b,lt.endY-ut,z,tt,ot,rt,a)&&y.push(a),a=new zt,Te.Ve(lt.startX+b,lt.startY+ut,lt.startX-b,lt.startY-ut,z,tt,ot,rt,a)&&y.push(a),a=new zt,Te.Ve(lt.endX+b,lt.endY+ut,lt.endX-b,lt.endY-ut,z,tt,ot,rt,a)&&y.push(a),ot=y.length,ot===0)return bn(y),!1;for(ut=!0,rt=1/0,b=0;b<ot;b++)a=y[b],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<rt&&(rt=x,E.x=a.x,E.y=a.y);bn(y)}else if(lt.type===Kn.u)ut=Te.Ff(Ct.x-gt,Ct.y-gt,Ct.x+Ct.width+gt,Ct.y+Ct.height+gt,z,tt,ot,rt,E);else if(lt.type===Kn.F){y=sn.allocAt(Ct.x,Ct.y,Ct.width,Ct.height).Bc(gt,gt);t:if(y.width===0)ut=Te.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,ot,rt,E);else if(y.height===0)ut=Te.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,ot,rt,E);else{if(a=y.width/2,lt=y.height/2,b=y.x+a,ut=y.y+lt,x=9999,z!==ot&&(x=(tt-rt)/(z-ot)),9999>Math.abs(x)){if(rt=tt-ut-x*(z-b),0>a*a*x*x+lt*lt-rt*rt){E.x=NaN,E.y=NaN,ut=!1;break t}gt=Math.sqrt(a*a*x*x+lt*lt-rt*rt),ot=(-(a*a*x*rt)+a*lt*gt)/(lt*lt+a*a*x*x)+b,a=(-(a*a*x*rt)-a*lt*gt)/(lt*lt+a*a*x*x)+b,lt=x*(ot-b)+rt+ut,rt=x*(a-b)+rt+ut,Math.abs((z-ot)*(z-ot))+Math.abs((tt-lt)*(tt-lt))<Math.abs((z-a)*(z-a))+Math.abs((tt-rt)*(tt-rt))?(E.x=ot,E.y=lt):(E.x=a,E.y=rt)}else{if(ot=lt*lt,rt=z-b,ot-=ot/(a*a)*rt*rt,0>ot){E.x=NaN,E.y=NaN,ut=!1;break t}rt=Math.sqrt(ot),ot=ut+rt,rt=ut-rt,Math.abs(ot-tt)<Math.abs(rt-tt)?(E.x=z,E.y=ot):(E.x=z,E.y=rt)}ut=!0}sn.free(y)}else if(lt.type===Kn.o){St=zt.alloc();var bt=ot-z,Bt=rt-tt,Yt=bt*bt+Bt*Bt,Gt=z,se=tt;if(0<Yt&&Ct.contains(Gt,se)&&(St.x=Gt,St.y=se,this.ca(St)))for(bt!==0&&.5>Math.abs(bt)?(Bt*=.5/bt,bt=.5):Bt!==0&&.5>Math.abs(Bt)&&(bt*=.5/Bt,Bt=.5),Gt-=bt,se-=Bt;Ct.contains(Gt,se);)Gt-=bt,se-=Bt;for(E.x=ot,E.y=rt,Bt=0;Bt<lt.figures.count;Bt++){var ae=lt.figures.s[Bt],he=ae.isFilled?Gt:z,be=ae.isFilled?se:tt,$e=ae.segments;Ct=ae.startX,bt=ae.startY;for(var Un=Ct,oi=bt,ti=0;ti<$e.count;ti++){var jn=$e.s[ti],wn=jn.type,Gi=jn.endX,Oi=jn.endY,wo=!1;switch(wn){case Kr:Un=Gi,oi=Oi;break;case Zo:wo=Tm(Ct,bt,Gi,Oi,he,be,ot,rt,St);break;case rs:wo=Te.Eo(Ct,bt,jn.point1X,jn.point1Y,jn.point2X,jn.point2Y,Gi,Oi,he,be,ot,rt,.6,St);break;case Pa:wo=Te.Eo(Ct,bt,Ct+2/3*(jn.point1X-Ct),bt+2/3*(jn.point1Y-bt),Gi+2/3*(jn.point1X-Gi),Oi+2/3*(jn.point1Y-Oi),Gi,Oi,he,be,ot,rt,.6,St);break;case Tr:case Fa:wn=jn.type===Tr?ua(jn,ae):_a(jn,ae,Ct,bt);var zo=wn.length;if(zo===0){wo=Tm(Ct,bt,jn.type===Tr?jn.centerX:jn.endX,jn.type===Tr?jn.centerY:jn.endY,he,be,ot,rt,St);break}for(Oi=null,Gi=0;Gi<zo;Gi++){if(Oi=wn[Gi],Gi===0&&Tm(Ct,bt,Oi[0],Oi[1],he,be,ot,rt,St)){var Zr=Nm(he,be,St,Yt,E);Zr<Yt&&(Yt=Zr,ut=!0)}Te.Eo(Oi[0],Oi[1],Oi[2],Oi[3],Oi[4],Oi[5],Oi[6],Oi[7],he,be,ot,rt,.6,St)&&(Zr=Nm(he,be,St,Yt,E),Zr<Yt&&(Yt=Zr,ut=!0))}Gi=Oi[6],Oi=Oi[7];break;default:le("Unknown Segment type: "+wn)}Ct=Gi,bt=Oi,wo&&(wo=Nm(he,be,St,Yt,E),wo<Yt&&(Yt=wo,ut=!0)),jn.isClosed&&(Gi=Un,Oi=oi,Tm(Ct,bt,Gi,Oi,he,be,ot,rt,St)&&(jn=Nm(he,be,St,Yt,E),jn<Yt&&(Yt=jn,ut=!0)))}}z=x-a,tt=b-y,ot=Math.sqrt(z*z+tt*tt),ot!==0&&(z/=ot,tt/=ot),E.x-=z*gt,E.y-=tt*gt,zt.free(St)}else le("Unknown Geometry type: "+lt.type);return ut?(this.transform.Ga(E),!0):!1};function Nm(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 Tm(a,y,x,b,E,z,tt,ot,rt){if(Te.$(a,x)&&Te.$(y,b)||Te.$(E,tt)&&Te.$(z,ot))return!1;var lt=!1,ut=(E-tt)*(y-b)-(z-ot)*(a-x);return ut===0?!1:(rt.x=((E*ot-z*tt)*(a-x)-(E-tt)*(a*b-y*x))/ut,rt.y=((E*ot-z*tt)*(y-b)-(z-ot)*(a*b-y*x))/ut,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(rt.y>a||Te.$(rt.y,a))&&(rt.y<y||Te.$(rt.y,y))&&(lt=!0)):(y=a<x?a:x,a=a<x?x:a,(rt.x>y||Te.$(rt.x,y))&&(rt.x<a||Te.$(rt.x,a))&&(lt=!0)),lt)}Mt.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,z=zt.alloc();return z.h(x.x-b,x.y-b),a.ca(y.Ga(z))&&(z.h(x.x-b,x.bottom+b),a.ca(y.Ga(z))&&(z.h(x.right+b,x.bottom+b),a.ca(y.Ga(z))&&(z.h(x.right+b,x.y-b),a.ca(y.Ga(z))&&(E=!0)))),zt.free(z),E},Mt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=eo.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,z=a.top;a=a.bottom;var tt=zt.alloc();if(tt.h(b,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(E,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0)))return zt.free(tt),!0;var ot=zt.alloc(),rt=zt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),ot.x=E,ot.y=z,ot.transform(x),tt.x=b,tt.y=z,tt.transform(x),y=!1,Bd(this,tt,ot,rt)?y=!0:(tt.x=E,tt.y=a,tt.transform(x),Bd(this,tt,ot,rt)?y=!0:(ot.x=b,ot.y=a,ot.transform(x),Bd(this,tt,ot,rt)?y=!0:(tt.x=b,tt.y=z,tt.transform(x),Bd(this,tt,ot,rt)&&(y=!0)))),zt.free(tt),eo.free(x),zt.free(ot),zt.free(rt),y};function Bd(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,z=x.y;return x=b.x,b=b.y,a===E?(y<z?(a=y,y=z):a=z,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}Mt.tx=function(a,y,x){function b(Yt,Gt){for(var se=Yt.length,ae=0;ae<se;ae+=2)if(Gt.zd(Yt[ae],Yt[ae+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),z=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 tt=y.bounds,ot=tt.x,rt=tt.y,lt=tt.x+tt.width;if(tt=tt.y+tt.height,uo(a.x,a.y,ot,rt)<=E&&uo(a.x,a.y,lt,rt)<=E&&uo(a.x,a.y,ot,tt)<=E&&uo(a.x,a.y,lt,tt)<=E)return!0}if(ot=y.startX,rt=y.startY,lt=y.endX,tt=y.endY,y.type===Kn.j){if(x=(ot-lt)*(a.x-lt)+(rt-tt)*(a.y-tt),co(a.x,a.y,ot,rt,lt,tt)<=(0<=(lt-ot)*(a.x-ot)+(tt-rt)*(a.y-rt)&&0<=x?E:z))return!0}else{if(y.type===Kn.u)return y=!1,x&&(y=co(a.x,a.y,ot,rt,ot,tt)<=E||co(a.x,a.y,ot,rt,lt,rt)<=E||co(a.x,a.y,lt,rt,lt,tt)<=E||co(a.x,a.y,ot,tt,lt,tt)<=E),y;if(y.type===Kn.F){y=a.x-(ot+lt)/2,z=a.y-(rt+tt)/2;var ut=Math.abs(lt-ot)/2,gt=Math.abs(tt-rt)/2;if(ut===0||gt===0)return co(a.x,a.y,ot,rt,lt,tt)<=E;if(x){if(a=Te.$y(ut,gt,y,z),a*a<=E)return!0}else return!(uo(y,z,-ut,0)>=E||uo(y,z,0,-gt)>=E||uo(y,z,0,gt)>=E||uo(y,z,ut,0)>=E)}else if(y.type===Kn.o){if(lt=y.bounds,z=lt.x,ot=lt.y,rt=lt.x+lt.width,lt=lt.y+lt.height,a.x>rt&&a.x<z&&a.y>lt&&a.y<ot&&co(a.x,a.y,z,ot,z,lt)>E&&co(a.x,a.y,z,ot,rt,ot)>E&&co(a.x,a.y,rt,lt,z,lt)>E&&co(a.x,a.y,rt,lt,rt,ot)>E)return!1;if(z=Math.sqrt(E),x){if(this.fill===null?wh(y,a.x,a.y,z):cu(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,ut=z.startY,a.zd(tt,ut)>E)return!1;for(ot=z.segments.s,rt=ot.length,lt=0;lt<rt;lt++)switch(gt=ot[lt],gt.type){case Kr:case Zo:if(tt=gt.endX,ut=gt.endY,a.zd(tt,ut)>E)return!1;break;case rs:var St=rn();if(Te.Qe(tt,ut,gt.point1X,gt.point1Y,gt.point2X,gt.point2Y,gt.endX,gt.endY,.8,St),tt=b(St,a),bn(St),tt||(tt=gt.endX,ut=gt.endY,a.zd(tt,ut)>E))return!1;break;case Pa:if(St=rn(),Te.ep(tt,ut,gt.point1X,gt.point1Y,gt.endX,gt.endY,.8,St),tt=b(St,a),bn(St),tt||(tt=gt.endX,ut=gt.endY,a.zd(tt,ut)>E))return!1;break;case Tr:case Fa:St=gt.type===Tr?ua(gt,z):_a(gt,z,tt,ut);var Ct=St.length;if(Ct===0){if(tt=gt.type===Tr?gt.centerX:gt.endX,ut=gt.type===Tr?gt.centerY:gt.endY,a.zd(tt,ut)>E)return!1;break}gt=null;for(var bt=rn(),Bt=0;Bt<Ct;Bt++)if(gt=St[Bt],bt.length=0,Te.Qe(gt[0],gt[1],gt[2],gt[3],gt[4],gt[5],gt[6],gt[7],.8,bt),b(bt,a))return bn(bt),!1;bn(bt),gt!==null&&(tt=gt[6],ut=gt[7]);break;default:le("Unknown Segment type: "+gt.type)}}return!0}}}return!1},Mt.qc=function(){this.ua=null},Mt.kq=function(){return this.ig};function S1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=Jg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=xr):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new ri(1-xr.x,xr.y)))}Xi.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=ql[a.toArrow];else a.fromArrow!=="None"?b=ql[a.fromArrow]:(b=Te.Ze[a.figure],typeof b=="string"&&(b=Te.Ze[b]),b===void 0&&le("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Te.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function x1(a){var y=ql[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=ql[x],y===void 0){var b=null,E;for(E in Te.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Kn.parse(Te.um[b],!1),ql[b]=a,x!==b&&(ql[x]=b),b}}return typeof y=="string"?y:y instanceof Kn?a:null}_t.Object.defineProperties(Xi.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),os(this)&&(a=this.part,a!==null&&Vo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Kn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=zt.allocAt(-y.x,-y.y),zt.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&&Sc(a,"Shape.fill"),a instanceof To&&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&&Sc(a,"Shape.stroke"),a instanceof To&&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 Gn(a,"value >= 0",Xi,"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"?Gn(a,'"butt", "round", or "square"',Xi,"strokeCap"):(Dd(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"?Gn(a,'"miter", "bevel", or "round"',Xi,"strokeJoin"):(Dd(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){Dd(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 z=a[E];0<=z&&isFinite(z)||le("strokeDashArray:value "+z+" at index "+E+" must be a positive number or zero."),b+=z}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&&(Dd(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=Te.Ze[a];typeof x=="function"?x=a:(x=Te.Ze[a.toLowerCase()])||le("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=x1(a);x===null?le("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Gh),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),S1(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=x1(a);x===null?le("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Gh),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),S1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:wi},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Dd(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:wi},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Dd(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&&(Dd(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:_i},set:function(a){var y=this.geometryStretch;y!==a&&(Dd(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 tu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Bl(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 tu),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 tu),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 tu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Xi.prototype.intersectsRect=Xi.prototype.Yc,Xi.prototype.containedInRect=Xi.prototype.fh,Xi.prototype.getNearestIntersectionPoint=Xi.prototype.rs,Xi.prototype.getDocumentBounds=Xi.prototype.mi,Xi.prototype.getDocumentPoint=Xi.prototype.ga;var ql=new Ge,Ev=new Ge;Xi.className="Shape",Xi.getFigureGenerators=function(){var a=new Yn,y;for(y in Te.Ze)y!==y.toLowerCase()&&a.add(y,Te.Ze[y]);return a.freeze(),a},Xi.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Te.Ze;b[a]=y,b[x]=a},Xi.getArrowheadGeometries=function(){var a=new Yn;for(b in Te.um)if(ql[b]===void 0){var y=Kn.parse(Te.um[b],!1);ql[b]=y,y=b.toLowerCase(),y!==b&&(ql[y]=b)}for(var x in ql)if(x!==x.toLowerCase()){var b=ql[x];b instanceof Kn&&a.add(x,b)}return a.freeze(),a},Xi.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Kn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||le("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=ql;b[a]=x,b[y]=a};function kv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=_i,this.gg=this.fg=wi}kv.prototype.copy=function(){var a=new kv;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 Go(a,y){return Me.call(this),Am||(Vs=dr?new Ja(null).context:null,Am=!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}Be(Go,Me),Go.prototype.cloneProtected=function(a){Me.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 jl(a){a.da===null?a.da=new Av:a.da.nc&&(a.da=a.da.copy())}Mt=Go.prototype,Mt.th=function(){Me.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function P1(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}Mt.qb=function(a){a.classType===Go?this.wrap=a:Me.prototype.qb.call(this,a)},Mt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Mt.v=function(){Me.prototype.v.call(this)},Mt.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,z=x.height,tt=$g(this),ot=a.textAlign=this.textAlign,rt=y.tn;ot==="start"?ot=rt?"right":"left":ot==="end"&&(ot=rt?"left":"right"),rt=this.isUnderline;var lt=this.isStrikethrough;cr(this,a,this.xc,!0,!1,x,b),(rt||lt)&&cr(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ut=this.oe,gt=ut.dx-(tt*ut.m21+ut.dx);ut=ut.dy-(tt*ut.m22+ut.dy);var St=y.scale;switch(8>(gt*gt+ut*ut)*St*St&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof ca&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,gt=this.spacingBelow,this.flip){case mo:a.translate(E,0),a.scale(-1,1);break;case qi:a.translate(0,z),a.scale(1,-1);break;case Io:a.translate(E,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,St=(y+tt+gt)*ut,z>St&&(b=this.verticalAlignment,b=b.y*z-b.y*St+b.offsetY),ut===1&&this.ze!==null)gt=this.Cb,gt>E&&(gt=E),this.Oj(this.ze,a,0,b+y,E,tt,gt,x,ot,rt,lt);else if(this.Qc!==null&&this.Qb!==null)for(St=0;St<ut;St++){var Ct=this.Qc[St];Ct>E&&(Ct=E),b+=y,this.Oj(this.Qb[St],a,0,b,E,tt,Ct,x,ot,rt,lt),b+=tt+gt}switch(this.flip){case mo:a.scale(-1,1),a.translate(-E,0);break;case qi:a.scale(1,-1),a.translate(0,-z);break;case Io:a.scale(-1,-1),a.translate(-E,-z)}}},Mt.Oj=function(a,y,x,b,E,z,tt,ot,rt,lt,ut){var gt=0;if(ot)rt==="left"?gt=0:rt==="right"?gt=E-tt:rt==="center"&&(gt=(E-tt)/2),y.fillRect(x+gt,b+.25*z,tt,1);else{if(rt==="left"?gt=0:rt==="right"?gt=E:rt==="center"&&(gt=E/2),E=Fm!==null?Fm(this,z):.75*z,y.fillText(a,x+gt,b+E),a=z/20|0,a===0&&(a=1),rt==="right"?gt-=tt:rt==="center"&&(gt-=tt/2),lt){ot=Om!==null?Om(this,z):.8*z,rt=x+gt,lt=b+ot,E=x+gt+tt,ot=b+ot;var St=a;y.beginPath(),y.lineWidth=St,y.moveTo(rt,lt),y.lineTo(E,ot),y.stroke(),y.Se(),y instanceof ca&&y.ad.classList.add("gojs-td")}ut&&(ut=b+z-z/2.2|0,a%2!==0&&(ut+=.5),b=x+gt,z=ut,x=x+gt+tt,tt=ut,gt=a,y.beginPath(),y.lineWidth=gt,y.moveTo(b,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof ca&&y.ad.classList.add("gojs-td"))}},Mt.kk=function(a,y,x){if(!Me.prototype.kk.call(this,a,y,x))return!1;if(cr(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++)t1(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,t1(a,y,!0);return!0},Mt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Me.prototype.nk.call(this,a)},Mt.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)}},Mt.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;Vs!==null&&k1!==z&&(k1=Vs.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),z.length===0)z=8;else if(this.isMultiline){for(var ot=tt=0,rt=!1;!rt;){var lt=z.indexOf(`
|
|
|
`,ot);lt===-1&&(lt=z.length,rt=!0),ot=z.substr(ot,lt-ot),this.formatting===Zg&&(ot=ot.trim()),tt=Math.max(tt,hl(ot)),ot=lt+1}z=tt}else tt=z.indexOf(`
|
|
|
`,0),0<=tt&&(z=z.substr(0,tt)),z=hl(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=C1(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,rt=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Dm&&(y=this.Ae,y=this.overflow===Dm?w1(y):0,lt=this.spacingAbove+this.spacingBelow,lt=Math.max(0,$g(this)+lt),rt=Math.min(this.maxLines-1,Math.max(Math.floor(rt/lt+.01)-1,0)),!(rt+1>=this.Qb.length))){for(this.l|=16777216,lt=this.Qb[rt],y=Math.max(1,a-y);hl(lt)>y&&1<lt.length;)lt=lt.substr(0,lt.length-1);lt+=_g,y=hl(lt),this.Qb[rt]=lt,this.Qb=this.Qb.slice(0,rt+1),this.Qc[rt]=y,this.Qc=this.Qc.slice(0,rt+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===b1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(b,tt),wr(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},Mt.eh=function(a,y,x,b){Ss(this,a,y,x,b)};function Kg(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 Nv(a,y,x,b){var E=a.formatting===Zg;E&&(y=y.trim());var z=0,tt=a.Ae,ot=a.spacingAbove+a.spacingBelow;ot=Math.max(0,$g(a)+ot);var rt=a.overflow===Dm?w1(tt):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,ot);else if(tt=y,a.wrap===Tv){a.Le=1;var lt=hl(y);if(rt===0||lt<=x)a.Cb=Math.max(a.Cb,lt),Kg(a,y,a.Cb),b!==null&&b.h(lt,ot);else{for(z=Pf(a,tt),tt=tt.substr(z.length),y=Pf(a,tt),lt=hl(z+y);0<y.length&<<=x;)z+=y,tt=tt.substr(y.length),y=Pf(a,tt),lt=z+y,E&&(lt=lt.trim()),lt=hl(lt);for(E&&(y=y.trim()),z+=y,x=Math.max(1,x-rt);hl(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=_g;var ut=hl(z);a.Cb=ut,Kg(a,z,ut),b!==null&&b.h(ut,ot)}}else{for(rt=0,tt.length===0&&(rt=1,Kg(a,tt,0));0<tt.length;){for(y=Pf(a,tt),tt=tt.substr(y.length);hl(y)>x;){var gt=1;for(lt=hl(y.substr(0,gt)),ut=0;lt<=x;)gt++,ut=lt,lt=hl(y.substr(0,gt));if(gt===1){var St=lt;z=Math.max(z,lt)}else St=ut,z=Math.max(z,ut);if(gt--,1>gt&&(gt=1),Kg(a,y.substr(0,gt),St),rt++,y=y.substr(gt),a.Gc+rt>a.maxLines)break}for(ut=Pf(a,tt),lt=hl(y+ut);0<ut.length&<<=x;)y+=ut,tt=tt.substr(ut.length),ut=Pf(a,tt),lt=y+ut,E&&(lt=lt.trim()),lt=hl(lt);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ut.length===0?(gt=lt,z=Math.max(z,lt)):(gt=ut=hl(y),z=Math.max(z,ut)),Kg(a,y,gt),rt++,a.Gc+rt>a.maxLines))break}a.Le=Math.min(a.maxLines,rt),a.Cb=Math.max(a.Cb,z),b!==null&&b.h(a.Cb,ot*a.Le)}}function Pf(a,y){if(a.wrap===L1)return y.substr(0,1);for(var x=y.length,b=0,E=Mx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===M1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function hl(a){return Vs===null?8*a.length:Vs.measureText(a).width}function $g(a){if(a.df!==null)return a.df;var y=a.Ae;if(Vs===null){var x=16;return a.df=x}return Dv[y]!==void 0&&5e3>E1?x=Dv[y]:(x=1.3*Vs.measureText("M").width,Dv[y]=x,E1++),a.df=x}function w1(a){if(Vs===null)return 6;if(Bm[a]!==void 0&&5e3>Bv)var y=Bm[a];else y=Vs.measureText(_g).width,Bm[a]=y,Bv++;return y}function C1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,$g(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 z=a.Gc=0,tt,ot=!1;!ot;){if(tt=x.indexOf(`
|
|
|
`,z),tt===-1&&(tt=x.length,ot=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==Tv){a.Le=0;var rt=Wn.alloc();Nv(a,z,y,rt),E+=rt.height,Wn.free(rt),a.Gc+=a.Le}else Nv(a,z,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(ot=!0)}z=tt+1}return a.Lq=E}_t.Object.defineProperties(Go.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"||(jl(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Mn},set:function(a){var y=this.flip;y!==a&&(jl(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:lr},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),jl(this),this.da.Yr=a,Ts(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Wn.alloc();Nv(this,this.ec,999999,a);var y=a.width;Wn.free(a),a=C1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),wr(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:Fv},set:function(a){var y=this.wrap;y!==a&&(jl(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Ov},set:function(a){var y=this.overflow;y!==a&&(jl(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&&Sc(a,"TextBlock.stroke"),a instanceof To&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return $g(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&&(jl(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&&(jl(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 tu),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 tu),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 tu),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 tu),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 tu),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&&(jl(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&&(jl(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&&(jl(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&&(jl(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Zg},set:function(a){var y=this.formatting;y!==a&&(jl(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&&Gn(a,"> 0",Go,"maxLines"),jl(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 Fm=null,Om=null,Tv=new nn(Go,"None",0),b1=new nn(Go,"WrapFit",1),Fv=new nn(Go,"WrapDesiredSize",2),L1=new nn(Go,"WrapBreakAll",3),Ov=new nn(Go,"OverflowClip",0),Dm=new nn(Go,"OverflowEllipsis",1),Zg=new nn(Go,"FormatTrim",0),M1=new nn(Go,"FormatNone",0),Mx=/[ \u200b\u00ad]/,Dv=new Ge,E1=0,Bm=new Ge,Bv=0,_g="...",k1="",Vs=null,Am=!1;Go.className="TextBlock";function Av(){this.nc=!1,this.Hd=null,this.Xf=Mn,this.gq=Zg,this.Jq=1/0,this.$q=Ov,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=lr,this.$r=Fv}Av.prototype.copy=function(){var a=new Av;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},Go.getEllipsis=function(){return _g},Go.setEllipsis=function(a){_g=a,Bm=new Ge,Bv=0},Go.getBaseline=function(){return Fm},Go.setBaseline=function(a){Fm=a},Go.getUnderline=function(){return Om},Go.setUnderline=function(a){Om=a},Go.isValidFont=function(a){if(Am||(Vs=dr?new Ja(null).context:null,Am=!0),Vs===null)return!0;var y=Vs.font;if(a===y||a==="10px sans-serif")return!0;Vs.font="10px sans-serif",Vs.font=a;var x=Vs.font;if(x!=="10px sans-serif")return Vs.font=y,!0;Vs.font="19px serif";var b=Vs.font;return Vs.font=a,x=Vs.font,Vs.font=y,x!==b},Go.FormatNone=M1,Go.FormatTrim=Zg,Go.None=Tv,Go.OverflowClip=Ov,Go.OverflowEllipsis=Dm,Go.WrapBreakAll=L1,Go.WrapDesiredSize=Fv,Go.WrapFit=b1;function tu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}tu.prototype.copy=function(){var a=new tu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},tu.className="GradElementSettings";function Us(a,y){Me.call(this),this.Eg=null,this.qo="",this.Xg=ko,this.Nk=Fn,this.Zg=this.Hd=null,this.Mk=po,this.Xf=Mn,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 wf;Be(Us,Me),Us.prototype.cloneProtected=function(a){Me.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},Us.prototype.qb=function(a){a===Mn||a===hi||a===ho?this.imageStretch=a:Me.prototype.qb.call(this,a)},Us.prototype.toString=function(){return"Picture("+this.source+")#"+$i(this)};function Cf(a){a===void 0&&(a=""),a!==""?wf[a]&&(delete wf[a],Im--):(wf=new Ge,Im=0)}function N1(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 z=y.getAttribute("src")||"",tt=E.Og.I(z);if(tt!==null)for(var ot=tt.length,rt=0;rt<ot;rt++)z=tt[rt],E.Xn.add(z),z.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(Ar(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,z=y.getAttribute("src")||"",tt=E.Og.I(z);if(tt!==null){E=tt.length,z=rn();for(var ot=0;ot<E;ot++)z.push(tt[ot]);if(y.hn)for(ot=0;ot<E;ot++)tt=z[ot],tt.Hd!==null&&tt.Hd(tt,x);bn(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Us.prototype.hA=function(){if(this.source!==""){Cf(this.source);var a=this.source;this.source="",this.source=a}},Us.prototype.redraw=function(){this.N(),this.Uc=!0},Us.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 Fd)){var E=a instanceof ca;b=this.naturalBounds;var z=0,tt=0,ot=this.qn,rt=ot?+x.width:x.naturalWidth;if(ot=ot?+x.height:x.naturalHeight,rt===void 0&&x.videoWidth&&(rt=x.videoWidth),ot===void 0&&x.videoHeight&&(ot=x.videoHeight),rt=rt||b.width,ot=ot||b.height,rt!==0&&ot!==0){var lt=rt,ut=ot;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,rt=this.Xg.width,ot=this.Xg.height);var gt=rt,St=ot,Ct=this.Nk,bt=this.Mk;switch(Ct){case Mn:if(this.sourceRect.w())break;gt>=b.width&&(z=z+bt.offsetX+(gt*bt.x-b.width*bt.x)),St>=b.height&&(tt=tt+bt.offsetY+(St*bt.y-b.height*bt.y)),rt=Math.min(b.width,gt),ot=Math.min(b.height,St);break;case Fn:gt=b.width,St=b.height;break;case hi:case ho:Ct===hi?(Ct=Math.min(b.height/St,b.width/gt),gt*=Ct,St*=Ct):Ct===ho&&(Ct=Math.max(b.height/St,b.width/gt),gt*=Ct,St*=Ct,gt>=b.width&&(z=(z+bt.offsetX+(gt*bt.x-b.width*bt.x)/gt)*rt),St>=b.height&&(tt=(tt+bt.offsetY+(St*bt.y-b.height*bt.y)/St)*ot),rt*=1/(gt/b.width),ot*=1/(St/b.height),gt=b.width,St=b.height)}Ct=this.Df()*y.scale;var Bt=gt*Ct*St*Ct,Yt=rt*ot/Bt,Gt=x.__goCache;Ct=null;var se=Ex;if(!E){if(x.sq&&Gt!==void 0&&4<Bt&&Yt>se*se)for(Gt.gi===null&&(F1(Gt,4,lt,ut,x),F1(Gt,16,lt,ut,x)),E=Gt.gi,lt=E.length,ut=0;ut<lt&&E[ut].ratio*E[ut].ratio<Yt;ut++)Ct=E[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new Ja(null).context;try{E.drawImage(this.Eg,0,0)}catch(ae){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(ae){this.vl=!0}}if(this.vl)return}}switch(E=gt<b.width?bt.offsetX+(b.width*bt.x-gt*bt.x):0,bt=St<b.height?bt.offsetY+(b.height*bt.y-St*bt.y):0,this.flip){case mo:a.translate(Math.min(b.width,gt),0),a.scale(-1,1);break;case qi:a.translate(0,Math.min(b.height,St)),a.scale(1,-1);break;case Io:a.translate(Math.min(b.width,gt),Math.min(b.height,St)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Gt!==void 0&&Ct!==null&&Ct.ratio!==1){a.save(),y=Ct.ratio;try{a.drawImage(Ct.source,z/y,tt/y,Math.min(Ct.source.width,rt/y),Math.min(Ct.source.height,ot/y),E,bt,Math.min(b.width,gt),Math.min(b.height,St)),a instanceof ca&&(this.bt=[z/y,tt/y,Math.min(Ct.source.width,rt/y),Math.min(Ct.source.height,ot/y),E,bt,Math.min(b.width,gt),Math.min(b.height,St)])}catch(ae){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,rt,ot,E,bt,Math.min(b.width,gt),Math.min(b.height,St)),a instanceof ca&&(this.bt=[z,tt,rt,ot,E,bt,Math.min(b.width,gt),Math.min(b.height,St)])}catch(ae){this.en=!1}switch(this.flip){case mo:a.scale(-1,1),a.translate(-Math.min(b.width,gt),0);break;case qi:a.scale(1,-1),a.translate(0,-Math.min(b.height,St));break;case Io:a.scale(-1,-1),a.translate(-Math.min(b.width,gt),-Math.min(b.height,St))}}}}},Us.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,z=_s(this,!0),tt=this.Eg,ot=this.qn,rt=0,lt=0;(ot||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(rt=ot?+tt.width:tt.naturalWidth,lt=ot?+tt.height:tt.naturalHeight),isFinite(E.width)||z===Fn||z===gi?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=rt)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:rt),isFinite(E.height)||z===Fn||z===bi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=lt)),b=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:lt),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),b=Math.max(b||0,z.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),wr(this.dc,a,y),this.Ge(0,0,a,y)},Us.prototype.eh=function(a,y,x,b){Ss(this,a,y,x,b)},_t.Object.defineProperties(Us.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||le("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Lg(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new tn),b!==null&&x&&jh(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()||(Ar(this,!1),this.v())):x&&N1(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=wf;if(dr){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Im&&(Cf(),x=wf),b=_n("img"),b.hn=!0,N1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Im++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new T1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),Us.prototype.redraw=Us.prototype.redraw,Us.prototype.reloadSource=Us.prototype.hA;var Im=0,Ex=4;Us.className="Picture",wf=new Ge,Us.clearCache=Cf;function T1(){this.gi=null}function F1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var z=new Ja(null),tt=z.context,ot=1/y;z.width=x/y,z.height=b/y,z.width!==0&&z.height!==0&&(y=new O1(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),tt.setTransform(ot*x,0,0,ot*x,0,0),tt.yc(),tt.drawImage(E,0,0),a.gi.push(y))}T1.className="PictureCacheArray";function O1(a,y){this.source=a,this.ratio=y}O1.className="PictureCacheInstance";function bf(){this.os=new Kn,this.mc=null}bf.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Kn,this.mc=null};function Lf(a,y,x,b,E,z){a.mc=new Wr,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function kx(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}bf.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Po(Kr);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},bf.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Po(Zo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function nh(a,y,x,b,E,z,tt){var ot;ot===void 0&&(ot=!1);var rt=new Po(rs);rt.point1X=y,rt.point1Y=x,rt.point2X=b,rt.point2Y=E,rt.endX=z,rt.endY=tt,ot&&rt.close(),a.mc.segments.add(rt)}function Rm(a,y,x,b,E){var z;z===void 0&&(z=!1);var tt=new Po(Pa);tt.point1X=y,tt.point1Y=x,tt.endX=b,tt.endY=E,z&&tt.close(),a.mc.segments.add(tt)}bf.prototype.arcTo=function(a,y,x,b,E,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var ot=new Po(Tr);ot.startAngle=a,ot.sweepAngle=y,ot.centerX=x,ot.centerY=b,ot.radiusX=E,ot.radiusY=z!==0?z:E,tt&&ot.close(),this.mc.segments.add(ot)};function Nx(a,y,x,b,E,z,tt,ot){var rt;rt===void 0&&(rt=!1),y=new Po(Fa,tt,ot,y,x,b,E,z),rt&&y.close(),a.mc.segments.add(y)}function D1(a){var y=jm;return y!==null?(jm=null,y.reset(a),y):(y=new bf,y.reset(a),y)}var jm=null;bf.className="StreamGeometryContext";function ps(a,y){var x=a.toLowerCase(),b=Te.Ze;b[a]=y,b[x]=a}ps("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Te.Mf[a];return b!==void 0||(b=new Kn(Kn.u),b.endX=y,b.endY=x,Te.Nf<Te.vm&&(Te.Mf[a]=b,Te.Nf++)),b}),ps("Square",function(a,y,x){a="s"+y+","+x;var b=Te.Mf[a];return b!==void 0||(b=new Kn(Kn.u),b.endX=y,b.endY=x,b.defaultStretch=hi,Te.Nf<Te.vm&&(Te.Mf[a]=b,Te.Nf++)),b}),ps("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=Te.Mf[b];if(E!==void 0)return E;var z=a*Te.wg;return E=new Kn().add(new Wr(a,0,!0).add(new Po(Zo,y-a,0)).add(new Po(rs,y,a,y-z,0,y,z)).add(new Po(Zo,y,x-a)).add(new Po(rs,y-a,x,y,x-z,y-z,x)).add(new Po(Zo,a,x)).add(new Po(rs,0,x-a,z,x,0,x-z)).add(new Po(Zo,0,a)).add(new Po(rs,a,0,0,z,z,0).close())),1<z&&(E.spot1=new ri(0,0,z,z),E.spot2=new ri(1,1,-z,-z)),Te.Nf<Te.vm&&(Te.Mf[b]=E,Te.Nf++),E}),ps("Border","RoundedRectangle"),ps("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Te.Mf[a];return b!==void 0||(b=new Kn(Kn.F),b.endX=y,b.endY=x,b.spot1=Za,b.spot2=la,Te.Nf<Te.vm&&(Te.Mf[a]=b,Te.Nf++)),b}),ps("Circle",function(a,y,x){a="c"+y+","+x;var b=Te.Mf[a];return b!==void 0||(b=new Kn(Kn.F),b.endX=y,b.endY=x,b.spot1=Za,b.spot2=la,b.defaultStretch=hi,Te.Nf<Te.vm&&(Te.Mf[a]=b,Te.Nf++)),b}),ps("TriangleRight",function(a,y,x){return new Kn().add(new Wr(0,0).add(new Po(Zo,y,.5*x)).add(new Po(Zo,0,x).close())).pm(0,.25,.5,.75)}),ps("TriangleDown",function(a,y,x){return new Kn().add(new Wr(0,0).add(new Po(Zo,y,0)).add(new Po(Zo,.5*y,x).close())).pm(.25,0,.75,.5)}),ps("TriangleLeft",function(a,y,x){return new Kn().add(new Wr(y,x).add(new Po(Zo,0,.5*x)).add(new Po(Zo,y,0).close())).pm(.5,.25,1,.75)}),ps("TriangleUp",function(a,y,x){return new Kn().add(new Wr(y,x).add(new Po(Zo,0,x)).add(new Po(Zo,.5*y,0).close())).pm(.25,.5,.75,1)}),ps("Triangle","TriangleUp"),ps("Diamond",function(a,y,x){return new Kn().add(new Wr(.5*y,0).add(new Po(Zo,0,.5*x)).add(new Po(Zo,.5*y,x)).add(new Po(Zo,y,.5*x).close())).pm(.25,.25,.75,.75)}),ps("LineH",function(a,y,x){return a=new Kn(Kn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ps("LineV",function(a,y,x){return a=new Kn(Kn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ps("None","Rectangle"),ps("BarH","Rectangle"),ps("BarV","Rectangle"),ps("MinusLine","LineH"),ps("PlusLine",function(a,y,x){return new Kn().add(new Wr(0,x/2,!1).add(new Po(Zo,y,x/2)).add(new Po(Kr,y/2,0)).add(new Po(Zo,y/2,x)))}),ps("XLine",function(a,y,x){return new Kn().add(new Wr(0,x,!1).add(new Po(Zo,y,0)).add(new Po(Kr,0,0)).add(new Po(Zo,y,x)))}),ps("LineRight",function(a,y,x){return new Kn().add(new Wr(.25*y,0,!1).add(new Po(Zo,.75*y,.5*x)).add(new Po(Zo,.25*y,x)))}),ps("LineDown",function(a,y,x){return new Kn().add(new Wr(0,.25*x,!1).add(new Po(Zo,.5*y,.75*x)).add(new Po(Zo,y,.25*x)))}),ps("LineLeft",function(a,y,x){return new Kn().add(new Wr(.75*y,0,!1).add(new Po(Zo,.25*y,.5*x)).add(new Po(Zo,.75*y,x)))}),ps("LineUp",function(a,y,x){return new Kn().add(new Wr(0,.75*x,!1).add(new Po(Zo,.5*y,.25*x)).add(new Po(Zo,y,.75*x)))}),Te.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 Iv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Ro,this.ir=null,this.jr="",this.lr=wi,this.Gq="",this.Hq=Dr,this.Pq=vo,this.Kq=ao,this.Up=null,this.Cq=127,this.zr=Eo,this.yr="gray",this.Vg=4}Iv.prototype.copy=function(){var a=new Iv;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 vi(a,y){a===void 0||a instanceof Hr||typeof a=="string"?Dn.call(this,a):(Dn.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 zt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new sn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Be(vi,Dn),vi.prototype.cloneProtected=function(a){Dn.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},Mt=vi.prototype,Mt.Af=function(a){Dn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Mt.toString=function(){var a=xn(this.constructor)+"#"+$i(this);return this.data!==null&&(a+="("+On(this.data)+")"),a};function Xs(a){a.P===null?a.P=new Iv:a.P.nc&&(a.P=a.P.copy())}Mt.th=function(){Dn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Mt.gk=function(a,y,x,b,E,z,tt){var ot=this.diagram;ot!==null&&(a===br&&y==="elements"?E instanceof Dn?Od(E,function(rt){uy(ot.partManager,rt),bd(ot,rt)}):jh(ot,E):a===zr&&y==="elements"&&(E instanceof Dn?Od(E,function(rt){hy(ot.partManager,rt,ot)}):Lg(ot,E)),ot.cb(a,y,x,b,E,z,tt))},Mt.La=function(a){if(Dn.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 Dn&&Od(E,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},vi.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},vi.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},vi.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 Yn),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)))}}},vi.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)}},vi.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=rn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);bn(y)}},vi.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof Ki?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof So))break t;Qa(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Dn.Link),x.adornedObject=y)}if(x!==null){x.type===Dn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(Tx(this,a),y=this.adornments;y.next();)y.value.La()}},vi.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Rv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Tx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function zm(a){if(Wh(a)===!1){zv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function B1(a){if(a.G|=2097152,Wh(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||R1(a,y,x),x=a.Ib;var b=sn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),sn.free(b),zv(a,!1)}}vi.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new eo);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),this.Lb=z,z.ws()||z.pp(E)},vi.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=po;this.locationSpot.sb()&&(z=this.locationSpot);var tt=zt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,b,E,z);a.rotate(this.Kb,tt.x,tt.y),zt.free(tt)}},vi.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},vi.prototype.moveTo=function(a,y,x){a=zt.allocAt(a,y),this.move(a,x),zt.free(a)},vi.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())},vi.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())},vi.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Yn),y.I(a)!==null)return y.I(a);var x=Dn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function ih(a,y,x,b){b===void 0&&(b=new zt),x=x.Mc()?po: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}vi.prototype.mi=function(a){return a===void 0&&(a=new sn),a.assign(this.actualBounds)},vi.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function A1(a){var y=zt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof Xi?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 Ad(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=c1(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 z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,b-=tt/2,E-=tt/2,0<a.x?z+=a.x:(b+=a.x,z-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,z+2,y+2),x}vi.prototype.arrange=function(){if(Fs(this)===!1)B1(this);else{Yl(this,!1);var a=this.Ib,y=sn.alloc();y.assign(a);var x=Kh(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;R1(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()||Te.B(y.width,a.width)&&Te.B(y.height,a.height)||0<=this.vw&&this.C(16),sn.free(y),zv(this,!1)}},Mt=vi.prototype,Mt.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=sn.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),sn.free(E)}!(this.G&65536)&&a.D(y)||H1(this,b,x),x.N(),!a.w()&&!y.w()||jo(a,y)||(this instanceof Xn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Mt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&I1(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 zt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),Wh(this)===!1&&Fs(this)===!1&&(zm(this),B1(this)),!0};function I1(a,y,x,b,E){y===null||a instanceof So||(y=y.animationManager,y.zb&&Xc(y,a,new zt(b,E),x))}Mt.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;Wh(this)||Fs(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)}zm(this)},Mt.Av=function(){this.G&=-2097153,zm(this)};function R1(a,y,x){var b=A1(a),E=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?j1(a,y,x,E,b):z1(a,y,x,E,b):z?j1(a,y,x,E,b):tt&&z1(a,y,x,E,b),a.G|=2097152,zt.free(b),a.Uk()}function j1(a,y,x,b,E){var z=y.x,tt=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 So||Xc(x,a,new zt(z,tt),y),b||y.x===z&&y.y===tt||a.g("position",new zt(z,tt),y.copy()))}function z1(a,y,x,b,E){var z=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(z)||b===null||a.g("location",z,x.copy())}function H1(a,y,x){Hv(a,!1),a instanceof Xn&&Yu(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?Kh(a)?(Xo(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Mt.si=function(){return!0},Mt.Zc=function(){return!0},Mt.ph=function(){return!1},Mt.Dd=function(){return!0};function jv(a,y,x,b){y.constructor===a.constructor||K1||(K1=!0,si('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),si(" Old class: "+xn(a.constructor)+", new class: "+xn(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,ot=!0,rt=!0,lt=!1;a instanceof Xn&&(ot=a.isTreeLeaf,rt=a.isTreeExpanded,lt=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=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof Xn&&(a.U=ot?a.U|4:a.U&-5,a.U=rt?a.U|1:a.U&-2,a.U=lt?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)}vi.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},vi.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},vi.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},vi.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},vi.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},vi.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},vi.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},vi.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},vi.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 Wh(a){return(a.G&32768)!==0}function zv(a,y){a.G=y?a.G|32768:a.G&-32769}function Hv(a,y){a.G=y?a.G|65536:a.G&-65537}function Kh(a){return(a.G&131072)!==0}Mt=vi.prototype,Mt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Hm(a,y){a.G=y?a.G|1048576:a.G&-1048577}Mt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Mt.N=function(){var a=this.diagram;a!==null&&!Fs(this)&&!Wh(this)&&this.isVisible()&&this.Ib.w()&&a.N(Ad(this,this.Ib))},Mt.v=function(){Dn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Xn&&this.labeledLink!==null&&Ts(this.labeledLink),a.$b(!0))},Mt.Vo=function(a){a||(a=this.Ah,a!==null&&_v(a,this))},Mt.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},Mt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Mt.oz=function(){return Gv(this,this)};function Gv(a,y){var x=y.containingGroup;return x!==null?1+Gv(a,x):y instanceof Xn&&(y=y.labeledLink,y!==null)?Gv(a,y):0}Mt.sz=function(){return G1(this,this)};function G1(a,y){var x=y.containingGroup;return x!==null||y instanceof Xn&&(x=y.labeledLink,x!==null)?G1(a,x):y}Mt.Td=function(a){return a instanceof Ki?Wv(this,this,a):!1};function Wv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Wv(a,b,x)?y instanceof Xn&&(y=y.labeledLink,y!==null)?Wv(a,y,x):!1:!0}Mt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Ki&&Hm(y,!0),y instanceof Xn){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 Xn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Ki&&Hm(y,!1),y instanceof Xn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},vi.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Xn&&this.isLinkLabel)},vi.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 Xn&&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 W1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function $h(a,y,x,b,E,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof So)){if(a.add(y),y instanceof Xn){if(x&&y instanceof Ki)for(var tt=y.memberParts;tt.next();)$h(a,tt.value,x,b,E,z);if(E!==!1)for(tt=y.linksConnected;tt.next();){var ot=tt.value;if(!a.contains(ot)){var rt=ot.fromNode,lt=ot.toNode;rt=rt===null||a.contains(rt),lt=lt===null||a.contains(lt),(E?rt&<:rt||lt)&&$h(a,ot,x,b,E,z)}}if(1<b)for(y=y.Ou();y.next();)$h(a,y.value,x,b-1,E,z)}else if(y instanceof Hn)for(y=y.labelNodes;y.next();)$h(a,y.value,x,b,E,z)}}_t.Object.defineProperties(vi.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?kn: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(zr,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(br,"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&&(Xs(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&&Qc(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 So?this.type!==Dn.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:vo},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Xs(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:ao},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Xs(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&&(Xs(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:Dr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Xs(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,Fs(this)===!1&&(zm(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),I1(this,E,x,z.x,z.y),this.g("position",z,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 So)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof So?this instanceof So&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Qa(x),x=x.copy(),x!==null&&jv(this,x,y,a))):(z!==null&&z.jm(b,a),x=gS(x.partManager,b,a),x!==null&&(Qa(x),x=x.copy(),x===null||x instanceof Hn||(b=this.location.copy(),jv(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){jv(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&&(Xs(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&&(Xs(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&&(Xs(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 Hn?(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&&(Xs(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&&(Xs(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&&(Xs(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:Ro},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Xs(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&&(Xs(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&&(Xs(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:wi},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Xs(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&le("Cannot make a Group a member of itself: "+this.toString()),le("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Vv(y,this):this instanceof Ki&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?_v(a,this):this instanceof Ki&&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 z=E.wa(a!==null?a.data:null);E.mp(b,z)}}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 Ki){for(x=new tn,$h(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Xn)for(b=b.linksConnected;b.next();)Mf(b.value)}if(this instanceof Xn){for(x=this.linksConnected;x.next();)Mf(x.value);x=this.labeledLink,x!==null&&Mf(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Qc(y,-1,a))}}else le("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(Xs(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Xn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Xs(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&&(Xs(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Eo},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Xs(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&&(Xs(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&&(Xs(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),vi.prototype.invalidateLayout=vi.prototype.C,vi.prototype.findCommonContainingGroup=vi.prototype.px,vi.prototype.isMemberOf=vi.prototype.Td,vi.prototype.findTopLevelPart=vi.prototype.sz,vi.prototype.findSubGraphLevel=vi.prototype.oz,vi.prototype.ensureBounds=vi.prototype.Va,vi.prototype.getDocumentBounds=vi.prototype.mi,vi.prototype.findObject=vi.prototype.fb,vi.prototype.moveTo=vi.prototype.moveTo,vi.prototype.invalidateAdornments=vi.prototype.Wb,vi.prototype.clearAdornments=vi.prototype.Ej,vi.prototype.removeAdornment=vi.prototype.Jf,vi.prototype.addAdornment=vi.prototype.bh,vi.prototype.findAdornment=vi.prototype.Pj,vi.prototype.updateTargetBindings=vi.prototype.La;var K1=!1;vi.className="Part",vi.LayoutNone=0,vi.LayoutAdded=1,vi.LayoutRemoved=2,vi.LayoutShown=4,vi.LayoutHidden=8,vi.LayoutNodeSized=16,vi.LayoutGroupLayout=32,vi.LayoutNodeReplaced=64,vi.LayoutStandard=127,vi.LayoutAll=16777215;function So(a,y){a===void 0||a instanceof Hr||typeof a=="string"?vi.call(this,a):(vi.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)}Be(So,vi),So.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},So.prototype.updateRelationshipsFromData=function(){},So.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Hn&&y instanceof Xi){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 Xi&&(E.ua=a)}}},So.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Fs(a))},So.prototype.Zc=function(){return!1},So.prototype.gk=function(a,y,x,b,E,z,tt){if(a===br&&y==="elements"){if(E instanceof Ds)this.$a===null&&(this.$a=E);else if(E instanceof Dn){var ot=E.Nl(function(rt){return rt instanceof Ds});ot instanceof Ds&&this.$a===null&&(this.$a=ot)}}else a===zr&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Dn&&this.$a.rg(b)&&(this.$a=null));vi.prototype.gk.call(this,a,y,x,b,E,z,tt)},So.prototype.updateAdornments=function(){},So.prototype.Lj=function(){},_t.Object.defineProperties(So.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}}}),So.className="Adornment";function Kv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=xa,this.er=Km,this.Kr=this.ij=this.Nq=this.Mq=null}Kv.prototype.copy=function(){var a=new Kv;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 Xn(a,y){a===void 0||a instanceof Hr||typeof a=="string"?vi.call(this,a):(vi.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new qe,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Be(Xn,vi),Xn.prototype.cloneProtected=function(a){vi.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Mt=Xn.prototype,Mt.Af=function(a){vi.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function oh(a){a.Ba===null?a.Ba=new Kv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Mt.th=function(){vi.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function $1(a,y){y!==null&&(a.af===null&&(a.af=new tn),a.af.add(y))}function Z1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var z=E.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===b||z.Ds===y&&z.cv===a&&z.Ox===b&&z.Px===x)return z}return null}Mt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=Z1(this,a,y,x),a!==null&&a.Sl()},Mt.gk=function(a,y,x,b,E,z,tt){a===br&&y==="elements"?this.wc=null:a===zr&&y==="elements"&&(this.wc=null),vi.prototype.gk.call(this,a,y,x,b,E,z,tt)},Mt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(fa(x.fromPort),fa(x.toPort),x.bb())}};function _1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(fa(x.fromPort),fa(x.toPort),x.bb())}}function fa(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||fa(y.port)}}Mt.si=function(){return!0},Xn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Xn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Xn.prototype.isVisible=function(){if(!vi.prototype.isVisible.call(this))return!1;var a=!0,y=Qu,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Qu){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Br){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===df&&(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},Xn.prototype.Zb=function(a){vi.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)}},Xn.prototype.qx=function(){var a=new tn,y=new tn;return V1(this,this,a,y),y.iterator};function V1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,z=a.diagram;z!==null&&(E=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(E?tt.fromNode===y:tt.toNode===y)&&V1(a,E?tt.toNode:tt.fromNode,x,b):b.add(tt)})}}Xn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Rn(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},Mt=Xn.prototype,Mt.Mo=function(a){a===void 0&&(a=null);var y=new Rn(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},Mt.Sd=function(a){a===void 0&&(a=null);var y=new Rn(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},Mt.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 tn,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 tn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Tn(x):kn},Mt.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 tn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Tn(x):kn},Mt.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 tn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Tn(x):kn},Mt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Rn(this.jb),E=this;return b.predicate=function(z){return!((z.fromNode!==E||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==E||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},b},Mt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Rn(this.jb),E=this;return b.predicate=function(z){return!(z.fromNode!==E||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},b};function Gm(a,y,x){fa(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 z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),E(a,y,x),tt!==null&&(tt.aa=z)}}!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,z=b?x:y,E.ci||(E.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function Wm(a,y,x){fa(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var z=a.linkDisconnected;if(E=a.diagram,z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(a,y,x),E!==null&&(E.aa=tt)}}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)):Vg(y)))}function Vg(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}}}Xn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Mt=Xn.prototype,Mt.Vo=function(a){vi.prototype.Vo.call(this,a),a||(Vg(this),a=this.Yk,a!==null&&nS(a,this))},Mt.Wo=function(a){vi.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Mt.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,vi.prototype.Lj.call(this)},Mt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;U1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function U1(a){a.wc===null?a.wc=new Yn:a.wc.clear(),a.qm(a,function(y,x){X1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function X1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function $v(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=rn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);bn(x)}}}Mt.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},Mt.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}},Mt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Hm(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;)Hm(y,!1),y=y.pg();return x},Mt.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},Mt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Xn)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},Mt.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 tn;return a(this,y),y},Mt.uz=function(){return Y1(this,this)};function Y1(a,y){return y=y.pg(),y===null?0:1+Y1(a,y)}Mt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Rn(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},Mt.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 qe,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 qe,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Tn(x):kn},Mt.wz=function(a){a===void 0&&(a=1/0);var y=new tn;return $h(y,this,!1,a,!0),y},Xn.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 tn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Qu),y.Ue=!1}};function J1(a,y,x,b,E,z,tt){if(1<b)for(var ot=x?a.Mo():a.Sd();ot.next();){var rt=ot.value;rt.isTreeLink&&(rt=rt.To(a),rt===null||rt===a||y.contains(rt)||(y.add(rt),J1(rt,y,x,b-1,E,z,tt)))}else Q1(a,y,x,E,z,tt)}function Q1(a,y,x,b,E,z){for(var tt=E===a?!0:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),rt={};ot.next();){var lt=ot.value;if(lt.isTreeLink&&(lt=lt.To(a),lt!==null&<!==a)){var ut=y.contains(lt);if(ut||y.add(lt),tt){var gt=x?lt.Oo():lt.Po();rt.uv=a,gt.all(function(St){return function(Ct){return Ct===St.uv||!Ct.isTreeExpanded}}(rt))&&b.Aj(lt,E),lt.oh(),lt.Zb(!1)}lt.isTreeExpanded&&(lt.wasTreeExpanded=lt.isTreeExpanded,ut||Q1(lt,y,x,b,E,z))}rt={uv:rt.uv}}a.isTreeExpanded=!1}Xn.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 tn;x.add(this),q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Qu),y.Ue=!1}};function q1(a,y,x,b,E,z,tt){for(var ot=z===a?!1:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),lt={};rt.next();){var ut=rt.value;if(ut.isTreeLink&&(ot||ut.fd||ut.bb(),ut=ut.To(a),ut!==null&&ut!==a&&!y.contains(ut))){if(y.add(ut),!ot){ut.Zb(!0),ut.oh();var gt=x?ut.Oo():ut.Po();lt.vv=a,gt.all(function(St){return function(Ct){return Ct===St.vv||!Ct.isTreeExpanded}}(lt))&&E.Cj(ut,z)}(2<b||ut.wasTreeExpanded)&&(ut.wasTreeExpanded=!1,q1(ut,y,x,b-1,E,z,tt))}lt={vv:lt.vv}}a.isTreeExpanded=!0}_t.Object.defineProperties(Xn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Km},set:function(a){var y=this.portSpreading;y!==a&&(oh(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&Yu(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:xa},set:function(a){typeof a=="number"&&(a=new mi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),oh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Yu(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(oh(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(oh(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(oh(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,z=x.model;if(E!==null&&z.ri()){var tt=z.wa(b);tt!==void 0&&z.Qx(E,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&(nS(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),Ts(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&U1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(oh(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),Xn.prototype.expandTree=Xn.prototype.expandTree,Xn.prototype.collapseTree=Xn.prototype.collapseTree,Xn.prototype.findTreeParts=Xn.prototype.wz,Xn.prototype.findTreeChildrenNodes=Xn.prototype.Ou,Xn.prototype.findTreeChildrenLinks=Xn.prototype.Qo,Xn.prototype.findTreeLevel=Xn.prototype.uz,Xn.prototype.findTreeParentChain=Xn.prototype.vz,Xn.prototype.findTreeParentNode=Xn.prototype.pg,Xn.prototype.findTreeParentLink=Xn.prototype.kh,Xn.prototype.findCommonTreeParent=Xn.prototype.gz,Xn.prototype.findTreeRoot=Xn.prototype.xz,Xn.prototype.isInTreeOf=Xn.prototype.Nz,Xn.prototype.findPort=Xn.prototype.ns,Xn.prototype.findLinksTo=Xn.prototype.kz,Xn.prototype.findLinksBetween=Xn.prototype.jz,Xn.prototype.findNodesInto=Xn.prototype.Oo,Xn.prototype.findNodesOutOf=Xn.prototype.Po,Xn.prototype.findNodesConnected=Xn.prototype.Mu,Xn.prototype.findLinksInto=Xn.prototype.Sd,Xn.prototype.findLinksOutOf=Xn.prototype.Mo,Xn.prototype.findExternalTreeLinksConnected=Xn.prototype.qx,Xn.prototype.invalidateConnectedLinks=Xn.prototype.Bd,Xn.prototype.invalidateLinkBundle=Xn.prototype.Lz;var Fx=new nn(Xn,"SpreadingNone",10),Km=new nn(Xn,"SpreadingEvenly",11),Zv=new nn(Xn,"SpreadingPacked",12);Xn.className="Node",Xn.SpreadingNone=Fx,Xn.SpreadingEvenly=Km,Xn.SpreadingPacked=Zv;function Ki(a,y){a===void 0||a instanceof Hr||typeof a=="string"?Xn.call(this,a):(Xn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new tn,this.$a=null,this.Sc=new Jo,this.Sc.group=this,this.gl=new tn,this.tb=this.$p=null,y&&Object.assign(this,y)}Be(Ki,Xn),Ki.prototype.cloneProtected=function(a){Xn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ds});y instanceof Ds?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())},Mt=Ki.prototype,Mt.Af=function(a){Xn.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 Xn)x.Bd(y);else if(x instanceof Hn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Mt.gk=function(a,y,x,b,E,z,tt){if(a===br&&y==="elements"){if(E instanceof Ds)this.$a===null?this.$a=E:this.$a!==E&&le("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Dn){var ot=E.Nl(function(rt){return rt instanceof Ds});ot instanceof Ds&&(this.$a===null?this.$a=ot:this.$a!==ot&&le("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===zr&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Dn&&this.$a.rg(b)&&(this.$a=null));Xn.prototype.gk.call(this,a,y,x,b,E,z,tt)},Mt.Xl=function(a,y){Xn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Dn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Dn&&(a=a.Pb()),this.tb===null&&(this.tb=new sn),a.mi(this.tb),a instanceof Xi&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Mt.eh=function(a,y,x,b){this.nf=this.$a,Xn.prototype.eh.call(this,a,y,x,b)},Mt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Hn||y.Va()}),Xn.prototype.Va.call(this)},Mt.si=function(){if(!Xn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Xn){if(y.isVisible()&&Fs(y))return!1}else if(y instanceof Hn&&y.isVisible()&&Fs(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function _v(a,y){if(a.Gn.add(y)){y instanceof Ki&&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 Hn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Vv(a,y){if(a.Gn.remove(y)){y instanceof Ki&&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 Hn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Mt.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)}Xn.prototype.Lj.call(this)},Ki.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},Ki.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},Ki.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))},Mt=Ki.prototype,Mt.Bd=function(a){var y=(this.U&65536)!==0;if(Xn.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()?(fa(x.fromPort),fa(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(fa(x.fromPort),fa(x.toPort),x.bb()))}}},Mt.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 tn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Xn)for(E=E.linksConnected;E.next();){var z=E.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Mt.iz=function(){var a=this.Rj();a.add(this);for(var y=new tn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Xn)for(b=b.linksConnected;b.next();){var E=b.value,z=E.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},Mt.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new tn;return a(this,y),y},Mt.Rj=function(){var a=new tn;return $h(a,this,!0,0,!0),a.remove(this),a},Mt.Zb=function(a){Xn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Ki.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();tS(this,y,a,this),a.Ue=!1}};function tS(a,y,x,b){for(var E=a.memberParts;E.next();){var z=E.value;if(z.Zb(!1),z instanceof Ki&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,tS(z,y,x,b)),z instanceof Xn)z.Bd(y),x.Aj(z,b);else if(z instanceof Hn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}Ki.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();eS(this,y,a,this),a.Ue=!1}};function eS(a,y,x,b){for(var E=a.memberParts;E.next();){var z=E.value;if(z.Zb(!0),z instanceof Ki&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,eS(z,y,x,b)),z instanceof Xn)z.Bd(y),x.Cj(z,b);else if(z instanceof Hn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}Ki.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,z=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===z||isNaN(x)&&isNaN(z))){for(b=E-(isNaN(b)?0:b),x=z-(isNaN(x)?0:x),z=zt.alloc(),Xn.prototype.move.call(this,a,y),a=new tn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Hn&&(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 Xn&&E.isLinkLabel)){var tt=E.position,ot=E.location;tt.w()?(z.x=tt.x+b,z.y=tt.y+x,E.position=z):ot.w()&&(z.x=ot.x+b,z.y=ot.y+x,E.location=z)}for(y.reset();y.next();)E=y.value,E instanceof Hn&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(tt=E.position,z.x=tt.x+b,z.y=tt.y+x,z.w()?E.move(z):E.bb(),Xv(E)&&E.bb());zt.free(z)}},_t.Object.defineProperties(Ki.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&le("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(oh(this),this.Ba.Mq=a,this.g("memberAdded",y,a))}},memberRemoved:{get:function(){return this.Ba!==null?this.Ba.Nq:null},set:function(a){var y=this.memberRemoved;y!==a&&(oh(this),this.Ba.Nq=a,this.g("memberRemoved",y,a))}},memberValidation:{get:function(){return this.Ba!==null?this.Ba.ij:null},set:function(a){var y=this.memberValidation;y!==a&&(oh(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(E){E.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(oh(this),this.Ba.Kr=a,this.g("subGraphExpandedChanged",y,a))}},rh:{get:function(){return(this.U&32768)!==0},set:function(a){(this.U&32768)!==0!==a&&(this.U^=32768)}}}),Ki.prototype.expandSubGraph=Ki.prototype.expandSubGraph,Ki.prototype.collapseSubGraph=Ki.prototype.collapseSubGraph,Ki.prototype.findSubGraphParts=Ki.prototype.Rj,Ki.prototype.findContainingGroupChain=Ki.prototype.hz,Ki.prototype.findExternalNodesConnected=Ki.prototype.iz,Ki.prototype.findExternalLinksConnected=Ki.prototype.Lu,Ki.prototype.ensureBounds=Ki.prototype.Va,Ki.className="Group";function Ds(a){Me.call(this),this.yb=jr,this.ko=new sn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Be(Ds,Me),Ds.prototype.cloneProtected=function(a){Me.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ds.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Ao(0,0,y.width,y.height,a.x,a.y)},Ds.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Ki||a instanceof So)||le("Placeholder is not inside a Group or Adornment."),a instanceof Ki){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(wr(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=zt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),zt.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof Xi&&(tt=z.strokeWidth);var ot=z.Df(),rt=z.naturalBounds,lt=(rt.width+tt)*ot;tt=(rt.height+tt)*ot,a.type!==Dn.Link&&(ot=z.ga(a.category==="Selection"?Dr:a.locationSpot,zt.alloc()),a.location=ot,zt.free(ot)),isNaN(lt)||isNaN(tt)?(a=z.ga(Dr,zt.alloc()),lt=sn.allocAt(a.x,a.y,0,0),lt.Ye(z.ga(Ws,a)),lt.Ye(z.ga(Nl,a)),lt.Ye(z.ga(Gs,a)),wr(y,lt.width+b||0,lt.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),zt.free(a),sn.free(lt)):(wr(y,lt+b||0,tt+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ds.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ds.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Ki&&!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=sn.alloc(),E=this.computeMemberBounds(x);var z=this.yb;return y instanceof Ki&&!y.isSubGraphExpanded?a.h(E.x-z.left,E.y-z.top,0,0):a.h(E.x-z.left,E.y-z.top,Math.max(E.width+z.left+z.right,0),Math.max(E.height+z.top+z.bottom,0)),sn.free(x),b&&y instanceof Ki&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ds.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Ki))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var ot=tt.value;if(ot.isVisible()){if(ot instanceof Hn&&(!y.computesBoundsIncludingLinks||La(ot)||ot.fromNode===y||ot.toNode===y))continue;ot=ot.actualBounds,ot.left<x&&(x=ot.left),ot.top<b&&(b=ot.top),ot.right>E&&(E=ot.right),ot.bottom>z&&(z=ot.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,z-b):(y=y.location,a.h(y.x,y.y,0,0)),a},_t.Object.defineProperties(Ds.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new mi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ds.className="Placeholder";function Hn(a){vi.call(this,Dn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Bs,this.Om=0,this.Qm=Bs,this.Rm=NaN,this.qj=Qv,this.po=.5,this.wd=null,this.Nb=new qe().freeze(),this.Tg=this.Mg=null,this.ml=new sn,this.ua=new Kn,this.u=this.o=this.Sf=this.Wf=null,this.su=new zt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Be(Hn,vi),Hn.prototype.cloneProtected=function(a){vi.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())},Mt=Hn.prototype,Mt.Af=function(a){vi.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&&fa(y),a=a.toPort,a!==null&&fa(a)},Mt.qb=function(a){a.classType===Hn?(a.value&2)===2?this.routing=a:a===Ea||a===sh||a===kf?this.curve=a:a===Yg||a===Xm||a===Ym?this.adjusting=a:a!==Qv&&a!==Bs&&le("Unknown Link enum value for a Link property: "+a):vi.prototype.qb.call(this,a)},Mt.Xc=function(){this.ba===null&&(this.ba=new Ig)},Mt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Fs(a)||Wh(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Fs(a)||Wh(a)))},Mt.zv=function(){return!1},Mt.Av=function(){},Mt.Zc=function(){return!1},Hn.prototype.computeAngle=function(a,y,x){return Hn.computeAngle(y,x)},Hn.computeAngle=function(a,y){switch(a){default:case Bs:a=0;break;case Jg:a=y;break;case Qg:a=y+90;break;case qg:a=y-90;break;case qv:a=y+180;break;case Jm:a=Te.bp(y),90<a&&270>a&&(a-=180);break;case tp:a=Te.bp(y+90),90<a&&270>a&&(a-=180);break;case ep:a=Te.bp(y-90),90<a&&270>a&&(a-=180);break;case Qm:if(a=Te.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Te.bp(a)};function Mf(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&&_v(y,a);var E=a.containingGroupChanged;if(E!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),E(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}Mt=Hn.prototype,Mt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&vi.prototype.oh.call(this)},Mt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Mt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function nS(a,y){a.wd===null&&(a.wd=new tn),a.wd.add(y),a.v()}Mt.Vo=function(a){if(vi.prototype.Vo.call(this,a),Id(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)}Ug(this)}},Mt.Wo=function(a){if(vi.prototype.Wo.call(this,a),Id(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Wm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Wm(x,this,b)}Xg(this)}},Mt.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))},Hn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Hn.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?vi.prototype.move.call(this,a,!1):(a=zt.allocAt(x.x+b,x.y+E),vi.prototype.move.call(this,a,!1),zt.free(a)),rh(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Hn.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},Hn.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},Hn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Ho),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()===Ea))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()===Ea){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Te.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 z=this.i(x+2);x=this.i(x+3),Te.ax(b.x,b.y,E.x,E.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,E=z=b=0;b<x/2&&z<y&&(E=tt[z],!(b+E>x/2));)b+=E,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-z.y)?y.x>z.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*(z.x-y.x),y.y+x*(z.y-y.y))),a},Hn.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()===Ea))return this.ua.wx(.5);if(this.computeCurve()===Ea&&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),Te.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 z;E<b/2&&x<a&&(z=y[x],!(E+z>b/2));)E+=z,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)},Mt=Hn.prototype,Mt.i=function(a){return this.Nb.s[a]},Mt.dd=function(a,y){this.Nb.cd(a,y)},Mt.L=function(a,y,x){this.Nb.cd(a,new zt(y,x))},Mt.Kz=function(a,y){this.Nb.Gb(a,y)},Mt.m=function(a,y,x){this.Nb.Gb(a,new zt(y,x))},Mt.ne=function(a){this.Nb.add(a)},Mt.yf=function(a,y){this.Nb.add(new zt(a,y))},Mt.pv=function(a){this.Nb.mb(a)},Mt.Fj=function(){this.Nb.clear()};function rh(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 qe,z=a.Nb.iterator;z.next();){var tt=z.value;E.add(new zt(tt.x+y,tt.y+x).freeze())}E.freeze(),z=a.Nb,a.Nb=E,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),Ts(a)),b?$m(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&Jc(tt.animationManager,a,E),a.g("points",z,E)}}Mt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Mt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,z=E.length,tt=0;tt<z;tt++){var ot=E[tt];x=Math.min(ot.x,x),b=Math.min(ot.y,b)}ot=tt=1/0;for(var rt=y.s,lt=rt.length,ut=0;ut<lt;ut++){var gt=rt[ut];tt=Math.min(gt.x,tt),ot=Math.min(gt.y,ot),gt.freeze()}if(y.freeze(),lt===z){for(z=0;z<lt;z++)if(ut=E[z],gt=rt[z],ut.x-x!==gt.x-tt||ut.y-b!==gt.y-ot){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&Jc(x.animationManager,this,y),$m(this),this.g("points",a,y)}},Mt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function $m(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),Um(a,!1))}Mt.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())}},Mt.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()}}},Hn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(wc||(wc=new Xn,wc.desiredSize=zi,wc.Va()),this.defaultFromPoint&&(wc.location=this.defaultFromPoint,wc.Va(),y=a=wc)):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?(Cc||(Cc=new Xn,Cc.desiredSize=zi,Cc.Va()),this.defaultToPoint&&(Cc.location=this.defaultToPoint,Cc.Va(),E=b=Cc)):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 z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var ot=Ef(tt),rt=Ef(x),lt=y===E&&y!==null,ut=this.isOrthogonal,gt=this.curve===Ea;this.Wf=lt&&!ut?gt=!0:!1;var St=this.computeAdjusting()===Bs||lt;if(!ut&&!lt&&ot&&rt){if(ot=!1,!St&&3<=z&&(St=this.getLinkPoint(a,y,tt,!0,!1,b,E),rt=this.getLinkPoint(b,E,x,!1,!1,a,y),ot=this.adjustPoints(0,St,z-1,rt))&&(St=this.getLinkPoint(a,y,tt,!0,!1,b,E),rt=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,St,z-1,rt)),!ot)if(this.Fj(),gt){z=this.getLinkPoint(a,y,tt,!0,!1,b,E),St=this.getLinkPoint(b,E,x,!1,!1,a,y),ot=St.x-z.x,rt=St.y-z.y,lt=this.computeCurviness(),gt=ut=0;var Ct=z.x+ot/3,bt=z.y+rt/3,Bt=Ct,Yt=bt;Te.B(rt,0)?Yt=0<ot?Yt-lt:Yt+lt:(ut=-ot/rt,gt=Math.sqrt(lt*lt/(ut*ut+1)),0>lt&&(gt=-gt),Bt=(0>rt?-1:1)*gt+Ct,Yt=ut*(Bt-Ct)+bt),Ct=z.x+2*ot/3,bt=z.y+2*rt/3;var Gt=Ct,se=bt;Te.B(rt,0)?se=0<ot?se-lt:se+lt:(Gt=(0>rt?-1:1)*gt+Ct,se=ut*(Gt-Ct)+bt),this.Fj(),this.ne(z),this.yf(Bt,Yt),this.yf(Gt,se),this.ne(St),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else z=b,St=E,b=this.getLinkPoint(a,y,tt,!0,!1,z,St),E=this.getLinkPoint(z,St,x,!1,!1,a,y),this.hasCurviness()?(St=E.x-b.x,x=E.y-b.y,tt=this.computeCurviness(),a=b.x+St/2,y=b.y+x/2,z=a,ot=y,Te.B(x,0)?ot=0<St?ot-tt:ot+tt:(St=-St/x,z=Math.sqrt(tt*tt/(St*St+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,ot=St*(z-a)+y),this.ne(b),this.yf(z,ot),this.ne(E)):(this.ne(b),this.ne(E),ot=sn.alloc(),y.mi(ot),rt=ot.ca(E),St.mi(ot),lt=ot.ca(b),(rt||lt)&&(tt=y.ga(_m(tt),new zt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,E,!0,tt)),x=St.ga(_m(x),new zt),this.dd(1,this.getLinkPointFromPoint(z,St,x,b,!1,x))),sn.free(ot))}else{gt=this.isAvoiding,St&&(ut&>||lt)&&this.Fj();var ae=lt?this.computeCurviness():0;gt=this.getLinkPoint(a,y,tt,!0,ut,b,E),Ct=Bt=bt=0,(ut||!ot||lt)&&(Yt=this.computeEndSegmentLength(a,y,tt,!0),Ct=this.getLinkDirection(a,y,gt,tt,!0,ut,b,E),lt&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(Ct-=ut?90:30,0>ae&&(Ct-=180)),0>Ct?Ct+=360:360<=Ct&&(Ct-=360),lt&&(Yt+=Math.abs(ae)*(ut?1:2)),Ct===0?bt=Yt:Ct===90?Bt=Yt:Ct===180?bt=-Yt:Ct===270?Bt=-Yt:(bt=Yt*Math.cos(Ct*Math.PI/180),Bt=Yt*Math.sin(Ct*Math.PI/180)),tt.Mc()&<&&(Yt=y.ga(po,zt.alloc()),Gt=zt.allocAt(Yt.x+1e3*bt,Yt.y+1e3*Bt),this.getLinkPointFromPoint(a,y,Yt,Gt,!0,gt),zt.free(Yt),zt.free(Gt))),Yt=this.getLinkPoint(b,E,x,!1,ut,a,y);var he=se=Gt=0;if(ut||!rt||lt){var be=this.computeEndSegmentLength(b,E,x,!1);he=this.getLinkDirection(b,E,Yt,x,!1,ut,a,y),lt&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(he+=ut?0:30,0>ae&&(he+=180)),0>he?he+=360:360<=he&&(he-=360),lt&&(be+=Math.abs(ae)*(ut?1:2)),he===0?Gt=be:he===90?se=be:he===180?Gt=-be:he===270?se=-be:(Gt=be*Math.cos(he*Math.PI/180),se=be*Math.sin(he*Math.PI/180)),x.Mc()&<&&(x=E.ga(po,zt.alloc()),tt=zt.allocAt(x.x+1e3*Gt,x.y+1e3*se),this.getLinkPointFromPoint(b,E,x,tt,!1,Yt),zt.free(x),zt.free(tt))}x=gt,(ut||!ot||lt)&&(x=new zt(gt.x+bt,gt.y+Bt)),tt=Yt,(ut||!rt||lt)&&(tt=new zt(Yt.x+Gt,Yt.y+se)),!St&&!ut&&ot&&3<z&&this.adjustPoints(0,gt,z-2,tt)?this.dd(z-1,Yt):!St&&!ut&&rt&&3<z&&this.adjustPoints(1,x,z-1,Yt)?this.dd(0,gt):!St&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,gt),this.dd(z-1,Yt)):(this.Fj(),this.ne(gt),(ut||!ot||lt)&&this.ne(x),ut&&this.addOrthoPoints(x,Ct,tt,he,a,b),(ut||!rt||lt)&&this.ne(tt),this.ne(Yt))}return!0};function Uv(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}Hn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,z){if(z===void 0&&(z=new zt),a===null||y===null)return z.assign(x),z;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 tt=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*E;var ot=-a.m12*E,rt=-a.m21*E,lt=a.m11*E,ut=E*(a.m21*a.dy-a.m22*a.dx),gt=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*tt+b.y*rt+ut,b=b.x*ot+b.y*lt+gt,tt=x.x*tt+x.y*rt+ut,x=x.x*ot+x.y*lt+gt}return y.Sj(E,b,tt,x,z),a!==null&&z.transform(a),z};function Zm(a,y){var x=y.Zn;return x===null&&(x=new bc,x.port=y,x.node=y.part,y.Zn=x),hS(x,a)}Hn.prototype.getLinkPoint=function(a,y,x,b,E,z,tt,ot){if(ot===void 0&&(ot=new zt),x.sb()&&!Ef(x))return y.ga(x,ot),ot;if(x.$c()){var rt=Zm(this,y);if(rt!==null){if(ot.assign(rt.Zo),E&&this.routing===oS){var lt=Zm(this,tt);if(lt!==null&&rt.Gl<lt.Gl){rt=zt.alloc(),lt=zt.alloc();var ut=new sn(y.ga(Dr,rt),y.ga(Ws,lt)),gt=this.computeSpot(!b,tt);a=this.getLinkPoint(z,tt,gt,!b,E,a,y,lt),(x.Hf(vl)||x.Hf(Ks))&&a.y>=ut.y&&a.y<=ut.y+ut.height?ot.y=a.y:(x.Hf(Tl)||x.Hf(aa))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(ot.x=a.x),zt.free(rt),zt.free(lt)}}return ot}}return x=y.ga(_m(x),zt.alloc()),this.pointsCount>(E?6:2)?(tt=b?this.i(1):this.i(this.pointsCount-2),E&&(tt=Uv(x,tt.copy()))):(rt=this.computeSpot(!b,tt),z=zt.alloc(),tt=tt.ga(_m(rt),z),E&&(tt=Uv(x,tt)),zt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,b,ot),zt.free(x),ot},Hn.prototype.getLinkDirection=function(a,y,x,b,E,z,tt,ot){t:if(b.sb())var rt=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()&&(rt=Zm(this,y),rt!==null))switch(rt.Nc){case 1:rt=270;break t;case 2:rt=180;break t;default:case 4:rt=0;break t;case 8:rt=90;break t}rt=y.ga(po,zt.alloc()),this.pointsCount>(z?6:2)?(ot=E?this.i(1):this.i(this.pointsCount-2),ot=z?Uv(rt,ot.copy()):x):(x=zt.alloc(),ot=ot.ga(po,x),zt.free(x)),x=Math.abs(ot.x-rt.x)>Math.abs(ot.y-rt.y)?ot.x>=rt.x?0:180:ot.y>=rt.y?90:270,zt.free(rt),rt=x}return b.Mc()&&tt.Td(a)&&(rt+=180,360<=rt&&(rt-=360)),Ef(b)||(a=y.li(),a===0)||(45<=a&&135>a?rt+=90:135<=a&&225>a?rt+=180:225<=a&&315>a&&(rt+=270),360<=rt&&(rt-=360)),rt},Hn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Zm(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)},Hn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=po:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===wi?hr:y)):(a=y||this.toPort,a===null?a=po:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===wi?hr:y)),a};function Ef(a){return a===hr||a.x===.5&&a.y===.5}function _m(a){return a.x===.5&&a.y===.5?a:po}Hn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Bs&&4<this.pointsCount?this.computeMidPoint(new zt):(a=y.Zn,a=a!==null?hS(a,this):null,a!==null?a.Zo:y.ga(po))},Hn.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},Hn.prototype.Cf=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=eo.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return yv(this,y,x,E),z===void 0&&eo.free(tt),!0;if(this.Yc(a,tt)){var ot=!1;if(!this.isAtomic)for(var rt=this.O.s,lt=rt.length;lt--;){var ut=rt[lt];if(ut.visible||ut===this.locationObject){var gt=ut.actualBounds,St=this.naturalBounds;if(!(gt.x>St.width||gt.y>St.height||0>gt.x+gt.width||0>gt.y+gt.height)){if(gt=eo.alloc(),gt.set(tt),ut instanceof Dn)ot=ut.Cf(a,y,x,b,E,gt);else if(this.path===ut){if(ut instanceof Xi)if(ot=a,St=b,ut.pickable===!1)ot=!1;else if(gt.multiply(ut.transform),St)t:{var Ct=ot,bt=gt;if(ut.fh(Ct,bt))ot=!0;else{if(bt===void 0&&(bt=ut.transform,Ct.Re(ut.actualBounds))){ot=!0;break t}ot=Ct.left,St=Ct.right;var Bt=Ct.top;Ct=Ct.bottom;var Yt=zt.alloc(),Gt=zt.alloc(),se=zt.alloc(),ae=eo.alloc();ae.set(bt),ae.bv(ut.transform),ae.Vj(),Gt.x=St,Gt.y=Bt,Gt.transform(ae),Yt.x=ot,Yt.y=Bt,Yt.transform(ae),bt=!1,Bd(ut,Yt,Gt,se)?bt=!0:(Yt.x=St,Yt.y=Ct,Yt.transform(ae),Bd(ut,Yt,Gt,se)?bt=!0:(Gt.x=ot,Gt.y=Ct,Gt.transform(ae),Bd(ut,Yt,Gt,se)?bt=!0:(Yt.x=ot,Yt.y=Bt,Yt.transform(ae),Bd(ut,Yt,Gt,se)&&(bt=!0)))),eo.free(ae),zt.free(Yt),zt.free(Gt),zt.free(se),ot=bt}}else ot=ut.fh(ot,gt)}else ot=$r(ut,a,b,gt);ot&&(St=ut,y!==null&&(St=y(ut)),St&&(x===null||x(St))&&E.add(St)),eo.free(gt)}}}return z===void 0&&eo.free(tt),ot||this.background!==null||this.areaBackground!==null}return z===void 0&&eo.free(tt),!1},Hn.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?Ea:this.curve},Hn.prototype.computeCorner=function(){if(this.curve===Ea)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Hn.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},Hn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=sS;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,z=b.margin,tt=isNaN(E.width)?30:E.width*b.scale+z.left+z.right;E=isNaN(E.height)?14:E.height*b.scale+z.top+z.bottom,b=b.segmentOrientation,b===Jg||b===Jm||b===qv?a=Math.max(a,E):b===qg||b===ep||b===Qg||b===tp?a=Math.max(a,tt):(y=y.ga(po).ab(x.ga(po))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*E)+1)),this.curve===Ea&&(a*=1.333)}}return a},Hn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Bs&&x.bb()}},Hn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=rn(),b=0,E=y.links,z=0;z<E.length;z++){var tt=E[z].computeSpacing();x.push(tt),b+=tt}for(b=-b/2,z=0;z<E.length;z++){if(E[z]===this){a=b+x[z]/2;break}b+=x[z]}y.Ds===this.fromNode&&(a=-a),bn(x)}}return a},Hn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Hn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Hn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===Xm)return!1;E===Ym&&(E=Yg)}switch(E){case Xm:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(b)){E=z.x,z=z.y;var ot=tt.x-E,rt=tt.y-z,lt=Math.sqrt(ot*ot+rt*rt);if(!Te.$(lt,0)){if(Te.$(ot,0))var ut=0>rt?-Math.PI/2:Math.PI/2;else ut=Math.atan(rt/Math.abs(ot)),0>ot&&(ut=Math.PI-ut);tt=y.x;var gt=y.y;ot=b.x-tt;var St=b.y-gt;for(rt=Math.sqrt(ot*ot+St*St),Te.$(ot,0)?St=0>St?-Math.PI/2:Math.PI/2:(St=Math.atan(St/Math.abs(ot)),0>ot&&(St=Math.PI-St)),lt=rt/lt,ut=St-ut,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),ot=y.x-E,rt=y.y-z,y=Math.sqrt(ot*ot+rt*rt),Te.$(y,0)||(Te.$(ot,0)?rt=0>rt?-Math.PI/2:Math.PI/2:(rt=Math.atan(rt/Math.abs(ot)),0>ot&&(rt=Math.PI-rt)),ot=rt+ut,y*=lt,this.L(a,tt+y*Math.cos(ot),gt+y*Math.sin(ot)));this.dd(x,b)}}return!0;case Ym:if(z=this.i(a),gt=this.i(x),!z.Xa(y)||!gt.Xa(b)){E=z.x,z=z.y,tt=gt.x,gt=gt.y,lt=(tt-E)*(tt-E)+(gt-z)*(gt-z),ot=y.x,ut=y.y,rt=b.x,St=b.y;var Ct=1;if(rt-ot!==0){var bt=(St-ut)/(rt-ot);Ct=Math.sqrt(1+1/(bt*bt))}else bt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Bt=y.x,Yt=y.y,Gt=.5;lt!==0&&(Gt=((E-Bt)*(E-tt)+(z-Yt)*(z-gt))/lt);var se=E+Gt*(tt-E),ae=z+Gt*(gt-z);y=Math.sqrt((Bt-se)*(Bt-se)+(Yt-ae)*(Yt-ae)),Yt<bt*(Bt-se)+ae&&(y=-y),0<bt&&(y=-y),Bt=ot+Gt*(rt-ot),Gt=ut+Gt*(St-ut),bt!==0?(y=Bt+y/Ct,this.L(a,y,Gt-(y-Bt)/bt)):this.L(a,Bt,Gt+y)}this.dd(x,b)}return!0;case Yg:t:{if(this.isOrthogonal&&(E=this.i(a),z=this.i(a+1),tt=this.i(a+2),ot=z.x,ut=z.y,gt=ot,lt=ut,Te.B(E.y,z.y)?Te.B(z.x,tt.x)?ut=y.y:Te.B(z.y,tt.y)&&(ot=y.x):Te.B(E.x,z.x)&&(Te.B(z.y,tt.y)?ot=y.x:Te.B(z.x,tt.x)&&(ut=y.y)),this.L(a+1,ot,ut),E=this.i(x),z=this.i(x-1),tt=this.i(x-2),ot=z.x,ut=z.y,rt=ot,St=ut,Te.B(E.y,z.y)?Te.B(z.x,tt.x)?ut=b.y:Te.B(z.y,tt.y)&&(ot=b.x):Te.B(E.x,z.x)&&(Te.B(z.y,tt.y)?ot=b.x:Te.B(z.x,tt.x)&&(ut=b.y)),this.L(x-1,ot,ut),Xv(this))){this.L(a+1,gt,lt),this.L(x-1,rt,St),x=!1;break t}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Hn.prototype.addOrthoPoints=function(a,y,x,b,E,z){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var tt=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 ot=E.actualBounds.copy(),rt=z.actualBounds.copy();if(ot.w()&&rt.w()){ot.Bc(np,np),rt.Bc(np,np),ot.Ye(a),rt.Ye(x);var lt=zt.alloc(),ut=zt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&rt.right>a.x||b===90&&x.y>a.y&&rt.right>a.x?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),b===180?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(lt.x=a.x<rt.left?this.computeMidOrthoPosition(a.x,a.y,rt.left,x.y,!1):a.x<rt.right&&(b===270&&a.y<rt.top||b===90&&a.y>rt.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):rt.right,ut.x=lt.x,ut.y=x.y):b===0&&a.x<rt.left&&a.y>rt.top&&a.y<rt.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,rt.top):Math.max(x.y,rt.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<ot.top||b===270&&x.y>ot.bottom)&&(b===180&&(rt.ca(a)||ot.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?lt.y=this.computeMidOrthoPosition(a.x,ot.top,x.x,Math.max(x.y,rt.bottom),!0):x.y>a.y&&(b===180||b===270)&&(lt.y=this.computeMidOrthoPosition(a.x,ot.bottom,x.x,Math.min(x.y,rt.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>ot.top&<.y<ot.bottom&&(x.x>=ot.left&&x.x<=a.x||a.x<=rt.right&&a.x>=x.x?(b===90||b===270)&&(lt.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?ot.top:Math.min(ot.top,rt.top)):Math.max(x.y,b===0?ot.bottom:Math.max(ot.bottom,rt.bottom)),ut.x=x.x,ut.y=lt.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&rt.left<a.x||b===90&&x.y>a.y&&rt.left<a.x?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),b===0?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(lt.x=a.x>rt.right?this.computeMidOrthoPosition(a.x,a.y,rt.right,x.y,!1):a.x>rt.left&&(b===270&&a.y<rt.top||b===90&&a.y>rt.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):rt.left,ut.x=lt.x,ut.y=x.y):b===180&&a.x>rt.right&&a.y>rt.top&&a.y<rt.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,rt.top):Math.max(x.y,rt.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<ot.top||b===270&&x.y>ot.bottom)&&(b===0&&(rt.ca(a)||ot.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?lt.y=this.computeMidOrthoPosition(a.x,ot.top,x.x,Math.max(x.y,rt.bottom),!0):x.y>a.y&&(b===0||b===270)&&(lt.y=this.computeMidOrthoPosition(a.x,ot.bottom,x.x,Math.min(x.y,rt.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>ot.top&<.y<ot.bottom&&(x.x<=ot.right&&x.x>=a.x||a.x>=rt.left&&a.x<=x.x?(b===90||b===270)&&(lt.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?ot.top:Math.min(ot.top,rt.top)):Math.max(x.y,b===180?ot.bottom:Math.max(ot.bottom,rt.bottom)),ut.x=x.x,ut.y=lt.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&rt.bottom>a.y||b===0&&x.x>a.x&&rt.bottom>a.y?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),b===270?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(lt.y=a.y<rt.top?this.computeMidOrthoPosition(a.x,a.y,x.x,rt.top,!0):a.y<rt.bottom&&(b===180&&a.x<rt.left||b===0&&a.x>rt.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):rt.bottom,ut.x=x.x,ut.y=lt.y):b===90&&a.y<rt.top&&a.x>rt.left&&a.x<rt.right&&(lt.x=a.x<x.x?Math.min(x.x,rt.left):Math.max(x.x,rt.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<ot.left||b===180&&x.x>ot.right)&&(b===270&&(rt.ca(a)||ot.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?lt.x=this.computeMidOrthoPosition(ot.left,a.y,Math.max(x.x,rt.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(lt.x=this.computeMidOrthoPosition(ot.right,a.y,Math.min(x.x,rt.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>ot.left&<.x<ot.right&&(x.y>=ot.top&&x.y<=a.y||a.y<=rt.bottom&&a.y>=x.y?(b===0||b===180)&&(lt.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?ot.left:Math.min(ot.left,rt.left)):Math.max(x.x,b===90?ot.right:Math.max(ot.right,rt.right)),ut.x=lt.x,ut.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&rt.top<a.y||b===0&&x.x>a.x&&rt.top<a.y?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),b===90?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(lt.y=a.y>rt.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,rt.bottom,!0):a.y>rt.top&&(b===180&&a.x<rt.left||b===0&&a.x>rt.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):rt.top,ut.x=x.x,ut.y=lt.y):b===270&&a.y>rt.bottom&&a.x>rt.left&&a.x<rt.right&&(lt.x=a.x<x.x?Math.min(x.x,rt.left):Math.max(x.x,rt.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<ot.left||b===180&&x.x>ot.right)&&(b===90&&(rt.ca(a)||ot.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?lt.x=this.computeMidOrthoPosition(ot.left,a.y,Math.max(x.x,rt.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(lt.x=this.computeMidOrthoPosition(ot.right,a.y,Math.min(x.x,rt.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>ot.left&<.x<ot.right&&(x.y<=ot.bottom&&x.y>=a.y||a.y>=rt.top&&a.y<=x.y?(b===0||b===180)&&(lt.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?ot.left:Math.min(ot.left,rt.left)):Math.max(x.x,b===270?ot.right:Math.max(ot.right,rt.right)),ut.x=lt.x,ut.y=x.y)));var gt=x;if(this.isAvoiding){var St=this.diagram;if(St===null||E===z||this.layer.isTemporary||!af(St)||ot.ca(gt)&&!z.Td(E)||rt.ca(a)&&!E.Td(z))y=!1;else{var Ct=lf(St,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ct.Yj(Math.min(a.x,lt.x),Math.min(a.y,lt.y),Math.abs(a.x-lt.x),Math.abs(a.y-lt.y))&&Ct.Yj(Math.min(lt.x,ut.x),Math.min(lt.y,ut.y),Math.abs(lt.x-ut.x),Math.abs(lt.y-ut.y))&&Ct.Yj(Math.min(ut.x,gt.x),Math.min(ut.y,gt.y),Math.abs(ut.x-gt.x),Math.abs(ut.y-gt.y)))y=!1;else{E=a,z=gt;var bt=x=null;if(St.isVirtualized){St=Ct.bounds.copy(),St.Bc(-Ct.Ho,-Ct.Go);var Bt=zt.alloc();Nf(Ct,a.x,a.y)||(Te.Ff(St.x,St.y,St.x+St.width,St.y+St.height,a.x,a.y,lt.x,lt.y,Bt)?(x=a=Bt.copy(),y=Bt.ab(lt)):Te.Ff(St.x,St.y,St.x+St.width,St.y+St.height,lt.x,lt.y,ut.x,ut.y,Bt)?(x=a=Bt.copy(),y=Bt.ab(ut)):Te.Ff(St.x,St.y,St.x+St.width,St.y+St.height,ut.x,ut.y,gt.x,gt.y,Bt)&&(x=a=Bt.copy(),y=Bt.ab(gt))),Nf(Ct,gt.x,gt.y)||(Te.Ff(St.x,St.y,St.x+St.width,St.y+St.height,gt.x,gt.y,ut.x,ut.y,Bt)?(bt=gt=Bt.copy(),b=ut.ab(Bt)):Te.Ff(St.x,St.y,St.x+St.width,St.y+St.height,ut.x,ut.y,lt.x,lt.y,Bt)?(bt=gt=Bt.copy(),b=lt.ab(Bt)):Te.Ff(St.x,St.y,St.x+St.width,St.y+St.height,lt.x,lt.y,a.x,a.y,Bt)&&(bt=gt=Bt.copy(),b=a.ab(Bt))),zt.free(Bt)}ot=ot.copy().ed(rt),ot.Bc(Ct.Ho*Ct.Os,Ct.Go*Ct.Os),lS(Ct,a,y,gt,b,ot,!0),rt=eu(Ct,gt.x,gt.y),!Ct.abort&&rt>=Tf&&(aS(Ct),ot.Bc(Ct.Ho*Ct.Hx,Ct.Go*Ct.Ix),lS(Ct,a,y,gt,b,ot,!1),rt=eu(Ct,gt.x,gt.y)),!Ct.abort&&rt<Tf&&eu(Ct,gt.x,gt.y)!==ah?(Yv(this,Ct,gt.x,gt.y,b,!0,tt),ot=this.i(2),4>this.pointsCount?(y===0||y===180?(ot.x=a.x,ot.y=gt.y):(ot.x=gt.x,ot.y=a.y),this.L(2,ot.x,ot.y),this.m(3,ot.x,ot.y)):(tt=this.i(3),y===0||y===180?Te.B(ot.x,tt.x)?(ot=y===0?Math.max(ot.x,a.x):Math.min(ot.x,a.x),this.L(2,ot,a.y),this.L(3,ot,tt.y)):Te.B(ot.y,tt.y)?(Math.abs(a.y-ot.y)<=Ct.Go/2&&(this.L(2,ot.x,a.y),this.L(3,tt.x,a.y)),this.m(2,ot.x,a.y)):this.L(2,a.x,ot.y):(y===90||y===270)&&(Te.B(ot.y,tt.y)?(ot=y===90?Math.max(ot.y,a.y):Math.min(ot.y,a.y),this.L(2,a.x,ot),this.L(3,tt.x,ot)):Te.B(ot.x,tt.x)?(Math.abs(a.x-ot.x)<=Ct.Ho/2&&(this.L(2,a.x,ot.y),this.L(3,a.x,tt.y)),this.m(2,a.x,ot.y)):this.L(2,ot.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),bt!==null&&(b===0||b===180?this.yf(z.x,bt.y):this.yf(bt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(lt.copy()),this.ne(ut.copy())),zt.free(lt),zt.free(ut)}},Hn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),E?(y+b)/2+z:(a+x)/2+z};function Xv(a){if(a.diagram===null||!a.isAvoiding||!af(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=lf(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],z=y[b+1];if(!a.Yj(Math.min(E.x,z.x),Math.min(E.y,z.y),Math.abs(E.x-z.x),Math.abs(E.y-z.y)))return!0}return!1}function Yv(a,y,x,b,E,z,tt){var ot=y.Ho,rt=y.Go,lt=eu(y,x,b),ut=x,gt=b;for(E===0?ut+=ot:E===90?gt+=rt:E===180?ut-=ot:gt-=rt,E!==tt&<>Rd&&eu(y,ut,gt)!==lt-1&&(eu(y,x-ot,b)===lt-1?(E=180,ut=x-ot,gt=b):eu(y,x+ot,b)===lt-1?(E=0,ut=x+ot,gt=b):eu(y,x,b-rt)===lt-1?(E=270,ut=x,gt=b-rt):eu(y,x,b+rt)===lt-1&&(E=90,ut=x,gt=b+rt));lt>Rd&&eu(y,ut,gt)===lt-1;)x=ut,b=gt,E===0?ut+=ot:E===90?gt+=rt:E===180?ut-=ot:gt-=rt,--lt;z?lt>Rd&&(E===180||E===0?x=Math.floor(x/ot)*ot+ot/2:(E===90||E===270)&&(b=Math.floor(b/rt)*rt+rt/2)):(x=Math.floor(x/ot)*ot+ot/2,b=Math.floor(b/rt)*rt+rt/2),lt>Rd&&(z=E,tt=x,ut=b,E===0?(z=90,ut+=rt):E===90?(z=180,tt-=ot):E===180?(z=270,ut-=rt):E===270&&(z=0,tt+=ot),eu(y,tt,ut)===lt-1?Yv(a,y,tt,ut,z,!1,z):(tt=x,ut=b,E===0?(z=270,ut-=rt):E===90?(z=0,tt+=ot):E===180?(z=90,ut+=rt):E===270&&(z=180,tt-=ot),eu(y,tt,ut)===lt-1&&Yv(a,y,tt,ut,z,!1,z))),a.yf(x,b)}Hn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=co(y,a,x.x,x.y,b.x,b.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var ot=co(y,a,b.x,b.y,x.x,x.y);b=x,ot<E&&(z=tt,E=ot)}return z},Hn.prototype.qc=function(){this.lk=!1,this.v()},Hn.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 Xi&&(E.ua=this.ua)}}},Hn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Id(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(),z=E.copy();b=this.Nb.s;var tt=this.computeCurve();if(tt===Ea&&3<=y&&!Te.$(this.smoothness,0))if(y===3){var ot=this.i(1);b=Math.min(E.x,ot.x);var rt=Math.min(E.y,ot.y);ot=this.i(2),b=Math.min(b,ot.x),rt=Math.min(rt,ot.y)}else{if(this.isOrthogonal)for(rt=0;rt<y;rt++)ot=b[rt],z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),rt=this.i(b),z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);b=z.x,rt=z.y}else{for(rt=0;rt<y;rt++)ot=b[rt],z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);b=z.x,rt=z.y}if(b-=this.su.x,rt-=this.su.y,E.x-=b,E.y-=rt,y!==2||Id(this)){if(a.type=Kn.o,ot=D1(a),this.computeShortLength(!0)!==0&&(E=xc(this,E,!0,z)),Lf(ot,E.x,E.y,!1),tt===Ea&&3<=y&&!Te.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-rt,E=this.i(2).copy(),E.x-=b,E.y-=rt,this.computeShortLength(!1)!==0&&(E=xc(this,E,!1,z)),nh(ot,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=zt.allocAt(b,rt),x=zt.alloc(),x.assign(this.i(1)),z=zt.allocAt(b,rt),E=zt.allocAt(b,rt),tt=this.i(0);for(var lt,ut=this.smoothness/3,gt=1;gt<this.pointsCount-1;gt++){lt=this.i(gt);var St=tt,Ct=lt,bt=this.i(Jv(this,lt,gt,!1));if((!Te.$(St.x,Ct.x)||!Te.$(Ct.x,bt.x))&&(!Te.$(St.y,Ct.y)||!Te.$(Ct.y,bt.y))){var Bt=ut;isNaN(Bt)&&(Bt=this.smoothness/3);var Yt=St.x;St=St.y;var Gt=Ct.x;Ct=Ct.y;var se=bt.x;bt=bt.y;var ae=Bt*Vm(Yt,St,Gt,Ct);Bt*=Vm(Gt,Ct,se,bt),Te.$(St,Ct)&&Te.$(Gt,se)&&(Gt>Yt?bt>Ct?(z.x=Gt-ae,z.y=Ct-ae,E.x=Gt+Bt,E.y=Ct+Bt):(z.x=Gt-ae,z.y=Ct+ae,E.x=Gt+Bt,E.y=Ct-Bt):bt>Ct?(z.x=Gt+ae,z.y=Ct-ae,E.x=Gt-Bt,E.y=Ct+Bt):(z.x=Gt+ae,z.y=Ct+ae,E.x=Gt-Bt,E.y=Ct-Bt)),Te.$(Yt,Gt)&&Te.$(Ct,bt)&&(Ct>St?(se>Gt?(z.x=Gt-ae,z.y=Ct-ae,E.x=Gt+Bt):(z.x=Gt+ae,z.y=Ct-ae,E.x=Gt-Bt),E.y=Ct+Bt):(se>Gt?(z.x=Gt-ae,z.y=Ct+ae,E.x=Gt+Bt):(z.x=Gt+ae,z.y=Ct+ae,E.x=Gt-Bt),E.y=Ct-Bt)),(Te.$(Yt,Gt)&&Te.$(Gt,se)||Te.$(St,Ct)&&Te.$(Ct,bt))&&(Yt=.5*(Yt+se),St=.5*(St+bt),z.x=Yt,z.y=St,E.x=Yt,E.y=St),(gt===1||gt===2&&Te.$(tt.x,this.i(0).x)&&Te.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+lt.x),x.y=.5*(tt.y+lt.y)),nh(ot,x.x-b,x.y-rt,z.x-b,z.y-rt,lt.x-b,lt.y-rt),y.set(z),x.set(E),tt=lt}}lt=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=xc(this,ut.copy(),!1,Ai)),lt=.5*(lt+ut.x),tt=.5*(tt+ut.y),nh(ot,E.x-b,E.y-rt,lt-b,tt-rt,ut.x-b,ut.y-rt),zt.free(y),zt.free(x),zt.free(z),zt.free(E)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=xc(this,tt.copy(),!1,Ai)),nh(ot,z.x-b,z.y-rt,E.x-b,E.y-rt,tt.x-b,tt.y-rt);else{for(z=zt.alloc(),z.assign(this.i(0)),E=zt.alloc(),E.assign(z),tt=this.computeCorner(),gt=1,lt=0;gt<y;){if(gt=Jv(this,z,gt,1<gt),ut=this.i(gt),gt>=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=xc(this,ut.copy(),!1,Ai)),Pc(this,ot,-b,-rt,z,ut,x);else if(lt===0)for(gt=1;gt<y;)E.assign(z),ut=this.i(gt++),Pc(this,ot,-b,-rt,z,ut,x),z.assign(ut);break}if(lt=Jv(this,ut,gt+1,gt<y-3),gt=-b,Yt=-rt,St=ut,Gt=this.i(lt),Bt=x,Te.B(z.y,St.y)&&Te.B(St.x,Gt.x))if(bt=Math.min(tt,Math.abs(St.x-E.x)/2),bt=ae=Math.min(bt,Math.abs(Gt.y-St.y)/2),Te.B(bt,0))Pc(this,ot,gt,Yt,z,St,Bt),z.assign(St);else{var he=St.x,be=St.y;Ct=he,se=be,St.x>z.x?he=St.x-bt:he=St.x+bt,Gt.y>St.y?se=St.y+ae:se=St.y-ae,Gt=zt.allocAt(he,be),Pc(this,ot,gt,Yt,z,Gt,Bt),zt.free(Gt),Rm(ot,St.x+gt,St.y+Yt,Ct+gt,se+Yt),z.h(Ct,se)}else Te.B(z.x,St.x)&&Te.B(St.y,Gt.y)?(bt=Math.min(tt,Math.abs(St.y-E.y)/2),bt=ae=Math.min(bt,Math.abs(Gt.x-St.x)/2),Te.B(ae,0)?(Pc(this,ot,gt,Yt,z,St,Bt),z.assign(St)):(he=St.x,be=St.y,Ct=he,se=be,St.y>z.y?be=St.y-bt:be=St.y+bt,Gt.x>St.x?Ct=St.x+ae:Ct=St.x-ae,Gt=zt.allocAt(he,be),Pc(this,ot,gt,Yt,z,Gt,Bt),zt.free(Gt),Rm(ot,St.x+gt,St.y+Yt,Ct+gt,se+Yt),z.h(Ct,se))):(Pc(this,ot,gt,Yt,z,St,Bt),z.assign(St));E.assign(ut),gt=lt}zt.free(z)}jm=ot}else ot=this.i(1).copy(),ot.x-=b,ot.y-=rt,this.computeShortLength(!0)!==0&&(E=xc(this,E,!0,z)),this.computeShortLength(!1)!==0&&(ot=xc(this,ot,!1,z)),a.type=Kn.j,a.startX=E.x,a.startY=E.y,a.endX=ot.x,a.endY=ot.y;return this.lk=!0,a};function Vm(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),Te.$(a,0)?y:Te.$(y,0)?a:Math.sqrt(a*a+y*y)))}function xc(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var z=a.i(1);if(x=z.x-b.x,z=z.y-b.y,b=Vm(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(z-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(z=a.i(E-2),x=z.x-b.x,z=z.y-b.y,b=Vm(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-z)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function Jv(a,y,x,b){for(var E=a.pointsCount,z=y;Te.$(y.x,z.x)&&Te.$(y.y,z.y);){if(x>=E)return E-1;z=a.i(x++)}if(!Te.$(y.x,z.x)&&!Te.$(y.y,z.y))return x-1;for(var tt=z;Te.$(y.x,z.x)&&Te.$(z.x,tt.x)&&(!b||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||Te.$(y.y,z.y)&&Te.$(z.y,tt.y)&&(!b||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=E)return E-1;tt=a.i(x++)}return x-2}Hn.prototype.computeJumpLength=function(){return 10};function Pc(a,y,x,b,E,z,tt){if(!tt&&Id(a)){tt=a.computeJumpLength();var ot=tt/2,rt=[],lt=0;if(a.isVisible()&&(lt=Ox(a,E,z,rt)),0<lt){if(Te.B(E.y,z.y))if(E.x<z.x)for(var ut=0;ut<lt;){var gt=Math.max(E.x,Math.min(rt[ut++]-ot,z.x-tt));y.lineTo(gt+x,z.y+b);for(var St=gt+x,Ct=Math.min(gt+tt,z.x);ut<lt&&(gt=rt[ut],gt<Ct+tt);)ut++,Ct=Math.min(gt+ot,z.x);gt=z.y-tt+b,Ct+=x;var bt=z.y+b;a.curve===sh?Lf(y,Ct,bt,!1):nh(y,St,gt,Ct,gt,Ct,bt)}else for(--lt;0<=lt;){for(ut=Math.min(E.x,Math.max(rt[lt--]+ot,z.x+tt)),y.lineTo(ut+x,z.y+b),St=ut+x,gt=Math.max(ut-tt,z.x);0<=lt&&(ut=rt[lt],ut>gt-tt);)lt--,gt=Math.max(ut-ot,z.x);ut=z.y-tt+b,gt+=x,Ct=z.y+b,a.curve===sh?Lf(y,gt,Ct,!1):nh(y,St,ut,gt,ut,gt,Ct)}else if(Te.B(E.x,z.x))if(E.y<z.y)for(ut=0;ut<lt;){for(gt=Math.max(E.y,Math.min(rt[ut++]-ot,z.y-tt)),y.lineTo(z.x+x,gt+b),St=gt+b,gt=Math.min(gt+tt,z.y);ut<lt&&(Ct=rt[ut],Ct<gt+tt);)ut++,gt=Math.min(Ct+ot,z.y);Ct=z.x-tt+x,bt=z.x+x,gt+=b,a.curve===sh?Lf(y,bt,gt,!1):nh(y,Ct,St,Ct,gt,bt,gt)}else for(--lt;0<=lt;){for(ut=Math.min(E.y,Math.max(rt[lt--]+ot,z.y+tt)),y.lineTo(z.x+x,ut+b),St=ut+b,ut=Math.max(ut-tt,z.y);0<=lt&&(gt=rt[lt],gt>ut-tt);)lt--,ut=Math.max(gt-ot,z.y);gt=z.x-tt+x,Ct=z.x+x,ut+=b,a.curve===sh?Lf(y,Ct,ut,!1):nh(y,gt,St,gt,ut,Ct,ut)}}}y.lineTo(z.x+x,z.y+b)}function Ox(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var z=E.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,ot=0;ot<tt;ot++){var rt=z[ot];if(rt instanceof Hn){if(rt===a)return 0<b.length&&b.sort(function(ut,gt){return ut-gt}),b.length;if(rt.isVisible()&&Id(rt)){var lt=rt.routeBounds;lt.w()&&a.routeBounds.Yc(lt)&&!a.usesSamePort(rt)&&(lt=rt.path,lt!==null&<.Ed()&&Dx(y,x,b,rt))}}}}}return 0<b.length&&b.sort(function(ut,gt){return ut-gt}),b.length}function Dx(a,y,x,b){for(var E=Te.B(a.y,y.y),z=b.pointsCount,tt=b.i(0),ot=zt.alloc(),rt=1;rt<z;rt++){var lt=b.i(rt);if(rt<z-1){var ut=b.i(rt+1);if(tt.y===lt.y&<.y===ut.y){if(lt.x>tt.x&&ut.x>=lt.x||lt.x<tt.x&&ut.x<=lt.x)continue}else if(tt.x===lt.x&<.x===ut.x&&(lt.y>tt.y&&ut.y>=lt.y||lt.y<tt.y&&ut.y<=lt.y))continue}t:{ut=a.x;var gt=a.y,St=y.x,Ct=y.y,bt=tt.x;tt=tt.y;var Bt=lt.x,Yt=lt.y;if(Te.B(ut,St)){if(!Te.B(gt,Ct)&&Te.B(tt,Yt)&&Math.min(gt,Ct)<tt&&Math.max(gt,Ct)>tt&&Math.min(bt,Bt)<ut&&Math.max(bt,Bt)>ut&&!Te.B(bt,Bt)){ot.x=ut,ot.y=tt,ut=!0;break t}}else if(Te.B(gt,Ct)&&Te.B(bt,Bt)&&Math.min(ut,St)<bt&&Math.max(ut,St)>bt&&Math.min(tt,Yt)<gt&&Math.max(tt,Yt)>gt&&!Te.B(tt,Yt)){ot.x=bt,ot.y=gt,ut=!0;break t}ot.x=0,ot.y=0,ut=!1}ut&&(E?x.push(ot.x):x.push(ot.y)),tt=lt}zt.free(ot)}function Id(a){return a=a.curve,a===kf||a===sh}function Um(a,y){(y||Id(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()))}Hn.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 z=!1;E=E.Pa.s;for(var tt=E.length,ot=0;ot<tt;ot++){var rt=E[ot];rt instanceof Hn&&(rt===this?z=!0:z&&iS(this,rt,a))}}else if(b)for(z=E.Pa.s,E=z.length,tt=0;tt<E;tt++)ot=z[tt],ot instanceof Hn&&iS(this,ot,a)}}}}};function iS(a,y,x){if(y!==null&&y.lk&&y.fd&&Id(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Hn.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},Hn.prototype.isVisible=function(){if(!vi.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},Hn.prototype.Zb=function(a){if(vi.prototype.Zb.call(this,a),a&&Um(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Hn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?Yg:this.qk};function Ug(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,z=a=null,tt=y.jb.s,ot=tt.length,rt=0;rt<ot;rt++){var lt=tt[rt];(lt.ef===y&<.ff===b&<.uf===x&<.vf===E||lt.ef===x&<.ff===E&<.uf===y&<.vf===b)&&(z===null?z=lt:(a===null&&(a=[],a.push(z)),a.push(lt)))}if(a!==null){for(z=Z1(y,x,b,E),z===null&&(z=new qm(y,b,x,E),$1(y,z),$1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function Xg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(vn(y.links,a),y.Sl()))}Hn.prototype.ph=function(){return!0},_t.Object.defineProperties(Hn.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&&Wm(y,this,x),Xg(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,z=this.fromPortChanged;if(z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt)}a!==null&&(this.uf!==a&&Gm(a,this,E),Ug(this),this.C(1)),this.g("fromNode",y,a),Mf(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&fa(x),Xg(this),this.ff=a;var b=this.fromPort;b!==null&&fa(b);var E=this.diagram;if(E!==null){var z=this.data,tt=E.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt))),Ug(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&&Wm(y,this,x),Xg(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,z=this.toPortChanged;if(z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt)}a!==null&&(this.ef!==a&&Gm(a,this,E),Ug(this),this.C(1)),this.g("toNode",y,a),Mf(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&fa(x),Xg(this),this.vf=a;var b=this.toPort;b!==null&&fa(b);var E=this.diagram;if(E!==null){var z=this.data,tt=E.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt))),Ug(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:wi},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&&fa(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&&Gn(a,">= 0",Hn,"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:wi},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&&fa(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&&Gn(a,">= 0",Hn,"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?kn: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&&Vg(this.fromNode),this.toNode!==null&&Vg(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Xi?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()===Ea&&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 z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),Te.Dl(E.x,E.y,b.x,b.y,b.x,b.y,z.x,z.y,.5,a)}else for(z=3;z<b;z+=3){var tt=this.i(z-2);z+3>=b&&(z=b-1);var ot=this.i(z-1),rt=this.i(z);Te.Dl(E.x,E.y,tt.x,tt.y,ot.x,ot.y,rt.x,rt.y,.5,a),y=Math.min(rt.x,y),x=Math.min(rt.y,x),E=rt}else for(E=this.i(0),z=this.i(1),y=Math.min(E.x,z.x),x=Math.min(E.y,z.y),a.h(E.x,E.y,0,0),a.Ye(z),E=2;E<b;E++)z=this.i(E),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new zt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||$m(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);Te.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Te.$(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 qe,b=0;b<a.length/2;b++)E=new zt(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var z=a[E];if(!Re(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){b=!1;break}}if(b)for(x=new qe,b=0;b<a.length;b++)E=a[b],x.add(new zt(E.x,E.y).freeze())}}else if(a instanceof qe)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else le("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),$m(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&Jc(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||!Ef(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Ef(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(),Um(this,y===sh||y===kf||a===sh||a===kf),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(),Um(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)}}}),Hn.prototype.invalidateOtherJumpOvers=Hn.prototype.Xo,Hn.prototype.findClosestSegment=Hn.prototype.ez,Hn.prototype.updateRoute=Hn.prototype.vg,Hn.prototype.invalidateRoute=Hn.prototype.bb,Hn.prototype.rollbackRoute=Hn.prototype.rv,Hn.prototype.commitRoute=Hn.prototype.zf,Hn.prototype.startRoute=Hn.prototype.uh,Hn.prototype.clearPoints=Hn.prototype.Fj,Hn.prototype.removePoint=Hn.prototype.pv,Hn.prototype.addPointAt=Hn.prototype.yf,Hn.prototype.addPoint=Hn.prototype.ne,Hn.prototype.insertPointAt=Hn.prototype.m,Hn.prototype.insertPoint=Hn.prototype.Kz,Hn.prototype.setPointAt=Hn.prototype.L,Hn.prototype.setPoint=Hn.prototype.dd,Hn.prototype.getPoint=Hn.prototype.i,Hn.prototype.getOtherPort=Hn.prototype.Cz,Hn.prototype.getOtherNode=Hn.prototype.To;var wc=null,Cc=null,Qv=new nn(Hn,"Normal",1),Bx=new nn(Hn,"Orthogonal",2),Ax=new nn(Hn,"AvoidsNodes",6),oS=new nn(Hn,"AvoidsNodesStraight",7),Bs=new nn(Hn,"None",0),Ea=new nn(Hn,"Bezier",9),sh=new nn(Hn,"JumpGap",10),kf=new nn(Hn,"JumpOver",11),Yg=new nn(Hn,"End",17),Xm=new nn(Hn,"Scale",18),Ym=new nn(Hn,"Stretch",19),Jg=new nn(Hn,"OrientAlong",21),Qg=new nn(Hn,"OrientPlus90",22),qg=new nn(Hn,"OrientMinus90",23),qv=new nn(Hn,"OrientOpposite",24),Jm=new nn(Hn,"OrientUpright",25),tp=new nn(Hn,"OrientPlus90Upright",26),ep=new nn(Hn,"OrientMinus90Upright",27),Qm=new nn(Hn,"OrientUpright45",28),rS=16,sS=14,np=8;Hn.className="Link",Hn.Normal=Qv,Hn.Orthogonal=Bx,Hn.AvoidsNodes=Ax,Hn.AvoidsNodesStraight=oS,Hn.None=Bs,Hn.Bezier=Ea,Hn.JumpGap=sh,Hn.JumpOver=kf,Hn.End=Yg,Hn.Scale=Xm,Hn.Stretch=Ym,Hn.OrientAlong=Jg,Hn.OrientPlus90=Qg,Hn.OrientMinus90=qg,Hn.OrientOpposite=qv,Hn.OrientUpright=Jm,Hn.OrientPlus90Upright=tp,Hn.OrientMinus90Upright=ep,Hn.OrientUpright45=Qm,Hn.EndSegmentStep=8,Hn.CurvinessStart=rS,Hn.SpacingMin=sS,Hn.OrthoShortCut=np;function qm(a,y,x,b){Ci(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 ip(a){Ci(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}ip.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=ty,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 Nf(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function eu(a,y,x){return Nf(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):ty}function aS(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]>=Rd&&(x[b]=ty)}ip.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 z=y;z<=x;z++)if(E[z]===ah)return!1}return!0};function nu(a,y,x,b,E,z,tt,ot,rt){if(!(y<z||y>tt||x<ot||x>rt)){var lt=y|0,ut=x|0,gt=a.ac[lt][ut];if(gt>=Rd&><Tf)for(E?ut+=b:lt+=b,gt+=1;z<=lt&<<=tt&&ot<=ut&&ut<=rt&&!(gt>=a.ac[lt][ut]);)a.ac[lt][ut]=gt,gt+=1,E?ut+=b:lt+=b;if(lt=E?ut:lt,E)if(0<b)for(x+=b;x<lt;x+=b)nu(a,y,x,1,!E,z,tt,ot,rt),nu(a,y,x,-1,!E,z,tt,ot,rt);else for(x+=b;x>lt;x+=b)nu(a,y,x,1,!E,z,tt,ot,rt),nu(a,y,x,-1,!E,z,tt,ot,rt);else if(0<b)for(y+=b;y<lt;y+=b)nu(a,y,x,1,!E,z,tt,ot,rt),nu(a,y,x,-1,!E,z,tt,ot,rt);else for(y+=b;y>lt;y+=b)nu(a,y,x,1,!E,z,tt,ot,rt),nu(a,y,x,-1,!E,z,tt,ot,rt)}}function t0(a,y,x,b,E,z,tt,ot,rt){y|=0,x|=0;var lt=ah,ut=Rd;for(a.ac[y][x]=ut;lt===ah&&y>z&&y<tt&&x>ot&&x<rt;)ut+=1,a.ac[y][x]=ut,E?x+=b:y+=b,lt=a.ac[y][x]}function e0(a,y,x,b,E,z,tt,ot,rt){y|=0,x|=0;var lt=ah,ut=Tf;for(a.ac[y][x]=ut;lt===ah&&y>z&&y<tt&&x>ot&&x<rt;)a.ac[y][x]=ut,E?x+=b:y+=b,lt=a.ac[y][x]}function lS(a,y,x,b,E,z,tt){if(a.ac!==null){a.abort=!1;var ot=y.x,rt=y.y;if(Nf(a,ot,rt)){ot-=a.Nd,ot/=a.rc,rt-=a.Od,rt/=a.sc;var lt=b.x,ut=b.y;if(Nf(a,lt,ut))if(lt-=a.Nd,lt/=a.rc,ut-=a.Od,ut/=a.sc,1>=Math.abs(ot-lt)&&1>=Math.abs(rt-ut))a.abort=!0;else{var gt=z.x;b=z.y,y=z.x+z.width;var St=z.y+z.height;gt-=a.Nd,gt/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,St-=a.Od,St/=a.sc,z=Math.max(0,Math.min(a.di,gt|0)),y=Math.min(a.di,Math.max(0,y|0)),gt=Math.max(0,Math.min(a.ei,b|0)),St=Math.min(a.ei,Math.max(0,St|0)),b=a.ac,ot|=0,rt|=0,lt|=0,ut|=0;var Ct=x===0||x===90?1:-1;if(x=x===90||x===270,b[ot][rt]===ah?(t0(a,ot,rt,Ct,x,z,y,gt,St),t0(a,ot,rt,1,!x,z,y,gt,St),t0(a,ot,rt,-1,!x,z,y,gt,St)):t0(a,ot,rt,Ct,x,ot,rt,ot,rt),b[lt][ut]===ah?(e0(a,lt,ut,E===0||E===90?1:-1,E===90||E===270,z,y,gt,St),e0(a,lt,ut,1,!(E===90||E===270),z,y,gt,St),e0(a,lt,ut,-1,!(E===90||E===270),z,y,gt,St)):e0(a,lt,ut,Ct,x,lt,ut,lt,ut),x=rn(),tt&&uS(a,lt,ut,E,ot,rt,x))for((x[0]!==lt||x[1]!==ut)&&(x.unshift(ut),x.unshift(lt)),(x[x.length-2]!==ot||x[x.length-1]!==rt)&&(x.push(ot),x.push(rt)),a=Rd,E=x[x.length-2],tt=x[x.length-1],b[E][tt]=a++,z=x.length-4;0<=z;z-=2)for(E=x[z+2],tt=x[z+3],y=x[z],lt=x[z+1];y>E?E++:y<E?E--:lt>tt?tt++:lt<tt&&tt--,b[E][tt]=a++,E!==y||tt!==lt;);else nu(a,ot,rt,1,!1,z,y,gt,St),nu(a,ot,rt,-1,!1,z,y,gt,St),nu(a,ot,rt,1,!0,z,y,gt,St),nu(a,ot,rt,-1,!0,z,y,gt,St);bn(x)}}}}function uS(a,y,x,b,E,z,tt){for(var ot=a.ac,rt=y,lt=x;;){if(rt===E&<===z)return!0;var ut=rt,gt=lt;if(b===0)if(ut<E)ut++;else break;else if(b===90)if(gt<z)gt++;else break;else if(b===180)if(ut>E)ut--;else break;else if(gt>z)gt--;else break;var St=ot[ut][gt];if(St===0||St===ey)break;rt=ut,lt=gt}for(;;){if(ut=b,gt=rt,St=lt,b===0?St<z?(ut=90,St++):St>z&&(ut=270,St--):b===90?gt<E?(ut=0,gt++):gt>E&&(ut=180,gt--):b===180?St<z?(ut=90,St++):St>z&&(ut=270,St--):gt<E?(ut=0,gt++):gt>E&&(ut=180,gt--),gt=ot[gt][St],ut!==b&>!==0&>!==ey){if(tt.push(rt),tt.push(lt),uS(a,rt,lt,ut,E,z,tt))return!0;tt.pop(),tt.pop()}if(ot[rt][lt]=ey,b===0){if(rt===y)return!1;rt--}else if(b===90){if(lt===x)return!1;lt--}else if(b===180){if(rt===y)return!1;rt++}else{if(lt===x)return!1;lt++}}}_t.Object.defineProperties(ip.prototype,{bounds:{get:function(){return new sn(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 ah=0,Rd=1,Tf=999999,ty=Tf+1,ey=Tf+2;ip.className="PositionArray";function bc(){Ci(this),this.port=this.node=null,this.pe=[],this.ap=!1}bc.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 Ix(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}bc.prototype.Sl=function(){this.pe.length=0};function hS(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,z=E instanceof Ki?E:null;if(z===null||z.isSubGraphExpanded)var tt=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}b=z,tt=b.Lu()}z=a.pe.length=0;var ot=a.port.ga(Dr,zt.alloc()),rt=a.port.ga(Ws,zt.alloc());for(E=sn.allocAt(ot.x,ot.y,0,0),E.Ye(rt),zt.free(ot),zt.free(rt),ot=zt.allocAt(E.x+E.width/2,E.y+E.height/2),rt=a.port.li(),tt=tt.iterator;tt.next();){var lt=tt.value;if(lt.isVisible()&<.fromPort!==lt.toPort){var ut=lt.fromPort===a.port||lt.fromNode!==null&<.fromNode.Td(b),gt=lt.computeSpot(ut,a.port);if(gt.$c()&&(ut=ut?lt.toPort:lt.fromPort,ut!==null)){var St=ut.part;if(St!==null){var Ct=St.findVisibleNode();Ct!==null&&Ct!==St&&(St=Ct,ut=St.port),ut=lt.computeOtherPoint(St,ut),St=ot.ab(ut),St-=rt,0>St?St+=360:360<=St&&(St-=360),gt=Ix(E,gt,St,lt.isOrthogonal),gt===0?(gt=4,180<St&&(St-=360)):gt===90?(gt=8,270<St&&(St-=360)):gt===180?gt=2:(gt=1,90>St&&(St+=360)),Ct=a.pe[z],Ct===void 0?(Ct=new ny(lt,St,gt),a.pe[z]=Ct):(Ct.link=lt,Ct.angle=St,Ct.Nc=gt),Ct.hv.set(ut),z++}}}}for(zt.free(ot),a.pe.sort(bc.prototype.j),rt=a.pe.length,b=-1,z=ot=0;z<rt;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==b&&(b=tt.Nc,ot=0),tt.Uo=ot,ot++);for(b=-1,ot=0,z=rt-1;0<=z;z--)rt=a.pe[z],rt!==void 0&&(rt.Nc!==b&&(b=rt.Nc,ot=rt.Uo+1),rt.Gl=ot);if(z=a.pe,gt=a.port,b=a.node.portSpreading,ot=zt.alloc(),rt=zt.alloc(),tt=zt.alloc(),lt=zt.alloc(),gt.ga(Dr,ot),gt.ga(Nl,rt),gt.ga(Ws,tt),gt.ga(Gs,lt),Ct=St=ut=gt=0,b===Zv)for(var bt=0;bt<z.length;bt++){var Bt=z[bt];if(Bt!==null){var Yt=Bt.link.computeThickness();switch(Bt.Nc){case 8:St+=Yt;break;case 2:Ct+=Yt;break;case 1:gt+=Yt;break;default:case 4:ut+=Yt}}}var Gt=bt=0,se=1,ae=Bt=0;for(Yt=0;Yt<z.length;Yt++){var he=z[Yt];if(he!==null){if(bt!==he.Nc){switch(bt=he.Nc,bt){case 8:var be=tt;Gt=lt;break;case 2:be=lt,Gt=ot;break;case 1:be=ot,Gt=rt;break;default:case 4:be=rt,Gt=tt}switch(Bt=Gt.x-be.x,ae=Gt.y-be.y,bt){case 8:St>Math.abs(Bt)?(se=Math.abs(Bt)/St,St=Math.abs(Bt)):se=1;break;case 2:Ct>Math.abs(ae)?(se=Math.abs(ae)/Ct,Ct=Math.abs(ae)):se=1;break;case 1:gt>Math.abs(Bt)?(se=Math.abs(Bt)/gt,gt=Math.abs(Bt)):se=1;break;default:case 4:ut>Math.abs(ae)?(se=Math.abs(ae)/ut,ut=Math.abs(ae)):se=1}Gt=0}var $e=he.Zo;if(b===Zv){switch(he=he.link.computeThickness(),he*=se,$e.set(be),bt){case 8:$e.x=be.x+Bt/2+St/2-Gt-he/2;break;case 2:$e.y=be.y+ae/2+Ct/2-Gt-he/2;break;case 1:$e.x=be.x+Bt/2-gt/2+Gt+he/2;break;default:case 4:$e.y=be.y+ae/2-ut/2+Gt+he/2}Gt+=he}else{var Un=.5;b===Km&&(Un=(he.Uo+1)/(he.Gl+1)),$e.x=be.x+Bt*Un,$e.y=be.y+ae*Un}}}for(zt.free(ot),zt.free(rt),zt.free(tt),zt.free(lt),be=a.pe,z=0;z<be.length;z++)b=be[z],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,sn.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}bc.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},bc.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,hr,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 z=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*b:(a?y.y===z.y:y.x===z.x)?x:x+8*(E-1-b)},bc.className="Knot";function ny(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new zt,this.Gl=this.Uo=0,this.Zo=new zt,this.Ju=0}ny.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()},ny.className="LinkInfo";function Jo(a){Ci(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new zt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Jo.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},Jo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Jo.prototype.qb=function(){},Jo.prototype.toString=function(){var a=xn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Jo.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())}}},Jo.prototype.createNetwork=function(){return new Wo(this)},Jo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Ze?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Ki?y.lg(a.memberParts):y.lg(a.iterator),y},Jo.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")}},Jo.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()}},Jo.prototype.doLayout=function(a){var y=new tn;a instanceof Ze?(Zh(this,y,a.nodes,!0,this.rh,!0,!1,!0),Zh(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Ki?Zh(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},Jo.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,z=0,tt=0;for(a=a.iterator;a.next();){var ot=a.value;op(ot);var rt=ot.measuredBounds,lt=rt.width;rt=rt.height,ot.moveTo(b,E),ot instanceof Ki&&(ot.rh=!1),b+=Math.max(lt,50)+20,tt=Math.max(tt,Math.max(rt,50)),z>=y-1?(z=0,b=x,E+=tt+20,tt=0):z++}},Jo.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,z=0,tt=this.network.vertexes.iterator;tt.next();){var ot=tt.value.node;if(!(ot===null||ot instanceof Hn)&&(op(ot),this.rh(ot))){var rt=ot.measuredBounds,lt=rt.width;rt=rt.height,ot.moveTo(x,b),ot instanceof Ki&&(ot.rh=!1),x+=Math.max(lt,50)+20,z=Math.max(z,Math.max(rt,50)),E>=a-1?(E=0,x=y,b+=z+20,z=0):E++}}},Jo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Ki&&a.rh)};function Zh(a,y,x,b,E,z,tt,ot){for(x=x.iterator;x.next();){var rt=x.value;b&&!rt.isTopLevel||E!==null&&!E(rt)||!rt.canLayout()||(z&&rt instanceof Xn?rt.isLinkLabel||(rt instanceof Ki&&rt.layout===null?Zh(a,y,rt.memberParts,!1,E,z,tt,ot):(op(rt),y.add(rt))):tt&&rt instanceof Hn?y.add(rt):!ot||!rt.Zc()||rt instanceof Xn||(op(rt),y.add(rt)))}}function op(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Jo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new sn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Jo.prototype.ex=function(a){var y=new tn;return a instanceof Ze?(Zh(this,y,a.nodes,!0,null,!0,!0,!0),Zh(this,y,a.links,!0,null,!0,!0,!0),Zh(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Ki?Zh(this,y,a.memberParts,!1,null,!0,!0,!0):Zh(this,y,a.iterator,!1,null,!0,!0,!0),y},Jo.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(Dr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},_t.Object.defineProperties(Jo.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())}}}),Jo.prototype.collectParts=Jo.prototype.ex,Jo.prototype.getLayoutBounds=Jo.prototype.ni,Jo.prototype.invalidateLayout=Jo.prototype.C,Jo.className="Layout";function Wo(a){Ci(this),this.Sc=a,this.wf=new tn,this.ye=new tn,this.Es=new Yn,this.zs=new Yn}Wo.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 tn,this.ye=new tn,this.Es=new Yn,this.zs=new Yn},Wo.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},Wo.prototype.createVertex=function(){return new Gr(this)},Wo.prototype.createEdge=function(){return new ga(this)},Wo.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof Xn)return!tt.isLinkLabel;if(tt instanceof Hn){var ot=tt.fromNode;return ot===null||ot.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Xn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Ki&&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 Hn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var z=b.fromNode;E=b.toNode,z!==null&&E!==null&&z!==E&&(z=this.findGroupVertex(z),E=this.findGroupVertex(E),z!==null&&E!==null&&this.Zj(z,E,b))}}},Wo.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},Mt=Wo.prototype,Mt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Mt.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},Mt.Iu=function(a){if(a!==null&&dS(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 dS(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}Mt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Mt.ki=function(a){return a===null?null:this.Es.I(a)},Mt.Bo=function(a){if(a!==null){iy(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function iy(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}}Mt.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},Mt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),oy(this,a)}};function oy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Mt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Mt.Lo=function(a){return a===null?null:this.zs.I(a)},Mt.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},Mt.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))}},Mt.Ko=function(){for(var a=rn(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);bn(a)},Wo.prototype.deleteArtificialVertexes=function(){for(var a=rn(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=rn(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);bn(a),bn(y)};function Rx(a){for(var y=rn(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);bn(y)}Wo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Rx(this),this.Ko()),a=new qe;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),ry(this,y,b),y=!0;break}}}return a.sort(function(E,z){return E===null||z===null||E===z?0:z.vertexes.count-E.vertexes.count}),a};function ry(a,y,x){if(x!==null&&x.network!==y){dS(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(oy(a,E),iy(y,E),ry(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(oy(a,x),iy(y,x),ry(a,y,x.toVertex))}}Wo.prototype.dz=function(){for(var a=new tn,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},_t.Object.defineProperties(Wo.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}}}),Wo.prototype.findAllParts=Wo.prototype.dz,Wo.prototype.splitIntoSubNetworks=Wo.prototype.Zx,Wo.prototype.deleteSelfEdges=Wo.prototype.Ko,Wo.prototype.reverseEdge=Wo.prototype.gm,Wo.prototype.linkVertexes=Wo.prototype.Zj,Wo.prototype.findEdge=Wo.prototype.Lo,Wo.prototype.deleteLink=Wo.prototype.Yy,Wo.prototype.deleteEdge=Wo.prototype.Mj,Wo.prototype.addLink=Wo.prototype.Dy,Wo.prototype.addEdge=Wo.prototype.Bo,Wo.prototype.findVertex=Wo.prototype.ki,Wo.prototype.deleteNode=Wo.prototype.Zy,Wo.prototype.deleteVertex=Wo.prototype.Iu,Wo.prototype.addNode=Wo.prototype.Bl,Wo.prototype.addVertex=Wo.prototype.dh,Wo.prototype.addParts=Wo.prototype.lg,Wo.className="LayoutNetwork";function Gr(a){Ci(this),this.ob=a,this.j=new sn(0,0,10,10).freeze(),this.o=new zt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new qe,this.mg=new qe}Gr.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new qe,this.mg=new qe},Gr.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+$i(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 z=b.value;x?x=!1:E+=",",E+=z.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},Gr.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Re(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 Ki)){x=sn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(po);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),sn.free(x);return}sn.free(x)}a.moveTo(y.x,y.y)}},Gr.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Gr.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Gr.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Gr.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function sy(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}_t.Object.defineProperties(Gr.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=sn.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,z=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,z,b),sn.free(x),!(a instanceof Ki)&&(a=a.locationObject.ga(po),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(z/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 tn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new tn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new tn,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 qe,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}}}),Gr.prototype.deleteDestinationEdge=Gr.prototype.Jl,Gr.prototype.addDestinationEdge=Gr.prototype.zl,Gr.prototype.deleteSourceEdge=Gr.prototype.Kl,Gr.prototype.addSourceEdge=Gr.prototype.Cl,Gr.className="LayoutVertex",Gr.standardComparer=sy,Gr.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 ga(a){Ci(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}ga.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},ga.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+$i(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},ga.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},ga.prototype.commit=function(){},ga.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},_t.Object.defineProperties(ga.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)}}}),ga.prototype.getOtherVertex=ga.prototype.Ax,ga.className="LayoutEdge";function ns(a){Jo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Wn(NaN,NaN).freeze(),this.tf=new Wn(10,10).freeze(),this.Jb=rp,this.Rb=i0,this.nd=sp,this.hd=cS,a&&Object.assign(this,a)}Be(ns,Jo),ns.prototype.cloneProtected=function(a){Jo.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},ns.prototype.qb=function(a){a.classType===ns?a===sp||a===r0||a===ay||a===o0?this.sorting=a:a===i0||a===xl?this.arrangement=a:a===rp||a===n0?this.alignment=a:le("Unknown enum value: "+a):Jo.prototype.qb.call(this,a)},ns.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 Ki)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 o0:E.reverse();break;case sp:E.sort(this.comparer);break;case r0:E.sort(this.comparer),E.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case n0:var ot=y,rt=x,lt=sn.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var gt=ut=0;gt<E.length;gt++){var St=this.ni(E[gt],lt);ut=Math.max(ut,St.width)}if(ut=Math.max(ut+ot,1),gt=Math.max(this.cellSize.height,1),!isFinite(gt))for(St=gt=0;St<E.length;St++){var Ct=this.ni(E[St],lt);gt=Math.max(gt,Ct.height)}gt=Math.max(gt+rt,1),St=this.arrangement;for(var bt=Ct=this.arrangementOrigin.x,Bt=this.arrangementOrigin.y,Yt=0,Gt=0,se=0;se<E.length;se++){var ae=E[se],he=this.ni(ae,lt),be=Math.ceil((he.width+ot)/ut)*ut,$e=Math.ceil((he.height+rt)/gt)*gt;switch(St){case xl:var Un=Math.abs(bt-he.width);break;default:Un=bt+he.width}switch((0<z&&Yt>z-1||0<tt&&0<Yt&&Un-Ct>tt)&&(b.push(new sn(0,Bt,tt+ot,Gt)),Yt=0,bt=Ct,Bt+=Gt,Gt=0),Gt=Math.max(Gt,$e),St){case xl:he=-he.width;break;default:he=0}switch(ae.moveTo(bt+he,Bt),St){case xl:bt-=be;break;default:bt+=be}Yt++}b.push(new sn(0,Bt,tt+ot,Gt)),sn.free(lt);break;case rp:for(rt=tt,ut=z,gt=y,St=x,tt=sn.alloc(),Ct=Math.max(this.cellSize.width,1),z=Bt=lt=0,ot=zt.alloc(),bt=0;bt<E.length;bt++)Gt=E[bt],Yt=this.ni(Gt,tt),Gt=ih(Gt,Gt.locationObject,Gt.locationSpot,ot),lt=Math.max(lt,Gt.x),Bt=Math.max(Bt,Yt.width-Gt.x),z=Math.max(z,Gt.y);switch(bt=this.arrangement,bt){case xl:lt+=gt;break;default:Bt+=gt}Ct=isFinite(Ct)?Math.max(Ct+gt,1):Math.max(lt+Bt,1);var oi=Gt=this.arrangementOrigin.x;for(se=this.arrangementOrigin.y,Bt=0,rt>=lt&&(rt-=lt),lt=ae=0,be=Math.max(this.cellSize.height,1),he=z=0,$e=!0,Yt=zt.alloc(),Un=0;Un<E.length;Un++){var ti=E[Un],jn=this.ni(ti,tt),wn=ih(ti,ti.locationObject,ti.locationSpot,ot);if(0<Bt)switch(bt){case xl:oi=(oi-Gt-(jn.width-wn.x))/Ct,oi=Te.$(Math.round(oi),oi)?Math.round(oi):Math.floor(oi),oi=oi*Ct+Gt;break;default:oi=(oi-Gt+wn.x)/Ct,oi=Te.$(Math.round(oi),oi)?Math.round(oi):Math.ceil(oi),oi=oi*Ct+Gt}else switch(bt){case xl:ae=oi+wn.x+jn.width;break;default:ae=oi-wn.x}switch(bt){case xl:var Gi=-(oi+wn.x)+ae;break;default:Gi=oi+jn.width-wn.x-ae}if(0<ut&&Bt>ut-1||0<rt&&0<Bt&&Gi>rt){for(b.push(new sn(0,$e?se-z:se,rt+gt,he+z+St)),oi=0;oi<Bt&&Un!==Bt;oi++){Gi=E[Un-Bt+oi];var Oi=ih(Gi,Gi.locationObject,Gi.locationSpot,Yt);Gi.moveTo(Gi.position.x,Gi.position.y+z-Oi.y)}he+=St,se=$e?se+he:se+(he+z),Bt=he=z=0,oi=Gt,$e=!1}switch(oi===Gt&&(lt=bt===xl?Math.max(lt,jn.width-wn.x):Math.min(lt,-wn.x)),z=Math.max(z,wn.y),he=Math.max(he,jn.height-wn.y),isFinite(be)&&(he=Math.max(he,Math.max(jn.height,be)-wn.y)),$e?ti.moveTo(oi-wn.x,se-wn.y):ti.moveTo(oi-wn.x,se),bt){case xl:oi-=wn.x+gt;break;default:oi+=jn.width-wn.x+gt}Bt++}if(b.push(new sn(0,se,rt+gt,($e?he:he+z)+St)),E.length!==Bt)for(rt=0;rt<Bt;rt++)ut=E[E.length-Bt+rt],gt=ih(ut,ut.locationObject,ut.locationSpot,ot),ut.moveTo(ut.position.x,ut.position.y+z-gt.y);if(zt.free(ot),zt.free(Yt),bt===xl)for(E=0;E<b.length;E++)z=b[E],z.width+=lt,z.x-=lt;else for(E=0;E<b.length;E++)z=b[E],z.x>lt&&(z.width+=z.x-lt,z.x=lt);sn.free(tt)}for(ot=z=tt=E=0;ot<b.length;ot++)rt=b[ot],E=Math.min(E,rt.x),tt=Math.min(tt,rt.y),z=Math.max(z,rt.x+rt.width);this.arrangement===xl?this.commitLayers(b,new zt(E+y/2-(z+E),tt-x/2)):this.commitLayers(b,new zt(E-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},ns.prototype.commitLayers=function(){};function cS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}_t.Object.defineProperties(ns.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!==rp&&a!==n0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==i0&&a!==xl||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==o0&&a!==sp&&a!==r0||(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 nn(ns,"Position",0),rp=new nn(ns,"Location",1),i0=new nn(ns,"LeftToRight",2),xl=new nn(ns,"RightToLeft",3),ay=new nn(ns,"Forward",4),o0=new nn(ns,"Reverse",5),sp=new nn(ns,"Ascending",6),r0=new nn(ns,"Descending",7);ns.className="GridLayout",ns.standardComparer=cS,ns.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},ns.Position=n0,ns.Location=rp,ns.LeftToRight=i0,ns.RightToLeft=xl,ns.Forward=ay,ns.Reverse=o0,ns.Ascending=sp,ns.Descending=r0;function Oo(){this.On=new tn,this.Dn=new tn,this.Pa=new tn,this.cf=new Yn,this.bf=new Yn,this.aj=new Yn,this.H=null,this.tp=!1}Mt=Oo.prototype,Mt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Mt.Xe=function(a){this.H=a},Mt.oi=function(a){if(a instanceof Xn){if(this.On.add(a),a instanceof Ki){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 Hn?this.Dn.add(a):a instanceof So||this.Pa.add(a);y=a.data,y===null||a instanceof So||(a instanceof Hn?this.bf.add(y,a):this.cf.add(y,a))},Mt.pc=function(a){if(a.Ej(),a instanceof Xn){if(this.On.remove(a),a instanceof Ki){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 Hn?this.Dn.remove(a):a instanceof So||this.Pa.remove(a);y=a.data,y===null||a instanceof So||(a instanceof Hn?this.bf.remove(y):this.cf.remove(y))},Mt.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 Ki)&&le('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 Ki||le('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 Hn||le('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=rn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=rn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=rn(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);bn(y),bn(x),bn(a)}},Oo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Oo.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&fS(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&rf(this.diagram,!1)};function fS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=gS(a,y,b);if(E!==null&&(Qa(E),E=E.copy(),E!==null)){var z=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=z,b=E;break t}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}Oo.prototype.insertLink=function(){return null},Oo.prototype.resolveReferencesForData=function(){},Oo.prototype.Ro=function(a){return this.H.model.Ro(a)};function gS(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&&(vS||(vS=!0,si('No Group template found for category "'+x+'"'),si(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(mS||(mS=!0,si('No Node template found for category "'+x+'"'),si(" Using default node template")),y=a.ny))),y}Oo.prototype.getLinkCategoryForData=function(){return""},Oo.prototype.setLinkCategoryForData=function(){},Oo.prototype.setFromNodeForLink=function(){},Oo.prototype.setToNodeForLink=function(){},Oo.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(yS||(yS=!0,si('No Link template found for category "'+a+'"'),si(" Using default link template")),x=y.my)),x},Oo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Oo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Oo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(xg(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Oo.prototype.unresolveReferencesForPart=function(){},Oo.prototype.removeDataForLink=function(){},Oo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Oo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Xn?a:null)},Oo.prototype.findLinkForKey=function(){return null},Mt=Oo.prototype,Mt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Mt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Xn?a:null)},Mt.Kc=function(a){return a===null?null:this.bf.I(a)},Mt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new tn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Re(tt)&&ly(this,E,tt)){y.add(b);break}}}return y.iterator},Mt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new tn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Re(tt)&&ly(this,E,tt)){y.add(b);break}}}return y.iterator};function ly(a,y,x){for(var b in x){var E=y[b],z=x[b];if(fn(z)){if(!fn(E)||E.length<z.length)return!1;for(var tt=0;tt<E.length;tt++){var ot=z[tt];if(ot!==void 0&&!pS(a,E[tt],ot))return!1}}else if(!pS(a,E,z))return!1}return!0}function pS(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(Re(y)&&Re(x)){if(!ly(a,y,x))return!1}else if(y!==x)return!1;return!0}Oo.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===tr){if(b==="nodeCategory"){var E=this.Lc(a.object),z=a.newValue;E!==null&&typeof z=="string"&&(E.category=z)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===br){var tt=a.newValue;b==="nodeDataArray"&&Re(tt)&&fS(this,tt),y.isModified=!0}else if(x===zr){var ot=a.oldValue;b==="nodeDataArray"&&Re(ot)&&this.ip(ot),y.isModified=!0}else x===ha&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===tr){var rt=a.propertyName,lt=a.object;lt===y.model?(rt==="nodeKeyProperty"||rt==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(lt,rt),y.isModified=!0}else if(x===br||x===zr){var ut=a.change===br,gt=ut?a.newParam:a.oldParam,St=ut?a.newValue:a.oldValue,Ct=this.aj.I(a.object);if(Array.isArray(Ct))for(a=0;a<Ct.length;a++){var bt=Ct[a];if(ut)bm(bt,St,gt,!0);else if(!(0>gt)){var Bt=gt+Gg(bt);bt.pc(Bt,!0),wv(bt,Bt,gt)}}y.isModified=!0}}finally{y.aa=!0}}}}},Oo.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)},Oo.prototype.rp=function(){for(var a=this.H.model,y=new tn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||E.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||E.push(tt.data)}),E.forEach(function(tt){ES(a,tt,!1)}),b=0;b<x.length;b++){var z=x[b];this.Lc(z)===null&&MS(a,z,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},Oo.prototype.refreshDataBoundLinks=function(){},Oo.prototype.updateRelationshipsFromData=function(){},Oo.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,z=0;z<E.length;z++){var tt=E[z].sx(a);tt!==null&&(x===null&&(x=rn()),x.push(tt))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);bn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function uy(a,y){var x=y.Hh;if(fn(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 hy(a,y,x){Od(y,function(tt){tt=tt.O.s;for(var ot=tt.length,rt=0;rt<ot;rt++)Lg(x,tt[rt])});var b=y.Hh;if(fn(b)){var E=a.aj.I(b);if(E!==null){for(var z=0;z<E.length;z++)if(E[z]===y){E.splice(z,1),E.length===0&&a.aj.remove(b);break}}}}Oo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Yn;if(fn(a))for(var E=0;E<a.length;E++)s0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)s0(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 tn;for(var z=new Yn,tt=b.iterator;tt.next();){var ot=tt.value;if(ot instanceof Hn)a||ot.fromNode!==null&&ot.toNode!==null||E.add(ot);else if(ot instanceof Xn&&ot.data!==null&&x.Tl()){var rt=ot;ot=tt.key;var lt=ot.pg();lt!==null&&(lt=b.I(lt),lt!==null?(x.qe(rt.data,x.wa(lt.data)),rt=y.Kc(rt.data),ot=ot.kh(),ot!==null&&rt!==null&&z.add(ot,rt)):x.qe(rt.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<z.count)for(x=z.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ut=new Yn;b.each(function(gt){gt.key.data!==null&&ut.add(gt.key.data,gt.value.data)}),x(ut,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function s0(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var z=a.copyPartData(y,x);if(!(z instanceof vi))return null;if(z.isSelected=!1,z.isHighlighted=!1,b.add(y,z),y instanceof Xn){for(var tt=y.linksConnected;tt.next();){var ot=tt.value;if(ot.fromNode===y){var rt=b.I(ot);rt!==null&&(rt.fromNode=z)}ot.toNode===y&&(ot=b.I(ot),ot!==null&&(ot.toNode=z))}if(y instanceof Ki&&z instanceof Ki)for(y=y.memberParts;y.next();)tt=s0(a,y.value,x,b,E),tt instanceof Hn||tt===null||(tt.containingGroup=z)}else if(y instanceof Hn&&z instanceof Hn)for(tt=y.fromNode,tt!==null&&(tt=b.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=b.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=s0(a,y.value,x,b,E),tt!==null&&tt instanceof Xn&&(tt.labeledLink=z);return z}Oo.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Hn||(b=E.copyNodeData(b),Re(b)&&(E.xf(b),x=y.Lc(b)))}else Qa(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 Hn||(E=y.copyNodeData(b)),Re(E)&&(x.data=E)));return x},_t.Object.defineProperties(Oo.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}}}),Oo.prototype.updateAllRelationshipsFromData=Oo.prototype.rp,Oo.prototype.findLinksByExample=Oo.prototype.ls,Oo.prototype.findNodesByExample=Oo.prototype.ms,Oo.prototype.findLinkForData=Oo.prototype.Kc,Oo.prototype.findNodeForData=Oo.prototype.ii,Oo.prototype.findPartForData=Oo.prototype.Lc,Oo.prototype.findNodeForKey=Oo.prototype.Vb,Oo.prototype.removeModeledPart=Oo.prototype.ip,Oo.prototype.removeModeledParts=Oo.prototype.Gs,Oo.prototype.rebuildParts=Oo.prototype.Wd;var mS=!1,vS=!1,yS=!1;Oo.className="PartManager";function Ur(a){Oo.apply(this,arguments)}Be(Ur,Oo),Ur.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),SS(this,a.linkDataArray)},Ur.prototype.addModeledParts=function(a){for(Oo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Mf(a.value);rf(this.diagram,!1)};function SS(a,y){y.forEach(function(x){xS(a,x)}),rf(a.diagram,!1)}function xS(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){Qa(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 z=h0(x,y,!0);z!==""&&(E.fromPortId=z),z=ka(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Xn&&(E.fromNode=z)),z=h0(x,y,!1),z!==""&&(E.toPortId=z),z=ka(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Xn&&(E.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}Ur.prototype.removeAllModeledParts=function(){var a=this.diagram.model;PS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function PS(a,y){y.forEach(function(x){a.ip(x)})}Ur.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Ur.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Ur.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Ur.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Ur.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Ur.prototype.findPartForKey=function(a){var y=Oo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Ur.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Ur.prototype.doModelChanged=function(a){var y=this;if(Oo.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===tr){if(E==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(E==="linkToKey"){var ot=this.Kc(a.object);if(ot!==null){var rt=this.Vb(a.newValue);ot.toNode=rt}}else if(E==="linkFromPortId"){var lt=this.Kc(a.object);if(lt!==null){var ut=a.newValue;typeof ut=="string"&&(lt.fromPortId=ut)}}else if(E==="linkToPortId"){var gt=this.Kc(a.object);if(gt!==null){var St=a.newValue;typeof St=="string"&&(gt.toPortId=St)}}else if(E==="nodeGroupKey"){var Ct=this.Lc(a.object);if(Ct!==null){var bt=a.newValue;if(bt!==void 0){var Bt=this.Vb(bt);Bt instanceof Ki?Ct.containingGroup=Bt:Ct.containingGroup=null}else Ct.containingGroup=null}}else if(E==="linkLabelKeys"){var Yt=this.Kc(a.object);if(Yt!==null){var Gt=a.oldValue,se=a.newValue;Array.isArray(Gt)&&Gt.forEach(function(wn){0<=se.indexOf(wn)||(wn=y.Vb(wn),wn!==null&&(wn.labeledLink=null))}),Array.isArray(se)&&se.forEach(function(wn){wn=y.Vb(wn),wn!==null&&(wn.labeledLink=Yt)})}}else if(E==="linkCategory"){var ae=this.Kc(a.object),he=a.newValue;ae!==null&&typeof he=="string"&&(ae.category=he)}else E==="linkDataArray"&&(PS(this,a.oldValue),SS(this,a.newValue));x.isModified=!0}else if(b===br){var be=a.newValue;if(E==="linkDataArray"&&typeof be=="object"&&be!==null)xS(this,be);else if(E==="linkLabelKeys"&&Vh(be)){var $e=this.Kc(a.object),Un=this.Vb(be);$e!==null&&Un!==null&&(Un.labeledLink=$e)}x.isModified=!0}else if(b===zr){var oi=a.oldValue;if(E==="linkDataArray"&&typeof oi=="object"&&oi!==null)this.ip(oi);else if(E==="linkLabelKeys"&&Vh(oi)){var ti=this.Vb(oi);ti!==null&&(ti.labeledLink=null)}x.isModified=!0}}else if(b===tr){var jn=a.propertyName;a.object!==x.model||jn!=="linkFromKeyProperty"&&jn!=="linkToKeyProperty"&&jn!=="linkFromPortIdProperty"&&jn!=="linkToPortIdProperty"&&jn!=="linkLabelKeysProperty"&&jn!=="nodeIsGroupProperty"&&jn!=="nodeGroupKeyProperty"&&jn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Ur.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new tn,b=y.linkDataArray;b.forEach(function(z){x.add(z)});var E=[];this.links.each(function(z){z.data===null||x.contains(z.data)||E.push(z.data)}),E.forEach(function(z){DS(y,z,!1)}),b.forEach(function(z){a.Kc(z)===null&&OS(y,z,!1)})},Ur.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 Hn){var E=ka(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=ka(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 z=a.labelNodes.first();if(b.wa(z.data)===E)return}E=new tn().addAll(y);var tt=new tn;a.labelNodes.each(function(ot){ot.data!==null&&(ot=b.wa(ot.data),ot!==void 0&&tt.add(ot))}),y=tt.copy(),y.hp(E),E=E.copy(),E.hp(tt),(0<y.count||0<E.count)&&(y.each(function(ot){ot=x.Vb(ot),ot!==null&&ot.labeledLink===a&&(ot.labeledLink=null)}),E.each(function(ot){ot=x.Vb(ot),ot!==null&&ot.labeledLink!==a&&(ot.labeledLink=a)}))}}else!(a instanceof So)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Ki)&&(a.containingGroup=y)}}},Ur.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=ap(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var z={};b.next();){var tt=b.value;y.lb(tt)?E instanceof Ki&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=E)):(z.link=this.Kc(tt),z.link!==null&&E instanceof Xn&&(ka(y,tt,!0)===x&&(z.link.fromNode=E),ka(y,tt,!1)===x&&(z.link.toNode=E),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(ot){return function(rt){return rt===x?(E.labeledLink=ot.link,!0):!1}}(z)))),z={link:z.link}}wl(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Ki&&(E.containingGroup=a))}},Ur.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Xn){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Pl(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Pl(y,x,b.data)),a instanceof Ki)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Pl(y,x,b)}}},Ur.prototype.copyPartData=function(a,y){var x=Oo.prototype.copyPartData.call(this,a,y);if(a instanceof Hn)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},Ur.prototype.insertLink=function(a,y,x,b){var E=this.diagram,z=E.model,tt=E.toolManager.findTool("Linking"),ot="";if(a!==null&&(y===null&&(y=a),ot=y.portId,ot===null&&(ot="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=tt.archetypeLinkData,b instanceof Hn){if(Qa(b),z=b.copy(),z!==null)return z.fromNode=a,z.fromPortId=ot,z.toNode=x,z.toPortId=y,E.add(z),a=tt.archetypeLabelNodeData,a instanceof Xn&&(Qa(a),a=a.copy(),a!==null&&(a.labeledLink=z,E.add(a))),z}else if(b!==null&&(b=z.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Of(z,b,z.wa(a.data),!0),Df(z,b,ot,!0),x!==null&&Of(z,b,z.wa(x.data),!1),Df(z,b,y,!1),z.fi(b),a=tt.archetypeLabelNodeData,a===null||a instanceof Xn||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(b,a))),E.Kc(b);return null},Ur.prototype.findLinkForKey=Ur.prototype.findLinkForKey,Ur.prototype.findPartForKey=Ur.prototype.findPartForKey,Ur.prototype.removeAllModeledParts=Ur.prototype.removeAllModeledParts,Ur.prototype.addModeledParts=Ur.prototype.addModeledParts,Ur.prototype.addAllModeledParts=Ur.prototype.addAllModeledParts,Ur.className="GraphLinksPartManager";function Ha(){Oo.apply(this,arguments),this.Sg=null}Be(Ha,Oo);function a0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,z=x;if(a.diagram.isTreePathToChildren||(E=x,z=y),(b===null||!Ls(b,E,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(Qa(b),b=b.copy(),b!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=z,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}Ha.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Ha.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Ha.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}},Ha.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))},Ha.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Ha.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Ha.prototype.doModelChanged=function(a){if(Oo.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===tr){if(b==="nodeParentKey"){var E=a.object,z=this.Vb(a.newValue),tt=this.ii(E);if(this.Sg!==null)z!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(tt!==null){var ot=tt.kh();ot!==null?z===null?y.remove(ot):y.isTreePathToChildren?ot.fromNode=z:ot.toNode=z:a0(this,z,tt)}}else if(b==="parentLinkCategory"){var rt=this.ii(a.object),lt=a.newValue;if(rt!==null&&typeof lt=="string"){var ut=rt.kh();ut!==null&&(ut.category=lt)}}y.isModified=!0}}else if(x===tr){var gt=a.propertyName;a.object===y.model&>==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Ha.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Xn&&(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:a0(this,y,a):b!==null&&xg(x,b,!1)))}}},Ha.prototype.updateDataBindings=function(a,y){Oo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Ha.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=ap(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var z=b.value;y.lb(z)&&E instanceof Xn&&y.mh(z)===x&&a0(this,E,this.ii(z))}wl(y,x)}a=y.mh(a),a!==void 0&&E instanceof Xn&&(a=this.Vb(a),a0(this,a,E))}},Ha.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Xn){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 z=E.pc(-1,b,!1);0<=z&&this.diagram.cb(zr,"parts",E,b,null,z,null),z=b.layerChanged,z!==null&&z(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)&&Pl(y,x,E)}},Ha.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},Ha.prototype.findLinkForKey=Ha.prototype.findLinkForKey,Ha.className="TreePartManager";function ci(a,y){this.kl=new tn,this.il=new tn,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,Ci(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Yn,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 Yn,this.Lt=new qe,this.Wg=!1,this.o=null,this.undoManager=new or,a!==void 0&&(fn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ci.prototype.cloneProtected=function(a){a.xa=this.xa,a.Sm=this.Sm,a.Gg=this.Gg,a.Th=this.Th,a.bl=this.bl,a.Bk=this.Bk,a.Km=this.Km,a.Jm=this.Jm,a.Mm=this.Mm,a.xm=this.xm,a.lj=this.lj},ci.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ci.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ci.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+On(E)}}return y},ci.prototype.xA=function(a){a.change!==ha&&le("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Vr?(CS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ci.prototype.Qv=function(a,y){var x=this,b=!1,E=new tn,z=new tn,tt=new tn,ot=this.vh;a.changes.each(function(gt){gt.model===x&&(gt.modelChange==="nodeDataArray"?gt.change===br?E.add(gt.newValue):gt.change===zr&&tt.add(gt.oldValue):x.lb(gt.object)?z.add(gt.object):gt.change!==tr||x.modelData!==gt.object&>.propertyName!=="modelData"?gt.object!==null&&(ot&&ot.contains(gt.object)?ot.get(gt.object).each(function(St){x.lb(St)&&z.add(St)}):gt.object instanceof ci||x.ri()&&x.Jc(gt.object)||bS(x,gt.object).each(function(St){z.add(St)})):b=!0)});var rt=this.il;rt.clear(),E.each(function(gt){rt.add(x.wa(gt)),y||z.add(gt)});var lt=this.kl;lt.clear(),tt.each(function(gt){lt.add(x.wa(gt)),y&&z.add(gt)}),a=x.cloneDeep(z.Fa());var ut=null;return b&&(ut===null&&(ut={}),ut.modelData=this.cloneDeep(this.modelData)),0<rt.count&&(ut===null&&(ut={}),y?ut.removedNodeKeys=rt.Fa():ut.insertedNodeKeys=rt.Fa()),0<a.length&&(ut===null&&(ut={}),ut.modifiedNodeData=a),0<lt.count&&(ut===null&&(ut={}),y?ut.insertedNodeKeys=lt.Fa():ut.removedNodeKeys=lt.Fa()),lt.clear(),rt.clear(),ut},ci.prototype.cloneDeep=function(a){return Ff(this,a,!0)};function Ff(a,y,x,b,E,z){function tt(gt,St){ot?(gt.__gohashid===void 0&&z.push(gt),b.set(gt,St)):(gt=Co++,b.set(gt,St),E.set(gt,y))}if(!Re(y))return y;z||(z=[]);var ot=Object.isExtensible(y);if(b||(b=new Yn),ot){var rt=b.get(y);if(rt)return rt}else for(E||(E=new Yn),rt=E.iterator;rt.next();){var lt=rt.key;if(rt.value===y&&(lt=b.get(lt)))return lt}if(Array.isArray(y)){rt=[],tt(y,rt);for(var ut=0;ut<y.length;ut++)rt.push(Ff(a,y[ut],!1,b,E,z))}else if(y instanceof zt||y instanceof Wn||y instanceof sn||y instanceof mi||y instanceof ri)rt=y.copy(),tt(y,rt);else{if(y instanceof To||y instanceof Kn||y instanceof nn)return y;if(y instanceof qe)rt=new qe().addAll(Ff(a,y.Fa(),!1,b,E,z)),tt(y,rt);else if(y instanceof tn)rt=new tn().addAll(Ff(a,y.Fa(),!1,b,E,z)),tt(y,rt);else if(y instanceof Yn)rt=new Yn().addAll(Ff(a,y.Fa(),!1,b,E,z)),tt(y,rt);else if(y instanceof Date)rt=new Date(y.getTime()),tt(y,rt);else if(y instanceof RegExp)rt=new RegExp(y),tt(y,rt),rt.lastIndex=y.lastIndex;else if(typeof y.copy=="function")rt=y.copy(),tt(y,rt);else for(ut in rt={},tt(y,rt),y)ut!=="__gohashid"&&(rt[ut]=Ff(a,y[ut],!1,b,E,z))}return x&&z.forEach(function(gt){delete gt.__gohashid}),rt}Mt=ci.prototype,Mt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Mt.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},Mt.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 wS(a,y){y=y.modelData,Re(y)&&(a.dm(y),a.modelData=y)}Mt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!LS(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+dy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+_h(this,this.nodeDataArray,!0)},Mt.kv=function(a){wS(this,a),a=a.nodeDataArray,fn(a)&&(this.dm(a),this.nodeDataArray=a)};function CS(a,y){function x(E,z){if((z=z.part)&&(z=z.data,E!==z)){var tt=b.get(E);tt===null?(tt=new tn,tt.add(z),b.add(E,tt)):tt.add(z)}}var b=a.vh;b===null&&(b=new Yn,y.changes.each(function(E){if(E.diagram!==null){var z=E.change;z===tr?(E=E.object.panel)&&(z=E.data)&&x(z,E):(z===br||z===zr)&&(E=E.object,(z=E.itemArray)&&x(z,E))}}),a.vh=b)}function bS(a,y){for(var x=new tn,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 z=0;z<x.length;z++){var tt=x[z];if(tt===y)return E.add(b),!0;if(l0(a,y,tt,b,E))return!0}else if(Re(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return E.add(b),!0;if(l0(a,y,tt,b,E))return!0}return!1}Mt.Pv=function(a,y){var x=this,b=!1,E=new tn,z=new tn,tt=new tn,ot=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===br?E.add(ut.newValue):ut.change===zr&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==tr||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(gt){x.lb(gt)&&z.add(gt)}):ut.object instanceof ci||x.ri()&&x.Jc(ut.object)||bS(x,ut.object).each(function(gt){z.add(gt)})):b=!0)});var rt=this.il;rt.clear(),E.each(function(ut){rt.add(x.wa(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(x.wa(ut)),y&&z.add(ut)}),a="",b&&(a+=`,
|
|
|
"modelData": `+dy(this,this.modelData)),0<rt.count&&(a+=(y?this.Yv:this.Wv)+_h(this,rt.Fa(),!0)),0<z.count&&(a+=this.jy+_h(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Wv:this.Yv)+_h(this,lt.Fa(),!0)),lt.clear(),rt.clear(),a},Mt.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&le("applyIncrementalJson cannot change Model properties"),wS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Yn;if(Array.isArray(x))for(var E=0;E<x.length;E++){var z=x[E],tt=this.wa(z);tt!=null&&b.set(tt,z)}if(Array.isArray(y))for(E=y.length,z=0;z<E;z++){tt=y[z];var ot=this.hc(tt);ot===null&&(ot=(ot=b.get(tt))?ot:this.copyNodeData({}),this.km(ot,tt),this.xf(ot))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],z=this.wa(E),z=this.hc(z),z!==null){for(var rt in E)rt==="__gohashid"||rt===this.nodeKeyProperty||this.Wj()&&rt===this.nodeIsGroupProperty||this.setDataProperty(z,rt,E[rt]);this.lm(E,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,rt=0;rt<x;rt++)y=this.hc(a[rt]),y!==null&&this.cm(y)},Mt.$x=function(a,y){a.change!==ha&&le("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Vr?(y===void 0&&(y=lp(this,this)),CS(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 }'},Mt.yA=function(a,y){return this.$x(a,y)},Mt.np=function(a){return a===void 0&&(a=lp(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Mt.toJSON=function(a){return this.np(a)},Mt.Zw=function(a){var y=null;if(typeof a=="string")try{y=ie.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:le("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&le("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Mt.Ky=function(a){return this.Zw(a)},ci.constructGraphLinksModel=function(){return new ci},Mt=ci.prototype,Mt.dm=function(a){if(fn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Re(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:le("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(Re(a)){for(y in a)if(x=a[y],Re(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 qe,b=0;b<x.length/2;b++)E.add(new zt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return jx(a)}return a},Mt.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()):fn(a)?_h(this,a):Re(a)?dy(this,a):typeof a=="function"?"null":a.toString()};function _h(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new ze;E.add("["),x&&1<b&&E.add(`
|
|
|
`);for(var z=0;z<b;z++){var tt=y[z];tt!==void 0&&(0<z&&(E.add(","),x&&E.add(`
|
|
|
`)),E.add(a.sm(tt)))}return x&&1<b&&E.add(`
|
|
|
`),E.add("]"),E.toString()}function LS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function As(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function dy(a,y){var x=y;if(x instanceof zt)y={class:"go.Point",x:As(x.x),y:As(x.y)};else if(x instanceof Wn)y={class:"go.Size",width:As(x.width),height:As(x.height)};else if(x instanceof sn)y={class:"go.Rect",x:As(x.x),y:As(x.y),width:As(x.width),height:As(x.height)};else if(x instanceof mi)y={class:"go.Margin",top:As(x.top),right:As(x.right),bottom:As(x.bottom),left:As(x.left)};else if(x instanceof ri)x.sb()?y={class:"go.Spot",x:As(x.x),y:As(x.y),offsetX:As(x.offsetX),offsetY:As(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof To){if(y={class:"go.Brush",type:x.type.name},x.type===th?y.color=x.color:(x.type===Cu||x.type===ja)&&(y.start=x.start,y.end=x.end,x.type===ja&&(x.startRadius!==0&&(y.startRadius=As(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=As(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 Kn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=As(x.startX)),x.startY!==0&&(y.startY=As(x.startY)),x.endX!==0&&(y.endX=As(x.endX)),x.endY!==0&&(y.endY=As(x.endY)),x.spot1.D(Dr)||(y.spot1=x.spot1),x.spot2.D(Ws)||(y.spot2=x.spot2),x.type===Kn.o&&(y.path=Kn.ia(x))):x instanceof nn&&(y={class:"go.EnumValue",classType:lp(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var z=Pr(y,E);if(!LS(E,z))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&z instanceof qe){var tt="[";for(z=z.iterator;z.next();){var ot=z.value;1<tt.length&&(tt+=","),tt+=a.sm(ot.x),tt+=",",tt+=a.sm(ot.y)}tt+="]",b+=tt}else b+=a.sm(z)}return b+"}"}function Is(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 zt(Is(a.x),Is(a.y));else if(y==="Size")x=new Wn(Is(a.width),Is(a.height));else if(y==="Rect")x=new sn(Is(a.x),Is(a.y),Is(a.width),Is(a.height));else if(y==="Margin")x=new mi(Is(a.top),Is(a.right),Is(a.bottom),Is(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Bu(a.enum):x=new ri(Is(a.x),Is(a.y),Is(a.offsetX),Is(a.offsetY));else if(y==="Brush"){if(x=new To,x.type=Vn(To,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof ri&&(x.start=a.start),a.end instanceof ri&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Is(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Is(a.endRadius)),a=a.colorStops,Re(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Kn.parse(a.path):x=new Kn,x.type=Vn(Kn,a.type),typeof a.startX=="number"&&(x.startX=Is(a.startX)),typeof a.startY=="number"&&(x.startY=Is(a.startY)),typeof a.endX=="number"&&(x.endX=Is(a.endX)),typeof a.endY=="number"&&(x.endY=Is(a.endY)),a.spot1 instanceof ri&&(x.spot1=a.spot1),a.spot2 instanceof ri&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=Vn(b,a.name)));return x}Mt.Pe=function(a){return this.Lt.add(a),this},Mt.ik=function(a){this.Lt.remove(a)},Mt.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)},Mt.cb=function(a,y,x,b,E,z,tt){Rr(this,"",a,y,x,b,E,z,tt)},Mt.g=function(a,y,x,b,E){Rr(this,"",tr,a,this,y,x,b,E)},Mt.Fs=function(a,y,x,b,E,z){Rr(this,"",tr,y,a,x,b,E,z)};function Rr(a,y,x,b,E,z,tt,ot,rt){ot===void 0&&(ot=null),rt===void 0&&(rt=null);var lt=new ir;lt.model=a,lt.change=x,lt.modelChange=y,lt.propertyName=b,lt.object=E,lt.oldValue=z,lt.oldParam=ot,lt.newValue=tt,lt.newParam=rt,a.ds(lt)}ci.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===tr){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)),Yo(x,b,E)}else a.change===br?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Re(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&vn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&je(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!fn(b)&&a.propertyName&&(b=Pr(a.object,a.propertyName)),fn(b)&&typeof x=="number"&&(a=a.newValue,y?vn(b,x):je(b,x,a))):le("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===zr?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Re(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&je(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&vn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!fn(b)&&a.propertyName&&(b=Pr(a.object,a.propertyName)),fn(b)&&typeof x=="number"&&(a=a.oldValue,y?je(b,x,a):vn(b,x))):le("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ha&&le("unknown ChangedEvent: "+a.toString())},ci.prototype.Ea=function(a){return this.undoManager.Ea(a)},ci.prototype.eb=function(a){return this.undoManager.eb(a)},ci.prototype.Kf=function(){return this.undoManager.Kf()},ci.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Mt=ci.prototype,Mt.La=function(a,y){y===void 0&&(y=""),Rr(this,"SourceChanged",ha,y,a,null,null)},Mt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Pr(a,y),y!==void 0)){if(Vh(y))return y;le("Key value for node data "+a+" is not a number or a string: "+y)}}},Mt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Pr(a,x);b!==y&&this.hc(y)===null&&(Yo(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Rr(this,"nodeKey",tr,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else Yo(a,x,y)}};function Vh(a){return typeof a=="number"||typeof a=="string"}Mt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Mt.hc=function(a){return a===null&&le("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Vh(a)?this.kb.I(a):null},Mt.$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))){Yo(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;Yo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Yo(a,y,x)}}}}},Mt.xf=function(a){a!==null&&(Ui(a),this.lb(a)||MS(this,a,!0))};function MS(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&&le("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,je(a.Tc,b,y)),Rr(a,"nodeDataArray",br,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}Mt.Fy=function(a){if(fn(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)},Mt.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){t:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break t}b=-1}if(0>b)return;vn(a.Tc,b)}Rr(a,"nodeDataArray",zr,"nodeDataArray",a,y,null,b,null),a.qp(y)}Mt.nA=function(a){if(fn(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)},Mt.$z=function(a){if(a!==this.nodeDataArray&&fn(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 z=a[E],tt=this.wa(z);if(tt!==void 0){x.add(tt);var ot=this.hc(tt);ot!==z&&(ot!==null?(this.Do(ot,z),this.lm(z,ot)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},Mt.jp=function(a,y){y!==void 0&&(a=ap(this,a),a instanceof tn&&this.Vf.add(y,a))},Mt.Lv=function(){},Mt.fm=function(){},Mt.em=function(){},Mt.qp=function(){};function Pl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new tn,a.Vf.add(y,b)),b.add(x)}}function wl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof tn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function ap(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof tn?a:null)}Mt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ci.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):u0(this,a,!0),Re(a)&&Ci(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 Ci(b),b}if(x&&Re(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 z=Pr(y,b),tt=lp(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof ci||z instanceof or||z instanceof Vr||z instanceof ir||(z=u0(a,z,!1)),Yo(x,b,z)}return Ci(x),x}return y instanceof zt||y instanceof Wn||y instanceof sn||y instanceof ri||y instanceof mi?y.copy():y}ci.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!kS&&a instanceof Me&&(kS=!0,si('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),si(" Is that really your intent?"));var b=Pr(a,y);b!==x&&(Yo(a,y,x),this.Fs(a,y,b,x))},Mt=ci.prototype,Mt.set=function(a,y,x){this.setDataProperty(a,y,x)},Mt.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])}},Mt.Ay=function(a,y){this.ts(a,-1,y)},Mt.ts=function(a,y,x){0>y&&(y=a.length),je(a,y,x),Rr(this,"",br,"",a,null,x,null,y)},Mt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&le("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];vn(a,y),Rr(this,"",zr,"",a,x,null,y,null)},Mt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Pr(a,y),y===void 0))return"";if(typeof y=="string")return y;le("getCategoryForNodeData found a non-string category for "+a+": "+y)},Mt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Pr(a,x);b===void 0&&(b=""),b!==y&&(Yo(a,x,y),Rr(this,"nodeCategory",tr,x,a,b,y))}else Yo(a,x,y)}},Mt.lm=function(a,y){this.jm(y,this.Ro(a))},Mt.Tl=function(){return!1},Mt.Wj=function(){return!1},Mt.ri=function(){return!1},Mt.xs=function(){return!1},Mt.Xj=function(){return!1};function cy(){return new ci}function lp(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 lp(a,y.constructor);return typeof y}function fy(a){return dl[a]?dl[a]:ie.go!==void 0&&ie.go[a]?ie.go[a]:null}function Pr(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 Yo(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){}}_t.Object.defineProperties(ci.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&le("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&le("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,b=0;b<x;b++){var E=a[b];Re(E)||le("Model.nodeDataArray must only contain Objects, not: "+E),Ui(E)}for(this.Tc=a,b=new qe,E=0;E<x;E++){var z=a[E],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?b.add(z):this.kb.add(tt,z)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),z=this.wa(E),z!==void 0&&this.kb.add(z,E);for(Rr(this,"nodeDataArray",tr,"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"}}}),ci.prototype.setCategoryForNodeData=ci.prototype.jm,ci.prototype.getCategoryForNodeData=ci.prototype.Ro,ci.prototype.removeArrayItem=ci.prototype.ov,ci.prototype.insertArrayItem=ci.prototype.ts,ci.prototype.addArrayItem=ci.prototype.Ay,ci.prototype.assignAllDataProperties=ci.prototype.Do,ci.prototype.set=ci.prototype.set,ci.prototype.clearUnresolvedReferences=ci.prototype.Qy,ci.prototype.mergeNodeDataArray=ci.prototype.$z,ci.prototype.removeNodeDataCollection=ci.prototype.nA,ci.prototype.removeNodeData=ci.prototype.cm,ci.prototype.addNodeDataCollection=ci.prototype.Fy,ci.prototype.addNodeData=ci.prototype.xf,ci.prototype.makeNodeDataKeyUnique=ci.prototype.$u,ci.prototype.findNodeDataForKey=ci.prototype.hc,ci.prototype.containsNodeData=ci.prototype.lb,ci.prototype.setKeyForNodeData=ci.prototype.km,ci.prototype.getKeyForNodeData=ci.prototype.wa,ci.prototype.updateTargetBindings=ci.prototype.La,ci.prototype.commit=ci.prototype.commit,ci.prototype.rollbackTransaction=ci.prototype.Kf,ci.prototype.commitTransaction=ci.prototype.eb,ci.prototype.startTransaction=ci.prototype.Ea,ci.prototype.raiseDataChanged=ci.prototype.Fs,ci.prototype.raiseChanged=ci.prototype.g,ci.prototype.raiseChangedEvent=ci.prototype.cb,ci.prototype.removeChangedListener=ci.prototype.ik,ci.prototype.addChangedListener=ci.prototype.Pe,ci.prototype.writeJsonValue=ci.prototype.sm,ci.prototype.replaceJsonObjects=ci.prototype.dm,ci.prototype.applyIncrementalJSON=ci.prototype.Ky,ci.prototype.applyIncrementalJson=ci.prototype.Zw,ci.prototype.toJSON=ci.prototype.toJSON,ci.prototype.toJson=ci.prototype.np,ci.prototype.toIncrementalJSON=ci.prototype.yA,ci.prototype.toIncrementalJson=ci.prototype.$x,ci.prototype.toIncrementalData=ci.prototype.xA,ci.prototype.clear=ci.prototype.clear;var kS=!1,dl={};ci.className="Model",ci.fromJSON=ci.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=ie.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:le("Unable to construct a Model from: "+a);if(y===null){a=null;var 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=ie[b])),typeof E=="function"&&(a=new E)}catch(z){}a===null||a instanceof ci?y=a:le("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ci.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ci.safePropertyValue=Pr,ci.safePropertySet=Yo,dl.Brush=To,dl.ChangedEvent=ir,dl.Geometry=Kn,dl.Margin=mi,dl.Panel=Dn,dl.Point=zt,dl.Rect=sn,dl.Size=Wn,dl.Spot=ri,dl.Transaction=Vr,dl.UndoManager=or;function Er(a,y,x,b){Ci(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,b===void 0?(this.el=TS,this.wk=null):(this.el=up,this.wk=b),this.st=new tn}Er.prototype.copy=function(){var a=new Er;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},Mt=Er.prototype,Mt.qb=function(a){a.classType===Er&&(this.mode=a)},Mt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Mt.freeze=function(){return this._isFrozen=!0,this},Mt.ka=function(){return this._isFrozen=!1,this},Mt.Kx=function(a){return a===void 0&&(a=null),this.mode=up,this.backConverter=a,this},Mt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Mt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function NS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Mt.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==="")si("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(b!==""&&(z=Pr(y,b)),z!==void 0)if(E===null)x!==""&&Yo(a,x,z);else try{if(x!==""){var tt=E(z,a);Yo(a,x,tt)}else E(z,a)}catch(ot){}}}},Mt.sp=function(a,y,x,b){if(this.el===up){var E=this.xl;if(x===void 0||E===x){x=this.sl;var z=this.wk,tt=a;if(E!==""&&(tt=Pr(a,E)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var ot=b!==null?b.diagram:null,rt=ot!==null?ot.model:null;if(z===null){if(x!=="")rt!==null?rt.setDataProperty(y,x,tt):Yo(y,x,tt);else if(rt!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var lt=b.itemIndex,ut=b.panel.itemArray;rt.ov(ut,lt),rt.ts(ut,lt,tt)}}else try{if(x!==""){var gt=z(tt,y,rt);rt!==null?rt.setDataProperty(y,x,gt):Yo(y,x,gt)}else{var St=z(tt,y,rt);if(St!==void 0&&rt!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Ct=b.itemIndex,bt=b.panel.itemArray;rt.ov(bt,Ct),rt.ts(bt,Ct,St)}}}catch(Bt){}}finally{this.st.remove(a)}}}},_t.Object.defineProperties(Er.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&mn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&mn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&mn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&mn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&mn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&mn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&mn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&mn(this),this.el=a}}}),Er.prototype.updateSource=Er.prototype.sp,Er.prototype.updateTarget=Er.prototype.Mv,Er.prototype.ofModel=Er.prototype.dA,Er.prototype.ofObject=Er.prototype.cp,Er.prototype.makeTwoWay=Er.prototype.Kx;var zx="Binding",TS=new nn(Er,"OneWay",1),up=new nn(Er,"TwoWay",2);Er.className="Binding",Er.parseEnum=function(a,y){return function(x){return x=Vn(a,x),x===null?y:x}},Er.toString=On,Er.OneWay=TS,Er.TwoWay=up;function fo(a,y,x){ci.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new tn,this.wb=new Yn,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&&(fn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Be(fo,ci),fo.constructGraphLinksModel=ci.constructGraphLinksModel,fo.prototype.cloneProtected=function(a){ci.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},Mt=fo.prototype,Mt.clear=function(){ci.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Mt.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)+":"+On(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+ka(this,E,!0)+"-->"+ka(this,E,!1)}return y},Mt.Qv=function(a,y){this.linkKeyProperty===""&&le("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ci.prototype.Qv.call(this,a,y),b=this,E=new tn,z=new tn,tt=new tn,ot=this.vh;a.changes.each(function(ut){ut.model===b&&(ut.modelChange==="linkDataArray"?ut.change===br?E.add(ut.newValue):ut.change===zr&&tt.add(ut.oldValue):b.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(gt){b.Jc(gt)&&z.add(gt)}):ut.object instanceof ci||b.lb(ut.object)||FS(b,ut.object).each(function(gt){z.add(gt)})))});var rt=this.il;rt.clear(),E.each(function(ut){rt.add(b.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(b.Ac(ut)),y&&z.add(ut)}),a=b.cloneDeep(z.Fa()),0<rt.count&&(x===null&&(x={}),y?x.removedLinkKeys=rt.Fa():x.insertedLinkKeys=rt.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<lt.count&&(x===null&&(x={}),y?x.insertedLinkKeys=lt.Fa():x.removedLinkKeys=lt.Fa()),lt.clear(),rt.clear(),x},Mt.rm=function(){var a=ci.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
|
|
|
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
|
|
|
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
|
|
|
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
|
|
|
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
|
|
|
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
|
|
|
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
|
|
|
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
|
|
|
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
|
|
|
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},Mt.gp=function(a){ci.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},Mt.Rv=function(){var a=ci.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+_h(this,this.linkDataArray,!0);return a+y},Mt.kv=function(a){ci.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function FS(a,y){for(var x=new tn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];l0(a,y,E,E,x)}return x}Mt.Pv=function(a,y){this.linkKeyProperty===""&&le("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ci.prototype.Pv.call(this,a,y),b=this,E=new tn,z=new tn,tt=new tn,ot=this.vh;a.changes.each(function(ut){ut.model===b&&(ut.modelChange==="linkDataArray"?ut.change===br?E.add(ut.newValue):ut.change===zr&&tt.add(ut.oldValue):b.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&ot&&ot.contains(ut.object)?ot.get(ut.object).each(function(gt){b.Jc(gt)&&z.add(gt)}):ut.object instanceof ci||b.lb(ut.object)||FS(b,ut.object).each(function(gt){z.add(gt)})))});var rt=this.il;rt.clear(),E.each(function(ut){rt.add(b.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(b.Ac(ut)),y&&z.add(ut)}),a=x,0<rt.count&&(a+=(y?this.Xv:this.Vv)+_h(this,rt.Fa(),!0)),0<z.count&&(a+=this.iy+_h(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Vv:this.Xv)+_h(this,lt.Fa(),!0)),lt.clear(),rt.clear(),a},Mt.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&le("applyIncrementalJson cannot change Model properties"),ci.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],z=this.jh(E);z===null&&(z=this.Jo({}),this.Ks(z,E),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],z=this.Ac(E),z=this.jh(z),z!==null){for(var tt in E)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,E[tt]);BS(this,E,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},fo.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===tr){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),Yo(x,b,E);return}}else if(a.change===br){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Re(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===zr){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Re(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}}ci.prototype.changeState.call(this,a,y)}},Mt=fo.prototype,Mt.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),Yo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Mt.yx=function(a){return ka(this,a,!0)},Mt.wv=function(a,y){Of(this,a,y,!0)},Mt.Bx=function(a){return ka(this,a,!1)},Mt.Bv=function(a,y){Of(this,a,y,!1)};function ka(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Pr(y,a),a!==void 0))){if(Vh(a))return a;le((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Of(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 z=Pr(y,E);z!==x&&(wl(a,z,y),Yo(y,E,x),a.hc(x)===null&&Pl(a,x,y),Rr(a,b?"linkFromKey":"linkToKey",tr,E,y,z,x),typeof E=="string"&&a.La(y,E))}else Yo(y,E,x)}}Mt.zx=function(a){return h0(this,a,!0)},Mt.xv=function(a,y){Df(this,a,y,!0)},Mt.Cx=function(a){return h0(this,a,!1)},Mt.Cv=function(a,y){Df(this,a,y,!1)};function h0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Pr(y,a),y===void 0?"":y)}function Df(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var z=Pr(y,E);z===void 0&&(z=""),z!==x&&(Yo(y,E,x),Rr(a,b?"linkFromPortId":"linkToPortId",tr,E,y,z,x),typeof E=="string"&&a.La(y,E))}else Yo(y,E,x)}}Mt.Ef=function(a){if(a===null)return d0;var y=this.je;return y===""?d0:(a=Pr(a,y),a===void 0?d0:a)},Mt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Pr(a,x);if(b===void 0&&(b=d0),b!==y){if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)wl(this,b[z],a);for(Yo(a,x,y),E=y.length,z=0;z<E;z++){var tt=y[z];this.hc(tt)===null&&Pl(this,tt,a)}Rr(this,"linkLabelKeys",tr,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Yo(a,x,y)}},Mt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Pr(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&&Pl(this,y,a),Rr(this,"linkLabelKeys",br,x,a,null,y,null,E)))}else le(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Mt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Pr(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(wl(this,y,a),Rr(this,"linkLabelKeys",zr,x,a,y,null,E,null)))}else b!==void 0&&le(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Mt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Pr(a,y),y!==void 0)){if(Vh(y))return y;le("Key value for link data "+a+" is not a number or a string: "+y)}}},Mt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Pr(a,x);b!==y&&this.jh(y)===null&&(Yo(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Rr(this,"linkKey",tr,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Yo(a,x,y)}},Mt.jh=function(a){return a===null&&le("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Vh(a)?this.wb.I(a):null},Mt.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))){Yo(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Yo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Yo(a,y,x)}}}}},Mt.Jc=function(a){return a===null?!1:this.$f.contains(a)},Mt.fi=function(a){a!==null&&(Ui(a),this.Jc(a)||OS(this,a,!0))};function OS(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&&le("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)),Rr(a,"linkDataArray",br,"linkDataArray",a,null,y,null,b),gy(a,y)}Mt.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)},Mt.bm=function(a){a!==null&&DS(this,a,!0)};function DS(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(Rr(a,"linkDataArray",zr,"linkDataArray",a,y,null,b,null),x=ka(a,y,!0),wl(a,x,y),x=ka(a,y,!1),wl(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],wl(a,x,y)}Mt.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)},Mt.Zz=function(a){if(this.linkKeyProperty===""&&le("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&fn(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 z=a[E],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var ot=this.jh(tt);ot!==z&&(ot!==null?(this.Do(ot,z),BS(this,z,ot)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function gy(a,y){var x=ka(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Pl(a,x,y),x=ka(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Pl(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],a.hc(x)===null&&Pl(a,x,y)}Mt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):u0(this,a,!0),Re(a)&&(Ci(a),this.lf!==""&&Yo(a,this.lf,void 0),this.mf!==""&&Yo(a,this.mf,void 0),this.je!==""&&Yo(a,this.je,[])),a},Mt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Pr(a,y)},Mt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Pr(a,y),y!==void 0)){if(Vh(y))return y;le("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Mt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Pr(a,x);b!==y&&(wl(this,b,a),Yo(a,x,y),this.hc(y)===null&&Pl(this,y,a),Rr(this,"nodeGroupKey",tr,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Yo(a,x,y)}},fo.prototype.copyNodeData=function(a){return a===null?null:(a=ci.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Pr(a,this.Je)===void 0||Yo(a,this.Je,void 0),a)},fo.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){Of(this,a,x,!0);return}if(y===this.linkToKeyProperty){Of(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Df(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Df(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=Pr(a,y);b!==x&&(Yo(a,y,x),this.Fs(a,y,b,x))},Mt=fo.prototype,Mt.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&&Pr(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},Mt.jp=function(a,y){ci.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var b=x.value,E=a,z=y;if(ka(this,b,!0)===E){var tt=this.lf;Yo(b,tt,z),Rr(this,"linkFromKey",tr,tt,b,E,z),typeof tt=="string"&&this.La(b,tt)}if(ka(this,b,!1)===E&&(tt=this.mf,Yo(b,tt,z),Rr(this,"linkToKey",tr,tt,b,E,z),typeof tt=="string"&&this.La(b,tt)),tt=this.Ef(b),Array.isArray(tt))for(var ot=tt.length,rt=this.je,lt=0;lt<ot;lt++)tt[lt]===E&&(tt[lt]=z,Rr(this,"linkLabelKeys",br,rt,b,E,z,lt,lt))}},Mt.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Yo(a,b,x),Rr(this,"nodeGroupKey",tr,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Mt.Lv=function(){ci.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)gy(this,a[x])},Mt.fm=function(a){ci.prototype.fm.call(this,a),a=this.wa(a);var y=ap(this,a);if(y!==null){var x=rn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Rr(this,"nodeGroupKey",tr,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(ka(this,b,!0)===a&&(E=this.lf,Rr(this,"linkFromKey",tr,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),ka(this,b,!1)===a&&(E=this.mf,Rr(this,"linkToKey",tr,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var z=E.length,tt=this.je,ot=0;ot<z;ot++)E[ot]===a&&(Rr(this,"linkLabelKeys",br,tt,b,a,a,ot,ot),x.push(b))}for(y=0;y<x.length;y++)wl(this,a,x[y]);bn(x)}},Mt.em=function(a){ci.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Pl(this,y,a)},Mt.qp=function(a){ci.prototype.qp.call(this,a);var y=this.lh(a);wl(this,y,a)},Mt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Pr(a,y),y===void 0))return"";if(typeof y=="string")return y;le("getCategoryForLinkData found a non-string category for "+a+": "+y)},fo.prototype.getLinkCategoryForData=function(a){return this.ps(a)},fo.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Pr(a,x);b===void 0&&(b=""),b!==y&&(Yo(a,x,y),Rr(this,"linkCategory",tr,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Yo(a,x,y)}},fo.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Mt=fo.prototype,Mt.lm=function(a,y){ci.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function BS(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))}Mt.Wj=function(){return!0},Mt.ri=function(){return!0},Mt.xs=function(){return!0},Mt.Xj=function(){return!0},_t.Object.defineProperties(fo.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];Re(E)||le("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Ui(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new qe,E=0;E<x;E++){var z=a[E],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?b.add(z):this.wb.add(tt,z)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),z=this.Ac(E),z!==void 0&&this.wb.add(z,E)}for(b=new tn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Rr(this,"linkDataArray",tr,"linkDataArray",this,y,a),y=0;y<x;y++)gy(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],z=this.Ac(E);z===void 0&&(this.Bs(E),z=this.Ac(E)),z!==void 0&&this.wb.add(z,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"}}}),fo.prototype.setCategoryForLinkData=fo.prototype.lp,fo.prototype.getCategoryForLinkData=fo.prototype.ps,fo.prototype.assignAllDataProperties=fo.prototype.Do,fo.prototype.setGroupKeyForNodeData=fo.prototype.mp,fo.prototype.getGroupKeyForNodeData=fo.prototype.lh,fo.prototype.isGroupForNodeData=fo.prototype.Yu,fo.prototype.copyLinkData=fo.prototype.Jo,fo.prototype.mergeLinkDataArray=fo.prototype.Zz,fo.prototype.removeLinkDataCollection=fo.prototype.lA,fo.prototype.removeLinkData=fo.prototype.bm,fo.prototype.addLinkDataCollection=fo.prototype.Ey,fo.prototype.addLinkData=fo.prototype.fi,fo.prototype.containsLinkData=fo.prototype.Jc,fo.prototype.makeLinkDataKeyUnique=fo.prototype.Bs,fo.prototype.findLinkDataForKey=fo.prototype.jh,fo.prototype.setKeyForLinkData=fo.prototype.Ks,fo.prototype.getKeyForLinkData=fo.prototype.Ac,fo.prototype.removeLabelKeyForLinkData=fo.prototype.Qx,fo.prototype.addLabelKeyForLinkData=fo.prototype.Bu,fo.prototype.setLabelKeysForLinkData=fo.prototype.Ls,fo.prototype.getLabelKeysForLinkData=fo.prototype.Ef,fo.prototype.setToPortIdForLinkData=fo.prototype.Cv,fo.prototype.getToPortIdForLinkData=fo.prototype.Cx,fo.prototype.setFromPortIdForLinkData=fo.prototype.xv,fo.prototype.getFromPortIdForLinkData=fo.prototype.zx,fo.prototype.setToKeyForLinkData=fo.prototype.Bv,fo.prototype.getToKeyForLinkData=fo.prototype.Bx,fo.prototype.setFromKeyForLinkData=fo.prototype.wv,fo.prototype.getFromKeyForLinkData=fo.prototype.yx,fo.prototype.clear=fo.prototype.clear;var d0=Object.freeze([]);fo.className="GraphLinksModel",dl.GraphLinksModel=fo,ci.constructGraphLinksModel=ci.constructGraphLinksModel=function(){return new fo},ci.initDiagramModel=cy=function(){return new fo};function Rs(a,y){ci.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(fn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Be(Rs,ci),Rs.constructGraphLinksModel=ci.constructGraphLinksModel,Rs.prototype.cloneProtected=function(a){ci.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Mt=Rs.prototype,Mt.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)+":"+On(E)}}return y},Mt.rm=function(){var a=ci.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Mt.gp=function(a){ci.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Mt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&le("applyIncrementalJson cannot change Model properties"),ci.prototype.fp.call(this,a)},Mt.Vl=function(a){return a},Mt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Pr(a,y),y!==void 0)){if(Vh(y))return y;le("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Mt.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=Pr(a,x);b!==y&&(wl(this,b,a),Yo(a,x,y),this.hc(y)===null&&Pl(this,y,a),Rr(this,"nodeParentKey",tr,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Yo(a,x,y)}},Mt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Pr(a,y),y===void 0)?"":typeof y=="string"?y:(le("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Rs.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Rs.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Pr(a,x);b===void 0&&(b=""),b!==y&&(Yo(a,x,y),Rr(this,"parentLinkCategory",tr,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Yo(a,x,y)}},Rs.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Rs.prototype.copyNodeData=function(a){return a===null?null:(a=ci.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Pr(a,this.Ke)===void 0||Yo(a,this.Ke,void 0),a)},Rs.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=Pr(a,y);b!==x&&(Yo(a,y,x),this.Fs(a,y,b,x))},Mt=Rs.prototype,Mt.jp=function(a,y){ci.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Mt.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Yo(a,b,x),Rr(this,"nodeParentKey",tr,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Mt.fm=function(a){ci.prototype.fm.call(this,a),a=this.wa(a);var y=ap(this,a);if(y!==null){var x=rn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Rr(this,"nodeParentKey",tr,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)wl(this,a,x[y]);bn(x)}},Mt.em=function(a){ci.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Pl(this,y,a)},Mt.qp=function(a){ci.prototype.qp.call(this,a);var y=this.mh(a);wl(this,y,a)},Mt.lm=function(a,y){ci.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Mt.Tl=function(){return!0},Mt.xs=function(){return!0},_t.Object.defineProperties(Rs.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"}}}),Rs.prototype.setParentLinkCategoryForNodeData=Rs.prototype.Ms,Rs.prototype.getParentLinkCategoryForNodeData=Rs.prototype.ss,Rs.prototype.setParentKeyForNodeData=Rs.prototype.qe,Rs.prototype.getParentKeyForNodeData=Rs.prototype.mh,Rs.className="TreeModel",dl.TreeModel=Rs;function sr(a){Jo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=cl,this.Ti=0,this.Zv=new zt,this.Jp=this.me=0,this.Xr=new fp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=cl,this.K=js,this.nd=Af,this.hd=sy,this.tf=6,this.Nn=y0,a&&Object.assign(this,a)}Be(sr,Jo),sr.prototype.cloneProtected=function(a){Jo.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},sr.prototype.qb=function(a){a.classType===sr?a===m0||a===v0||a===g0||a===p0||a===Af?this.sorting=a:a===jd||a===Bf||a===js||a===Xh?this.direction=a:a===lh||a===Uh||a===cl||a===fl?this.arrangement=a:(a===Lc||a===y0)&&(this.nodeDiameterFormula=a):Jo.prototype.qb.call(this,a)},sr.prototype.createNetwork=function(){return new If(this)},sr.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 qe;y.addAll(a.iterator),a=new qe;var x=new qe,b=this.sort(y),E,z,tt=this.Jp,ot=this.arrangement,rt=this.nodeDiameterFormula,lt=this.radius;(!isFinite(lt)||0>=lt)&&(lt=NaN);var ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=1);var gt=this.startAngle;isFinite(gt)||(gt=0);var St=this.sweepAngle;if((!isFinite(St)||360<St||1>St)&&(St=360),y=this.spacing,isFinite(y)||(y=NaN),ot===fl&&rt===Lc?ot=cl:ot===fl&&rt!==Lc&&(ot=this.arrangement),(this.direction===jd||this.direction===Bf)&&this.sorting!==Af){for(rt=0;!(rt>=b.length)&&(a.add(b.M(rt)),!(rt+1>=b.length));rt+=2)x.add(b.M(rt+1));this.direction===jd?(this.arrangement===fl&&a.reverse(),b=new qe,b.addAll(a),b.addAll(x)):(this.arrangement===fl&&x.reverse(),b=new qe,b.addAll(x),b.addAll(a))}rt=b.length;for(var Ct=z=E=0;Ct<b.length;Ct++){var bt=gt+St*z*(this.direction===js?1:-1)/rt,Bt=b.M(Ct).diameter;isNaN(Bt)&&(Bt=Yh(b.M(Ct),bt)),360>St&&(Ct===0||Ct===b.length-1)&&(Bt/=2),E+=Bt,z++}if(isNaN(lt)||ot===fl){if(isNaN(y)&&(y=6),ot!==cl&&ot!==fl){for(z=-1/0,tt=0;tt<rt;tt++)Ct=b.M(tt),E=b.M(tt===rt-1?0:tt+1),isNaN(Ct.diameter)&&Yh(Ct,0),isNaN(E.diameter)&&Yh(E,0),z=Math.max(z,(Ct.diameter+E.diameter)/2);tt=z+y,ot===lh?lt=(z+y)/(2*Math.PI/rt):lt=c0(this,tt*(360<=St?rt:rt-1),ut,gt*Math.PI/180,St*Math.PI/180)}else lt=c0(this,E+(360<=St?rt:rt-1)*(ot!==fl?y:1.6*y),ut,gt*Math.PI/180,St*Math.PI/180);z=lt*ut}else if(z=lt*ut,Ct=py(this,lt,z,gt*Math.PI/180,St*Math.PI/180),isNaN(y))(ot===cl||ot===fl)&&(y=(Ct-E)/(360<=St?rt:rt-1));else if(ot===cl||ot===fl)Ct=(Ct-E)/(360<=St?rt:rt-1),Ct<y?(lt=c0(this,E+y*(360<=St?rt:rt-1),ut,gt*Math.PI/180,St*Math.PI/180),z=lt*ut):y=Ct;else{for(tt=-1/0,E=0;E<rt;E++)bt=b.M(E),Bt=b.M(E===rt-1?0:E+1),isNaN(bt.diameter)&&Yh(bt,0),isNaN(Bt.diameter)&&Yh(Bt,0),tt=Math.max(tt,(bt.diameter+Bt.diameter)/2);tt+=y,E=c0(this,tt*(360<=St?rt:rt-1),ut,gt*Math.PI/180,St*Math.PI/180),E>lt?(lt=E,z=lt*ut):tt=Ct/(360<=St?rt:rt-1)}if(this.kw=ot,this.lc=lt,this.Zm=ut,this.lw=gt,this.Wp=St,this.Ti=y,this.me=z,this.Jp=tt,y=b,b=this.kw,ot=this.lc,lt=this.lw,ut=this.Wp,gt=this.Ti,St=this.me,rt=this.Jp,this.direction!==jd&&this.direction!==Bf||b!==fl)if(this.direction===jd||this.direction===Bf){switch(tt=0,b){case Uh:tt=180*f0(this,ot,St,lt,rt)/Math.PI;break;case cl:rt=y=0,tt=a.first(),tt!==null&&(y=Yh(tt,Math.PI/2)),tt=x.first(),tt!==null&&(rt=Yh(tt,Math.PI/2)),tt=180*f0(this,ot,St,lt,gt+(y+rt)/2)/Math.PI;break;case lh:tt=ut/y.length}if(this.direction===jd){switch(b){case Uh:cp(this,a,lt,Xh);break;case cl:dp(this,a,lt,Xh);break;case lh:hp(this,a,ut/2,lt,Xh)}switch(b){case Uh:cp(this,x,lt+tt,js);break;case cl:dp(this,x,lt+tt,js);break;case lh:hp(this,x,ut/2,lt+tt,js)}}else{switch(b){case Uh:cp(this,x,lt,Xh);break;case cl:dp(this,x,lt,Xh);break;case lh:hp(this,x,ut/2,lt,Xh)}switch(b){case Uh:cp(this,a,lt+tt,js);break;case cl:dp(this,a,lt+tt,js);break;case lh:hp(this,a,ut/2,lt+tt,js)}}}else switch(b){case Uh:cp(this,y,lt,this.direction);break;case cl:dp(this,y,lt,this.direction);break;case lh:hp(this,y,ut,lt,this.direction);break;case fl:AS(this,y,ut,lt,this.direction)}else AS(this,y,ut,lt-ut/2,js)}this.updateParts(),this.network=null,this.isValidLayout=!0};function hp(a,y,x,b,E){var z=a.Wp,tt=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var ot=y.length,rt=0;rt<ot;rt++){var lt=b+(E===js?rt*x/(360<=z?ot:ot-1):-(rt*x)/ot),ut=y.M(rt),gt=tt*Math.tan(lt)/a;gt=Math.sqrt((tt*tt+a*a*gt*gt)/(1+gt*gt)),ut.centerX=gt*Math.cos(lt),ut.centerY=gt*Math.sin(lt),ut.actualAngle=180*lt/Math.PI}}function dp(a,y,x,b){var E=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var ot=y.length,rt=0;rt<ot;rt++){var lt=y.M(rt),ut=y.M(rt===ot-1?0:rt+1),gt=z*Math.sin(x);lt.centerX=E*Math.cos(x),lt.centerY=gt,lt.actualAngle=180*x/Math.PI,isNaN(lt.diameter)&&Yh(lt,0),isNaN(ut.diameter)&&Yh(ut,0),lt=f0(a,E,z,b===js?x:-x,(lt.diameter+ut.diameter)/2+tt),x+=b===js?lt:-lt}}function cp(a,y,x,b){var E=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var ot=y.length,rt=0;rt<ot;rt++){var lt=y.M(rt);lt.centerX=E*Math.cos(x),lt.centerY=z*Math.sin(x),lt.actualAngle=180*x/Math.PI,lt=f0(a,E,z,b===js?x:-x,tt),x+=b===js?lt:-lt}}function AS(a,y,x,b,E){var z=a.Wp;if(a.mj=0,a.Xr=new fp,360>x){for(z=b+(E===js?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,RS(a,y,x,b,E)}else IS(a,y,x,b,E);a.Xr.commit(y)}function IS(a,y,x,b,E){var z=a.lc,tt=a.Ti,ot=a.Zm,rt=z*Math.cos(b*Math.PI/180),lt=a.me*Math.sin(b*Math.PI/180),ut=y.Fa();if(ut.length===3)ut[0].centerX=z,ut[0].centerY=0,ut[1].centerX=ut[0].centerX-ut[0].width/2-ut[1].width/2-tt,ut[1].y=ut[0].y,ut[2].centerX=(ut[0].centerX+ut[1].centerX)/2,ut[2].y=ut[0].y-ut[2].height-tt;else if(ut.length===4)ut[0].centerX=z,ut[0].centerY=0,ut[2].centerX=-ut[0].centerX,ut[2].centerY=ut[0].centerY,ut[1].centerX=0,ut[1].y=Math.min(ut[0].y,ut[2].y)-ut[1].height-tt,ut[3].centerX=0,ut[3].y=Math.max(ut[0].y+ut[0].height+tt,ut[2].y+ut[2].height+tt);else{z=zt.alloc();for(var gt=0;gt<ut.length&&(ut[gt].centerX=rt,ut[gt].centerY=lt,!(gt>=ut.length-1));gt++)jS(a,rt,lt,ut,gt,E,z)||zS(a,rt,lt,ut,gt,E,z),rt=z.x,lt=z.y;if(zt.free(z),a.mj++,!(23<a.mj)){rt=ut[0].centerX,lt=ut[0].centerY,z=ut[ut.length-1].centerX,gt=ut[ut.length-1].centerY;var St=Math.abs(rt-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),Ct=Math.abs(lt-gt)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(Ct)?Math.abs(rt-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<Ct?Ct:1>Math.abs(St)?0:St,rt=Math.abs(z)>Math.abs(gt)?0<z!=lt>gt:0<gt!=rt<z,(rt=E===js?rt:!rt)&&(tt=-Math.abs(tt),tt=Math.min(tt,-ut[ut.length-1].width),tt=Math.min(tt,-ut[ut.length-1].height)),a.Xr.compare(tt,ut),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*ot,IS(a,y,x,b,E))}}}function RS(a,y,x,b,E){for(var z=a.lc,tt=a.me,ot=a.Zm,rt=z*Math.cos(b*Math.PI/180),lt=tt*Math.sin(b*Math.PI/180),ut=zt.alloc(),gt=y.Fa(),St=0;St<gt.length&&(gt[St].centerX=rt,gt[St].centerY=lt,!(St>=gt.length-1));St++)jS(a,rt,lt,gt,St,E,ut)||zS(a,rt,lt,gt,St,E,ut),rt=ut.x,lt=ut.y;if(zt.free(ut),a.mj++,!(23<a.mj)){if(rt=Math.atan2(lt,rt),rt=E===js?a.gt-rt:rt-a.gt,rt=Math.abs(rt)<Math.abs(rt-2*Math.PI)?rt:rt-2*Math.PI,z=rt*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],rt=0;rt<gt.length;rt++)tt.mk[rt]=gt[rt].bounds.x,tt.tm[rt]=gt[rt].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*ot,RS(a,y,x,b,E))}}function jS(a,y,x,b,E,z,tt){var ot=a.lc,rt=a.me,lt=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ut=!1;if(0<=x!=(z===js)){if(z=y+a,z>ot){if(z=y-a,z<-ot)return tt.x=z,tt.y=lt,!1;ut=!0}}else if(z=y-a,z<-ot){if(z=y+a,z>ot)return tt.x=z,tt.y=lt,!1;ut=!0}return lt=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>x!==ut&&(lt=-lt),Math.abs(x-lt)>(b[E].height+b[E+1].height)/2?(tt.x=z,tt.y=lt,!1):(tt.x=z,tt.y=lt,!0)}function zS(a,y,x,b,E,z,tt){var ot=a.lc,rt=a.me,lt=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(z===js)){if(z=x-a,z<-rt){if(z=x+a,z>rt){tt.x=lt,tt.y=z;return}b=!0}}else if(z=x+a,z>rt){if(z=x-a,z<-rt){tt.x=lt,tt.y=z;return}b=!0}lt=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>y!==b&&(lt=-lt),tt.x=lt,tt.y=z}sr.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},sr.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 zt(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))},sr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var z=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 tt=0,ot=b!==void 0&&E!==void 0?E/(z+1):Math.PI/(2*(z+1)),rt=0,lt=0;lt<=z;lt++){b!==void 0&&E!==void 0?rt=b+lt*E/z:rt=lt*Math.PI/(2*z);var ut=Math.sin(rt);tt+=Math.sqrt(1-a*a*ut*ut)*ot}return b!==void 0&&E!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function c0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function f0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var ot=0;;ot++){var rt=Math.sin(b+ot*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*rt*rt)*a,tt>=E)return ot*a}}sr.prototype.sort=function(a){switch(this.sorting){case g0:break;case p0:a.reverse();break;case m0:a.sort(this.comparer);break;case v0:a.sort(this.comparer),a.reverse();break;case Af:return this.ak(Hx(a));default:le("Invalid sorting type.")}return a};function Hx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new qe;for(var b=0;b<a.length;b++){var E=-1,z=-1;if(b===0)for(var tt=0;tt<a.length;tt++){var ot=a.M(tt).edgesCount;ot>E&&(E=ot,z=tt)}else for(tt=0;tt<a.length;tt++)ot=y[tt],ot>E&&(E=ot,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)E=a.indexOf(tt.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(z=z.destinationEdges;z.next();)E=a.indexOf(z.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}sr.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,z=b.destinationEdges;z.next();)E=a.indexOf(z.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(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],ot=[];b=[],E=new qe;for(var rt=0,lt=0;lt<y.length;lt++){var ut=y[lt].length;if(ut===1)b.push(lt);else if(ut===0)E.add(a.M(lt));else{if(rt===0)x.push(lt);else{for(var gt=ut=1/0,St=-1,Ct=[],bt=0;bt<x.length;bt++)0>y[x[bt]].indexOf(x[bt===x.length-1?0:bt+1])&&Ct.push(bt===x.length-1?0:bt+1);if(Ct.length===0)for(bt=0;bt<x.length;bt++)Ct.push(bt);for(bt=0;bt<Ct.length;bt++){for(var Bt=Ct[bt],Yt=y[lt],Gt=0,se=0;se<tt.length;se++){var ae=z[tt[se]],he=z[ot[se]];if(ae<he){var be=ae;ae=he}else be=he;if(be<Bt&&Bt<=ae)for(he=0;he<Yt.length;he++){var $e=Yt[he];0>x.indexOf($e)||be<z[$e]&&z[$e]<ae||be===z[$e]||ae===z[$e]||Gt++}else for(he=0;he<Yt.length;he++)$e=Yt[he],0>x.indexOf($e)||be<z[$e]&&z[$e]<ae&&be!==z[$e]&&ae!==z[$e]&&Gt++}for(Yt=Gt,se=Gt=0;se<y[lt].length;se++)be=x.indexOf(y[lt][se]),0<=be&&(be=Math.abs(Bt-(be>=Bt?be+1:be)),Gt+=be<x.length+1-be?be:x.length+1-be);for(se=0;se<tt.length;se++)be=z[tt[se]],ae=z[ot[se]],be>=Bt&&be++,ae>=Bt&&ae++,be>ae&&(he=ae,ae=be,be=he),ae-be<(x.length+2)/2==(be<Bt&&Bt<=ae)&&Gt++;(Yt<ut||Yt===ut&&Gt<gt)&&(ut=Yt,gt=Gt,St=Bt)}for(x.splice(St,0,lt),ut=0;ut<x.length;ut++)z[x[ut]]=ut;for(ut=0;ut<y[lt].length;ut++)gt=y[lt][ut],0<=x.indexOf(gt)&&(tt.push(lt),ot.push(gt))}rt++}}for(tt=x.length;;){for(z=!0,ot=0;ot<b.length;ot++)if(rt=b[ot],lt=y[rt][0],ut=x.indexOf(lt),0<=ut){for(St=gt=0;St<y[lt].length;St++)Ct=x.indexOf(y[lt][St]),0>Ct||Ct===ut||(bt=Ct>ut?Ct-ut:ut-Ct,gt+=Ct<ut!=bt>tt-bt?1:-1);x.splice(0>gt?ut:ut+1,0,rt),b.splice(ot,1),ot--}else z=!1;if(z)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},_t.Object.defineProperties(sr.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!==fl&&a!==cl&&a!==Uh&&a!==lh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==js&&a!==Xh&&a!==jd&&a!==Bf||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==g0&&a!==p0&&a!==m0&&!v0&&a!==Af||(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!==Lc||(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 cl=new nn(sr,"ConstantSpacing",0),Uh=new nn(sr,"ConstantDistance",1),lh=new nn(sr,"ConstantAngle",2),fl=new nn(sr,"Packed",3),js=new nn(sr,"Clockwise",4),Xh=new nn(sr,"Counterclockwise",5),jd=new nn(sr,"BidirectionalLeft",6),Bf=new nn(sr,"BidirectionalRight",7),g0=new nn(sr,"Forwards",8),p0=new nn(sr,"Reverse",9),m0=new nn(sr,"Ascending",10),v0=new nn(sr,"Descending",11),Af=new nn(sr,"Optimized",12),y0=new nn(sr,"Pythagorean",13),Lc=new nn(sr,"Circular",14);sr.className="CircularLayout",sr.ConstantSpacing=cl,sr.ConstantDistance=Uh,sr.ConstantAngle=lh,sr.Packed=fl,sr.Clockwise=js,sr.Counterclockwise=Xh,sr.BidirectionalLeft=jd,sr.BidirectionalRight=Bf,sr.Forwards=g0,sr.Reverse=p0,sr.Ascending=m0,sr.Descending=v0,sr.Optimized=Af,sr.Pythagorean=y0,sr.Circular=Lc;function fp(){this.Pl=-1/0,this.tm=this.mk=null}fp.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},fp.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]}},fp.className="VertexArrangement";function If(a){Wo.call(this,a)}Be(If,Wo),If.prototype.createVertex=function(){return new gp(this)},If.prototype.createEdge=function(){return new S0(this)},If.className="CircularNetwork";function gp(a){Gr.call(this,a),this.u=this.Si=NaN}Be(gp,Gr);function Yh(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===fl)if(x.nodeDiameterFormula===Lc)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===Lc?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}_t.Object.defineProperties(gp.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)}}}),gp.className="CircularVertex";function S0(a){ga.call(this,a)}Be(S0,ga),S0.className="CircularEdge";function us(a){Jo.call(this),this.ah=null,this.An=0,this.$d=new Wn(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)}Be(us,Jo),us.prototype.cloneProtected=function(a){Jo.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},us.prototype.createNetwork=function(){return new Mc(this)},us.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 z=E.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}HS(this,0,a)}this.network=y;var tt=b=x.iterator;b=this.arrangementSpacing;var ot=tt.count,rt=!0;z=E=0;for(var lt=rn(),ut=0;ut<ot+y.vertexes.count+2;ut++)lt[ut]=null;ot=0,tt.reset();for(var gt=sn.alloc();tt.next();)if(ut=tt.value,this.computeBounds(ut,gt),rt)rt=!1,E=gt.x+gt.width/2,z=gt.y+gt.height/2,lt[0]=new zt(gt.x+gt.width+b.width,gt.y),lt[1]=new zt(gt.x,gt.y+gt.height+b.height),ot=2;else{var St=GS(lt,ot,E,z,gt.width,gt.height,b),Ct=lt[St],bt=new zt(Ct.x+gt.width+b.width,Ct.y),Bt=new zt(Ct.x,Ct.y+gt.height+b.height);for(St+1<ot&<.splice(St+1,0,null),lt[St]=bt,lt[St+1]=Bt,ot++,St=Ct.x-gt.x,Ct=Ct.y-gt.y,ut=ut.vertexes.iterator;ut.next();)bt=ut.value,bt.centerX+=St,bt.centerY+=Ct}for(sn.free(gt),ut=y.vertexes.iterator;ut.next();)tt=ut.value,St=tt.bounds,2>ot?(E=St.x+St.width/2,z=St.y+St.height/2,lt[0]=new zt(St.x+St.width+b.width,St.y),lt[1]=new zt(St.x,St.y+St.height+b.height),ot=2):(rt=GS(lt,ot,E,z,St.width,St.height,b),gt=lt[rt],Ct=new zt(gt.x+St.width+b.width,gt.y),St=new zt(gt.x,gt.y+St.height+b.height),rt+1<ot&<.splice(rt+1,0,null),lt[rt]=Ct,lt[rt+1]=St,ot++,tt.centerX=gt.x+tt.width/2,tt.centerY=gt.y+tt.height/2);for(bn(lt),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)}}KS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},us.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},us.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 HS(a,y,x){if(Gx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Wx(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,HS(a,y+1,x),KS(a,z),Kx(a,E),y=E.vertexes.Fa(),y.sort(function(tt,ot){return tt===null||ot===null||tt===ot?0:ot.Vd-tt.Vd}),x=0;x<y.length;x++)$x(a,y[x]);a.Zf=b}}function Gx(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 Wx(a,y){for(var x=a.network,b=new Mc(a),E=0;E<a.ah.length;E++){var z=a.ah[E];if(1<z.Vd){b.dh(z);var tt=new $S;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new qe),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var ot=z.value;E=ot.fromVertex,tt=ot.toVertex,E.network===b&&tt.network===b?b.Bo(ot):E.network===b?(ot=E.Hj,ot===null&&(ot=new qe,E.Hj=ot),ot.add(tt),E.Vd--,E.sh+=tt.sh):tt.network===b&&(ot=tt.Hj,ot===null&&(ot=new qe,tt.Hj=ot),ot.add(E),tt.Vd--,tt.sh+=E.sh)}for(E=b.edges.iterator;E.next();)z=E.value,z.length*=Math.max(1,Te.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var rt=E.Hj;if(rt!==null&&0<rt.count&&(tt=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=tt))){for(var lt=ot=0,ut=rt.count-tt;ut<rt.count;ut++){var gt=rt.M(ut),St=null;for(z=gt.edges.iterator;z.next();){var Ct=z.value;if(Ct.Ax(gt)===E){St=Ct;break}}St!==null&&(lt+=St.length,ot+=gt.width*gt.height)}z=E.centerX,rt=E.centerY,ut=E.width,gt=E.height,St=E.focus,Ct=ut*gt,1>Ct&&(Ct=1),ot=Te.sqrt((ot+Ct+lt*lt*4/(tt*tt))/Ct),tt=(ot-1)*ut/2,ot=(ot-1)*gt/2,E.bounds=new sn(z-St.x-tt,rt-St.y-ot,ut+2*tt,gt+2*ot),E.focus=new zt(St.x+tt,St.y+ot)}}return a.network=b,x}function Kx(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 z=E.Sv,tt=E.Tv;b.bounds=new sn(b.centerX-z,b.centerY-tt,E.Ss,E.Qs),b.focus=new zt(z,tt),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function $x(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=Te.sqrt(z*z+tt*tt)/2;for(var ot=!1,rt=tt=0,lt=0,ut=y.vertexes.iterator;ut.next();){var gt=ut.value;1>=gt.Vd?rt++:(ot=!0,lt++,tt+=Math.atan2(y.centerY-gt.centerY,y.centerX-gt.centerX))}if(rt!==0){for(0<lt&&(tt/=lt),lt=y=0,y=ot?2*Math.PI/(rt+1):2*Math.PI/rt,rt%2===0&&(lt=y/2),1<x.count&&x.sort(function(Ct,bt){return Ct===null||bt===null||Ct===bt?0:bt.width*bt.height-Ct.width*Ct.height}),ot=rt%2===0?0:1,x=x.iterator;x.next();)if(rt=x.value,!(1<rt.Vd||a.isFixed(rt))){for(ut=null,gt=rt.edges.iterator;gt.next();){ut=gt.value;break}gt=rt.width;var St=rt.height;gt=Te.sqrt(gt*gt+St*St)/2,ut=z+ut.length+gt,gt=tt+(y*(ot/2>>1)+lt)*(ot%2===0?1:-1),rt.centerX=b+ut*Math.cos(gt),rt.centerY=E+ut*Math.sin(gt),ot++}}}}function GS(a,y,x,b,E,z,tt){var ot=9e19,rt=-1,lt=0;t:for(;lt<y;lt++){var ut=a[lt],gt=ut.x-x,St=ut.y-b;if(gt=gt*gt+St*St,gt<ot){for(St=lt-1;0<=St;St--)if(a[St].y>ut.y&&a[St].x-ut.x<E+tt.width)continue t;for(St=lt+1;St<y;St++)if(a[St].x>ut.x&&a[St].y-ut.y<z+tt.height)continue t;rt=lt,ot=gt}}return rt}us.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},us.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 z=E.value;if(z.toVertex===a){x=z;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(z=E.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function WS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var ot=z.width;return z=z.height,b+E<tt?a>y+z?(x=b+E-tt,a=a-y-z,Te.sqrt(x*x+a*a)):a+x<y?(b=b+E-tt,a=a+x-y,Te.sqrt(b*b+a*a)):tt-(b+E):b>tt+ot?a>y+z?(x=b-tt-ot,a=a-y-z,Te.sqrt(x*x+a*a)):a+x<y?(b=b-tt-ot,a=a+x-y,Te.sqrt(b*b+a*a)):b-(tt+ot):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function KS(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,Zx(a)););a.ah=null}function Zx(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,z=x=x.centerY,tt=1;tt<y.length;tt++){var ot=y[tt];ot.forceX=0,ot.forceY=0;var rt=ot.centerX;ot=ot.centerY,b=Math.min(b,rt),E=Math.max(E,rt),x=Math.min(x,ot),z=Math.max(z,ot)}(E=E-b>z-x)?y.sort(function(Bt,Yt){return Bt===null||Yt===null||Bt===Yt?0:Bt.centerX-Yt.centerX}):y.sort(function(Bt,Yt){return Bt===null||Yt===null||Bt===Yt?0:Bt.centerY-Yt.centerY}),x=a.Zf;var lt=b=ot=0;for(z=0;z<y.length;z++){tt=y[z],b=tt.bounds,ot=tt.focus,rt=b.x+ot.x;var ut=b.y+ot.y;b=tt.charge*a.electricalFieldX(rt,ut),lt=tt.charge*a.electricalFieldY(rt,ut),b+=tt.mass*a.gravitationalFieldX(rt,ut),lt+=tt.mass*a.gravitationalFieldY(rt,ut),tt.forceX+=b,tt.forceY+=lt;for(var gt=z+1;gt<y.length;gt++){var St=y[gt];if(St!==tt){b=St.bounds,ot=St.focus,lt=b.x+ot.x;var Ct=b.y+ot.y;if(rt-lt>x||lt-rt>x){if(E)break}else if(ut-Ct>x||Ct-ut>x){if(!E)break}else{var bt=WS(tt,St);1>bt?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new x0),bt=b.random(),ot=b.random(),rt>lt?(b=Math.abs(St.bounds.right-tt.bounds.x),b=(1+b)*bt):rt<lt?(b=Math.abs(St.bounds.x-tt.bounds.right),b=-(1+b)*bt):(b=Math.max(St.width,tt.width),b=(1+b)*bt-b/2),ut>Ct?(lt=Math.abs(St.bounds.bottom-tt.bounds.y),lt=(1+lt)*ot):rt<lt?(lt=Math.abs(St.bounds.y-tt.bounds.bottom),lt=-(1+lt)*ot):(lt=Math.max(St.height,tt.height),lt=(1+lt)*ot-lt/2)):(ot=-(tt.charge*St.charge)/(bt*bt),b=(lt-rt)/bt*ot,lt=(Ct-ut)/bt*ot),tt.forceX+=b,tt.forceY+=lt,St.forceX-=b,St.forceY-=lt}}}}for(E=a.network.edges.iterator;E.next();)ot=E.value,x=ot.fromVertex,z=ot.toVertex,tt=x.bounds,rt=x.focus,b=tt.x+rt.x,tt=tt.y+rt.y,ut=z.bounds,gt=z.focus,rt=ut.x+gt.x,ut=ut.y+gt.y,gt=WS(x,z),1>gt?(gt=a.randomNumberGenerator,gt===null&&(a.randomNumberGenerator=gt=new x0),ot=gt.random(),gt=gt.random(),b=(b>rt?1:-1)*(1+(z.width>x.width?z.width:x.width))*ot,lt=(tt>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*gt):(ot=ot.stiffness*(gt-ot.length),b=(rt-b)/gt*ot,lt=(ut-tt)/gt*ot),x.forceX+=b,x.forceY+=lt,z.forceX-=b,z.forceY-=lt;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}us.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},us.prototype.moveFixedVertex=function(){},us.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},us.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=wi,y.toSpot=wi)}},us.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=sn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,sn.free(x)}x=sn.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()}sn.free(x)},us.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},us.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},us.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},us.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},us.prototype.electricalFieldX=function(){return 0},us.prototype.electricalFieldY=function(){return 0},us.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},us.prototype.gravitationalFieldX=function(){return 0},us.prototype.gravitationalFieldY=function(){return 0},us.prototype.isFixed=function(a){return a.isFixed},_t.Object.defineProperties(us.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&le('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),us.className="ForceDirectedLayout";function $S(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}$S.className="ForceDirectedSubnet";function Mc(a){Wo.call(this,a)}Be(Mc,Wo),Mc.prototype.createVertex=function(){return new pp(this)},Mc.prototype.createEdge=function(){return new mp(this)},Mc.className="ForceDirectedNetwork";function pp(a){Gr.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}Be(pp,Gr),_t.Object.defineProperties(pp.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)}}}),pp.className="ForceDirectedVertex";function mp(a){ga.call(this,a),this.j=this.o=NaN}Be(mp,ga),_t.Object.defineProperties(mp.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)}}}),mp.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 Do(a){Jo.call(this),this.kc=this.ie=25,this.K=0,this.Dk=L0,this.Zk=M0,this.Qk=E0,this.bj=4,this.rk=k0,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 zt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Be(Do,Jo),Do.prototype.cloneProtected=function(a){Jo.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},Do.prototype.qb=function(a){a.classType===Do?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:le("Unknown enum value: "+a):Jo.prototype.qb.call(this,a)},Do.prototype.createNetwork=function(){return new jf(this)},Do.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!==yp&&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===yp&&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,z=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||z.node===null&&z.data===null)&&E.layer===z.layer)){var tt=0,ot=0,rt=0,lt=0;if(b.link!==null){if(ot=b.link,ot===null)continue;var ut=E.node;if(tt=z.node,ut===null||tt===null)continue;var gt=ot.fromNode;rt=ot.toNode;for(var St=ot.fromPort;St!==null&&!St.Ed();)St=St.panel;for(ot=ot.toPort;ot!==null&&!ot.Ed();)ot=ot.panel;if(b.rev){lt=gt;var Ct=St;gt=rt,St=ot,rt=lt,ot=Ct}var bt=E.focus;lt=z.focus;var Bt=b.rev?z.bounds:E.bounds;Ct=zt.alloc(),ut!==gt?Bt.w()&>.isVisible()?gt.actualBounds.w()?(ih(gt,St,po,Ct),Ct.x+=gt.actualBounds.x-Bt.x,Ct.y+=gt.actualBounds.y-Bt.y):(ih(gt,St,po,Ct),Ct.w()||Ct.assign(bt)):Ct.assign(bt):Bt.w()?(ih(gt,St,po,Ct),Ct.w()||Ct.assign(bt)):Ct.assign(bt),gt=b.rev?E.bounds:z.bounds,ut=zt.alloc(),tt!==rt?gt.w()&&rt.isVisible()?rt.actualBounds.w()?(ih(rt,ot,po,ut),ut.x+=rt.actualBounds.x-gt.x,ut.y+=rt.actualBounds.y-gt.y):(ih(rt,ot,po,ut),ut.w()||ut.assign(lt)):ut.assign(lt):gt.w()?(ih(rt,ot,po,ut),ut.w()||ut.assign(lt)):ut.assign(lt),this.K===90||this.K===270?(tt=Math.round((Ct.x-bt.x)/this.kc),rt=Ct.x,ot=Math.round((ut.x-lt.x)/this.kc),lt=ut.x):(tt=Math.round((Ct.y-bt.y)/this.kc),rt=Ct.y,ot=Math.round((ut.y-lt.y)/this.kc),lt=ut.y),zt.free(Ct),zt.free(ut),b.portFromColOffset=tt,b.portFromPos=rt,b.portToColOffset=ot,b.portToPos=lt}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Ct=E.layer,ut=z.layer,gt=0,Bt=b.link,Bt!==null){var Yt=Bt.fromPort,Gt=Bt.toPort;if(Yt!==null&&Gt!==null){var se=Bt.fromNode;if(St=Bt.toNode,se!==null&&St!==null){var ae=b0(this,!0),he=b0(this,!1),be=this.setsPortSpots?ae:Bt.computeSpot(!0,Yt);bt=this.setsPortSpots?he:Bt.computeSpot(!1,Gt);var $e=Bt.isOrthogonal;be.$c()&&be.Hf(he)&&bt.$c()&&bt.Hf(ae)?gt=0:(ae=Bt.getLinkPoint(se,Yt,be,!0,$e,St,Gt,zt.alloc()),he=Bt.getLinkDirection(se,Yt,ae,be,!0,$e,St,Gt),zt.free(ae),be.ys()||he!==qS(this,b,!0)?this.setsPortSpots&&se!==null&&se.ports.count===1&&b.rev&&(gt+=1):gt+=1,be=Bt.getLinkPoint(St,Gt,bt,!1,$e,se,Yt,zt.alloc()),Bt=Bt.getLinkDirection(St,Gt,be,bt,!1,$e,se,Yt),zt.free(be),bt.ys()||Bt!==qS(this,b,!1)?this.setsPortSpots&&St!==null&&St.ports.count===1&&b.rev&&(gt+=2):gt+=2)}}}if(St=gt,gt=St===1||St===3,(St=St===2||St===3)&&(bt=a.createVertex(),bt.node=null,bt.Dj=1,bt.layer=Ct,bt.near=E,a.dh(bt),E=a.Zj(E,bt,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=tt,E.portToColOffset=0,E.portFromPos=rt,E.portToPos=0,E=bt),Bt=1,gt&&Bt--,Ct-ut>Bt&&0<Ct){for(b.valid=!1,bt=a.createVertex(),bt.node=null,bt.Dj=2,bt.layer=Ct-1,a.dh(bt),E=a.Zj(E,bt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=St?0:tt,E.portToColOffset=0,E.portFromPos=St?0:rt,E.portToPos=0,E=bt,Ct--;Ct-ut>Bt&&0<Ct;)bt=a.createVertex(),bt.node=null,bt.Dj=3,bt.layer=Ct-1,a.dh(bt),E=a.Zj(E,bt,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=bt,Ct--;E=a.Zj(bt,z,b.link),E.valid=!gt,gt&&(bt.near=z),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=ot,E.portFromPos=0,E.portToPos=lt}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=Jh(this,a),x=0,b=this.tc[a],z=0;z<b;z++)E=y[z],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),Qh(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Do.prototype.linkMinLength=function(){return 1};function my(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}Do.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},Do.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 Ys(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 Ga(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 ZS(a,y,x){var b=Jh(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<E;tt++){var ot=0,rt=b[tt],lt=rt.near;if(lt!==null&<.layer===rt.layer)if(rt=lt.index,rt>tt)for(var ut=tt+1;ut<rt;ut++){var gt=b[ut];gt.near===lt&>.Dj===lt.Dj||ot++}else for(ut=tt-1;ut>rt;ut--)gt=b[ut],gt.near===lt&>.Dj===lt.Dj||ot++;var St;if(0<=x)for(rt=b[tt].sourceEdgesArrayAccess,lt=0;lt<rt.length;lt++){var Ct=rt[lt];if(Ct.valid&&Ct.fromVertex.layer!==y)for(gt=Ct.fromVertex.index,ut=Ct.portToPos,Ct=Ct.portFromPos,St=lt+1;St<rt.length;St++){var bt=rt[St];if(bt.valid&&bt.fromVertex.layer!==y){var Bt=bt.fromVertex.index,Yt=bt.portToPos;bt=bt.portFromPos,ut<Yt&&(gt>Bt||gt===Bt&&Ct>bt)&&ot++,Yt<ut&&(Bt>gt||Bt===gt&&bt>Ct)&&ot++}}}if(0>=x){for(rt=b[tt].destinationEdgesArrayAccess,lt=0;lt<rt.length;lt++)if(Ct=rt[lt],Ct.valid&&Ct.toVertex.layer!==y)for(gt=Ct.toVertex.index,ut=Ct.portToPos,Ct=Ct.portFromPos,St=lt+1;St<rt.length;St++)bt=rt[St],bt.valid&&bt.toVertex.layer!==y&&(Bt=bt.toVertex.index,Yt=bt.portToPos,bt=bt.portFromPos,Ct<bt&&(gt>Bt||gt===Bt&&ut>Yt)&&ot++,bt<Ct&&(Bt>gt||Bt===gt&&Yt>ut)&&ot++)}for(z[tt*E+tt]=ot,rt=tt+1;rt<E;rt++){var Gt=0,se=0;if(0<=x){ot=b[tt].sourceEdgesArrayAccess;var ae=b[rt].sourceEdgesArrayAccess;for(lt=0;lt<ot.length;lt++)if(Ct=ot[lt],Ct.valid&&Ct.fromVertex.layer!==y)for(gt=Ct.fromVertex.index,Ct=Ct.portFromPos,St=0;St<ae.length;St++)bt=ae[St],bt.valid&&bt.fromVertex.layer!==y&&(Bt=bt.fromVertex.index,bt=bt.portFromPos,(gt<Bt||gt===Bt&&Ct<bt)&&se++,(Bt<gt||Bt===gt&&bt<Ct)&&Gt++)}if(0>=x){for(ot=b[tt].destinationEdgesArrayAccess,ae=b[rt].destinationEdgesArrayAccess,lt=0;lt<ot.length;lt++)if(Ct=ot[lt],Ct.valid&&Ct.toVertex.layer!==y)for(gt=Ct.toVertex.index,ut=Ct.portToPos,St=0;St<ae.length;St++)bt=ae[St],bt.valid&&bt.toVertex.layer!==y&&(Bt=bt.toVertex.index,Yt=bt.portToPos,(gt<Bt||gt===Bt&&ut<Yt)&&se++,(Bt<gt||Bt===gt&&Yt<ut)&&Gt++)}z[tt*E+rt]=Gt,z[rt*E+tt]=se}}return Qh(a,y,b),z}Do.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=ZS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var z=E;z<b;z++)a+=x[E*b+z];return a};function P0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,z=Jh(b,E),tt=b.tc[E],ot=0,rt=0;rt<tt;rt++){var lt=z[rt].destinationEdgesArrayAccess;if(lt!==null)for(var ut=0;ut<lt.length;ut++){var gt=lt[ut];if(gt.valid&>.toVertex.layer!==E){var St=gt.fromVertex.column+gt.portFromColOffset,Ct=gt.toVertex.column+gt.portToColOffset;ot+=(Math.abs(St-Ct)+1)*my(gt)}}}Qh(b,E,z),y+=ot}return y}Do.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 vy(a,y,x){for(var b=Jh(a,y),E=a.tc[y],z=[],tt=0;tt<E;tt++){var ot=b[tt],rt=null;0>=x&&(rt=ot.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=ot.destinationEdgesArrayAccess);var ut=0,gt=0,St=ot.near;if(St!==null&&St.layer===ot.layer&&(ut+=St.column-1,gt++),rt!==null)for(St=0;St<rt.length;St++){ot=rt[St];var Ct=ot.fromVertex;ot.valid&&!ot.rev&&Ct.layer!==y&&(ut+=Ct.column,gt++)}if(lt!==null)for(rt=0;rt<lt.length;rt++)ot=lt[rt],St=ot.toVertex,ot.valid&&!ot.rev&&St.layer!==y&&(ut+=St.column,gt++);z[tt]=gt===0?-1:ut/gt}return Qh(a,y,b),z}function _S(a,y,x){for(var b=Jh(a,y),E=a.tc[y],z=[],tt=0;tt<E;tt++){var ot=b[tt],rt=null;0>=x&&(rt=ot.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=ot.destinationEdgesArrayAccess);var ut=0,gt=[],St=ot.near;if(St!==null&&St.layer===ot.layer&&(gt[ut]=St.column-1,ut++),ot=void 0,rt!==null)for(St=0;St<rt.length;St++){ot=rt[St];var Ct=ot.fromVertex;ot.valid&&!ot.rev&&Ct.layer!==y&&(gt[ut]=Ct.column+ot.portFromColOffset,ut++)}if(lt!==null)for(rt=0;rt<lt.length;rt++)ot=lt[rt],St=ot.toVertex,ot.valid&&!ot.rev&&St.layer!==y&&(gt[ut]=St.column+ot.portToColOffset,ut++);ut===0?z[tt]=-1:(gt.sort(function(bt,Bt){return bt-Bt}),lt=ut>>1,z[tt]=ut&1?gt[lt]:gt[lt-1]+gt[lt]>>1)}return Qh(a,y,b),z}function vp(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var tt=y.destinationEdges;tt.next();){var ot=tt.value,rt=ot.toVertex,lt=y.layer-rt.layer;ot=a.linkMinLength(ot),lt===ot&&vp(a,rt,x,b,E,z)}if(z)for(tt=y.sourceEdges;tt.next();)ot=tt.value,rt=ot.fromVertex,lt=rt.layer-y.layer,ot=a.linkMinLength(ot),lt===ot&&vp(a,rt,x,b,E,z)}}function yy(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var tt=y.destinationEdges;tt.next();)yy(a,tt.value.toVertex,x,b,E,z);if(z)for(y=y.sourceEdges;y.next();)yy(a,y.value.fromVertex,x,b,E,z)}}Do.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Py: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(;_x(a)!==null;){for(E=VS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=VS(a);for(E=US(a);E!==null;)b[y]=E,y++,E.valid=!1,E=US(a);E=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var ot=tt.value;if(ot.valid){for(var rt=0,lt=ot.destinationEdges;lt.next();)lt.value.toVertex.valid&&rt++;lt=0;for(var ut=ot.sourceEdges;ut.next();)ut.value.fromVertex.valid&<++;(E===null||z<rt-lt)&&(E=ot,z=rt-lt)}}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 L0: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&&Sy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&Sy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,z=E.finish,E.Ll<y.Ll&&x<z&&(this.network.gm(b),b.rev=!0));break;case yp: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(z=0;z<E.length;z++)E[z].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 _x(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function VS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function US(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 Sy(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,Sy(a,E))}y.finish=a.Kn,a.Kn++}Do.prototype.assignLayers=function(){switch(this.Zk){case wy:XS(this);break;case Cy:for(var a,y=this.network.vertexes.iterator;y.next();)a=JS(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 M0:for(XS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&QS(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 XS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=YS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,z=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,z)+E)}y.layer=x}else x=y.layer;return x}function JS(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,z=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,JS(a,z)+E)}y.layer=x}else x=y.layer;return x}function QS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)QS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,z=0;z<E;z++){var tt=b[z],ot=tt.fromVertex,rt=tt.toVertex;tt=a.linkMinLength(tt),ot.layer-rt.layer>tt&&vp(a,ot,0,-1,!0,!1)}for(vp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,b=1/0,ot=0,rt=null,tt=a.network.vertexes.iterator;tt.next();){var lt=tt.value;if(lt.component===1){var ut=0,gt=!1,St=lt.sourceEdgesArrayAccess;E=St.length;for(var Ct=0;Ct<E;Ct++){var bt=St[Ct],Bt=bt.fromVertex;ut+=1,Bt.component!==1&&(z+=1,Bt=Bt.layer-lt.layer,bt=a.linkMinLength(bt),b=Math.min(b,Bt-bt))}for(St=lt.destinationEdgesArrayAccess,E=St.length,Ct=0;Ct<E;Ct++)bt=St[Ct].toVertex,--ut,bt.component!==1?--z:gt=!0;(rt===null||ut<ot)&&!gt&&(rt=lt,ot=ut)}}if(0<z){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else rt.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(vp(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,z=0,ot=null,rt=a.network.vertexes.iterator;rt.next();)if(tt=rt.value,tt.component===1){for(lt=0,ut=!1,St=tt.sourceEdgesArrayAccess,gt=St.length,Ct=0;Ct<gt;Ct++)bt=St[Ct].fromVertex,lt+=1,bt.component!==1?b+=1:ut=!0;for(St=tt.destinationEdgesArrayAccess,gt=St.length,Ct=0;Ct<gt;Ct++)bt=St[Ct],Bt=bt.toVertex,--lt,Bt.component!==1&&(--b,Bt=tt.layer-Bt.layer,bt=a.linkMinLength(bt),E=Math.min(E,Bt-bt));(ot===null||lt>z)&&!ut&&(ot=tt,z=lt)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else ot.component=0}}}function qS(a,y,x){return a.K===90?x&&!y.rev||!x&&y.rev?270:90:a.K===180?x&&!y.rev||!x&&y.rev?0:180:a.K===270?x&&!y.rev||!x&&y.rev?90:270:x&&!y.rev||!x&&y.rev?180:0}Do.prototype.initializeIndices=function(){switch(this.Qk){default:case Ly: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 E0: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&&tx(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&&ex(this,x)}};function tx(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],z=y[b+1];E.portFromColOffset>z.portFromColOffset&&(x=!0,y[b]=z,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&tx(a,b))}function ex(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],z=y[x+1];E.portToColOffset>z.portToColOffset&&(b=!0,y[x]=z,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&ex(a,b))}Do.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Ys(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)w0(this,b,1),qa(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=Ys(this)),b=this.Ia;0<=b;b--)w0(this,b,-1),qa(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=Ys(this))}for(Ga(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)w0(this,b,0),qa(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=Ys(this)),b=this.Ia;0<=b;b--)w0(this,b,0),qa(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=Ys(this))}Ga(this,y);var z,tt,ot;switch(this.rk){case My:break;case Ey:for(ot=a+1;(b=this.countCrossings())<ot;)for(ot=b,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=qa(this,b,-1)||z;for(E=this.countCrossings(),E>=a?Ga(this,y):(a=E,y=Ys(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=qa(this,b,1)||z;for(E=this.countCrossings(),E>=a?Ga(this,y):(a=E,y=Ys(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=qa(this,b,1)||z;for(E>=a?Ga(this,y):(a=E,y=Ys(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=qa(this,b,-1)||z;for(E>=a?Ga(this,y):(a=E,y=Ys(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=qa(this,b,0)||z;for(E>=a?Ga(this,y):(a=E,y=Ys(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=qa(this,b,0)||z;E>=a?Ga(this,y):(a=E,y=Ys(this))}break;default:case k0:for(x=this.Ia,tt=0,ot=a+1;(b=this.countCrossings())<ot;){for(ot=b,z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=qa(this,b,-1)||z;for(E=this.countCrossings(),E>=a?Ga(this,y):(a=E,y=Ys(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=qa(this,b,1)||z;for(E=this.countCrossings(),E>=a?Ga(this,y):(a=E,y=Ys(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=qa(this,b,1)||z;for(E>=a?Ga(this,y):(a=E,y=Ys(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=qa(this,b,-1)||z;for(E>=a?Ga(this,y):(a=E,y=Ys(this)),z=!0;z;)for(z=!1,b=x;b>=tt;b--)z=qa(this,b,0)||z;for(E>=a?Ga(this,y):(a=E,y=Ys(this)),z=!0;z;)for(z=!1,b=tt;b<=x;b++)z=qa(this,b,0)||z;E>=a?Ga(this,y):(a=E,y=Ys(this))}}Ga(this,y)};function w0(a,y,x){var b=Jh(a,y),E=a.tc[y],z=_S(a,y,x),tt=vy(a,y,x);for(x=0;x<E;x++)tt[x]===-1&&(tt[x]=b[x].column),z[x]===-1&&(z[x]=b[x].column);for(var ot=!0,rt;ot;)for(ot=!1,x=0;x<E-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(ot=!0,rt=z[x],z[x]=z[x+1],z[x+1]=rt,rt=tt[x],tt[x]=tt[x+1],tt[x+1]=rt,rt=b[x],b[x]=b[x+1],b[x+1]=rt);for(x=z=0;x<E;x++)rt=b[x],rt.index=x,z+=a.nodeMinColumnSpace(rt,!0),rt.column=z,z+=1,z+=a.nodeMinColumnSpace(rt,!1);Qh(a,y,b)}function qa(a,y,x){var b=Jh(a,y),E=a.tc[y];x=ZS(a,y,x);var z,tt=[];for(z=0;z<E;z++)tt[z]=-1;var ot=[];for(z=0;z<E;z++)ot[z]=-1;for(var rt=!1,lt=!0;lt;)for(lt=!1,z=0;z<E-1;z++){var ut=x[b[z].index*E+b[z+1].index],gt=x[b[z+1].index*E+b[z].index],St=0,Ct=0,bt=b[z].column,Bt=b[z+1].column,Yt=a.nodeMinColumnSpace(b[z],!0),Gt=a.nodeMinColumnSpace(b[z],!1),se=a.nodeMinColumnSpace(b[z+1],!0),ae=a.nodeMinColumnSpace(b[z+1],!1);Yt=bt-Yt+se,Gt=Bt-Gt+ae;var he=b[z].sourceEdges.iterator;for(he.reset();he.next();)if(se=he.value,ae=se.fromVertex,se.valid&&ae.layer===y){for(se=0;b[se]!==ae;)se++;se<z&&(St+=2*(z-se),Ct+=2*(z+1-se)),se===z+1&&(St+=1),se>z+1&&(St+=4*(se-z),Ct+=4*(se-(z+1)))}for(he=b[z].destinationEdges.iterator,he.reset();he.next();)if(se=he.value,ae=se.toVertex,se.valid&&ae.layer===y){for(se=0;b[se]!==ae;)se++;se===z+1&&(Ct+=1)}for(he=b[z+1].sourceEdges.iterator,he.reset();he.next();)if(se=he.value,ae=se.fromVertex,se.valid&&ae.layer===y){for(se=0;b[se]!==ae;)se++;se<z&&(St+=2*(z+1-se),Ct+=2*(z-se)),se===z&&(Ct+=1),se>z+1&&(St+=4*(se-(z+1)),Ct+=4*(se-z))}for(he=b[z+1].destinationEdges.iterator,he.reset();he.next();)if(se=he.value,ae=se.toVertex,se.valid&&ae.layer===y){for(se=0;b[se]!==ae;)se++;se===z&&(St+=1)}se=ae=0,he=tt[b[z].index];var be=ot[b[z].index],$e=tt[b[z+1].index],Un=ot[b[z+1].index];he!==-1&&(ae+=Math.abs(he-bt),se+=Math.abs(he-Gt)),be!==-1&&(ae+=Math.abs(be-bt),se+=Math.abs(be-Gt)),$e!==-1&&(ae+=Math.abs($e-Bt),se+=Math.abs($e-Yt)),Un!==-1&&(ae+=Math.abs(Un-Bt),se+=Math.abs(Un-Yt)),(Ct<St-.5||Ct===St&><ut-.5||Ct===St&>===ut&&se<ae-.5)&&(lt=rt=!0,b[z].column=Gt,b[z+1].column=Yt,ut=b[z],b[z]=b[z+1],b[z+1]=ut)}for(z=0;z<E;z++)b[z].index=z;return Qh(a,y,b),rt}Do.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&tP)!==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 z=E.value;y=z.layer,b=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],b+z)}for(E.reset();E.next();)z=E.value,y=z.layer,b=z.column,z.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=Rf(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Rf(this,y,-1)||x;x=Rf(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)xy(this,y,1);for(y=this.Md-1;0<=y;y--)xy(this,y,-1);xy(this,this.Md,0)}if(a&&(nx(this,-1),nx(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Rf(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Rf(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Rf(this,y,0)||x}}else Yx(this)};function Rf(a,y,x){for(var b=!1;Vx(a,y,x);)b=!0;return b}function Vx(a,y,x){var b,E=Jh(a,y),z=a.tc[y],tt=vy(a,y,-1);if(0<x)for(b=0;b<z;b++)tt[b]=-1;var ot=vy(a,y,1);if(0>x)for(b=0;b<z;b++)ot[b]=-1;for(var rt=!1,lt=!0;lt;)for(lt=!1,b=0;b<z;b++){var ut=E[b].column,gt=a.nodeMinColumnSpace(E[b],!0),St=a.nodeMinColumnSpace(E[b],!1),Ct=0;0>b-1||ut-E[b-1].column-1>gt+a.nodeMinColumnSpace(E[b-1],!1)?Ct=ut-1:Ct=ut,gt=b+1>=z||E[b+1].column-ut-1>St+a.nodeMinColumnSpace(E[b+1],!0)?ut+1:ut;var bt=St=0,Bt=0;if(0>=x)for(var Yt=E[b].sourceEdges.iterator;Yt.next();){var Gt=Yt.value,se=Gt.fromVertex;if(Gt.valid&&se.layer!==y){var ae=my(Gt),he=Gt.portFromColOffset;Gt=Gt.portToColOffset,se=se.column,St+=(Math.abs(ut+Gt-(se+he))+1)*ae,bt+=(Math.abs(Ct+Gt-(se+he))+1)*ae,Bt+=(Math.abs(gt+Gt-(se+he))+1)*ae}}if(0<=x)for(Yt=E[b].destinationEdges.iterator;Yt.next();)Gt=Yt.value,se=Gt.toVertex,Gt.valid&&se.layer!==y&&(ae=my(Gt),he=Gt.portFromColOffset,Gt=Gt.portToColOffset,se=se.column,St+=(Math.abs(ut+he-(se+Gt))+1)*ae,bt+=(Math.abs(Ct+he-(se+Gt))+1)*ae,Bt+=(Math.abs(gt+he-(se+Gt))+1)*ae);Gt=he=ae=0,Yt=tt[E[b].index],se=ot[E[b].index],Yt!==-1&&(ae+=Math.abs(Yt-ut),he+=Math.abs(Yt-Ct),Gt+=Math.abs(Yt-gt)),se!==-1&&(ae+=Math.abs(se-ut),he+=Math.abs(se-Ct),Gt+=Math.abs(se-gt)),bt<St||bt===St&&he<ae?(lt=rt=!0,E[b].column=Ct):(Bt<St||Bt===St&&Gt<ae)&&(lt=rt=!0,E[b].column=gt)}return Qh(a,y,E),a.normalize(),rt}function xy(a,y,x){var b=Jh(a,y),E=a.tc[y],z=_S(a,y,x),tt=[];for(x=0;x<E;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<E;x++){var ot=b[x].column,rt=a.nodeMinColumnSpace(b[x],!0),lt=a.nodeMinColumnSpace(b[x],!1),ut=0;if(tt[x]===-1)if(x===0&&x===E-1)ut=ot;else if(x===0){var gt=b[x+1].column;gt-ot===lt+a.nodeMinColumnSpace(b[x+1],!0)?ut=ot-1:ut=ot}else x===E-1?(gt=b[x-1].column,ut=ot-gt===rt+a.nodeMinColumnSpace(b[x-1],!1)?ot+1:ot):(gt=b[x-1].column,rt=gt+a.nodeMinColumnSpace(b[x-1],!1)+rt+1,gt=b[x+1].column,lt=gt-a.nodeMinColumnSpace(b[x+1],!0)-lt-1,ut=(rt+lt)/2|0);else x===0&&x===E-1?ut=tt[x]:x===0?(gt=b[x+1].column,lt=gt-a.nodeMinColumnSpace(b[x+1],!0)-lt-1,ut=Math.min(tt[x],lt)):x===E-1?(gt=b[x-1].column,rt=gt+a.nodeMinColumnSpace(b[x-1],!1)+rt+1,ut=Math.max(tt[x],rt)):(gt=b[x-1].column,rt=gt+a.nodeMinColumnSpace(b[x-1],!1)+rt+1,gt=b[x+1].column,lt=gt-a.nodeMinColumnSpace(b[x+1],!0)-lt-1,rt<tt[x]&&tt[x]<lt?ut=tt[x]:rt>=tt[x]?ut=rt:lt<=tt[x]&&(ut=lt));ut!==ot&&(z=!0,b[x].column=ut)}Qh(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,z=a.nodeMinColumnSpace(E,!0),tt=a.nodeMinColumnSpace(E,!1);if(E.column-z<=y&&E.column+tt>=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 Xx(a,y){var x=y+1,b,E=[],z=[];for(b=0;b<=a.Ia;b++)E[b]=!1,z[b]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){b=tt.value;var ot=b.column-a.nodeMinColumnSpace(b,!0),rt=b.column+a.nodeMinColumnSpace(b,!1);ot<=y&&rt>=y&&(E[b.layer]=!0),ot<=x&&rt>=x&&(z[b.layer]=!0)}for(ot=!0,x=!1,b=0;b<=a.Ia;b++)ot=ot&&!(E[b]&&z[b]);if(ot)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function nx(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Xx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=Ys(a),z=P0(a);for(b=z+1;z<b;){b=z,ix(a,x,1);var tt=P0(a);tt>z?Ga(a,E):tt<z&&(z=tt,E=Ys(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=Ys(a),z=P0(a),b=z+1;z<b;)b=z,ix(a,x,-1),tt=P0(a),tt>z?Ga(a,E):tt<z&&(z=tt,E=Ys(a));a.normalize()}function ix(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&&(yy(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(E=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)E[z]=-1;for(b.reset();b.next();){z=b.value;for(var tt=z.layer,ot=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),rt=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));ot<=rt;ot++)E[tt*(a.Ra+1)+ot]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)E[z*(a.Ra+1)+tt]!==-1&&E[z*(a.Ra+1)+tt+1]!==-1&&E[z*(a.Ra+1)+tt]!==E[z*(a.Ra+1)+tt+1]&&(y[E[z*(a.Ra+1)+tt]*a.le+E[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)E[z*(a.Ra+1)+tt]!==-1&&E[z*(a.Ra+1)+tt-1]!==-1&&E[z*(a.Ra+1)+tt]!==E[z*(a.Ra+1)+tt-1]&&(y[E[z*(a.Ra+1)+tt]*a.le+E[z*(a.Ra+1)+tt-1]]=!0)}for(E=[],z=0;z<a.le;z++)E[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(rt=tt[tt.length-1],tt.pop(),E[rt])for(E[rt]=!1,z=0;z<a.le;z++)y[rt*a.le+z]&&tt.splice(0,0,z);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 Yx(a){for(var y=rn(),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 tn,Jx(y,x);var z=null,tt=null,ot=null,rt=null,lt=(a.ve&1)!==0,ut=(a.ve&2)!==0,gt=(a.ve&4)!==0,St=(a.ve&8)!==0;for(lt&&(a.verticalAlignment(y,x,!0),z=C0(a,y,!0,!1)),y.reverse(),gt&&(a.verticalAlignment(y,x,!1),ot=C0(a,y,!1,!1)),b=Ii(y),E=b.next();!E.done;E=b.next())E.value.reverse();St&&(a.verticalAlignment(y,x,!1),rt=C0(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=C0(a,y,!0,!0)),bn(y),a.u(z,tt,ot,rt),a.network.vertexes.each(function(Ct){var bt=rn();lt&&bt.push(z.get(Ct)),ut&&bt.push(tt.get(Ct)),gt&&bt.push(ot.get(Ct)),St&&bt.push(rt.get(Ct)),bt.sort(function(Yt,Gt){return Yt-Gt});var Bt=bt.length;Bt=(bt[Math.floor((Bt-1)/2)]+bt[Math.ceil((Bt-1)/2)])/2,bn(bt),Ct.zc=Bt})}function Jx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,z=0,tt=a[b],ot=a[b+1],rt=0;z<ot.length;rt++){var lt=ot[rt];t:{if(lt.node===null){var ut=ky(lt);if(0<ut.length){ut=ut[0].node===null;break t}}ut=!1}var gt=ut;if(rt===ot.length-1||gt){for(ut=tt.length-1,gt&&(ut=ky(lt)[0].index);z<=rt;){if(lt=ot[z],!lt.bo){gt=[];for(var St=Ii(lt.sourceEdgesArrayAccess),Ct=St.next();!Ct.done;Ct=St.next())Ct=Ct.value,Ct.valid&>.push(Ct);lt.bo=gt}for(lt=Ii(lt.bo),gt=lt.next();!gt.done;gt=lt.next())gt=gt.value,St=gt.fromVertex.index,(St<E||St>ut)&&y.add(gt);z++}E=ut}}}Do.prototype.verticalAlignment=function(a,y,x){Qx(a),a=Ii(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Ii(b.value);for(var z=b.next();!z.done;z=b.next()){z=z.value;var tt=x?ky(z):eP(z),ot=tt.length;if(0<ot){tt.sort(function(gt,St){return gt.vi-St.vi});var rt=(ot-1)/2;for(ot=Math.floor(rt),rt=Math.ceil(rt);ot<=rt;ot++)if(z.align===z){var lt=tt[ot],ut=void 0;ut=x?N0(lt,z):N0(z,lt),!y.contains(ut)&&E<lt.vi&&(lt.align=z,z.root=lt.root,z.align=lt.root,E=lt.vi)}}}}};function Qx(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 C0(a,y,x,b){for(var E=a.K===90||a.K===270,z=Ii(y),tt=z.next();!tt.done;tt=z.next()){var ot=Ii(tt.value);for(tt=ot.next();!tt.done;tt=ot.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=Ii(y),ot=z.next();!ot.done;ot=z.next()){ot=Ii(ot.value);for(var rt=ot.next();!rt.done;rt=ot.next())if(rt=rt.value,rt.root===rt){for(var lt=0,ut=rt;ut.align!==rt;){var gt=ut.align,St=tt?ut.width:ut.height,Ct=tt?gt.width:gt.height;if(x){var bt=N0(ut,gt),Bt=bt.portFromPos,Yt=bt.portToPos;bt.link!==null&&(ut.node&&ut.node!==bt.link.fromNode&&(Bt=tt?ut.focusX:ut.focusY),gt.node&>.node!==bt.link.toNode&&(Yt=tt?gt.focusX:gt.focusY))}else bt=N0(gt,ut),Bt=bt.portToPos,Yt=bt.portFromPos,bt.link!==null&&(ut.node&&ut.node!==bt.link.toNode&&(Bt=tt?ut.focusX:ut.focusY),gt.node&>.node!==bt.link.fromNode&&(Yt=tt?gt.focusX:gt.focusY));St=b?ut.qg+(St-Bt)-(Ct-Yt):ut.qg+Bt-Yt,gt.qg=St,lt=Math.min(lt,St),ut=ut.align}ut=rt;do ut.qg=ut.qg-lt,ut=ut.align;while(ut!==rt)}}for(x=Ii(y),tt=x.next();!tt.done;tt=x.next())for(z=Ii(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&ox(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,ot=0;do{for(z=y[tt][ot];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(ot=rx(z,y),ot.sd.shift=Math.min(ot.sd.shift,z.sd.shift+z.zc+z.qg-(ot.zc+ot.qg+(E?ot.width:ot.height)+a.columnSpacing)));ot=z.vi+1}while(tt<y.length&&ot<y[tt].length&&z.sd===y[tt][ot].sd)}for(a=new Yn,y=Ii(y),tt=y.next();!tt.done;tt=y.next())for(x=Ii(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=E?tt.width:tt.height,a.add(tt,b?-tt.zc-z:tt.zc);return a}function ox(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=rx(b,x),z=E.root;ox(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?E.width:E.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+E.qg+tt-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&&le("Could not determine previous vertex in layer"),y[x][a-1]}Do.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=rn(),E=rn(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var ot=qx(this,y[tt],b,E,tt);ot<z&&(x=tt,z=ot)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?b[x]-b[tt]:E[x]-E[tt],z.delta!==0&&y[tt].each(function(rt){return function(lt){lt.value+=rt.delta}}(z)));bn(b),bn(E)};function qx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(ot){var rt=ot.key;ot=ot.value,rt=a.K===90||a.K===270?rt.width:rt.height,ot<z&&(z=ot),ot+rt>tt&&(tt=ot+rt)}),x[E]=z,b[E]=tt,tt-z}Do.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=b0(this,!0),y=b0(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 b0(a,y){return a.K===270?y?gr:yr:a.K===90?y?yr:gr:a.K===180?y?Sr:xr:y?xr:Sr}Do.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 z=1/0,tt=E=1/0,ot=-1/0;a.next();){var rt=a.value,lt=rt.layer,ut=rt.column|0;b?(tt=y.x+this.kc*ut,lt=this.Kd[lt]):(tt=this.Kd[lt],lt=y.y+this.kc*ut),rt.centerX=tt,rt.centerY=lt,x&&isFinite(rt.zc)&&(b?rt.node?rt.x=y.x+rt.zc:rt.centerX=y.x+rt.zc:rt.node?rt.y=y.y+rt.zc:rt.centerY=y.y+rt.zc),z=Math.min(rt.x,z),E=Math.min(rt.y,E),b?(tt=z,ot=Math.max(ot,rt.bounds.right)):(tt=E,ot=Math.max(ot,rt.bounds.bottom))}for(this.xw=ot-tt,z=y.x-z,y=y.y-E,this.Rf=new zt(x&&b?0:z,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Do.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 sn(0,0,x,Math.abs(this.Ta[0]))):y.push(new sn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new sn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new sn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new sn(0,0,Math.abs(this.Ta[0]),x)):y.push(new sn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new sn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new sn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Do.prototype.commitLayers=function(){},Do.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,z=b.toNode,tt=b.fromPort,ot=b.toPort;if(E!==null){var rt=E.findVisibleNode();rt!==null&&rt!==E&&(E=rt,tt=rt.port)}z!==null&&(rt=z.findVisibleNode(),rt!==null&&rt!==z&&(z=rt,ot=rt.port));var lt=y.computeSpot(!0,tt);rt=y.computeSpot(!1,ot);var ut=x.fromVertex,gt=x.toVertex;if(x.valid)y.curve===Ea&&y.pointsCount===4&&(ut.column===gt.column&&this.alignOption===0?(x=y.getLinkPoint(E,tt,lt,!0,!1,z,ot),ot=y.getLinkPoint(z,ot,rt,!1,!1,E,tt),x.w()||x.set(E.actualBounds.center),ot.w()||ot.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+ot.x)/3,(2*x.y+ot.y)/3),y.yf((x.x+2*ot.x)/3,(x.y+2*ot.y)/3),y.yf(ot.x,ot.y)):(x=b=!1,tt!==null&<===hr&&(b=!0),ot!==null&&rt===hr&&(x=!0),(b||x)&&(rt=null,b&&(rt=y.getLinkPointFromPoint(E,tt,tt.ga(po),y.i(3),!0),rt.w()||rt.set(E.actualBounds.center),y.L(0,rt.x,rt.y)),E=null,x&&(E=y.getLinkPointFromPoint(z,ot,ot.ga(po),y.i(0),!1),E.w()||E.set(z.actualBounds.center),y.L(3,E.x,E.y)),rt&&(z=y.i(2),y.L(1,(2*rt.x+z.x)/3,(2*rt.y+z.y)/3)),E&&(z=y.i(1),y.L(2,(2*E.x+z.x)/3,(2*E.y+z.y)/3))))),y.zf();else if(ut.layer===gt.layer)y.zf();else{var St=!1,Ct=!1,bt=this.ie,Bt=y.firstPickIndex+1;if(y.isOrthogonal){Ct=!0;var Yt=y.pointsCount;4<Yt&&y.points.removeRange(2,Yt-3)}else if(y.curve===Ea)St=!0,Yt=y.pointsCount,4<Yt&&y.points.removeRange(2,Yt-3),Yt===4&&(Bt=2);else{Yt=y.pointsCount;var Gt=lt===hr,se=rt===hr;2<Yt&&Gt&&se?y.points.removeRange(1,Yt-2):3<Yt&&Gt&&!se?y.points.removeRange(1,Yt-3):3<Yt&&!Gt&&se?y.points.removeRange(2,Yt-2):4<Yt&&!Gt&&!se&&y.points.removeRange(2,Yt-3)}if(x.rev){for(;gt!==null&&ut!==gt;){var ae=Yt=null;for(Gt=gt.sourceEdges.iterator;Gt.next()&&(se=Gt.value,se.link!==x.link||(Yt=se.fromVertex,ae=se.toVertex,Yt.node!==null)););if(Yt===null)break;if(Yt!==ut){Gt=y.i(Bt-1).x,se=y.i(Bt-1).y;var he=Yt.centerX,be=Yt.centerY;if(Ct)this.K===180||this.K===0?Bt===y.firstPickIndex+1?(y.m(Bt++,Gt,se),y.m(Bt++,Gt,be)):(ae!==null?ae.centerY:se)!==be&&(ae=this.Ta[Yt.layer-1]+this.Rf.x,y.m(Bt++,ae,se),y.m(Bt++,ae,be)):Bt===y.firstPickIndex+1?(y.m(Bt++,Gt,se),y.m(Bt++,he,se)):(ae!==null?ae.centerX:Gt)!==he&&(ae=this.Ta[Yt.layer-1]+this.Rf.y,y.m(Bt++,Gt,ae),y.m(Bt++,he,ae));else if(Bt===y.firstPickIndex+1){ae=Math.max(10,this.he[gt.layer]);var $e=Math.max(10,this.Ld[gt.layer]);if(St)this.K===180?he<=gt.bounds.x?(gt=gt.bounds.x,y.m(Bt++,gt-ae,be),y.m(Bt++,gt,be),y.m(Bt++,gt+$e,be)):(y.m(Bt++,he-ae,be),y.m(Bt++,he,be),y.m(Bt++,he+$e,be)):this.K===90?be>=gt.bounds.bottom?(gt=gt.bounds.y+gt.bounds.height,y.m(Bt++,he,gt+$e),y.m(Bt++,he,gt),y.m(Bt++,he,gt-ae)):(y.m(Bt++,he,be+$e),y.m(Bt++,he,be),y.m(Bt++,he,be-ae)):this.K===270?be<=gt.bounds.y?(gt=gt.bounds.y,y.m(Bt++,he,gt-ae),y.m(Bt++,he,gt),y.m(Bt++,he,gt+$e)):(y.m(Bt++,he,be-ae),y.m(Bt++,he,be),y.m(Bt++,he,be+$e)):this.K===0&&(he>=gt.bounds.right?(gt=gt.bounds.x+gt.bounds.width,y.m(Bt++,gt+$e,be),y.m(Bt++,gt,be),y.m(Bt++,gt-ae,be)):(y.m(Bt++,he+$e,be),y.m(Bt++,he,be),y.m(Bt++,he-ae,be)));else{y.m(Bt++,Gt,se);var Un=0;this.K===180||this.K===0?((this.K===180?he>=gt.bounds.right:he<=gt.bounds.x)&&(Un=(this.K===0?-ae:$e)/2),y.m(Bt++,Gt+Un,be)):((this.K===270?be>=gt.bounds.bottom:be<=gt.bounds.y)&&(Un=(this.K===90?-ae:$e)/2),y.m(Bt++,he,se+Un)),y.m(Bt++,he,be)}}else ae=Math.max(10,this.he[Yt.layer]),$e=Math.max(10,this.Ld[Yt.layer]),St?this.K===180?(y.m(Bt++,he-ae-bt,be),y.m(Bt++,Math.min(he-ae+bt/2,he),be),y.m(Bt++,he,be),y.m(Bt++,he,be),y.m(Bt++,Math.max(he+$e-bt/2,he),be),y.m(Bt++,he+$e+bt,be)):this.K===90?(y.m(Bt++,he,be+$e+bt),y.m(Bt++,he,Math.max(be+$e-bt/2,be)),y.m(Bt++,he,be),y.m(Bt++,he,be),y.m(Bt++,he,Math.min(be-ae+bt/2,be)),y.m(Bt++,he,be-ae-bt)):this.K===270?(y.m(Bt++,he,be-ae-bt),y.m(Bt++,he,Math.min(be-ae+bt/2,be)),y.m(Bt++,he,be),y.m(Bt++,he,be),y.m(Bt++,he,Math.max(be+$e-bt/2,be)),y.m(Bt++,he,be+$e+bt)):(y.m(Bt++,he+$e+bt,be),y.m(Bt++,Math.max(he+$e-bt/2,he),be),y.m(Bt++,he,be),y.m(Bt++,he,be),y.m(Bt++,Math.min(he-ae+bt/2,he),be),y.m(Bt++,he-ae-bt,be)):y.m(Bt++,he,be)}gt=Yt}(ot===null||lt!==hr||Ct)&&(Gt=y.i(Bt-1).x,se=y.i(Bt-1).y,he=y.i(Bt).x,be=y.i(Bt).y,Ct?(bt=this.Ld[ut.layer],this.K===180||this.K===0?(Ct=se,Ct>=ut.bounds.y&&Ct<=ut.bounds.bottom&&(this.K===180?he>=ut.bounds.x:he<=ut.bounds.right)&&(gt=ut.centerX+(this.K===180?-bt:bt),Ct<ut.bounds.y+ut.bounds.height/2?Ct=ut.bounds.y-this.kc/2:Ct=ut.bounds.bottom+this.kc/2,y.m(Bt++,gt,se),y.m(Bt++,gt,Ct)),y.m(Bt++,he,Ct)):(Ct=Gt,Ct>=ut.bounds.x&&Ct<=ut.bounds.right&&(this.K===270?be>=ut.bounds.y:be<=ut.bounds.bottom)&&(gt=ut.centerY+(this.K===270?-bt:bt),Ct<ut.bounds.x+ut.bounds.width/2?Ct=ut.bounds.x-this.kc/2:Ct=ut.bounds.right+this.kc/2,y.m(Bt++,Gt,gt),y.m(Bt++,Ct,gt)),y.m(Bt++,Ct,be)),y.m(Bt++,he,be)):St?(ae=Math.max(10,this.he[ut.layer]),$e=Math.max(10,this.Ld[ut.layer]),this.K===180&&he>=ut.bounds.x?(gt=ut.bounds.x+ut.bounds.width,y.L(Bt-2,gt,se),y.L(Bt-1,gt+$e,se)):this.K===90&&be<=ut.bounds.bottom?(gt=ut.bounds.y,y.L(Bt-2,Gt,gt),y.L(Bt-1,Gt,gt-ae)):this.K===270&&be>=ut.bounds.y?(gt=ut.bounds.y+ut.bounds.height,y.L(Bt-2,Gt,gt),y.L(Bt-1,Gt,gt+$e)):this.K===0&&he<=ut.bounds.right&&(gt=ut.bounds.x,y.L(Bt-2,gt,se),y.L(Bt-1,gt-ae,se))):(ae=Math.max(10,this.he[ut.layer]),$e=Math.max(10,this.Ld[ut.layer]),Ct=0,this.K===180||this.K===0?((this.K===180?he<=ut.bounds.x:he>=ut.bounds.right)&&(Ct=(this.K===0?$e:-ae)/2),y.m(Bt++,he+Ct,se)):((this.K===270?be<=ut.bounds.y:be>=ut.bounds.bottom)&&(Ct=(this.K===90?$e:-ae)/2),y.m(Bt++,Gt,be+Ct)),y.m(Bt++,he,be)))}else{for(;ut!==null&&ut!==gt;){for(ae=Yt=null,ut=ut.destinationEdges.iterator;ut.next()&&(Gt=ut.value,Gt.link!==x.link||(Yt=Gt.toVertex,ae=Gt.fromVertex,ae.node!==null&&(ae=null),Yt.node!==null)););if(Yt===null)break;Yt!==gt&&(Gt=y.i(Bt-1).x,se=y.i(Bt-1).y,he=Yt.centerX,be=Yt.centerY,Ct?this.K===180||this.K===0?(ae!==null?ae.centerY:se)!==be&&(ae=this.Ta[Yt.layer]+this.Rf.x,Bt===y.firstPickIndex+1&&(ae=this.K===0?Math.max(ae,Gt):Math.min(ae,Gt)),y.m(Bt++,ae,se),y.m(Bt++,ae,be)):(ae!==null?ae.centerX:Gt)!==he&&(ae=this.Ta[Yt.layer]+this.Rf.y,Bt===y.firstPickIndex+1&&(ae=this.K===90?Math.max(ae,se):Math.min(ae,se)),y.m(Bt++,Gt,ae),y.m(Bt++,he,ae)):(ae=Math.max(10,this.he[Yt.layer]),$e=Math.max(10,this.Ld[Yt.layer]),St?this.K===180?(y.m(Bt++,he+$e+bt,be),y.m(Bt++,Math.max(he+$e-bt/2,he),be),y.m(Bt++,he,be),y.m(Bt++,he,be),y.m(Bt++,Math.min(he-ae+bt/2,he),be),y.m(Bt++,he-ae-bt,be)):this.K===90?(y.m(Bt++,he,be-ae-bt),y.m(Bt++,he,Math.min(be-ae+bt/2,be)),y.m(Bt++,he,be),y.m(Bt++,he,be),y.m(Bt++,he,Math.max(be+$e-bt/2,be)),y.m(Bt++,he,be+$e+bt)):this.K===270?(y.m(Bt++,he,be+$e+bt),y.m(Bt++,he,Math.max(be+$e-bt/2,be)),y.m(Bt++,he,be),y.m(Bt++,he,be),y.m(Bt++,he,Math.min(be-ae+bt/2,be)),y.m(Bt++,he,be-ae-bt)):(y.m(Bt++,he-ae-bt,be),y.m(Bt++,Math.min(he-ae+bt/2,he),be),y.m(Bt++,he,be),y.m(Bt++,he,be),y.m(Bt++,Math.max(he+$e-bt/2,he),be),y.m(Bt++,he+$e+bt,be)):this.K===180?(y.m(Bt++,he+$e,be),y.m(Bt++,he-ae,be)):this.K===90?(y.m(Bt++,he,be-ae),y.m(Bt++,he,be+$e)):this.K===270?(y.m(Bt++,he,be+$e),y.m(Bt++,he,be-ae)):(y.m(Bt++,he-ae,be),y.m(Bt++,he+$e,be)))),ut=Yt}Ct&&(Gt=y.i(Bt-1).x,se=y.i(Bt-1).y,he=y.i(Bt).x,be=y.i(Bt).y,this.K===180||this.K===0?se!==be&&(ae=this.K===0?Math.min(Math.max((he+Gt)/2,this.Ta[gt.layer]+this.Rf.x),he):Math.max(Math.min((he+Gt)/2,this.Ta[gt.layer]+this.Rf.x),he),y.m(Bt++,ae,se),y.m(Bt++,ae,be)):Gt!==he&&(ae=this.K===90?Math.min(Math.max((be+se)/2,this.Ta[gt.layer]+this.Rf.y),be):Math.max(Math.min((be+se)/2,this.Ta[gt.layer]+this.Rf.y),be),y.m(Bt++,Gt,ae),y.m(Bt++,he,ae)))}b!==null&&St&&4<=y.pointsCount&&(tt!==null&&(tt=lt===hr?y.getLinkPointFromPoint(E,tt,tt.ga(po),y.i(3),!0):y.i(0),lt===hr&&(lt=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+lt.x)/2,lt.y),y.L(2,b.x,(lt.y+b.y)/2)):(y.L(1,lt.x,(tt.y+lt.y)/2),y.L(2,(lt.x+b.x)/2,b.y))),tt.w()||tt.set(E.actualBounds.center),y.L(0,tt.x,tt.y)),ot!==null&&(E=rt===hr?y.getLinkPointFromPoint(z,ot,ot.ga(po),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),rt===hr&&(ot=y.i(y.pointsCount-3),rt=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+ot.x)/2,ot.y),y.L(y.pointsCount-2,rt.x,(ot.y+rt.y)/2)):(y.L(y.pointsCount-2,ot.x,(E.y+ot.y)/2),y.L(y.pointsCount-3,(ot.x+rt.x)/2,rt.y))),E.w()||E.set(z.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Do.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new qe,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 z=b.i(E),tt=b.i(E+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var ot=new qh;ot.layer=Math.floor(z.y/2);var rt=b.i(0),lt=b.i(b.pointsCount-1);if(ot.first=rt.x*rt.x+rt.y,ot.jc=lt.x*lt.x+lt.y,ot.rd=Math.min(z.x,tt.x),ot.Ic=Math.max(z.x,tt.x),ot.index=E,ot.link=b,E+2<b.pointsCount){rt=b.i(E-1),lt=b.i(E+2);var ut=0;rt.y<z.y?ut=lt.y<z.y?3:z.x<tt.x?2:1:rt.y>z.y&&(ut=lt.y>z.y?0:tt.x<z.x?2:1),ot.j=ut}x.push(ot)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(tt=x[z].Ic,E=a+1;E<b&&x[E].rd<tt;)tt=Math.max(tt,x[E].Ic),E++;if(tt=E-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,ot=x[z].jc,rt=z;rt<E;rt++)lt=x[rt],lt.jc!==ot&&(ut++,ot=lt.jc);this.zi(x,this.Ux,z,z+tt);var gt=1;for(ot=x[z].first,rt=z;rt<E;rt++)lt=x[rt],lt.first!==ot&&(gt++,ot=lt.first);for(rt=!0,lt=gt,ut<gt?(rt=!1,lt=ut,ot=x[z].jc,this.zi(x,this.Js,z,z+tt)):ot=x[z].first,ut=0,gt=z;gt<E;gt++){var St=x[gt];(rt?St.first:St.jc)!==ot&&(ut++,ot=rt?St.first:St.jc);var Ct=St.link;z=Ct.i(St.index),tt=Ct.i(St.index+1);var bt=this.linkSpacing*(ut-(lt-1)/2);y++,Ct.uh(),Ct.L(St.index,z.x,z.y+bt),Ct.L(St.index+1,tt.x,tt.y+bt),Ct.zf()}}z=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++)z=b.i(E),tt=b.i(E+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(ot=new qh,ot.layer=Math.floor(z.x/2),rt=b.i(0),lt=b.i(b.pointsCount-1),ot.first=rt.x+rt.y*rt.y,ot.jc=lt.x+lt.y*lt.y,ot.rd=Math.min(z.y,tt.y),ot.Ic=Math.max(z.y,tt.y),ot.index=E,ot.link=b,E+2<b.pointsCount&&(rt=b.i(E-1),lt=b.i(E+2),ut=0,rt.x<z.x?ut=lt.x<z.x?3:z.y<tt.y?2:1:rt.x>z.x&&(ut=lt.x>z.x?0:tt.y<z.y?2:1),ot.j=ut),x.push(ot));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(tt=x[z].Ic,E=a+1;E<b&&x[E].rd<tt;)tt=Math.max(tt,x[E].Ic),E++;if(tt=E-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,ot=x[z].jc,rt=z;rt<E;rt++)lt=x[rt],lt.jc!==ot&&(ut++,ot=lt.jc);for(this.zi(x,this.Ux,z,z+tt),gt=1,ot=x[z].first,rt=z;rt<E;rt++)lt=x[rt],lt.first!==ot&&(gt++,ot=lt.first);for(rt=!0,lt=gt,ut<gt?(rt=!1,lt=ut,ot=x[z].jc,this.zi(x,this.Js,z,z+tt)):ot=x[z].first,ut=0,gt=z;gt<E;gt++)St=x[gt],(rt?St.first:St.jc)!==ot&&(ut++,ot=rt?St.first:St.jc),Ct=St.link,z=Ct.i(St.index),tt=Ct.i(St.index+1),bt=this.linkSpacing*(ut-(lt-1)/2),y++,Ct.uh(),Ct.L(St.index,z.x+bt,z.y),Ct.L(St.index+1,tt.x+bt,tt.y),Ct.zf()}z=E}a=b}}}},Mt=Do.prototype,Mt.Vx=function(a,y){return a instanceof qh&&y instanceof qh&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Mt.Ux=function(a,y){return a instanceof qh&&y instanceof qh&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Mt.Js=function(a,y){return a instanceof qh&&y instanceof qh&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Mt.B=function(a,y){return a-=y,-1<a&&1>a},Mt.zi=function(a,y,x,b){var E=a.length,z=b-x;if(!(1>=z))if((0>x||x>=E-1)&&le("not in range 0 <= from < length: "+x),z===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 Jh(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 Qh(a,y,x){a.He[a.tc[y]]=x}_t.Object.defineProperties(Do.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):le("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Py&&a!==L0&&a!==yp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==M0&&a!==wy&&a!==Cy||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==E0&&a!==by&&a!==Ly||(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!==My&&a!==k0&&a!==Ey||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var L0=new nn(Do,"CycleDepthFirst",0),Py=new nn(Do,"CycleGreedy",1),yp=new nn(Do,"CycleFromLayers",2),M0=new nn(Do,"LayerOptimalLinkLength",0),wy=new nn(Do,"LayerLongestPathSink",1),Cy=new nn(Do,"LayerLongestPathSource",2),E0=new nn(Do,"InitDepthFirstOut",0),by=new nn(Do,"InitDepthFirstIn",1),Ly=new nn(Do,"InitNaive",2),My=new nn(Do,"AggressiveNone",0),k0=new nn(Do,"AggressiveLess",1),Ey=new nn(Do,"AggressiveMore",2),tP=8;Do.className="LayeredDigraphLayout",Do.CycleDepthFirst=L0,Do.CycleGreedy=Py,Do.CycleFromLayers=yp,Do.LayerOptimalLinkLength=M0,Do.LayerLongestPathSink=wy,Do.LayerLongestPathSource=Cy,Do.InitDepthFirstOut=E0,Do.InitDepthFirstIn=by,Do.InitNaive=Ly,Do.AggressiveNone=My,Do.AggressiveLess=k0,Do.AggressiveMore=Ey,Do.PackNone=0,Do.PackExpand=1,Do.PackStraighten=2,Do.PackMedian=4,Do.PackAll=15,Do.AlignNone=0,Do.AlignUpperLeft=1,Do.AlignUpperRight=2,Do.AlignLowerLeft=4,Do.AlignLowerRight=8,Do.AlignAll=15;function qh(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}qh.className="SegInfo";function jf(a){Wo.call(this,a)}Be(jf,Wo),jf.prototype.createVertex=function(){return new Wa(this)},jf.prototype.createEdge=function(){return new Sp(this)},jf.className="LayeredDigraphNetwork";function Wa(a){Gr.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}Be(Wa,Gr);function sx(a,y){return a.index-y.index}function N0(a,y){if(!a.$n){for(var x=[],b=Ii(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Ii(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;le("Unable to find destination edge to given vertex")}function ky(a){if(!a.co){for(var y=[],x=Ii(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(sx),a.co=y}return a.co}function eP(a){if(!a.ao){for(var y=[],x=Ii(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(sx),a.ao=y}return a.ao}Wa.prototype.Cl=function(a){Gr.prototype.Cl.call(this,a),this.bo=this.co=null},Wa.prototype.Kl=function(a){Gr.prototype.Kl.call(this,a),this.bo=this.co=null},Wa.prototype.zl=function(a){Gr.prototype.zl.call(this,a),this.$n=this.ao=null},Wa.prototype.Jl=function(a){Gr.prototype.Jl.call(this,a),this.$n=this.ao=null},_t.Object.defineProperties(Wa.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)}}}),Wa.prototype.deleteDestinationEdge=Wa.prototype.Jl,Wa.prototype.addDestinationEdge=Wa.prototype.zl,Wa.prototype.deleteSourceEdge=Wa.prototype.Kl,Wa.prototype.addSourceEdge=Wa.prototype.Cl,Wa.className="LayeredDigraphVertex";function Sp(a){ga.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Be(Sp,ga),_t.Object.defineProperties(Sp.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)}}}),Sp.className="LayeredDigraphEdge";function ro(a){Jo.call(this),this.Ub=new tn,this.Wn=D0,this.ud=iu,this.vo=A0,this.Bq=zy,this.$v=[],this.td=!0,this.Rb=I0,this.$d=new Wn(10,10).freeze();var y=new Tc(this);this.W=new tl(y),this.Y=new tl(y),this.ru=[],a&&Object.assign(this,a)}Be(ro,Jo),ro.prototype.cloneProtected=function(a){Jo.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)},ro.prototype.qb=function(a){a.classType===ro?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:le("Unknown enum value: "+a):Jo.prototype.qb.call(this,a)},ro.prototype.createNetwork=function(){return new Tc(this)},ro.prototype.makeNetwork=function(a){function y(b){if(b instanceof Xn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Hn){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 Ze?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Ki?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},ro.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==R0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Ze&&(y=a),this.path===D0&&y!==null?this.ud=y.isTreePathToChildren?iu:kc:this.ud=this.path===D0?iu: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 tn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Xn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof tl&&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,Ny(this,y));for(y=this.network.vertexes,a=null;a=nP(y),0<a.count;)y=ax(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ny(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof tl&&ux(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof tl&&hx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof tl&&dx(this,y);if(this.Cu(),this.layerStyle===j0){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===Hy)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 z=y.children[E];b=Math.max(b,x?z.width:z.height)}if(0<=b)for(E=0;E<y.children.length;E++)z=y.children[E],x?(y.angle===180&&(z.focusX+=b-z.width),z.width=b):(y.angle===270&&(z.focusY+=b-z.height),z.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof tl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new tn,this.isValidLayout=!0};function nP(a){var y=new tn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}ro.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case iu:x.sourceEdges.count===0&&this.Ub.add(x);break;case kc:x.destinationEdges.count===0&&this.Ub.add(x);break;default:le("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ax(this,a),a!==null&&this.Ub.add(a))};function ax(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case iu:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case kc:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:le("Unhandled path value "+a.ud.toString())}}return b}function Ny(a,y){if(y!==null){switch(a.ud){case iu:if(0<y.destinationEdges.count){for(var x=new qe,b=y.destinationVertexes;b.next();){var E=b.value;lx(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case kc:if(0<y.sourceEdges.count){for(x=new qe,b=y.sourceVertexes;b.next();)E=b.value,lx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:le("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var z=x[E];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<b;y++)Ny(a,x[y])}}function lx(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}ro.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 z=E=0;z<x.length;z++)x[z]!==y&&(b[E++]=x[z]);a.children=b}}};function ux(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===su&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,z=y.children,tt=z.length,ot=0;ot<tt;ot++){var rt=z[ot];ux(a,rt),x+=rt.descendantCount+1,b=Math.max(b,rt.maxChildrenCount),E=Math.max(E,rt.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function iP(a,y){switch(a.vo){default:case A0:return y.parent!==null?y.parent:a.W;case Ry:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Iy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Ay:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,z=0;z<E;z++)if(0<b[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}ro.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(iP(this,a)),a.parent!==null&&a.parent.alignment===su){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 hx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)hx(a,y[b])}}ro.prototype.assignTreeVertexValues=function(){};function dx(a,y){if(y!==null){y.alignment!==su&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)dx(a,y[b])}}ro.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case zf:break;case Pp:a.children.reverse();break;case wp:a.children.sort(a.comparer);break;case Cp:a.children.sort(a.comparer),a.children.reverse();break;default:le("Unhandled sorting value "+a.sorting.toString())}},ro.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},ro.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=td(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var z=0,tt=0,ot=0,rt=a.commentSpacing;if(a.node!==null)for(var lt=a.node.Mu();lt.next();){var ut=lt.value;ut.category==="Comment"&&ut.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ut),ut.Va(),ut=ut.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(z=Math.max(z,ut.width),tt+=ut.height+Math.abs(ot)):(z+=ut.width+Math.abs(ot),tt=Math.max(tt,ut.height)),ot=rt)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),E=sn.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=E,sn.free(E))};function td(a){return a===uh||a===su||a===hh||a===Mu}function xp(a){return a===uh||a===su}function Ty(a){var y=a.parent;if(y!==null){var x=y.alignment;if(td(x)){if(xp(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===hh)return!0}}return!1}ro.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,z=!1;x!==null&&(E=x.angle,z=x.alignment,z=td(z)),b=b===90||b===270,x=E===90||E===270;for(var tt=a.childrenCount===0,ot=Ty(a),rt=0,lt=a.comments,ut=lt.length,gt=zt.alloc(),St=0;St<ut;St++){var Ct=lt[St],bt=Ct.measuredBounds;if(b&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<E&&!z||x&&ot)if(0<=a.commentMargin)for(gt.h(a.bounds.x-a.commentMargin-bt.width,a.bounds.y+rt),Ct.move(gt),Ct=Ct.Sd();Ct.next();){var Bt=Ct.value;Bt.fromSpot=Sr,Bt.toSpot=xr}else for(gt.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+rt),Ct.move(gt),Ct=Ct.Sd();Ct.next();)Bt=Ct.value,Bt.fromSpot=xr,Bt.toSpot=Sr;else if(0<=a.commentMargin)for(gt.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+rt),Ct.move(gt),Ct=Ct.Sd();Ct.next();)Bt=Ct.value,Bt.fromSpot=xr,Bt.toSpot=Sr;else for(gt.h(a.bounds.x+a.commentMargin-bt.width,a.bounds.y+rt),Ct.move(gt),Ct=Ct.Sd();Ct.next();)Bt=Ct.value,Bt.fromSpot=Sr,Bt.toSpot=xr;rt=0<=a.commentSpacing?rt+(bt.height+a.commentSpacing):rt+(a.commentSpacing-bt.height)}else{if(135<E&&!z||!x&&ot)if(0<=a.commentMargin)for(gt.h(a.bounds.x+rt,a.bounds.y-a.commentMargin-bt.height),Ct.move(gt),Ct=Ct.Sd();Ct.next();)Bt=Ct.value,Bt.fromSpot=gr,Bt.toSpot=yr;else for(gt.h(a.bounds.x+rt,a.bounds.y+2*a.focus.y-a.commentMargin),Ct.move(gt),Ct=Ct.Sd();Ct.next();)Bt=Ct.value,Bt.fromSpot=yr,Bt.toSpot=gr;else if(0<=a.commentMargin)for(gt.h(a.bounds.x+rt,a.bounds.y+2*a.focus.y+a.commentMargin),Ct.move(gt),Ct=Ct.Sd();Ct.next();)Bt=Ct.value,Bt.fromSpot=yr,Bt.toSpot=gr;else for(gt.h(a.bounds.x+rt,a.bounds.y+a.commentMargin-bt.height),Ct.move(gt),Ct=Ct.Sd();Ct.next();)Bt=Ct.value,Bt.fromSpot=gr,Bt.toSpot=yr;rt=0<=a.commentSpacing?rt+(bt.width+a.commentSpacing):rt+(a.commentSpacing-bt.width)}}if(zt.free(gt),y=rt-a.commentSpacing-(b?y.height:y.width),this.ud===iu)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)}},ro.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 B0:cx(this,a);break;case bp:if(a.alignment===su)cx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=td(x)),b=Ty(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=gl(a);y=E===90||E===270;var z=0,tt=a.children,ot=tt.length;for(x=0;x<ot;x++)b=tt[x],z=Math.max(z,y?b.Da.width:b.Da.height);var rt=a.alignment;b=rt===ou;var lt=rt===ru,ut=td(rt),gt=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var St=a.nodeSpacing,Ct=this.computeNodeIndent(a),bt=a.rowSpacing,Bt=0;(b||lt||a.hm||a.im&&a.maxGenerationCount===1)&&(Bt=Math.max(0,a.rowIndent)),b=a.width;var Yt=a.height,Gt=0,se=0,ae=0,he=null,be=null,$e=0,Un=0,oi=0,ti=0,jn=0,wn=0,Gi=0,Oi=0;if(ut&&!xp(rt)&&135<E&&tt.reverse(),xp(rt))if(1<ot)for(var wo=0;wo<ot;wo++)wo%2===0&&wo!==ot-1&&(Oi=Math.max(Oi,y?tt[wo].Da.width:tt[wo].Da.height));else ot===1&&(Oi=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(rt){case uh:se=135>E?fx(this,a,tt,Oi,Gt,se):gx(this,a,tt,Oi,Gt,se),Oi=se.x,Gt=se.width,se=se.height;break;case hh:for(he=0;he<ot;he++)be=tt[he],gt=be.Da,ae=wn===0?0:bt,y?(be.S.h(z-gt.width,ti+ae),Gt=Math.max(Gt,gt.width),se=Math.max(se,ti+ae+gt.height),ti+=ae+gt.height):(be.S.h(oi+ae,z-gt.height),Gt=Math.max(Gt,oi+ae+gt.width),se=Math.max(se,gt.height),oi+=ae+gt.width),wn++;break;case Mu:for(he=0;he<ot;he++)be=tt[he],z=be.Da,gt=wn===0?0:bt,y?(be.S.h(St/2+a.focus.x,ti+gt),Gt=Math.max(Gt,z.width),se=Math.max(se,ti+gt+z.height),ti+=gt+z.height):(be.S.h(oi+gt,St/2+a.focus.y),Gt=Math.max(Gt,oi+gt+z.width),se=Math.max(se,z.height),oi+=gt+z.width),wn++}he=ea(this,2),be=ea(this,2),y?(he[0].h(0,0),he[1].h(0,se),be[0].h(Gt,0)):(he[0].h(0,0),he[1].h(Gt,0),be[0].h(0,se)),be[1].h(Gt,se)}else for(wo=0;wo<ot;wo++){var zo=tt[wo],Zr=zo.Da;if(y){0<gt&&0<wn&&oi+St+Zr.width>gt&&(oi<z&&zd(a,rt,z-oi,0,Gi,wo-1),jn++,wn=0,Gi=wo,ae=se,oi=0,ti=135<E?-se-bt:se+bt),F0(this,zo,0,ti);var Xr=0;if(wn===0)he=zo.Yo,be=zo.kp,$e=Zr.width,Un=Zr.height,(he===null||be===null||E!==gl(zo))&&(he=ea(this,2),be=ea(this,2),he[0].h(0,0),he[1].h(0,Un),be[0].h($e,0),be[1].h($e,Un));else{var xs=rn();Un=px(this,a,zo,he,be,$e,Un,xs),Xr=Un.x,he=xs[0],be=xs[1],$e=Un.width,Un=Un.height,bn(xs),oi<Zr.width&&0>Xr&&(Ec(a,-Xr,0,Gi,wo-1),O0(he,-Xr,0),O0(be,-Xr,0),Xr=0)}zo.S.h(Xr,ti),Gt=Math.max(Gt,$e),se=Math.max(se,ae+(jn===0?0:bt)+Zr.height),oi=$e}else 0<gt&&0<wn&&ti+St+Zr.height>gt&&(ti<z&&zd(a,rt,0,z-ti,Gi,wo-1),jn++,wn=0,Gi=wo,ae=Gt,ti=0,oi=135<E?-Gt-bt:Gt+bt),F0(this,zo,oi,0),Xr=0,wn===0?(he=zo.Yo,be=zo.kp,$e=Zr.width,Un=Zr.height,(he===null||be===null||E!==gl(zo))&&(he=ea(this,2),be=ea(this,2),he[0].h(0,0),he[1].h($e,0),be[0].h(0,Un),be[1].h($e,Un))):(xs=rn(),Un=px(this,a,zo,he,be,$e,Un,xs),Xr=Un.x,he=xs[0],be=xs[1],$e=Un.width,Un=Un.height,bn(xs),ti<Zr.height&&0>Xr&&(Ec(a,0,-Xr,Gi,wo-1),O0(he,0,-Xr),O0(be,0,-Xr),Xr=0)),zo.S.h(oi,Xr),se=Math.max(se,Un),Gt=Math.max(Gt,ae+(jn===0?0:bt)+Zr.width),ti=Un;wn++}switch(0<jn&&(y?(se+=Math.max(0,x),oi<Gt&&zd(a,rt,Gt-oi,0,Gi,ot-1),0<Bt&&(lt||Ec(a,Bt,0,0,ot-1),Gt+=Bt)):(Gt+=Math.max(0,x),ti<se&&zd(a,rt,0,se-ti,Gi,ot-1),0<Bt&&(lt||Ec(a,0,Bt,0,ot-1),se+=Bt))),Bt=lt=0,rt){case Hf:y?lt+=Gt/2-a.focus.x-Ct/2:Bt+=se/2-a.focus.y-Ct/2;break;case Nc:0<jn?y?lt+=Gt/2-a.focus.x-Ct/2:Bt+=se/2-a.focus.y-Ct/2:y?(Oi=tt[0].S.x+tt[0].la.x,lt+=Oi+(tt[ot-1].S.x+tt[ot-1].la.x+2*tt[ot-1].focus.x-Oi)/2-a.focus.x-Ct/2):(Oi=tt[0].S.y+tt[0].la.y,Bt+=Oi+(tt[ot-1].S.y+tt[ot-1].la.y+2*tt[ot-1].focus.y-Oi)/2-a.focus.y-Ct/2);break;case ou:y?(lt-=Ct,Gt+=Ct):(Bt-=Ct,se+=Ct);break;case ru:y?(lt+=Gt-a.width+Ct,Gt+=Ct):(Bt+=se-a.height+Ct,se+=Ct);break;case uh:y?1<ot?lt+=Oi+St/2-a.focus.x:lt+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<ot?Bt+=Oi+St/2-a.focus.y:Bt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case hh:y?lt+=Gt+St/2-a.focus.x:Bt+=se+St/2-a.focus.y;break;case Mu:break;default:se=this.customAlignment(a,lt,Bt,Gt,se),lt=se[0],Bt=se[1],Gt=se[2],se=se[3]}for(Ct=0;Ct<ot;Ct++)Oi=tt[Ct],y?Oi.S.h(Oi.S.x+Oi.la.x-lt,Oi.S.y+(135<E?(ut?-se:-Oi.Da.height)+Oi.la.y-x:Yt+x+Oi.la.y)):Oi.S.h(Oi.S.x+(135<E?(ut?-Gt:-Oi.Da.width)+Oi.la.x-x:b+x+Oi.la.x),Oi.S.y+Oi.la.y-Bt);if(ot=tt=0,ut?y?(Gt=Fy(a,Gt,lt),0>lt&&(lt=0),135<E&&(Bt+=se+x),se+=Yt+x,rt===Mu&&(tt+=St/2+a.focus.x),ot+=Yt+x):(135<E&&(lt+=Gt+x),Gt+=b+x,se=Oy(a,se,Bt),0>Bt&&(Bt=0),rt===Mu&&(ot+=St/2+a.focus.y),tt+=b+x):y?(a.comments===null?b>Gt&&(Gt=Dy(rt,b-Gt,0),tt=Gt.x,ot=Gt.y,Gt=b,lt=0):Gt=Fy(a,Gt,lt),0>lt&&(tt-=lt,lt=0),135<E&&(Bt+=se+x),se=Math.max(Math.max(se,Yt),se+Yt+x),ot+=Yt+x):(135<E&&(lt+=Gt+x),Gt=Math.max(Math.max(Gt,b),Gt+b+x),a.comments===null?Yt>se&&(se=Dy(rt,0,Yt-se),tt=se.x,ot=se.y,se=Yt,Bt=0):se=Oy(a,se,Bt),0>Bt&&(ot-=Bt,Bt=0),tt+=b+x),0<jn)E=ea(this,4),jn=ea(this,4),y?(E[2].h(0,Yt+x),E[3].h(E[2].x,se),jn[2].h(Gt,E[2].y),jn[3].h(jn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Gt,E[2].y),jn[2].h(E[2].x,se),jn[3].h(E[3].x,jn[2].y));else{for(E=ea(this,he.length+2),jn=ea(this,be.length+2),rt=0;rt<he.length;rt++)ut=he[rt],E[rt+2].h(ut.x+tt,ut.y+ot);for(rt=0;rt<be.length;rt++)ut=be[rt],jn[rt+2].h(ut.x+tt,ut.y+ot)}y?(E[0].h(lt,0),E[1].h(E[0].x,Yt),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])),jn[0].h(lt+b,0),jn[1].h(jn[0].x,Yt),jn[2].y<jn[1].y&&(jn[2].x<jn[0].x?jn[2].assign(jn[1]):jn[1].assign(jn[2])),jn[3].y<jn[2].y&&(jn[3].x<jn[0].x?jn[3].assign(jn[2]):jn[2].assign(jn[3])),E[2].y-=x/2,jn[2].y-=x/2):(E[0].h(0,Bt),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])),jn[0].h(0,Bt+Yt),jn[1].h(b,jn[0].y),jn[2].x<jn[1].x&&(jn[2].y<jn[0].y?jn[2].assign(jn[1]):jn[1].assign(jn[2])),jn[3].x<jn[2].x&&(jn[3].y<jn[0].y?jn[3].assign(jn[2]):jn[2].assign(jn[3])),E[2].x-=x/2,jn[2].x-=x/2),Cl(this,he),Cl(this,be),a.Yo=E,a.kp=jn,a.la.h(lt,Bt),a.Da.h(Gt,se)}break;default:le("Unhandled compaction value "+a.compaction.toString())}}};function cx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=td(x));var E=Ty(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=gl(y),x=b===90||b===270;var z=0;E=y.children;for(var tt=E.length,ot=0;ot<tt;ot++){var rt=E[ot];z=Math.max(z,x?rt.Da.width:rt.Da.height)}var lt=y.alignment,ut=lt===ou,gt=lt===ru;ot=td(lt);var St=Math.max(0,y.breadthLimit);rt=a.computeLayerSpacing(y);var Ct=y.nodeSpacing,bt=a.computeNodeIndent(y),Bt=ut||gt?0:bt/2,Yt=y.rowSpacing,Gt=0;(ut||gt||y.hm||y.im&&y.maxGenerationCount===1)&&(Gt=Math.max(0,y.rowIndent)),ut=y.width;var se=y.height,ae=0,he=0,be=0,$e=0,Un=0,oi=0,ti=0,jn=0,wn=0,Gi=0;if(ot&&!xp(lt)&&135<b&&E.reverse(),xp(lt))if(1<tt)for(var Oi=0;Oi<tt;Oi++){var wo=E[Oi],zo=wo.Da;Oi%2===0&&Oi!==tt-1?wn=Math.max(wn,(x?zo.width:zo.height)+a.computeBusNodeSpacing(wo)-Ct):Oi%2!==0&&(Gi=Math.max(Gi,(x?zo.width:zo.height)+a.computeBusNodeSpacing(wo)-Ct))}else tt===1&&(wn=x?E[0].Da.width:E[0].Da.height);if(ot)switch(lt){case uh:case su:he=135>b?fx(a,y,E,wn,ae,he):gx(a,y,E,wn,ae,he),wn=he.x,ae=he.width,he=he.height;break;case hh:for(St=0;St<tt;St++)Bt=E[St],be=Bt.Da,Gi=ti===0?0:Yt,x?(Bt.S.h(z-be.width,Un+Gi),ae=Math.max(ae,be.width),he=Math.max(he,Un+Gi+be.height),Un+=Gi+be.height):(Bt.S.h($e+Gi,z-be.height),ae=Math.max(ae,$e+Gi+be.width),he=Math.max(he,be.height),$e+=Gi+be.width),ti++;break;case Mu:for(z=0;z<tt;z++)St=E[z],Bt=St.Da,be=ti===0?0:Yt,x?(St.S.h(Ct/2+y.focus.x,Un+be),ae=Math.max(ae,Bt.width),he=Math.max(he,Un+be+Bt.height),Un+=be+Bt.height):(St.S.h($e+be,Ct/2+y.focus.y),ae=Math.max(ae,$e+be+Bt.width),he=Math.max(he,Bt.height),$e+=be+Bt.width),ti++}else for(Gi=0;Gi<tt;Gi++)Oi=E[Gi],wo=Oi.Da,x?(0<St&&0<ti&&$e+Ct+wo.width>St&&($e<z&&zd(y,lt,z-$e,0,jn,Gi-1),oi++,ti=0,jn=Gi,be=he,$e=0,Un=135<b?-he-Yt:he+Yt),zo=ti===0?Bt:Ct,F0(a,Oi,0,Un),Oi.S.h($e+zo,Un),ae=Math.max(ae,$e+zo+wo.width),he=Math.max(he,be+(oi===0?0:Yt)+wo.height),$e+=zo+wo.width):(0<St&&0<ti&&Un+Ct+wo.height>St&&(Un<z&&zd(y,lt,0,z-Un,jn,Gi-1),oi++,ti=0,jn=Gi,be=ae,Un=0,$e=135<b?-ae-Yt:ae+Yt),zo=ti===0?Bt:Ct,F0(a,Oi,$e,0),Oi.S.h($e,Un+zo),he=Math.max(he,Un+zo+wo.height),ae=Math.max(ae,be+(oi===0?0:Yt)+wo.width),Un+=zo+wo.height),ti++;switch(0<oi&&(x?(he+=Math.max(0,rt),$e<ae&&zd(y,lt,ae-$e,0,jn,tt-1),0<Gt&&(gt||Ec(y,Gt,0,0,tt-1),ae+=Gt)):(ae+=Math.max(0,rt),Un<he&&zd(y,lt,0,he-Un,jn,tt-1),0<Gt&&(gt||Ec(y,0,Gt,0,tt-1),he+=Gt))),Gt=gt=0,lt){case Hf:x?gt+=ae/2-y.focus.x-bt/2:Gt+=he/2-y.focus.y-bt/2;break;case Nc:0<oi?x?gt+=ae/2-y.focus.x-bt/2:Gt+=he/2-y.focus.y-bt/2:x?(a=E[0].S.x+E[0].la.x,gt+=a+(E[tt-1].S.x+E[tt-1].la.x+2*E[tt-1].focus.x-a)/2-y.focus.x-bt/2):(a=E[0].S.y+E[0].la.y,Gt+=a+(E[tt-1].S.y+E[tt-1].la.y+2*E[tt-1].focus.y-a)/2-y.focus.y-bt/2);break;case ou:x?(gt-=bt,ae+=bt):(Gt-=bt,he+=bt);break;case ru:x?(gt+=ae-y.width+bt,ae+=bt):(Gt+=he-y.height+bt,he+=bt);break;case uh:case su:x?1<tt?gt+=wn+Ct/2-y.focus.x:gt+=E[0].focus.x-y.focus.x+E[0].la.x:1<tt?Gt+=wn+Ct/2-y.focus.y:Gt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case hh:x?gt+=ae+Ct/2-y.focus.x:Gt+=he+Ct/2-y.focus.y;break;case Mu:break;default:a=a.customAlignment(y,gt,Gt,ae,he),gt=a[0],Gt=a[1],ae=a[2],he=a[3]}for(a=0;a<tt;a++)bt=E[a],x?bt.S.h(bt.S.x+bt.la.x-gt,bt.S.y+(135<b?(ot?-he:-bt.Da.height)+bt.la.y-rt:se+rt+bt.la.y)):bt.S.h(bt.S.x+(135<b?(ot?-ae:-bt.Da.width)+bt.la.x-rt:ut+rt+bt.la.x),bt.S.y+bt.la.y-Gt);x?(ae=Fy(y,ae,gt),0>gt&&(gt=0),135<b&&(Gt+=he+rt),he=Math.max(Math.max(he,se),he+se+rt)):(135<b&&(gt+=ae+rt),ae=Math.max(Math.max(ae,ut),ae+ut+rt),he=Oy(y,he,Gt),0>Gt&&(Gt=0)),y.la.h(gt,Gt),y.Da.h(ae,he)}}ro.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function fx(a,y,x,b,E,z){var tt=x.length;if(tt===0)return new sn(b,0,E,z);if(tt===1)return y=x[0],E=y.Da.width,z=y.Da.height,new sn(b,0,E,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,lt=gl(y)===90,ut=0,gt=0,St=0,Ct=0;Ct<tt;Ct++)if(!(Ct%2!==0||1<tt&&Ct===tt-1)){var bt=x[Ct],Bt=bt.Da,Yt=ut===0?0:rt;if(lt){var Gt=a.computeBusNodeSpacing(bt)-ot;bt.S.h(b-(Bt.width+Gt),St+Yt),E=Math.max(E,Bt.width+Gt),z=Math.max(z,St+Yt+Bt.height),St+=Yt+Bt.height}else Gt=a.computeBusNodeSpacing(bt)-ot,bt.S.h(gt+Yt,b-(Bt.height+Gt)),z=Math.max(z,Bt.height+Gt),E=Math.max(E,gt+Yt+Bt.width),gt+=Yt+Bt.width;ut++}for(ut=0,bt=gt,Ct=St,lt?(gt=b+ot,St=0):(gt=0,St=b+ot),Bt=0;Bt<tt;Bt++)if(Bt%2!==0){Yt=x[Bt],Gt=Yt.Da;var se=ut===0?0:rt;if(lt){var ae=a.computeBusNodeSpacing(Yt)-ot;Yt.S.h(gt+ae,St+se),E=Math.max(E,gt+Gt.width+ae),z=Math.max(z,St+se+Gt.height),St+=se+Gt.height}else ae=a.computeBusNodeSpacing(Yt)-ot,Yt.S.h(gt+se,St+ae),E=Math.max(E,gt+se+Gt.width),z=Math.max(z,St+Gt.height+ae),gt+=se+Gt.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,lt?Math.max(Math.abs(Ct),Math.abs(St)):Math.max(Math.abs(bt),Math.abs(gt))),lt?(x.S.h(b+ot/2-x.focus.x-x.la.x,z+a),lt=b+ot/2-x.focus.x-x.la.x,E=Math.max(E,lt+tt.width),0>lt&&(E-=lt),z=Math.max(z,Math.max(Ct,St)+a+tt.height),0>x.S.x&&(b=T0(y,x.S.x,!1,b,ot))):(x.S.h(E+a,b+ot/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(bt,gt)+a+tt.width),St=b+ot/2-x.focus.y-x.la.y,z=Math.max(z,St+tt.height),0>St&&(z-=St),0>x.S.y&&(b=T0(y,x.S.y,!0,b,ot)))),new sn(b,0,E,z)}function gx(a,y,x,b,E,z){var tt=x.length;if(tt===0)return new sn(b,0,E,z);if(tt===1)return x=x[0],E=x.Da.width,z=x.Da.height,new sn(b,0,E,z);for(var ot=y.nodeSpacing,rt=y.rowSpacing,lt=gl(y)===270,ut=0,gt=0,St=0,Ct=0;Ct<tt;Ct++)if(!(Ct%2!==0||1<tt&&Ct===tt-1)){var bt=x[Ct],Bt=bt.Da,Yt=ut===0?0:rt;if(lt){var Gt=a.computeBusNodeSpacing(bt)-ot;St-=Yt+Bt.height,bt.S.h(b-(Bt.width+Gt),St),E=Math.max(E,Bt.width+Gt),z=Math.max(z,Math.abs(St))}else Gt=a.computeBusNodeSpacing(bt)-ot,gt-=Yt+Bt.width,bt.S.h(gt,b-(Bt.height+Gt)),z=Math.max(z,Bt.height+Gt),E=Math.max(E,Math.abs(gt));ut++}for(ut=0,bt=gt,Ct=St,lt?(gt=b+ot,St=0):(gt=0,St=b+ot),Bt=0;Bt<tt;Bt++)if(Bt%2!==0){Yt=x[Bt],Gt=Yt.Da;var se=ut===0?0:rt;if(lt){var ae=a.computeBusNodeSpacing(Yt)-ot;St-=se+Gt.height,Yt.S.h(gt+ae,St),E=Math.max(E,gt+Gt.width+ae),z=Math.max(z,Math.abs(St))}else ae=a.computeBusNodeSpacing(Yt)-ot,gt-=se+Gt.width,Yt.S.h(gt,St+ae),z=Math.max(z,St+Gt.height+ae),E=Math.max(E,Math.abs(gt));ut++}for(1<tt&&tt%2===1&&(rt=x[tt-1],ut=rt.Da,a=a.computeBusLastRowSpacing(rt,lt?Math.max(Math.abs(Ct),Math.abs(St)):Math.max(Math.abs(bt),Math.abs(gt))),lt?(rt.S.h(b+ot/2-rt.focus.x-rt.la.x,-z-ut.height-a),gt=b+ot/2-rt.focus.x-rt.la.x,E=Math.max(E,gt+ut.width),0>gt&&(E-=gt),z=Math.max(z,Math.abs(Math.min(Ct,St))+a+ut.height),0>rt.S.x&&(b=T0(y,rt.S.x,!1,b,ot))):(rt.S.h(-E-ut.width-a,b+ot/2-rt.focus.y-rt.la.y),E=Math.max(E,Math.abs(Math.min(bt,gt))+a+ut.width),St=b+ot/2-rt.focus.y-rt.la.y,z=Math.max(z,St+ut.height),0>St&&(z-=St),0>rt.S.y&&(b=T0(y,rt.S.y,!0,b,ot)))),y=0;y<tt;y++)ot=x[y],lt?ot.S.h(ot.S.x,ot.S.y+z):ot.S.h(ot.S.x+E,ot.S.y);return new sn(b,0,E,z)}ro.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},ro.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function T0(a,y,x,b,E){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Fy(a,y,x){switch(a.alignment){case Nc:case Hf:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ou:return a.width>y?a.width:y;case ru:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case uh:case su:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case hh:return a.width-a.focus.x+a.nodeSpacing/2+y;case Mu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Oy(a,y,x){switch(a.alignment){case Nc:case Hf:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ou:return a.height>y?a.height:y;case ru:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case uh:case su:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case hh:return a.height-a.focus.y+a.nodeSpacing/2+y;case Mu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Dy(a,y,x){switch(a){case Hf:y/=2,x/=2;break;case Nc:y/=2,x/=2;break;case ou:x=y=0;break;case ru:break;default:le("Unhandled alignment value "+a.toString())}return new zt(y,x)}function zd(a,y,x,b,E,z){y=Dy(y,x,b),Ec(a,y.x,y.y,E,z)}function Ec(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var z=a[b].S;z.x+=y,z.y+=x}}function F0(a,y,x,b){var E=y.parent;switch(a.ud){case iu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case kc:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:le("Unhandled path value "+a.ud.toString())}}function O0(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function px(a,y,x,b,E,z,tt,ot){var rt=gl(y),lt=rt===90||rt===270,ut=y.nodeSpacing;y=b;var gt=E;b=z;var St=tt,Ct=x.Yo,bt=x.kp;tt=x.Da;var Bt=lt?Math.max(St,tt.height):Math.max(b,tt.width);if((Ct===null||rt!==gl(x))&&(Ct=ea(a,2),bt=ea(a,2),lt?(Ct[0].h(0,0),Ct[1].h(0,tt.height),bt[0].h(tt.width,0),bt[1].h(bt[0].x,Ct[1].y)):(Ct[0].h(0,0),Ct[1].h(tt.width,0),bt[0].h(0,tt.height),bt[1].h(Ct[1].x,bt[0].y))),lt){if(St=9999999,!(gt===null||2>gt.length||Ct===null||2>Ct.length))for(E=x=0;x<gt.length&&E<Ct.length;){z=gt[x];var Yt=Ct[E];rt=Yt.x,lt=Yt.y,rt+=b;var Gt=z;x+1<gt.length&&(Gt=gt[x+1]);var se=Yt;Yt=se.x,se=se.y,E+1<Ct.length&&(se=Ct[E+1],Yt=se.x,se=se.y,Yt+=b);var ae=St;z.y===lt?ae=rt-z.x:z.y>lt&&z.y<se?ae=rt+(z.y-lt)/(se-lt)*(Yt-rt)-z.x:lt>z.y&<<Gt.y&&(ae=rt-(z.x+(lt-z.y)/(Gt.y-z.y)*(Gt.x-z.x))),ae<St&&(St=ae),Gt.y<=z.y?x++:se<=lt?E++:(Gt.y<=se&&x++,se<=Gt.y&&E++)}if(St=b-St,St+=ut,x=Ct,E=St,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ut=ea(a,y.length+x.length),b=z=rt=0;z<x.length&&x[z].y<y[0].y;)lt=x[z++],ut[b++].h(lt.x+E,lt.y);for(;rt<y.length;)lt=y[rt++],ut[b++].h(lt.x,lt.y);for(rt=y[y.length-1].y;z<x.length&&x[z].y<=rt;)z++;for(;z<x.length&&x[z].y>rt;)lt=x[z++],ut[b++].h(lt.x+E,lt.y);for(x=ea(a,b),rt=0;rt<b;rt++)x[rt].assign(ut[rt]);Cl(a,ut),b=x}if(z=bt,rt=St,gt===null||2>gt.length||z===null||2>z.length)E=null;else{for(ut=ea(a,gt.length+z.length),E=lt=x=0;x<gt.length&>[x].y<z[0].y;)Gt=gt[x++],ut[E++].h(Gt.x,Gt.y);for(;lt<z.length;)Gt=z[lt++],ut[E++].h(Gt.x+rt,Gt.y);for(z=z[z.length-1].y;x<gt.length&>[x].y<=z;)x++;for(;x<gt.length&>[x].y>z;)rt=gt[x++],ut[E++].h(rt.x,rt.y);for(z=ea(a,E),x=0;x<E;x++)z[x].assign(ut[x]);Cl(a,ut),E=z}return z=Math.max(0,St)+tt.width,tt=Bt,Cl(a,y),Cl(a,Ct),Cl(a,gt),Cl(a,bt),ot[0]=b,ot[1]=E,new sn(St,0,z,tt)}if(b=9999999,!(gt===null||2>gt.length||Ct===null||2>Ct.length))for(E=x=0;x<gt.length&&E<Ct.length;)z=gt[x],Yt=Ct[E],rt=Yt.x,lt=Yt.y,lt+=St,Gt=z,x+1<gt.length&&(Gt=gt[x+1]),se=Yt,Yt=se.x,se=se.y,E+1<Ct.length&&(se=Ct[E+1],Yt=se.x,se=se.y,se+=St),ae=b,z.x===rt?ae=lt-z.y:z.x>rt&&z.x<Yt?ae=lt+(z.x-rt)/(Yt-rt)*(se-lt)-z.y:rt>z.x&&rt<Gt.x&&(ae=lt-(z.y+(rt-z.x)/(Gt.x-z.x)*(Gt.y-z.y))),ae<b&&(b=ae),Gt.x<=z.x?x++:Yt<=rt?E++:(Gt.x<=Yt&&x++,Yt<=Gt.x&&E++);if(St-=b,St+=ut,x=Ct,E=St,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ut=ea(a,y.length+x.length),b=z=rt=0;z<x.length&&x[z].x<y[0].x;)lt=x[z++],ut[b++].h(lt.x,lt.y+E);for(;rt<y.length;)lt=y[rt++],ut[b++].h(lt.x,lt.y);for(rt=y[y.length-1].x;z<x.length&&x[z].x<=rt;)z++;for(;z<x.length&&x[z].x>rt;)lt=x[z++],ut[b++].h(lt.x,lt.y+E);for(x=ea(a,b),rt=0;rt<b;rt++)x[rt].assign(ut[rt]);Cl(a,ut),b=x}if(z=bt,rt=St,gt===null||2>gt.length||z===null||2>z.length)E=null;else{for(ut=ea(a,gt.length+z.length),E=lt=x=0;x<gt.length&>[x].x<z[0].x;)Gt=gt[x++],ut[E++].h(Gt.x,Gt.y);for(;lt<z.length;)Gt=z[lt++],ut[E++].h(Gt.x,Gt.y+rt);for(z=z[z.length-1].x;x<gt.length&>[x].x<=z;)x++;for(;x<gt.length&>[x].x>z;)rt=gt[x++],ut[E++].h(rt.x,rt.y);for(z=ea(a,E),x=0;x<E;x++)z[x].assign(ut[x]);Cl(a,ut),E=z}return z=Bt,tt=Math.max(0,St)+tt.height,Cl(a,y),Cl(a,Ct),Cl(a,gt),Cl(a,bt),ot[0]=b,ot[1]=E,new sn(St,0,z,tt)}function ea(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 zt;return a}function Cl(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}ro.prototype.arrangeTrees=function(){if(this.Rb===R0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof tl){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),By(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof tl&&a.push(x);switch(this.sorting){case zf:break;case Pp:a.reverse();break;case wp:a.sort(this.comparer);break;case Cp:a.sort(this.comparer),a.reverse();break;default:le("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(By(this,E,y+E.la.x,x+E.la.y),this.Rb){case I0:x+=E.Da.height+this.$d.height;break;case jy:y+=E.Da.width+this.$d.width;break;default:le("Unhandled arrangement value "+this.Rb.toString())}}}};function By(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,z=0;z<E;z++){var tt=y[z];By(a,tt,x+tt.S.x,b+tt.S.y)}}}ro.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},ro.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},ro.prototype.Gu=function(){if(this.layerStyle===j0){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 z=y[E.level];z===void 0?z=this.computeLayerSpacing(E):z=Math.max(z,this.computeLayerSpacing(E)),y[E.level]=z}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 zt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new zt(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var ot=a[tt]+y[tt];this.angle===270?(z-=ot,E.push(new sn(0,z,x,ot))):this.angle===90?(E.push(new sn(0,z,x,ot)),z+=ot):this.angle===180?(z-=ot,E.push(new sn(z,0,ot,x))):(E.push(new sn(z,0,ot,x)),z+=ot)}this.commitLayers(E,b)}},ro.prototype.commitLayers=function(){},ro.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},ro.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof tl&&mx(this,y)}};function mx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)mx(a,y[b])}}ro.prototype.setPortSpots=function(a){var y=a.alignment;if(td(y)){var x=this.ud===iu,b=gl(a);switch(b){case 0:var E=xr;break;case 90:E=yr;break;case 180:E=Sr;break;default:E=gr}var z=a.children,tt=z.length;switch(y){case uh:case su:for(y=0;y<tt;y++){var ot=z[y];if(ot=(x?ot.sourceEdges:ot.destinationEdges).first(),ot!==null&&(ot=ot.link,ot!==null)){var rt=b===90||b===270?Sr:gr;if(tt===1||y===tt-1&&tt%2===1)switch(b){case 0:rt=Sr;break;case 90:rt=gr;break;case 180:rt=xr;break;default:rt=yr}else y%2===0&&(rt=b===90||b===270?xr:yr);x?(a.setsPortSpot&&(ot.fromSpot=E),a.setsChildPortSpot&&(ot.toSpot=rt)):(a.setsPortSpot&&(ot.fromSpot=rt),a.setsChildPortSpot&&(ot.toSpot=E))}}break;case hh:for(b=b===90||b===270?xr:yr,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)):(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)));break;case Mu:for(b=b===90||b===270?Sr:gr,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)):(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)))}}else if(x=gl(a),this.ud===iu){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=xr;break;case 90:b.fromSpot=yr;break;case 180:b.fromSpot=Sr;break;default:b.fromSpot=gr}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Sr;break;case 90:b.toSpot=gr;break;case 180:b.toSpot=xr;break;default:b.toSpot=yr}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=xr;break;case 90:b.toSpot=yr;break;case 180:b.toSpot=Sr;break;default:b.toSpot=gr}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Sr;break;case 90:b.fromSpot=gr;break;case 180:b.fromSpot=xr;break;default:b.fromSpot=yr}else b.fromSpot=a.childPortSpot}};function gl(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}ro.prototype.computeLayerSpacing=function(a){var y=gl(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},ro.prototype.computeNodeIndent=function(a){var y=gl(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)},_t.Object.defineProperties(ro.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!==A0&&a!==Iy&&a!==Ay&&a!==Ry||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==zy&&a!==Hy&&a!==j0||(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!==I0&&a!==jy&&a!==R0||(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!==zf&&a!==Pp&&a!==wp&&!Cp||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):le("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==B0&&a!==bp||(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!==zf&&a!==Pp&&a!==wp&&!Cp||(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!==B0&&a!==bp||(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 D0=new nn(ro,"PathDefault",-1),iu=new nn(ro,"PathDestination",0),kc=new nn(ro,"PathSource",1),zf=new nn(ro,"SortingForwards",10),Pp=new nn(ro,"SortingReverse",11),wp=new nn(ro,"SortingAscending",12),Cp=new nn(ro,"SortingDescending",13),Hf=new nn(ro,"AlignmentCenterSubtrees",20),Nc=new nn(ro,"AlignmentCenterChildren",21),ou=new nn(ro,"AlignmentStart",22),ru=new nn(ro,"AlignmentEnd",23),uh=new nn(ro,"AlignmentBus",24),su=new nn(ro,"AlignmentBusBranching",25),hh=new nn(ro,"AlignmentTopLeftBus",26),Mu=new nn(ro,"AlignmentBottomRightBus",27),B0=new nn(ro,"CompactionNone",30),bp=new nn(ro,"CompactionBlock",31),A0=new nn(ro,"StyleLayered",40),Ay=new nn(ro,"StyleLastParents",41),Iy=new nn(ro,"StyleAlternating",42),Ry=new nn(ro,"StyleRootOnly",43),I0=new nn(ro,"ArrangementVertical",50),jy=new nn(ro,"ArrangementHorizontal",51),R0=new nn(ro,"ArrangementFixedRoots",52),zy=new nn(ro,"LayerIndividual",60),Hy=new nn(ro,"LayerSiblings",61),j0=new nn(ro,"LayerUniform",62);ro.className="TreeLayout",ro.PathDefault=D0,ro.PathDestination=iu,ro.PathSource=kc,ro.SortingForwards=zf,ro.SortingReverse=Pp,ro.SortingAscending=wp,ro.SortingDescending=Cp,ro.AlignmentCenterSubtrees=Hf,ro.AlignmentCenterChildren=Nc,ro.AlignmentStart=ou,ro.AlignmentEnd=ru,ro.AlignmentBus=uh,ro.AlignmentBusBranching=su,ro.AlignmentTopLeftBus=hh,ro.AlignmentBottomRightBus=Mu,ro.CompactionNone=B0,ro.CompactionBlock=bp,ro.StyleLayered=A0,ro.StyleLastParents=Ay,ro.StyleAlternating=Iy,ro.StyleRootOnly=Ry,ro.ArrangementVertical=I0,ro.ArrangementHorizontal=jy,ro.ArrangementFixedRoots=R0,ro.LayerIndividual=zy,ro.LayerSiblings=Hy,ro.LayerUniform=j0;function Tc(a){Wo.call(this,a)}Be(Tc,Wo),Tc.prototype.createVertex=function(){return new tl(this)},Tc.prototype.createEdge=function(){return new Gf(this)},Tc.className="TreeNetwork";function tl(a){Gr.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 zt(0,0),this.Da=new Wn(0,0),this.la=new zt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=zf,this.hd=sy,this.Kb=0,this.Jb=Nc,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=bp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=wi,this.wr=!0,this.Dp=wi}Be(tl,Gr),tl.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)},_t.Object.defineProperties(tl.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)}}}),tl.className="TreeVertex";function Gf(a){ga.call(this,a),this.$t=new zt(0,0)}Be(Gf,ga),Gf.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 iu:x=this.fromVertex,b=this.toVertex;break;case kc:x=this.toVertex,b=this.fromVertex;break;default:le("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 z=gl(x),tt=y.computeLayerSpacing(x),ot=x.rowSpacing;a.vg();var rt=a.curve===Ea,lt=a.isOrthogonal,ut;if(a.uh(),lt||rt){for(ut=2;4<a.pointsCount;)a.pv(2);var gt=a.i(1),St=a.i(2)}else{for(ut=1;3<a.pointsCount;)a.pv(1);gt=a.i(0),St=a.i(a.pointsCount-1)}var Ct=a.i(a.pointsCount-1);z===0?(x.alignment===ru?(z=b.bottom+E.y,E.y===0&>.y>Ct.y+x.rowIndent&&(z=Math.min(z,Math.max(gt.y,z-y.computeNodeIndent(x))))):x.alignment===ou?(z=b.top+E.y,E.y===0&>.y<Ct.y-x.rowIndent&&(z=Math.max(z,Math.min(gt.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,rt?(a.m(ut,gt.x,z),ut++,a.m(ut,b.right+tt,z),ut++,a.m(ut,b.right+tt+(E.x-ot)/3,z),ut++,a.m(ut,b.right+tt+2*(E.x-ot)/3,z),ut++,a.m(ut,b.right+tt+(E.x-ot),z),ut++,a.m(ut,St.x,z)):(lt&&(a.m(ut,b.right+tt/2,gt.y),ut++),a.m(ut,b.right+tt/2,z),ut++,a.m(ut,b.right+tt+E.x-(lt?ot/2:ot),z),ut++,lt&&a.m(ut,a.i(ut-1).x,St.y))):z===90?(x.alignment===ru?(z=b.right+E.x,E.x===0&>.x>Ct.x+x.rowIndent&&(z=Math.min(z,Math.max(gt.x,z-y.computeNodeIndent(x))))):x.alignment===ou?(z=b.left+E.x,E.x===0&>.x<Ct.x-x.rowIndent&&(z=Math.max(z,Math.min(gt.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,rt?(a.m(ut,z,gt.y),ut++,a.m(ut,z,b.bottom+tt),ut++,a.m(ut,z,b.bottom+tt+(E.y-ot)/3),ut++,a.m(ut,z,b.bottom+tt+2*(E.y-ot)/3),ut++,a.m(ut,z,b.bottom+tt+(E.y-ot)),ut++,a.m(ut,z,St.y)):(lt&&(a.m(ut,gt.x,b.bottom+tt/2),ut++),a.m(ut,z,b.bottom+tt/2),ut++,a.m(ut,z,b.bottom+tt+E.y-(lt?ot/2:ot)),ut++,lt&&a.m(ut,St.x,a.i(ut-1).y))):z===180?(x.alignment===ru?(z=b.bottom+E.y,E.y===0&>.y>Ct.y+x.rowIndent&&(z=Math.min(z,Math.max(gt.y,z-y.computeNodeIndent(x))))):x.alignment===ou?(z=b.top+E.y,E.y===0&>.y<Ct.y-x.rowIndent&&(z=Math.max(z,Math.min(gt.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,rt?(a.m(ut,gt.x,z),ut++,a.m(ut,b.left-tt,z),ut++,a.m(ut,b.left-tt+(E.x+ot)/3,z),ut++,a.m(ut,b.left-tt+2*(E.x+ot)/3,z),ut++,a.m(ut,b.left-tt+(E.x+ot),z),ut++,a.m(ut,St.x,z)):(lt&&(a.m(ut,b.left-tt/2,gt.y),ut++),a.m(ut,b.left-tt/2,z),ut++,a.m(ut,b.left-tt+E.x+(lt?ot/2:ot),z),ut++,lt&&a.m(ut,a.i(ut-1).x,St.y))):z===270?(x.alignment===ru?(z=b.right+E.x,E.x===0&>.x>Ct.x+x.rowIndent&&(z=Math.min(z,Math.max(gt.x,z-y.computeNodeIndent(x))))):x.alignment===ou?(z=b.left+E.x,E.x===0&>.x<Ct.x-x.rowIndent&&(z=Math.max(z,Math.min(gt.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,rt?(a.m(ut,z,gt.y),ut++,a.m(ut,z,b.top-tt),ut++,a.m(ut,z,b.top-tt+(E.y+ot)/3),ut++,a.m(ut,z,b.top-tt+2*(E.y+ot)/3),ut++,a.m(ut,z,b.top-tt+(E.y+ot)),ut++,a.m(ut,z,St.y)):(lt&&(a.m(ut,gt.x,b.top-tt/2),ut++),a.m(ut,z,b.top-tt/2),ut++,a.m(ut,z,b.top-tt+E.y+(lt?ot/2:ot)),ut++,lt&&a.m(ut,St.x,a.i(ut-1).y))):le("Invalid angle "+z),a.zf()}else E=b,a=this.link,b=this.network.layout,y=gl(x),y!==gl(E)&&(tt=b.computeLayerSpacing(x),ot=x.bounds,x=E.bounds,y===0&&x.left-ot.right<tt+1||y===90&&x.top-ot.bottom<tt+1||y===180&&ot.left-x.right<tt+1||y===270&&ot.top-x.bottom<tt+1||(a.vg(),x=a.curve===Ea,E=a.isOrthogonal,b=td(this.fromVertex.alignment),a.uh(),y===0?(y=ot.right+tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):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=ot.bottom+tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):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=ot.left-tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):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=ot.top-tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):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()))}}},_t.Object.defineProperties(Gf.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)}}}),Gf.className="TreeEdge",qo.prototype.initializeStandardTools=function(){this.gb("Action",new Va,this.mouseDownTools),this.gb("Relinking",new wa,this.mouseDownTools),this.gb("LinkReshaping",new Lr,this.mouseDownTools),this.gb("Rotating",new ks,this.mouseDownTools),this.gb("Resizing",new ds,this.mouseDownTools),this.gb("Linking",new Es,this.mouseMoveTools),this.gb("Dragging",new rr,this.mouseMoveTools),this.gb("DragSelecting",new Oa,this.mouseMoveTools),this.gb("Panning",new ss,this.mouseMoveTools),this.gb("ContextMenu",new Ns,this.mouseUpTools),this.gb("TextEditing",new _o,this.mouseUpTools),this.gb("ClickCreating",new $u,this.mouseUpTools),this.gb("ClickSelecting",new Eh,this.mouseUpTools)},Rl("Horizontal",new fm),Rl("Spot",new pm),Rl("Table",new vm),Rl("Viewbox",new xm),Rl("TableRow",new ym),Rl("TableColumn",new Sm),Rl("Graduated",new Hg),Rl("Grid",new zg),hf.add("GraphLinksModel",Ur),hf.add("TreeModel",Ha);var z0=ie.go,Gy={get licenseKey(){return Ze.licenseKey},set licenseKey(a){Ze.licenseKey=a},get version(){return Ze.version},Group:Ki,EnumValue:nn,List:qe,Set:tn,Map:Yn,Point:zt,Size:Wn,Rect:sn,Margin:mi,Spot:ri,Geometry:Kn,PathFigure:Wr,PathSegment:Po,InputEvent:ms,DiagramEvent:Au,ChangedEvent:ir,Model:ci,GraphLinksModel:fo,TreeModel:Rs,Binding:Er,Transaction:Vr,UndoManager:or,CommandHandler:Xt,Tool:yo,DraggingTool:rr,DraggingInfo:xu,DraggingOptions:st,LinkingBaseTool:pr,LinkingTool:Es,RelinkingTool:wa,LinkReshapingTool:Lr,ResizingTool:ds,RotatingTool:ks,ClickSelectingTool:Eh,ActionTool:Va,ClickCreatingTool:$u,HTMLInfo:Ol,ContextMenuTool:Ns,DragSelectingTool:Oa,PanningTool:ss,TextEditingTool:_o,ToolManager:qo,Animation:as,AnimationManager:da,AnimationTrigger:sl,Layer:Yr,Diagram:Ze,Palette:ct,Overview:pt,Brush:To,GraphObject:Me,Panel:Dn,RowColumnDefinition:Ir,Shape:Xi,TextBlock:Go,Picture:Us,Part:vi,Adornment:So,Node:Xn,Link:Hn,Placeholder:Ds,Layout:Jo,LayoutNetwork:Wo,LayoutVertex:Gr,LayoutEdge:ga,GridLayout:ns,PanelLayout:Hr,CircularLayout:sr,CircularNetwork:If,CircularVertex:gp,CircularEdge:S0,ForceDirectedLayout:us,ForceDirectedNetwork:Mc,ForceDirectedVertex:pp,ForceDirectedEdge:mp,LayeredDigraphLayout:Do,LayeredDigraphNetwork:jf,LayeredDigraphVertex:Wa,LayeredDigraphEdge:Sp,TreeLayout:ro,TreeNetwork:Tc,TreeVertex:tl,TreeEdge:Gf};typeof z0=="object"&&z0.version&&si("WARNING: a `go` object on the root object is already defined. "+("Debug"in z0?"debug ":"")+"version: "+z0.version+", replaced with version: "+Gy.version),Ze.prototype.go=Gy,ie.go=Gy,typeof Sn.exports=="object"&&(Sn.exports=typeof Pt.g!="undefined"?Pt.g.go:self.go)}();var vt=typeof Pt.g!="undefined"?Pt.g.go:self.go;const It=typeof Pt.g!="undefined"?Pt.g.go:self.go,oe=It.Group,de=It.EnumValue,$t=It.List,Ut=It.Set,Jt=It.Map,De=It.Point,we=It.Size,te=It.Rect,Fe=It.Margin,re=It.Spot,me=It.Geometry,Ot=It.PathFigure,et=It.PathSegment,nt=It.InputEvent,ht=It.DiagramEvent,at=It.ChangedEvent,ft=It.Model,mt=It.GraphLinksModel,wt=It.TreeModel,Et=It.Binding,Nt=It.Transaction,Dt=It.UndoManager,At=It.CommandHandler,Kt=It.Tool,Wt=It.DraggingTool,xe=It.DraggingInfo,Vt=It.LinkingBaseTool,Ie=It.LinkingTool,Se=It.RelinkingTool,Ye=It.LinkReshapingTool,Le=It.ResizingTool,Pe=It.RotatingTool,We=It.ClickSelectingTool,Ue=It.ActionTool,ue=It.ClickCreatingTool,Ht=It.HTMLInfo,ke=It.ContextMenuTool,pn=It.DragSelectingTool,ln=It.PanningTool,Ee=It.TextEditingTool,Ke=It.ToolManager,gn=It.Animation,Bn=It.AnimationManager,dn=It.AnimationTrigger,In=It.Layer,Ce=It.Diagram,$n=It.Palette,Qn=It.Overview,jt=It.Brush,Lt=It.GraphObject,xt=It.Panel,Tt=It.RowColumnDefinition,Ft=It.Shape,yt=It.TextBlock,ee=It.TextBlockMetrics,pe=It.Picture,qt=It.Part,Zt=It.Adornment,fe=It.Node,ce=It.Link,ne=It.Placeholder,Ne=It.Layout,hn=It.LayoutNetwork,an=It.LayoutVertex,_e=It.LayoutEdge,En=It.GridLayout,Ln=It.PanelLayout,ye=It.CircularLayout,on=It.CircularNetwork,Pn=It.CircularVertex,Cn=It.CircularEdge,An=It.ForceDirectedLayout,Jn=It.ForceDirectedNetwork,ui=It.ForceDirectedVertex,ni=It.ForceDirectedEdge,fi=It.LayeredDigraphLayout,Bi=It.LayeredDigraphNetwork,Ti=It.LayeredDigraphVertex,Di=It.LayeredDigraphEdge,io=It.TreeLayout,to=It.TreeNetwork,Ri=It.TreeVertex,Qi=It.TreeEdge,Zn=It.version},2859:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{hP:function(){return Qn}});var vt=function(jt,Lt){return(vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(xt,Tt){xt.__proto__=Tt}||function(xt,Tt){for(var Ft in Tt)Object.prototype.hasOwnProperty.call(Tt,Ft)&&(xt[Ft]=Tt[Ft])})(jt,Lt)};function It(jt,Lt){function xt(){this.constructor=jt}vt(jt,Lt),jt.prototype=Lt===null?Object.create(Lt):(xt.prototype=Lt.prototype,new xt)}function oe(jt,Lt,xt,Tt){return new(xt||(xt=Promise))(function(Ft,yt){function ee(Zt){try{qt(Tt.next(Zt))}catch(fe){yt(fe)}}function pe(Zt){try{qt(Tt.throw(Zt))}catch(fe){yt(fe)}}function qt(Zt){var fe;Zt.done?Ft(Zt.value):(fe=Zt.value,fe instanceof xt?fe:new xt(function(ce){ce(fe)})).then(ee,pe)}qt((Tt=Tt.apply(jt,Lt||[])).next())})}function de(jt,Lt){var xt,Tt,Ft,yt,ee={label:0,sent:function(){if(1&Ft[0])throw Ft[1];return Ft[1]},trys:[],ops:[]};return yt={next:pe(0),throw:pe(1),return:pe(2)},typeof Symbol=="function"&&(yt[Symbol.iterator]=function(){return this}),yt;function pe(qt){return function(Zt){return function(fe){if(xt)throw new TypeError("Generator is already executing.");for(;ee;)try{if(xt=1,Tt&&(Ft=2&fe[0]?Tt.return:fe[0]?Tt.throw||((Ft=Tt.return)&&Ft.call(Tt),0):Tt.next)&&!(Ft=Ft.call(Tt,fe[1])).done)return Ft;switch(Tt=0,Ft&&(fe=[2&fe[0],Ft.value]),fe[0]){case 0:case 1:Ft=fe;break;case 4:return ee.label++,{value:fe[1],done:!1};case 5:ee.label++,Tt=fe[1],fe=[0];continue;case 7:fe=ee.ops.pop(),ee.trys.pop();continue;default:if(Ft=ee.trys,!((Ft=Ft.length>0&&Ft[Ft.length-1])||fe[0]!==6&&fe[0]!==2)){ee=0;continue}if(fe[0]===3&&(!Ft||fe[1]>Ft[0]&&fe[1]<Ft[3])){ee.label=fe[1];break}if(fe[0]===6&&ee.label<Ft[1]){ee.label=Ft[1],Ft=fe;break}if(Ft&&ee.label<Ft[2]){ee.label=Ft[2],ee.ops.push(fe);break}Ft[2]&&ee.ops.pop(),ee.trys.pop();continue}fe=Lt.call(jt,ee)}catch(ce){fe=[6,ce],Tt=0}finally{xt=Ft=0}if(5&fe[0])throw fe[1];return{value:fe[0]?fe[1]:void 0,done:!0}}([qt,Zt])}}}function $t(){for(var jt=0,Lt=0,xt=arguments.length;Lt<xt;Lt++)jt+=arguments[Lt].length;var Tt=Array(jt),Ft=0;for(Lt=0;Lt<xt;Lt++)for(var yt=arguments[Lt],ee=0,pe=yt.length;ee<pe;ee++,Ft++)Tt[Ft]=yt[ee];return Tt}var Ut=function(){function jt(){}return jt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},jt.setAttributes=function(Lt,xt){for(var Tt=0,Ft=xt;Tt<Ft.length;Tt++){var yt=Ft[Tt],ee=yt[0],pe=yt[1];Lt.setAttribute(ee,pe)}},jt.createRect=function(Lt,xt,Tt){var Ft=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ft.setAttribute("width",Lt.toString()),Ft.setAttribute("height",xt.toString()),Tt&&jt.setAttributes(Ft,Tt),Ft},jt.createLine=function(Lt,xt,Tt,Ft,yt){var ee=document.createElementNS("http://www.w3.org/2000/svg","line");return ee.setAttribute("x1",Lt.toString()),ee.setAttribute("y1",xt.toString()),ee.setAttribute("x2",Tt.toString()),ee.setAttribute("y2",Ft.toString()),yt&&jt.setAttributes(ee,yt),ee},jt.createPolygon=function(Lt,xt){var Tt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Tt.setAttribute("points",Lt),xt&&jt.setAttributes(Tt,xt),Tt},jt.createCircle=function(Lt,xt){var Tt=document.createElementNS("http://www.w3.org/2000/svg","circle");return Tt.setAttribute("cx",(Lt/2).toString()),Tt.setAttribute("cy",(Lt/2).toString()),Tt.setAttribute("r",Lt.toString()),xt&&jt.setAttributes(Tt,xt),Tt},jt.createEllipse=function(Lt,xt,Tt){var Ft=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ft.setAttribute("cx",(Lt/2).toString()),Ft.setAttribute("cy",(xt/2).toString()),Ft.setAttribute("rx",(Lt/2).toString()),Ft.setAttribute("ry",(xt/2).toString()),Tt&&jt.setAttributes(Ft,Tt),Ft},jt.createGroup=function(Lt){var xt=document.createElementNS("http://www.w3.org/2000/svg","g");return Lt&&jt.setAttributes(xt,Lt),xt},jt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},jt.createMarker=function(Lt,xt,Tt,Ft,yt,ee,pe){var qt=document.createElementNS("http://www.w3.org/2000/svg","marker");return jt.setAttributes(qt,[["id",Lt],["orient",xt],["markerWidth",Tt.toString()],["markerHeight",Ft.toString()],["refX",yt.toString()],["refY",ee.toString()]]),qt.appendChild(pe),qt},jt.createText=function(Lt){var xt=document.createElementNS("http://www.w3.org/2000/svg","text");return xt.setAttribute("x","0"),xt.setAttribute("y","0"),Lt&&jt.setAttributes(xt,Lt),xt},jt.createTSpan=function(Lt,xt){var Tt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Tt.textContent=Lt,xt&&jt.setAttributes(Tt,xt),Tt},jt.createImage=function(Lt){var xt=document.createElementNS("http://www.w3.org/2000/svg","image");return Lt&&jt.setAttributes(xt,Lt),xt},jt.createPoint=function(Lt,xt){var Tt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Tt.x=Lt,Tt.y=xt,Tt},jt.createPath=function(Lt,xt){var Tt=document.createElementNS("http://www.w3.org/2000/svg","path");return Tt.setAttribute("d",Lt),xt&&jt.setAttributes(Tt,xt),Tt},jt}(),Jt=function(){function jt(){}return jt.addKey=function(Lt){jt.key=Lt},Object.defineProperty(jt,"isLicensed",{get:function(){return!!jt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(jt.key)},enumerable:!1,configurable:!0}),jt}(),De=function(){function jt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return jt.prototype.rasterize=function(Lt,xt,Tt){var Ft=this;return new Promise(function(yt){var ee=Tt!==void 0?Tt:document.createElement("canvas");Lt===null&&(Ft.markersOnly=!0,Ft.naturalSize=!1);var pe=document.createElementNS("http://www.w3.org/2000/svg","svg");pe.setAttribute("xmlns","http://www.w3.org/2000/svg"),pe.setAttribute("width",xt.width.baseVal.valueAsString),pe.setAttribute("height",xt.height.baseVal.valueAsString),pe.setAttribute("viewBox","0 0 "+xt.viewBox.baseVal.width.toString()+" "+xt.viewBox.baseVal.height.toString()),pe.innerHTML=xt.innerHTML,Ft.naturalSize===!0?(pe.width.baseVal.value=Lt.naturalWidth,pe.height.baseVal.value=Lt.naturalHeight):Ft.width!==void 0&&Ft.height!==void 0&&(pe.width.baseVal.value=Ft.width,pe.height.baseVal.value=Ft.height),ee.width=pe.width.baseVal.value,ee.height=pe.height.baseVal.value;var qt=pe.outerHTML,Zt=ee.getContext("2d");Ft.markersOnly!==!0&&Zt.drawImage(Lt,0,0,ee.width,ee.height);var fe=window.URL,ce=new Image(ee.width,ee.height);ce.setAttribute("crossOrigin","anonymous");var ne=new Blob([qt],{type:"image/svg+xml"}),Ne=fe.createObjectURL(ne);ce.onload=function(){Zt.drawImage(ce,0,0),fe.revokeObjectURL(Ne);var hn=ee.toDataURL(Ft.imageType,Ft.imageQuality);yt(hn)},ce.src=Ne})},jt}(),we=function(){},te=function(){function jt(Lt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Lt+"_"}return Object.defineProperty(jt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),jt.prototype.addClass=function(Lt){return this.styleSheet===void 0&&this.addStyleSheet(),Lt.name=""+this.classNamePrefix+Lt.localName,this.classes.push(Lt),this.styleSheet.sheet.insertRule("."+Lt.name+" {"+Lt.style+"}",this.styleSheet.sheet.cssRules.length),Lt},jt.prototype.addRule=function(Lt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Lt),this.styleSheet.sheet.insertRule(Lt.selector+" {"+Lt.style+"}",this.styleSheet.sheet.cssRules.length)},jt.prototype.addStyleSheet=function(){var Lt;this.styleSheet=document.createElement("style"),((Lt=this.styleSheetRoot)!==null&&Lt!==void 0?Lt:document.head).appendChild(this.styleSheet),this.addRule(new Fe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Fe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Fe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new re("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new re("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},jt.prototype.removeStyleSheet=function(){var Lt;this.styleSheet&&(((Lt=this.styleSheetRoot)!==null&&Lt!==void 0?Lt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},jt}(),Fe=function(jt,Lt){this.selector=jt,this.style=Lt},re=function(jt,Lt){this.localName=jt,this.style=Lt},me=function(){function jt(Lt,xt,Tt,Ft,yt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Lt,this.displayMode=xt,this.markerItems=Tt,this.uiStyleSettings=Ft,this.styles=yt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return jt.prototype.show=function(Lt){var xt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Tt=document.createElement("div");Tt.className=this.toolbarBlockStyleClass.name,Tt.style.whiteSpace="nowrap",this.uiContainer.appendChild(Tt),this.addActionButton(Tt,'<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(Tt,'<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(Tt,'<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(Tt,'<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(Tt,'<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(Tt,'<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(Tt,'<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(Tt,'<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(yt){var ee=document.createElement("div");ee.className=""+xt.toolbarButtonStyleClass.name,ee.setAttribute("data-type-name",yt.typeName),ee.innerHTML=yt.icon,ee.addEventListener("click",function(){xt.markerToolbarButtonClicked(ee,yt)}),xt.buttons.push(ee),xt.markerButtons.push(ee)}),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 Ft=document.createElement("div");Ft.className=this.toolbarBlockStyleClass.name,Ft.style.whiteSpace="nowrap",Ft.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ft),this.addActionButton(Ft,'<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(Ft,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},jt.prototype.addButtonClickListener=function(Lt){this.buttonClickListeners.push(Lt)},jt.prototype.removeButtonClickListener=function(Lt){this.buttonClickListeners.indexOf(Lt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Lt),1)},jt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},jt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Lt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var xt=0;xt<this.markerButtons.length;xt++)xt<Lt||xt===Lt&&this.markerButtons.length-1===Lt?this.markerButtonBlock.appendChild(this.markerButtons[xt]):(xt===Lt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[xt]))}},jt.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},jt.prototype.resetButtonStyles=function(){var Lt=this;this.buttons.forEach(function(xt){xt.className=xt.className.replace(Lt.uiStyleSettings.toolbarButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarButtonStyleColorsClassName:Lt.toolbarButtonStyleColorsClass.name,"").trim(),xt.className=xt.className.replace(Lt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Lt.toolbarActiveButtonStyleColorsClass.name,"").trim(),xt.className+=" "+(Lt.uiStyleSettings.toolbarButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarButtonStyleColorsClassName:Lt.toolbarButtonStyleColorsClass.name)})},jt.prototype.addActionButton=function(Lt,xt,Tt){var Ft=this,yt=document.createElement("div");switch(yt.className=""+this.toolbarButtonStyleClass.name,yt.innerHTML=xt,yt.setAttribute("data-action",Tt),yt.addEventListener("click",function(){Ft.actionToolbarButtonClicked(yt,Tt)}),Tt){case"select":yt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":yt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":yt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":yt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":yt.style.fill=this.uiStyleSettings.closeButtonColor}Lt.appendChild(yt),this.buttons.push(yt)},jt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new re("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 re("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new re("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new re("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 re("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var Lt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new re("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
|
|
|
padding: `+Lt+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new re("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new re("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Fe("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Fe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},jt.prototype.markerToolbarButtonClicked=function(Lt,xt){this.setActiveButton(Lt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Tt){return Tt("marker",xt)}),this.markerButtonOverflowBlock.style.display="none"},jt.prototype.actionToolbarButtonClicked=function(Lt,xt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Tt){return Tt("action",xt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},jt.prototype.setActiveButton=function(Lt){this.resetButtonStyles(),Lt.className=Lt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Lt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},jt.prototype.setActiveMarkerButton=function(Lt){var xt=this.markerButtons.find(function(Tt){return Tt.getAttribute("data-type-name")===Lt});xt&&this.setActiveButton(xt)},jt.prototype.setCurrentMarker=function(Lt){var xt=this;this.currentMarker=Lt,this.buttons.filter(function(Tt){return/delete|notes/.test(Tt.getAttribute("data-action"))}).forEach(function(Tt){xt.currentMarker===void 0?(Tt.style.fillOpacity="0.4",Tt.style.pointerEvents="none"):(Tt.style.fillOpacity="1",Tt.style.pointerEvents="all")})},jt}(),Ot=function(){function jt(Lt,xt,Tt,Ft){this.panels=[],this.panelButtons=[],this.markerjsContainer=Lt,this.displayMode=xt,this.uiStyleSettings=Tt,this.styles=Ft,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return jt.prototype.addStyles=function(){var Lt;this.toolboxStyleClass=this.styles.addClass(new re("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 re("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var xt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new re("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new re("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new re("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 re("toolbox-panel-row_colors",`
|
|
|
background-color: `+((Lt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Lt!==void 0?Lt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new re("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*xt)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*xt)+`px;
|
|
|
padding: `+xt+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new re("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new re("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Fe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Fe("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},jt.prototype.show=function(Lt){var xt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((xt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&xt!==void 0?xt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},jt.prototype.setPanelButtons=function(Lt){var xt,Tt,Ft=this;this.panels=Lt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((xt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&xt!==void 0?xt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Tt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Tt!==void 0?Tt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(yt){var ee;yt.uiStyleSettings=Ft.uiStyleSettings;var pe=document.createElement("div");pe.className=Ft.toolboxButtonStyleClass.name+" "+((ee=Ft.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ee!==void 0?ee:Ft.toolboxButtonStyleColorsClass.name),pe.innerHTML=yt.icon,pe.title=yt.title,pe.addEventListener("click",function(){Ft.panelButtonClick(yt)}),Ft.panelButtons.push(pe),Ft.buttonRow.appendChild(pe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},jt.prototype.panelButtonClick=function(Lt){var xt=this,Tt=-1;if(Lt!==this.activePanel){Tt=this.panels.indexOf(Lt),this.panelRow.innerHTML="";var Ft=Lt.getUi();Ft.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ft),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=Lt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){xt.displayMode==="inline"?xt.panelRow.style.display="none":xt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(yt,ee){var pe,qt;yt.className=xt.toolboxButtonStyleClass.name+" "+(ee===Tt?""+((pe=xt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&pe!==void 0?pe:xt.toolboxActiveButtonStyleColorsClass.name):""+((qt=xt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&qt!==void 0?qt:xt.toolboxButtonStyleColorsClass.name))})},jt}(),et=function(jt,Lt){this.title=jt,this.icon=Lt},nt=function(jt){function Lt(xt,Tt,Ft,yt){var ee=jt.call(this,xt,yt||'<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 ee.colors=[],ee.addTransparent=!1,ee.colorBoxes=[],ee.colors=Tt,ee.currentColor=Ft,ee.setCurrentColor=ee.setCurrentColor.bind(ee),ee.getColorBox=ee.getColorBox.bind(ee),ee}return It(Lt,jt),Lt.prototype.getUi=function(){var xt=this,Tt=document.createElement("div");return Tt.style.overflow="hidden",Tt.style.whiteSpace="nowrap",this.colors.forEach(function(Ft){var yt=xt.getColorBox(Ft);Tt.appendChild(yt),xt.colorBoxes.push(yt)}),Tt},Lt.prototype.getColorBox=function(xt){var Tt=this,Ft=this.uiStyleSettings.toolbarHeight/4,yt=this.uiStyleSettings.toolbarHeight-Ft,ee=document.createElement("div");ee.style.display="inline-block",ee.style.boxSizing="content-box",ee.style.width=yt-2+"px",ee.style.height=yt-2+"px",ee.style.padding="1px",ee.style.marginRight="2px",ee.style.marginBottom="2px",ee.style.borderWidth="2px",ee.style.borderStyle="solid",ee.style.borderRadius=(yt+2)/2+"px",ee.style.borderColor=xt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ee.addEventListener("click",function(){Tt.setCurrentColor(xt,ee)});var pe=document.createElement("div");return pe.style.display="inline-block",pe.style.width=yt-2+"px",pe.style.height=yt-2+"px",pe.style.backgroundColor=xt,pe.style.borderRadius=yt/2+"px",xt==="transparent"&&(pe.style.fill=this.uiStyleSettings.toolboxAccentColor,pe.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),ee.appendChild(pe),ee},Lt.prototype.setCurrentColor=function(xt,Tt){var Ft=this;this.currentColor=xt,this.colorBoxes.forEach(function(yt){yt.style.borderColor=yt===Tt?Ft.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(xt)},Lt}(et),ht=function(){function jt(Lt,xt,Tt){this._state="new",this._isSelected=!1,this._container=Lt,this._overlayContainer=xt,this.globalSettings=Tt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(jt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),jt.prototype.ownsTarget=function(Lt){return!1},Object.defineProperty(jt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),jt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},jt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},jt.prototype.pointerDown=function(Lt,xt){},jt.prototype.dblClick=function(Lt,xt){},jt.prototype.manipulate=function(Lt){},jt.prototype.pointerUp=function(Lt){this.stateChanged()},jt.prototype.dispose=function(){},jt.prototype.addMarkerVisualToContainer=function(Lt){this.container.childNodes.length>0?this.container.insertBefore(Lt,this.container.childNodes[0]):this.container.appendChild(Lt)},jt.prototype.getState=function(){return{typeName:jt.typeName,state:this.state,notes:this.notes}},jt.prototype.restoreState=function(Lt){this._state=Lt.state,this.notes=Lt.notes},jt.prototype.scale=function(Lt,xt){},jt.prototype.colorChanged=function(Lt){this.onColorChanged&&this.onColorChanged(Lt),this.stateChanged()},jt.prototype.fillColorChanged=function(Lt){this.onFillColorChanged&&this.onFillColorChanged(Lt),this.stateChanged()},jt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Lt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Lt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Lt)&&this.onStateChanged(this)}},jt.typeName="MarkerBase",jt}(),at=function(){function jt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return jt.prototype.findGripByVisual=function(Lt){return this.topLeft.ownsTarget(Lt)?this.topLeft:this.topCenter.ownsTarget(Lt)?this.topCenter:this.topRight.ownsTarget(Lt)?this.topRight:this.centerLeft.ownsTarget(Lt)?this.centerLeft:this.centerRight.ownsTarget(Lt)?this.centerRight:this.bottomLeft.ownsTarget(Lt)?this.bottomLeft:this.bottomCenter.ownsTarget(Lt)?this.bottomCenter:this.bottomRight.ownsTarget(Lt)?this.bottomRight:void 0},jt}(),ft=function(){function jt(){this.GRIP_SIZE=10,this.visual=Ut.createGroup(),this.visual.appendChild(Ut.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ut.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return jt.prototype.ownsTarget=function(Lt){return Lt===this.visual||Lt===this.visual.childNodes[0]||Lt===this.visual.childNodes[1]},jt}(),mt=function(){function jt(){}return jt.toITransformMatrix=function(Lt){return{a:Lt.a,b:Lt.b,c:Lt.c,d:Lt.d,e:Lt.e,f:Lt.f}},jt.toSVGMatrix=function(Lt,xt){return Lt.a=xt.a,Lt.b=xt.b,Lt.c=xt.c,Lt.d=xt.d,Lt.e=xt.e,Lt.f=xt.f,Lt},jt}(),wt=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.left=0,yt.top=0,yt.width=0,yt.height=0,yt.defaultSize={x:50,y:20},yt.offsetX=0,yt.offsetY=0,yt.rotationAngle=0,yt.CB_DISTANCE=10,yt._suppressMarkerCreateEvent=!1,yt.container.transform.baseVal.appendItem(Ut.createTransform()),yt.setupControlBox(),yt}return It(Lt,jt),Object.defineProperty(Lt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"visual",{get:function(){return this._visual},set:function(xt){this._visual=xt;var Tt=Ut.createTransform();this._visual.transform.baseVal.appendItem(Tt)},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(xt){return!!jt.prototype.ownsTarget.call(this,xt)||!!(this.controlGrips.findGripByVisual(xt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(xt))},Lt.prototype.pointerDown=function(xt,Tt){jt.prototype.pointerDown.call(this,xt,Tt),this.state==="new"&&(this.left=xt.x,this.top=xt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ft=this.unrotatePoint(xt);if(this.manipulationStartX=Ft.x,this.manipulationStartY=Ft.y,this.offsetX=Ft.x-this.left,this.offsetY=Ft.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Tt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Tt)){this.activeGrip=this.rotatorGrip;var yt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=yt.x-this.width/2,this.top=yt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ee=this.container.transform.baseVal.getItem(0);ee.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ee,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Lt.prototype.pointerUp=function(xt){var Tt=this.state;jt.prototype.pointerUp.call(this,xt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(xt),this._state="select",Tt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Lt.prototype.moveVisual=function(xt){this.visual.style.transform="translate("+xt.x+"px, "+xt.y+"px)"},Lt.prototype.manipulate=function(xt){var Tt=this.unrotatePoint(xt);this.state==="creating"?this.resize(xt):this.state==="move"?(this.left=this.manipulationStartLeft+(Tt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Tt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Tt):this.state==="rotate"&&this.rotate(xt)},Lt.prototype.resize=function(xt){var Tt=this.manipulationStartLeft,Ft=this.manipulationStartWidth,yt=this.manipulationStartTop,ee=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Tt=this.manipulationStartLeft+xt.x-this.manipulationStartX,Ft=this.manipulationStartWidth+this.manipulationStartLeft-Tt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ft=this.manipulationStartWidth+xt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:yt=this.manipulationStartTop+xt.y-this.manipulationStartY,ee=this.manipulationStartHeight+this.manipulationStartTop-yt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ee=this.manipulationStartHeight+xt.y-this.manipulationStartY}Ft>=0?(this.left=Tt,this.width=Ft):(this.left=Tt+Ft,this.width=-Ft),ee>=0?(this.top=yt,this.height=ee):(this.top=yt+ee,this.height=-ee),this.setSize()},Lt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Lt.prototype.rotate=function(xt){if(Math.abs(xt.x-this.centerX)>.1){var Tt=Math.sign(xt.x-this.centerX);this.rotationAngle=180*Math.atan((xt.y-this.centerY)/(xt.x-this.centerX))/Math.PI+90*Tt,this.applyRotation()}},Lt.prototype.applyRotation=function(){var xt=this.container.transform.baseVal.getItem(0);xt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(xt,0)},Lt.prototype.rotatePoint=function(xt){if(this.rotationAngle===0)return xt;var Tt=this.container.getCTM(),Ft=Ut.createPoint(xt.x,xt.y);return{x:(Ft=Ft.matrixTransform(Tt)).x,y:Ft.y}},Lt.prototype.unrotatePoint=function(xt){if(this.rotationAngle===0)return xt;var Tt=this.container.getCTM();Tt=Tt.inverse();var Ft=Ut.createPoint(xt.x,xt.y);return{x:(Ft=Ft.matrixTransform(Tt)).x,y:Ft.y}},Lt.prototype.select=function(){jt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){jt.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=Ut.createGroup();var xt=Ut.createTransform();xt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(xt),this.container.appendChild(this.controlBox),this.controlRect=Ut.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=Ut.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new at,this.addControlGrips(),this.controlBox.style.display="none"},Lt.prototype.adjustControlBox=function(){var xt=this.controlBox.transform.baseVal.getItem(0);xt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(xt,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()},Lt.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()},Lt.prototype.createGrip=function(){var xt=new ft;return xt.visual.transform.baseVal.appendItem(Ut.createTransform()),this.controlBox.appendChild(xt.visual),xt},Lt.prototype.positionGrips=function(){var xt=this.controlGrips.topLeft.GRIP_SIZE,Tt=-xt/2,Ft=Tt,yt=(this.width+this.CB_DISTANCE)/2-xt/2,ee=(this.height+this.CB_DISTANCE)/2-xt/2,pe=this.height+this.CB_DISTANCE-xt/2,qt=this.width+this.CB_DISTANCE-xt/2;this.positionGrip(this.controlGrips.topLeft.visual,Tt,Ft),this.positionGrip(this.controlGrips.topCenter.visual,yt,Ft),this.positionGrip(this.controlGrips.topRight.visual,qt,Ft),this.positionGrip(this.controlGrips.centerLeft.visual,Tt,ee),this.positionGrip(this.controlGrips.centerRight.visual,qt,ee),this.positionGrip(this.controlGrips.bottomLeft.visual,Tt,pe),this.positionGrip(this.controlGrips.bottomCenter.visual,yt,pe),this.positionGrip(this.controlGrips.bottomRight.visual,qt,pe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,yt,Ft-3*this.CB_DISTANCE)},Lt.prototype.positionGrip=function(xt,Tt,Ft){var yt=xt.transform.baseVal.getItem(0);yt.setTranslate(Tt,Ft),xt.transform.baseVal.replaceItem(yt,0)},Lt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Lt.prototype.showControlBox=function(){this.controlBox.style.display=""},Lt.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:mt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:mt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},jt.prototype.getState.call(this))},Lt.prototype.restoreState=function(xt){jt.prototype.restoreState.call(this,xt);var Tt=xt;this.left=Tt.left,this.top=Tt.top,this.width=Tt.width,this.height=Tt.height,this.rotationAngle=Tt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(mt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Tt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(mt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Tt.containerTransformMatrix))},Lt.prototype.scale=function(xt,Tt){jt.prototype.scale.call(this,xt,Tt);var Ft=this.rotatePoint({x:this.left,y:this.top}),yt=this.unrotatePoint({x:Ft.x*xt,y:Ft.y*Tt});this.left=yt.x,this.top=yt.y,this.width=this.width*xt,this.height=this.height*Tt,this.adjustControlBox()},Lt}(ht),Et=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.fillColor="transparent",yt.strokeColor="transparent",yt.strokeWidth=0,yt.strokeDasharray="",yt.opacity=1,yt.setStrokeColor=yt.setStrokeColor.bind(yt),yt.setFillColor=yt.setFillColor.bind(yt),yt.setStrokeWidth=yt.setStrokeWidth.bind(yt),yt.setStrokeDasharray=yt.setStrokeDasharray.bind(yt),yt.createVisual=yt.createVisual.bind(yt),yt}return It(Lt,jt),Lt.prototype.ownsTarget=function(xt){return!(!jt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual)},Lt.prototype.createVisual=function(){this.visual=Ut.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)},Lt.prototype.pointerDown=function(xt,Tt){jt.prototype.pointerDown.call(this,xt,Tt),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},Lt.prototype.manipulate=function(xt){jt.prototype.manipulate.call(this,xt)},Lt.prototype.resize=function(xt){jt.prototype.resize.call(this,xt),this.setSize()},Lt.prototype.setSize=function(){jt.prototype.setSize.call(this),Ut.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(xt){jt.prototype.pointerUp.call(this,xt),this.setSize()},Lt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.visual&&Ut.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(xt),this.stateChanged()},Lt.prototype.setFillColor=function(xt){this.fillColor=xt,this.visual&&Ut.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Lt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.visual&&Ut.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.visual&&Ut.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Lt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},jt.prototype.getState.call(this))},Lt.prototype.restoreState=function(xt){var Tt=xt;this.fillColor=Tt.fillColor,this.strokeColor=Tt.strokeColor,this.strokeWidth=Tt.strokeWidth,this.strokeDasharray=Tt.strokeDasharray,this.opacity=Tt.opacity,this.createVisual(),jt.prototype.restoreState.call(this,xt),this.setSize()},Lt.prototype.scale=function(xt,Tt){jt.prototype.scale.call(this,xt,Tt),this.setSize()},Lt.title="Rectangle marker",Lt}(wt),Nt=function(jt){function Lt(xt,Tt,Ft,yt){var ee=jt.call(this,xt,yt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ee.widths=[],ee.widthBoxes=[],ee.widths=Tt,ee.currentWidth=Ft,ee.setCurrentWidth=ee.setCurrentWidth.bind(ee),ee}return It(Lt,jt),Lt.prototype.getUi=function(){var xt=this,Tt=document.createElement("div");return Tt.style.display="flex",Tt.style.overflow="hidden",Tt.style.flexGrow="2",this.widths.forEach(function(Ft){var yt=document.createElement("div");yt.style.display="flex",yt.style.flexGrow="2",yt.style.alignItems="center",yt.style.justifyContent="space-between",yt.style.padding="5px",yt.style.borderWidth="2px",yt.style.borderStyle="solid",yt.style.borderColor=Ft===xt.currentWidth?xt.uiStyleSettings.toolboxAccentColor:"transparent",yt.addEventListener("click",function(){xt.setCurrentWidth(Ft,yt)}),Tt.appendChild(yt);var ee=document.createElement("div");ee.innerText=Ft.toString(),ee.style.marginRight="5px",yt.appendChild(ee);var pe=document.createElement("div");pe.style.minHeight="20px",pe.style.flexGrow="2",pe.style.display="flex",pe.style.alignItems="center";var qt=document.createElement("hr");qt.style.minWidth="20px",qt.style.border="0px",qt.style.borderTop=Ft+"px solid "+xt.uiStyleSettings.toolboxColor,qt.style.flexGrow="2",pe.appendChild(qt),yt.appendChild(pe),xt.widthBoxes.push(yt)}),Tt},Lt.prototype.setCurrentWidth=function(xt,Tt){var Ft=this;this.currentWidth=xt,this.widthBoxes.forEach(function(yt){yt.style.borderColor=yt===Tt?Ft.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Lt}(et),Dt=function(jt){function Lt(xt,Tt,Ft,yt){var ee=jt.call(this,xt,yt||'<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 ee.styles=[],ee.styleBoxes=[],ee.styles=Tt,ee.currentStyle=Ft,ee.setCurrentStyle=ee.setCurrentStyle.bind(ee),ee}return It(Lt,jt),Lt.prototype.getUi=function(){var xt=this,Tt=document.createElement("div");return Tt.style.display="flex",Tt.style.overflow="hidden",Tt.style.flexGrow="2",this.styles.forEach(function(Ft){var yt=document.createElement("div");yt.style.display="flex",yt.style.alignItems="center",yt.style.justifyContent="space-between",yt.style.padding="5px",yt.style.borderWidth="2px",yt.style.borderStyle="solid",yt.style.overflow="hidden",yt.style.maxWidth=100/xt.styles.length-5+"%",yt.style.borderColor=Ft===xt.currentStyle?xt.uiStyleSettings.toolboxAccentColor:"transparent",yt.addEventListener("click",function(){xt.setCurrentStyle(Ft,yt)}),Tt.appendChild(yt);var ee=document.createElement("div");ee.style.minHeight="20px",ee.style.flexGrow="2",ee.style.overflow="hidden";var pe=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+xt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ft!==""?'stroke-dasharray="'+Ft+'"':"")+` />
|
|
|
</svg>`;ee.innerHTML=pe,yt.appendChild(ee),xt.styleBoxes.push(yt)}),Tt},Lt.prototype.setCurrentStyle=function(xt,Tt){var Ft=this;this.currentStyle=xt,this.styleBoxes.forEach(function(yt){yt.style.borderColor=yt===Tt?Ft.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Lt}(et),At=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.strokeColor=Ft.defaultColor,yt.strokeWidth=Ft.defaultStrokeWidth,yt.strokeDasharray=Ft.defaultStrokeDasharray,yt.strokePanel=new nt("Line color",Ft.defaultColorSet,Ft.defaultColor),yt.strokePanel.onColorChanged=yt.setStrokeColor,yt.strokeWidthPanel=new Nt("Line width",Ft.defaultStrokeWidths,Ft.defaultStrokeWidth),yt.strokeWidthPanel.onWidthChanged=yt.setStrokeWidth,yt.strokeStylePanel=new Dt("Line style",Ft.defaultStrokeDasharrays,Ft.defaultStrokeDasharray),yt.strokeStylePanel.onStyleChanged=yt.setStrokeDasharray,yt}return It(Lt,jt),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=jt.prototype.getState.call(this);return xt.typeName=Lt.typeName,xt},Lt.typeName="FrameMarker",Lt.title="Frame marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Lt}(Et),Kt=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"},Wt=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.x1=0,yt.y1=0,yt.x2=0,yt.y2=0,yt.defaultLength=50,yt.manipulationStartX=0,yt.manipulationStartY=0,yt.manipulationStartX1=0,yt.manipulationStartY1=0,yt.manipulationStartX2=0,yt.manipulationStartY2=0,yt.setupControlBox(),yt}return It(Lt,jt),Lt.prototype.ownsTarget=function(xt){return!!jt.prototype.ownsTarget.call(this,xt)||!(!this.grip1.ownsTarget(xt)&&!this.grip2.ownsTarget(xt))},Lt.prototype.pointerDown=function(xt,Tt){jt.prototype.pointerDown.call(this,xt,Tt),this.manipulationStartX=xt.x,this.manipulationStartY=xt.y,this.state==="new"&&(this.x1=xt.x,this.y1=xt.y,this.x2=xt.x,this.y2=xt.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(Tt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Tt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Lt.prototype.pointerUp=function(xt){var Tt=this.state;jt.prototype.pointerUp.call(this,xt),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(xt),this._state="select",Tt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Lt.prototype.adjustVisual=function(){},Lt.prototype.manipulate=function(xt){this.state==="creating"?this.resize(xt):this.state==="move"?(this.x1=this.manipulationStartX1+xt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+xt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+xt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+xt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(xt)},Lt.prototype.resize=function(xt){switch(this.activeGrip){case this.grip1:this.x1=xt.x,this.y1=xt.y;break;case this.grip2:case void 0:this.x2=xt.x,this.y2=xt.y}this.adjustVisual(),this.adjustControlBox()},Lt.prototype.select=function(){jt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){jt.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=Ut.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Lt.prototype.adjustControlBox=function(){this.positionGrips()},Lt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Lt.prototype.createGrip=function(){var xt=new ft;return xt.visual.transform.baseVal.appendItem(Ut.createTransform()),this.controlBox.appendChild(xt.visual),xt},Lt.prototype.positionGrips=function(){var xt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-xt/2,this.y1-xt/2),this.positionGrip(this.grip2.visual,this.x2-xt/2,this.y2-xt/2)},Lt.prototype.positionGrip=function(xt,Tt,Ft){var yt=xt.transform.baseVal.getItem(0);yt.setTranslate(Tt,Ft),xt.transform.baseVal.replaceItem(yt,0)},Lt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},jt.prototype.getState.call(this))},Lt.prototype.restoreState=function(xt){jt.prototype.restoreState.call(this,xt);var Tt=xt;this.x1=Tt.x1,this.y1=Tt.y1,this.x2=Tt.x2,this.y2=Tt.y2},Lt.prototype.scale=function(xt,Tt){jt.prototype.scale.call(this,xt,Tt),this.x1=this.x1*xt,this.y1=this.y1*Tt,this.x2=this.x2*xt,this.y2=this.y2*Tt,this.adjustVisual(),this.adjustControlBox()},Lt}(ht),xe=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.strokeColor="transparent",yt.strokeWidth=0,yt.strokeDasharray="",yt.setStrokeColor=yt.setStrokeColor.bind(yt),yt.setStrokeWidth=yt.setStrokeWidth.bind(yt),yt.setStrokeDasharray=yt.setStrokeDasharray.bind(yt),yt.strokeColor=Ft.defaultColor,yt.strokeWidth=Ft.defaultStrokeWidth,yt.strokeDasharray=Ft.defaultStrokeDasharray,yt.strokePanel=new nt("Line color",Ft.defaultColorSet,Ft.defaultColor),yt.strokePanel.onColorChanged=yt.setStrokeColor,yt.strokeWidthPanel=new Nt("Line width",Ft.defaultStrokeWidths,Ft.defaultStrokeWidth),yt.strokeWidthPanel.onWidthChanged=yt.setStrokeWidth,yt.strokeStylePanel=new Dt("Line style",Ft.defaultStrokeDasharrays,Ft.defaultStrokeDasharray),yt.strokeStylePanel.onStyleChanged=yt.setStrokeDasharray,yt}return It(Lt,jt),Lt.prototype.ownsTarget=function(xt){return!(!jt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.selectorLine&&xt!==this.visibleLine)},Lt.prototype.createVisual=function(){this.visual=Ut.createGroup(),this.selectorLine=Ut.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ut.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)},Lt.prototype.pointerDown=function(xt,Tt){jt.prototype.pointerDown.call(this,xt,Tt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Lt.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()),Ut.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ut.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ut.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.adjustVisual(),this.colorChanged(xt)},Lt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},jt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){jt.prototype.restoreState.call(this,xt);var Tt=xt;this.strokeColor=Tt.strokeColor,this.strokeWidth=Tt.strokeWidth,this.strokeDasharray=Tt.strokeDasharray,this.createVisual(),this.adjustVisual()},Lt.typeName="LineMarker",Lt.title="Line marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Lt}(Wt),Vt=function(jt){function Lt(xt,Tt,Ft,yt){var ee=jt.call(this,xt,yt||'<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 ee.fonts=[],ee.fontBoxes=[],ee.fonts=Tt,ee.currentFont=Ft,ee.setCurrentFont=ee.setCurrentFont.bind(ee),ee}return It(Lt,jt),Lt.prototype.getUi=function(){var xt=this,Tt=document.createElement("div");return Tt.style.overflow="hidden",Tt.style.flexGrow="2",this.fonts.forEach(function(Ft){var yt=document.createElement("div");yt.style.display="inline-block",yt.style.alignItems="center",yt.style.justifyContent="space-between",yt.style.padding="5px",yt.style.borderWidth="2px",yt.style.borderStyle="solid",yt.style.overflow="hidden",yt.style.maxWidth=100/xt.fonts.length-5+"%",yt.style.borderColor=Ft===xt.currentFont?xt.uiStyleSettings.toolboxAccentColor:"transparent",yt.addEventListener("click",function(){xt.setCurrentFont(Ft,yt)}),Tt.appendChild(yt);var ee=document.createElement("div");ee.style.display="flex",ee.style.minHeight="20px",ee.style.flexGrow="2",ee.style.fontFamily=Ft,ee.style.overflow="hidden";var pe=document.createElement("div");pe.style.whiteSpace="nowrap",pe.style.overflow="hidden",pe.style.textOverflow="ellipsis",pe.innerHTML="The quick brown fox jumps over the lazy dog",ee.appendChild(pe),yt.appendChild(ee),xt.fontBoxes.push(yt)}),Tt},Lt.prototype.setCurrentFont=function(xt,Tt){var Ft=this;this.currentFont=xt,this.fontBoxes.forEach(function(yt){yt.style.borderColor=yt===Tt?Ft.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Lt}(et),Ie=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.color="transparent",yt.padding=5,yt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",yt.text=yt.DEFAULT_TEXT,yt.isMoved=!1,yt.color=Ft.defaultColor,yt.fontFamily=Ft.defaultFontFamily,yt.defaultSize={x:100,y:30},yt.setColor=yt.setColor.bind(yt),yt.setFont=yt.setFont.bind(yt),yt.renderText=yt.renderText.bind(yt),yt.sizeText=yt.sizeText.bind(yt),yt.textEditDivClicked=yt.textEditDivClicked.bind(yt),yt.showTextEditor=yt.showTextEditor.bind(yt),yt.setSize=yt.setSize.bind(yt),yt.positionTextEditor=yt.positionTextEditor.bind(yt),yt.colorPanel=new nt("Color",Ft.defaultColorSet,Ft.defaultColor),yt.colorPanel.onColorChanged=yt.setColor,yt.fontFamilyPanel=new Vt("Font",Ft.defaultFontFamilies,Ft.defaultFontFamily),yt.fontFamilyPanel.onFontChanged=yt.setFont,yt}return It(Lt,jt),Lt.prototype.ownsTarget=function(xt){if(jt.prototype.ownsTarget.call(this,xt)||xt===this.visual||xt===this.textElement||xt===this.bgRectangle)return!0;var Tt=!1;return this.textElement.childNodes.forEach(function(Ft){Ft===xt&&(Tt=!0)}),Tt},Lt.prototype.createVisual=function(){this.visual=Ut.createGroup(),this.bgRectangle=Ut.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ut.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ut.createTransform()),this.textElement.transform.baseVal.appendItem(Ut.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Lt.prototype.pointerDown=function(xt,Tt){jt.prototype.pointerDown.call(this,xt,Tt),this.isMoved=!1,this.pointerDownPoint=xt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},Lt.prototype.renderText=function(){var xt=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(Tt){xt.textElement.appendChild(Ut.createTSpan(Tt.trim()===""?" ":Tt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Lt.prototype.getTextScale=function(){var xt=this.textElement.getBBox(),Tt=1;if(xt.width>0&&xt.height>0){var Ft=(1*this.width-this.width*this.padding*2/100)/xt.width,yt=(1*this.height-this.height*this.padding*2/100)/xt.height;Tt=Math.min(Ft,yt)}return Tt},Lt.prototype.getTextPosition=function(xt){var Tt=this.textElement.getBBox(),Ft=0,yt=0;return Tt.width>0&&Tt.height>0&&(Ft=(this.width-Tt.width*xt)/2,yt=this.height/2-Tt.height*xt/2),{x:Ft,y:yt}},Lt.prototype.sizeText=function(){var xt=this.textElement.getBBox(),Tt=this.getTextScale(),Ft=this.getTextPosition(Tt);Ft.y-=xt.y*Tt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ft.x+"px, "+Ft.y+"px) scale("+Tt+", "+Tt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ft.x,Ft.y),this.textElement.transform.baseVal.getItem(1).setScale(Tt,Tt))},Lt.prototype.manipulate=function(xt){jt.prototype.manipulate.call(this,xt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(xt.x-this.pointerDownPoint.x)>5||Math.abs(xt.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(xt){jt.prototype.resize.call(this,xt),this.isMoved=!0,this.setSize(),this.sizeText()},Lt.prototype.setSize=function(){jt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ut.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ut.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Lt.prototype.pointerUp=function(xt){var Tt=this.state;Tt==="creating"&&(this._suppressMarkerCreateEvent=!0),jt.prototype.pointerUp.call(this,xt),this.setSize(),(Tt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.showTextEditor=function(){var xt=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(Tt){Tt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Tt=Number.parseFloat(xt.textEditor.style.fontSize);xt.textEditor.clientWidth>=Number.parseInt(xt.textEditor.style.maxWidth)&&Tt>.9;)Tt-=.1,xt.textEditor.style.fontSize=Math.max(Tt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Tt){Tt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Tt){if(Tt.clipboardData){var Ft=Tt.clipboardData.getData("text"),yt=window.getSelection();if(!yt.rangeCount)return!1;yt.deleteFromDocument(),yt.getRangeAt(0).insertNode(document.createTextNode(Ft)),Tt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){xt.textEditDivClicked(xt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Lt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var xt=this.getTextScale(),Tt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ft=this.textElement.getBBox(),yt={x:Ft.width*xt,y:Ft.height*xt};Tt.x-=yt.x/2,Tt.y-=yt.y/2,this.textEditor.style.top=Tt.y+"px",this.textEditor.style.left=Tt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Tt.x+"px",this.textEditor.style.fontSize=Math.max(16*xt,12)+"px",this.textElement.style.display="none"}},Lt.prototype.textEditDivClicked=function(xt){this.text=xt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Lt.prototype.select=function(){jt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Lt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),jt.prototype.deselect.call(this)},Lt.prototype.dblClick=function(xt,Tt){jt.prototype.dblClick.call(this,xt,Tt),this.showTextEditor()},Lt.prototype.setColor=function(xt){this.textElement&&Ut.setAttributes(this.textElement,[["fill",xt]]),this.color=xt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(xt)},Lt.prototype.setFont=function(xt){this.textElement&&Ut.setAttributes(this.textElement,[["font-family",xt]]),this.fontFamily=xt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Lt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Lt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},jt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){var Tt=xt;this.color=Tt.color,this.fontFamily=Tt.fontFamily,this.padding=Tt.padding,this.text=Tt.text,this.createVisual(),jt.prototype.restoreState.call(this,xt),this.setSize()},Lt.prototype.scale=function(xt,Tt){jt.prototype.scale.call(this,xt,Tt),this.setSize(),this.sizeText(),this.positionTextEditor()},Lt.typeName="TextMarker",Lt.title="Text marker",Lt.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>',Lt}(wt),Se=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.color="transparent",yt.lineWidth=3,yt.drawing=!1,yt.pixelRatio=1,yt.color=Ft.defaultColor,yt.lineWidth=Ft.defaultStrokeWidth,yt.pixelRatio=Ft.freehandPixelRatio,yt.setColor=yt.setColor.bind(yt),yt.addCanvas=yt.addCanvas.bind(yt),yt.finishCreation=yt.finishCreation.bind(yt),yt.setLineWidth=yt.setLineWidth.bind(yt),yt.colorPanel=new nt("Color",Ft.defaultColorSet,Ft.defaultColor),yt.colorPanel.onColorChanged=yt.setColor,yt.lineWidthPanel=new Nt("Line width",Ft.defaultStrokeWidths,Ft.defaultStrokeWidth),yt.lineWidthPanel.onWidthChanged=yt.setLineWidth,yt}return It(Lt,jt),Lt.prototype.ownsTarget=function(xt){return!(!jt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.drawingImage)},Lt.prototype.createVisual=function(){this.visual=Ut.createGroup(),this.drawingImage=Ut.createImage(),this.visual.appendChild(this.drawingImage);var xt=Ut.createTransform();this.visual.transform.baseVal.appendItem(xt),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(xt,Tt){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(xt.x,xt.y),this.drawing=!0):jt.prototype.pointerDown.call(this,xt,Tt)},Lt.prototype.manipulate=function(xt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(xt.x,xt.y),this.canvasContext.stroke()):jt.prototype.manipulate.call(this,xt)},Lt.prototype.resize=function(xt){jt.prototype.resize.call(this,xt),Ut.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ut.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(xt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):jt.prototype.pointerUp.call(this,xt)},Lt.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)},Lt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),jt.prototype.select.call(this)},Lt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),jt.prototype.deselect.call(this)},Lt.prototype.finishCreation=function(){for(var xt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Tt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ft=Tt[0],yt=Tt[1],ee=Tt[2],pe=Tt[3],qt=!1,Zt=0;Zt<this.canvasElement.height;Zt++)for(var fe=0;fe<this.canvasElement.width;fe++)xt.data[Zt*this.canvasElement.width*4+4*fe+3]>0&&(qt=!0,Zt<yt&&(yt=Zt),fe<Ft&&(Ft=fe),Zt>pe&&(pe=Zt),fe>ee&&(ee=fe));if(qt){this.left=Ft/this.pixelRatio,this.top=yt/this.pixelRatio,this.width=(ee-Ft)/this.pixelRatio,this.height=(pe-yt)/this.pixelRatio;var ce=document.createElement("canvas");ce.width=ee-Ft,ce.height=pe-yt,ce.getContext("2d").putImageData(this.canvasContext.getImageData(Ft,yt,ee-Ft,pe-yt),0,0),this.drawingImgUrl=ce.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Lt.prototype.setDrawingImage=function(){Ut.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ut.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Lt.prototype.setColor=function(xt){this.color=xt,this.colorChanged(xt)},Lt.prototype.setLineWidth=function(xt){this.lineWidth=xt},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({drawingImgUrl:this.drawingImgUrl},jt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){this.createVisual(),jt.prototype.restoreState.call(this,xt),this.drawingImgUrl=xt.drawingImgUrl,this.setDrawingImage()},Lt.prototype.scale=function(xt,Tt){jt.prototype.scale.call(this,xt,Tt),this.setDrawingImage()},Lt.typeName="FreehandMarker",Lt.title="Freehand marker",Lt.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>',Lt}(wt),Ye=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Ft||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return yt.typeBoxes=[],yt.currentType=Tt,yt.setCurrentType=yt.setCurrentType.bind(yt),yt}return It(Lt,jt),Lt.prototype.getUi=function(){var xt=this,Tt=document.createElement("div");Tt.style.display="flex",Tt.style.overflow="hidden",Tt.style.flexGrow="2";for(var Ft=function(pe){var qt="both";switch(pe){case 0:qt="both";break;case 1:qt="start";break;case 2:qt="end";break;case 3:qt="none"}var Zt=document.createElement("div");if(Zt.style.display="flex",Zt.style.flexGrow="2",Zt.style.alignItems="center",Zt.style.justifyContent="space-between",Zt.style.padding="5px",Zt.style.borderWidth="2px",Zt.style.borderStyle="solid",Zt.style.borderColor=qt===yt.currentType?yt.uiStyleSettings.toolboxAccentColor:"transparent",Zt.addEventListener("click",function(){xt.setCurrentType(qt,Zt)}),Tt.appendChild(Zt),qt==="both"||qt==="start"){var fe=document.createElement("div");fe.style.display="flex",fe.style.alignItems="center",fe.style.minHeight="20px",fe.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(yt.uiStyleSettings!==void 0?yt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,fe.style.marginLeft="5px",Zt.appendChild(fe)}var ce=document.createElement("div");ce.style.display="flex",ce.style.alignItems="center",ce.style.minHeight="20px",ce.style.flexGrow="2";var ne=document.createElement("hr");if(ne.style.minWidth="20px",ne.style.border="0px",ne.style.borderTop="3px solid "+(yt.uiStyleSettings!==void 0?yt.uiStyleSettings.toolboxColor:"#eeeeee"),ne.style.flexGrow="2",ce.appendChild(ne),Zt.appendChild(ce),qt==="both"||qt==="end"){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.alignItems="center",Ne.style.minHeight="20px",Ne.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="`+(yt.uiStyleSettings!==void 0?yt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ne.style.marginRight="5px",Zt.appendChild(Ne)}yt.typeBoxes.push(Zt)},yt=this,ee=0;ee<4;ee++)Ft(ee);return Tt},Lt.prototype.setCurrentType=function(xt,Tt){var Ft=this;this.currentType=xt,this.typeBoxes.forEach(function(yt){yt.style.borderColor=yt===Tt?Ft.uiStyleSettings!==void 0?Ft.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Lt}(et),Le=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.arrowType="end",yt.arrowBaseHeight=10,yt.arrowBaseWidth=10,yt.getArrowPoints=yt.getArrowPoints.bind(yt),yt.setArrowType=yt.setArrowType.bind(yt),yt.arrowTypePanel=new Ye("Arrow type","end"),yt.arrowTypePanel.onArrowTypeChanged=yt.setArrowType,yt}return It(Lt,jt),Lt.prototype.ownsTarget=function(xt){return!(!jt.prototype.ownsTarget.call(this,xt)&&xt!==this.arrow1&&xt!==this.arrow2)},Lt.prototype.getArrowPoints=function(xt,Tt){var Ft=this.arrowBaseWidth+2*this.strokeWidth,yt=this.arrowBaseHeight+2*this.strokeWidth;return xt-Ft/2+","+(Tt+yt/2)+" "+xt+","+(Tt-yt/2)+" "+(xt+Ft/2)+","+(Tt+yt/2)},Lt.prototype.createTips=function(){this.arrow1=Ut.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ut.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ut.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ut.createTransform()),this.visual.appendChild(this.arrow2)},Lt.prototype.pointerDown=function(xt,Tt){jt.prototype.pointerDown.call(this,xt,Tt),this.state==="creating"&&this.createTips()},Lt.prototype.adjustVisual=function(){if(jt.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Ut.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ut.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var xt=0;Math.abs(this.x1-this.x2)>.1&&(xt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Tt=this.arrow1.transform.baseVal.getItem(0);Tt.setRotate(xt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Tt,0);var Ft=this.arrow2.transform.baseVal.getItem(0);Ft.setRotate(xt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ft,0)}},Lt.prototype.setArrowType=function(xt){this.arrowType=xt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({arrowType:this.arrowType},jt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){jt.prototype.restoreState.call(this,xt);var Tt=xt;this.arrowType=Tt.arrowType,this.createTips(),this.adjustVisual()},Lt.typeName="ArrowMarker",Lt.title="Arrow marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Lt}(xe),Pe=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.fillColor=Ft.defaultFillColor,yt.strokeWidth=0,yt.fillPanel=new nt("Color",Ft.defaultColorSet,Ft.defaultFillColor),yt.fillPanel.onColorChanged=yt.setFillColor,yt}return It(Lt,jt),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=jt.prototype.getState.call(this);return xt.typeName=Lt.typeName,xt},Lt.typeName="CoverMarker",Lt.title="Cover marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Lt}(Et),We=function(jt){function Lt(xt,Tt,Ft,yt){var ee=jt.call(this,xt,yt||'<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 ee.opacities=[],ee.opacityBoxes=[],ee.opacities=Tt,ee.currentOpacity=Ft,ee.setCurrentOpacity=ee.setCurrentOpacity.bind(ee),ee}return It(Lt,jt),Lt.prototype.getUi=function(){var xt=this,Tt=document.createElement("div");return Tt.style.display="flex",Tt.style.overflow="hidden",Tt.style.flexGrow="2",Tt.style.justifyContent="space-between",this.opacities.forEach(function(Ft){var yt=document.createElement("div");yt.style.display="flex",yt.style.alignItems="center",yt.style.justifyContent="center",yt.style.padding="5px",yt.style.borderWidth="2px",yt.style.borderStyle="solid",yt.style.borderColor=Ft===xt.currentOpacity?xt.uiStyleSettings.toolboxAccentColor:"transparent",yt.addEventListener("click",function(){xt.setCurrentOpacity(Ft,yt)}),Tt.appendChild(yt);var ee=document.createElement("div");ee.innerText=100*Ft+"%",yt.appendChild(ee),xt.opacityBoxes.push(yt)}),Tt},Lt.prototype.setCurrentOpacity=function(xt,Tt){var Ft=this;this.currentOpacity=xt,this.opacityBoxes.forEach(function(yt){yt.style.borderColor=yt===Tt?Ft.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Lt}(et),Ue=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.setOpacity=yt.setOpacity.bind(yt),yt.fillColor=Ft.defaultHighlightColor,yt.strokeWidth=0,yt.opacity=Ft.defaultHighlightOpacity,yt.fillPanel=new nt("Color",Ft.defaultColorSet,yt.fillColor),yt.fillPanel.onColorChanged=yt.setFillColor,yt.opacityPanel=new We("Opacity",Ft.defaultOpacitySteps,yt.opacity),yt.opacityPanel.onOpacityChanged=yt.setOpacity,yt}return It(Lt,jt),Lt.prototype.setOpacity=function(xt){this.opacity=xt,this.visual&&Ut.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=jt.prototype.getState.call(this);return xt.typeName=Lt.typeName,xt},Lt.typeName="HighlightMarker",Lt.title="Highlight marker",Lt.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>',Lt}(Pe),ue='<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>',Ht='<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>',ke=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.bgColor="transparent",yt.tipPosition={x:0,y:0},yt.tipBase1Position={x:0,y:0},yt.tipBase2Position={x:0,y:0},yt.tipMoving=!1,yt.color=Ft.defaultStrokeColor,yt.bgColor=Ft.defaultFillColor,yt.fontFamily=Ft.defaultFontFamily,yt.defaultSize={x:100,y:30},yt.setBgColor=yt.setBgColor.bind(yt),yt.getTipPoints=yt.getTipPoints.bind(yt),yt.positionTip=yt.positionTip.bind(yt),yt.setTipPoints=yt.setTipPoints.bind(yt),yt.colorPanel=new nt("Text color",Ft.defaultColorSet,yt.color,ue),yt.colorPanel.onColorChanged=yt.setColor,yt.bgColorPanel=new nt("Fill color",Ft.defaultColorSet,yt.bgColor,Ht),yt.bgColorPanel.onColorChanged=yt.setBgColor,yt.fontFamilyPanel=new Vt("Font",Ft.defaultFontFamilies,Ft.defaultFontFamily),yt.fontFamilyPanel.onFontChanged=yt.setFont,yt.tipGrip=new ft,yt.tipGrip.visual.transform.baseVal.appendItem(Ut.createTransform()),yt.controlBox.appendChild(yt.tipGrip.visual),yt}return It(Lt,jt),Lt.prototype.ownsTarget=function(xt){return jt.prototype.ownsTarget.call(this,xt)||this.tipGrip.ownsTarget(xt)||this.tip===xt},Lt.prototype.createTip=function(){Ut.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ut.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Lt.prototype.pointerDown=function(xt,Tt){this.state==="new"&&jt.prototype.pointerDown.call(this,xt,Tt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Tt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):jt.prototype.pointerDown.call(this,xt,Tt)},Lt.prototype.pointerUp=function(xt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,jt.prototype.pointerUp.call(this,xt);else{var Tt=this.state==="creating";jt.prototype.pointerUp.call(this,xt),this.setTipPoints(Tt),this.positionTip()}},Lt.prototype.manipulate=function(xt){if(this.tipMoving){var Tt=this.unrotatePoint(xt);this.tipPosition={x:Tt.x-this.manipulationStartLeft,y:Tt.y-this.manipulationStartTop},this.positionTip()}else jt.prototype.manipulate.call(this,xt)},Lt.prototype.setBgColor=function(xt){this.bgRectangle&&this.tip&&(Ut.setAttributes(this.bgRectangle,[["fill",xt]]),Ut.setAttributes(this.tip,[["fill",xt]])),this.bgColor=xt,this.fillColorChanged(xt)},Lt.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},Lt.prototype.setTipPoints=function(xt){xt===void 0&&(xt=!1);var Tt=Math.min(this.height/2,15),Ft=this.height/5;xt&&(this.tipPosition={x:Tt+Ft/2,y:this.height+20});var yt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?yt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ft=this.width/5,Tt=Math.min(this.width/2,15),this.tipBase1Position={x:Tt,y:0},this.tipBase2Position={x:Tt+Ft,y:0}):(this.tipBase1Position={x:0,y:Tt},this.tipBase2Position={x:0,y:Tt+Ft}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?yt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ft=this.width/5,Tt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Tt-Ft,y:0},this.tipBase2Position={x:this.width-Tt,y:0}):(this.tipBase1Position={x:this.width,y:Tt},this.tipBase2Position={x:this.width,y:Tt+Ft}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?yt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ft=this.width/5,Tt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Tt-Ft,y:this.height},this.tipBase2Position={x:this.width-Tt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Tt-Ft},this.tipBase2Position={x:this.width,y:this.height-Tt}):yt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ft=this.width/5,Tt=Math.min(this.width/2,15),this.tipBase1Position={x:Tt,y:this.height},this.tipBase2Position={x:Tt+Ft,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Tt},this.tipBase2Position={x:0,y:this.height-Tt-Ft})},Lt.prototype.resize=function(xt){jt.prototype.resize.call(this,xt),this.positionTip()},Lt.prototype.positionTip=function(){Ut.setAttributes(this.tip,[["points",this.getTipPoints()]]);var xt=this.tipGrip.visual.transform.baseVal.getItem(0);xt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(xt,0)},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Lt.prototype.select=function(){this.positionTip(),jt.prototype.select.call(this)},Lt.prototype.getState=function(){var xt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},jt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){var Tt=xt;this.bgColor=Tt.bgColor,this.tipPosition=Tt.tipPosition,jt.prototype.restoreState.call(this,xt),this.createTip(),this.setTipPoints()},Lt.prototype.scale=function(xt,Tt){jt.prototype.scale.call(this,xt,Tt),this.tipPosition={x:this.tipPosition.x*xt,y:this.tipPosition.y*Tt},this.positionTip()},Lt.typeName="CalloutMarker",Lt.title="Callout marker",Lt.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>',Lt}(Ie),pn=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.fillColor="transparent",yt.strokeColor="transparent",yt.strokeWidth=0,yt.strokeDasharray="",yt.opacity=1,yt.strokeColor=Ft.defaultColor,yt.strokeWidth=Ft.defaultStrokeWidth,yt.strokeDasharray=Ft.defaultStrokeDasharray,yt.fillColor=Ft.defaultFillColor,yt.setStrokeColor=yt.setStrokeColor.bind(yt),yt.setFillColor=yt.setFillColor.bind(yt),yt.setStrokeWidth=yt.setStrokeWidth.bind(yt),yt.setStrokeDasharray=yt.setStrokeDasharray.bind(yt),yt.setOpacity=yt.setOpacity.bind(yt),yt.createVisual=yt.createVisual.bind(yt),yt.strokePanel=new nt("Line color",$t(Ft.defaultColorSet,["transparent"]),Ft.defaultColor),yt.strokePanel.onColorChanged=yt.setStrokeColor,yt.fillPanel=new nt("Fill color",$t(Ft.defaultColorSet,["transparent"]),yt.fillColor,Ht),yt.fillPanel.onColorChanged=yt.setFillColor,yt.strokeWidthPanel=new Nt("Line width",Ft.defaultStrokeWidths,Ft.defaultStrokeWidth),yt.strokeWidthPanel.onWidthChanged=yt.setStrokeWidth,yt.strokeStylePanel=new Dt("Line style",Ft.defaultStrokeDasharrays,Ft.defaultStrokeDasharray),yt.strokeStylePanel.onStyleChanged=yt.setStrokeDasharray,yt.opacityPanel=new We("Opacity",Ft.defaultOpacitySteps,yt.opacity),yt.opacityPanel.onOpacityChanged=yt.setOpacity,yt}return It(Lt,jt),Lt.prototype.ownsTarget=function(xt){return!(!jt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual)},Lt.prototype.createVisual=function(){this.visual=Ut.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)},Lt.prototype.pointerDown=function(xt,Tt){jt.prototype.pointerDown.call(this,xt,Tt),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},Lt.prototype.manipulate=function(xt){jt.prototype.manipulate.call(this,xt)},Lt.prototype.resize=function(xt){jt.prototype.resize.call(this,xt),this.setSize()},Lt.prototype.setSize=function(){jt.prototype.setSize.call(this),Ut.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Lt.prototype.pointerUp=function(xt){jt.prototype.pointerUp.call(this,xt),this.setSize()},Lt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.visual&&Ut.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(xt),this.stateChanged()},Lt.prototype.setFillColor=function(xt){this.fillColor=xt,this.visual&&Ut.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(xt),this.stateChanged()},Lt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.visual&&Ut.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.visual&&Ut.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Lt.prototype.setOpacity=function(xt){this.opacity=xt,this.visual&&Ut.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},jt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){var Tt=xt;this.fillColor=Tt.fillColor,this.strokeColor=Tt.strokeColor,this.strokeWidth=Tt.strokeWidth,this.strokeDasharray=Tt.strokeDasharray,this.opacity=Tt.opacity,this.createVisual(),jt.prototype.restoreState.call(this,xt),this.setSize()},Lt.prototype.scale=function(xt,Tt){jt.prototype.scale.call(this,xt,Tt),this.setSize()},Lt.typeName="EllipseMarker",Lt.title="Ellipse marker",Lt.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>',Lt}(wt),ln=function(jt){function Lt(xt,Tt,Ft){return jt.call(this,xt,Tt,Ft)||this}return It(Lt,jt),Object.defineProperty(Lt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(xt){return!(!jt.prototype.ownsTarget.call(this,xt)&&xt!==this.tip1&&xt!==this.tip2)},Lt.prototype.createTips=function(){this.tip1=Ut.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(Ut.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ut.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(Ut.createTransform()),this.visual.appendChild(this.tip2)},Lt.prototype.pointerDown=function(xt,Tt){jt.prototype.pointerDown.call(this,xt,Tt),this.state==="creating"&&this.createTips()},Lt.prototype.adjustVisual=function(){if(jt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ut.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()]]),Ut.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 xt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Tt=this.tip1.transform.baseVal.getItem(0);Tt.setRotate(xt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Tt,0);var Ft=this.tip2.transform.baseVal.getItem(0);Ft.setRotate(xt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ft,0)}},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=jt.prototype.getState.call(this);return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){jt.prototype.restoreState.call(this,xt),this.createTips(),this.adjustVisual()},Lt.typeName="MeasurementMarker",Lt.title="Measurement marker",Lt.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>',Lt}(xe),Ee=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.strokePanel.colors=Ft.defaultColorSet,yt.fillColor="transparent",yt}return It(Lt,jt),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=jt.prototype.getState.call(this);return xt.typeName=Lt.typeName,xt},Lt.typeName="EllipseFrameMarker",Lt.title="Ellipse frame marker",Lt.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>',Lt}(pn),Ke=function(){function jt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(jt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),jt.prototype.addUndoStep=function(Lt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Lt)||(this.undoStack.push(Lt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Lt)&&this.redoStack.splice(0,this.redoStack.length))},jt.prototype.replaceLastUndoStep=function(Lt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Lt)},jt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},jt.prototype.undo=function(){if(this.undoStack.length>1){var Lt=this.undoStack.pop();return Lt!==void 0&&this.redoStack.push(Lt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},jt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},jt}(),gn=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.strokeColor="transparent",yt.strokeWidth=0,yt.strokeDasharray="",yt.curveX=0,yt.curveY=0,yt.manipulationStartCurveX=0,yt.manipulationStartCurveY=0,yt.setStrokeColor=yt.setStrokeColor.bind(yt),yt.setStrokeWidth=yt.setStrokeWidth.bind(yt),yt.setStrokeDasharray=yt.setStrokeDasharray.bind(yt),yt.positionGrips=yt.positionGrips.bind(yt),yt.addControlGrips=yt.addControlGrips.bind(yt),yt.adjustVisual=yt.adjustVisual.bind(yt),yt.setupControlBox=yt.setupControlBox.bind(yt),yt.resize=yt.resize.bind(yt),yt.strokeColor=Ft.defaultColor,yt.strokeWidth=Ft.defaultStrokeWidth,yt.strokeDasharray=Ft.defaultStrokeDasharray,yt.strokePanel=new nt("Line color",Ft.defaultColorSet,Ft.defaultColor),yt.strokePanel.onColorChanged=yt.setStrokeColor,yt.strokeWidthPanel=new Nt("Line width",Ft.defaultStrokeWidths,Ft.defaultStrokeWidth),yt.strokeWidthPanel.onWidthChanged=yt.setStrokeWidth,yt.strokeStylePanel=new Dt("Line style",Ft.defaultStrokeDasharrays,Ft.defaultStrokeDasharray),yt.strokeStylePanel.onStyleChanged=yt.setStrokeDasharray,yt}return It(Lt,jt),Lt.prototype.ownsTarget=function(xt){return!(!jt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.selectorCurve&&xt!==this.visibleCurve&&!this.curveGrip.ownsTarget(xt))},Lt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Lt.prototype.createVisual=function(){this.visual=Ut.createGroup(),this.selectorCurve=Ut.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ut.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)},Lt.prototype.pointerDown=function(xt,Tt){jt.prototype.pointerDown.call(this,xt,Tt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=xt.x,this.curveY=xt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Tt)&&(this.activeGrip=this.curveGrip,this._state="resize")},Lt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ut.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ut.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ut.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setupControlBox=function(){jt.prototype.setupControlBox.call(this),this.curveControlLine1=Ut.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ut.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)},Lt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,jt.prototype.addControlGrips.call(this)},Lt.prototype.positionGrips=function(){jt.prototype.positionGrips.call(this);var xt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-xt/2,this.curveY-xt/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()))},Lt.prototype.manipulate=function(xt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+xt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+xt.y-this.manipulationStartY),jt.prototype.manipulate.call(this,xt)},Lt.prototype.resize=function(xt){this.activeGrip===this.curveGrip&&(this.curveX=xt.x,this.curveY=xt.y),jt.prototype.resize.call(this,xt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Lt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.adjustVisual(),this.colorChanged(xt)},Lt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.adjustVisual()},Lt.prototype.scale=function(xt,Tt){this.curveX=this.curveX*xt,this.curveY=this.curveY*Tt,jt.prototype.scale.call(this,xt,Tt)},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},jt.prototype.getState.call(this));return xt.typeName=Lt.typeName,xt},Lt.prototype.restoreState=function(xt){jt.prototype.restoreState.call(this,xt);var Tt=xt;this.strokeColor=Tt.strokeColor,this.strokeWidth=Tt.strokeWidth,this.strokeDasharray=Tt.strokeDasharray,this.curveX=Tt.curveX,this.curveY=Tt.curveY,this.createVisual(),this.adjustVisual()},Lt.typeName="CurveMarker",Lt.title="Curve marker",Lt.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>',Lt}(Wt),Bn=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,Tt,Ft)||this;return yt.fillColor="transparent",yt.strokeColor="transparent",yt.strokeWidth=0,yt.strokeDasharray="",yt.textColor="transparent",yt.fontSize="1rem",yt.isMoved=!1,yt.captionText="Caption",yt.PADDING=5,yt.captionBoxWidth=0,yt.captionBoxHeight=0,yt.strokeColor=Ft.defaultColor,yt.strokeWidth=Ft.defaultStrokeWidth,yt.strokeDasharray=Ft.defaultStrokeDasharray,yt.fillColor=Ft.defaultFillColor,yt.textColor=Ft.defaultStrokeColor,yt.fontFamily=Ft.defaultFontFamily,yt.fontSize=Ft.defaultCaptionFontSize,yt.captionText=Ft.defaultCaptionText,yt.setStrokeColor=yt.setStrokeColor.bind(yt),yt.setFillColor=yt.setFillColor.bind(yt),yt.setStrokeWidth=yt.setStrokeWidth.bind(yt),yt.setStrokeDasharray=yt.setStrokeDasharray.bind(yt),yt.createVisual=yt.createVisual.bind(yt),yt.sizeCaption=yt.sizeCaption.bind(yt),yt.setCaptionText=yt.setCaptionText.bind(yt),yt.showTextEditor=yt.showTextEditor.bind(yt),yt.positionTextEditor=yt.positionTextEditor.bind(yt),yt.finishTextEditing=yt.finishTextEditing.bind(yt),yt.setFont=yt.setFont.bind(yt),yt.setTextColor=yt.setTextColor.bind(yt),yt.strokePanel=new nt("Line color",$t(Ft.defaultColorSet,["transparent"]),yt.strokeColor),yt.strokePanel.onColorChanged=yt.setStrokeColor,yt.fillPanel=new nt("Fill color",$t(Ft.defaultColorSet,["transparent"]),yt.fillColor,Ht),yt.fillPanel.onColorChanged=yt.setFillColor,yt.strokeWidthPanel=new Nt("Line width",Ft.defaultStrokeWidths,Ft.defaultStrokeWidth),yt.strokeWidthPanel.onWidthChanged=yt.setStrokeWidth,yt.strokeStylePanel=new Dt("Line style",Ft.defaultStrokeDasharrays,Ft.defaultStrokeDasharray),yt.strokeStylePanel.onStyleChanged=yt.setStrokeDasharray,yt.fontFamilyPanel=new Vt("Font",Ft.defaultFontFamilies,Ft.defaultFontFamily),yt.fontFamilyPanel.onFontChanged=yt.setFont,yt.textColorPanel=new nt("Text color",Ft.defaultColorSet,yt.textColor,ue),yt.textColorPanel.onColorChanged=yt.setTextColor,yt}return It(Lt,jt),Lt.prototype.ownsTarget=function(xt){return!(!jt.prototype.ownsTarget.call(this,xt)&&xt!==this.visual&&xt!==this.frame&&xt!==this.captionBg&&xt!==this.captionElement)},Lt.prototype.createVisual=function(){this.visual=Ut.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ut.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ut.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=Ut.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()},Lt.prototype.setCaptionText=function(xt){this.captionText=xt,this.captionElement.textContent=this.captionText,this.sizeCaption()},Lt.prototype.pointerDown=function(xt,Tt){jt.prototype.pointerDown.call(this,xt,Tt),this.isMoved=!1,this.pointerDownPoint=xt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(xt),this._state="creating")},Lt.prototype.manipulate=function(xt){jt.prototype.manipulate.call(this,xt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(xt.x-this.pointerDownPoint.x)>5||Math.abs(xt.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(xt){jt.prototype.resize.call(this,xt),this.setSize()},Lt.prototype.sizeCaption=function(){var xt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=xt.width+2*this.PADDING,this.captionBoxHeight=xt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Ut.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')"]]),Ut.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')"]])},Lt.prototype.showTextEditor=function(){var xt=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(Tt){Tt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Tt){Tt.key==="Enter"&&xt.finishTextEditing(xt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Tt){Tt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){xt.finishTextEditing(xt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){xt.finishTextEditing(xt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Lt.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"))},Lt.prototype.finishTextEditing=function(xt){this.setCaptionText(xt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Lt.prototype.setFont=function(xt){this.captionElement&&Ut.setAttributes(this.captionElement,[["font-family",xt]]),this.fontFamily=xt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Lt.prototype.setTextColor=function(xt){this.captionElement&&Ut.setAttributes(this.captionElement,[["fill",xt]]),this.textColor=xt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Lt.prototype.setSize=function(){jt.prototype.setSize.call(this),Ut.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Lt.prototype.pointerUp=function(xt){jt.prototype.pointerUp.call(this,xt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.dblClick=function(xt,Tt){jt.prototype.dblClick.call(this,xt,Tt),this.showTextEditor()},Lt.prototype.setStrokeColor=function(xt){this.strokeColor=xt,this.frame&&Ut.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(xt),this.stateChanged()},Lt.prototype.setFillColor=function(xt){this.fillColor=xt,this.captionBg&&Ut.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(xt),this.stateChanged()},Lt.prototype.setStrokeWidth=function(xt){this.strokeWidth=xt,this.frame&&Ut.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(xt){this.strokeDasharray=xt,this.frame&&Ut.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var xt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},jt.prototype.getState.call(this));return xt.typeName=this.typeName,xt},Lt.prototype.restoreState=function(xt){var Tt=xt;this.fillColor=Tt.fillColor,this.strokeColor=Tt.strokeColor,this.strokeWidth=Tt.strokeWidth,this.strokeDasharray=Tt.strokeDasharray,this.textColor=Tt.textColor,this.fontFamily=Tt.fontFamily,this.captionText=Tt.captionText,this.fontSize=Tt.fontSize,this.createVisual(),jt.prototype.restoreState.call(this,xt),this.setSize()},Lt.prototype.scale=function(xt,Tt){jt.prototype.scale.call(this,xt,Tt),this.setSize()},Lt.typeName="CaptionFrameMarker",Lt.title="Caption frame marker",Lt.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>',Lt}(wt),dn=function(){function jt(Lt,xt){xt===void 0&&(xt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Lt,this.cancelable=xt}return Object.defineProperty(jt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),jt.prototype.preventDefault=function(){this._defaultPrevented=!0},jt}(),In=function(jt){function Lt(xt,Tt,Ft){var yt=jt.call(this,xt,!1)||this;return yt.dataUrl=Tt,yt.state=Ft,yt}return It(Lt,jt),Lt}(dn),Ce=function(jt){function Lt(xt,Tt,Ft){Ft===void 0&&(Ft=!1);var yt=jt.call(this,xt,Ft)||this;return yt.marker=Tt,yt}return It(Lt,jt),Lt}(dn),$n=function(){function jt(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return jt.prototype.addEventListener=function(Lt,xt){this[Lt].push(xt)},jt.prototype.removeEventListener=function(Lt,xt){var Tt=this[Lt].indexOf(xt);Tt>-1&&this[Lt].splice(Tt,1)},jt}(),Qn=function(){function jt(Lt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Kt,this._isOpen=!1,this.undoRedoManager=new Ke,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 $n,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=jt.instanceCounter++,this.styles=new te(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Lt,this.targetRoot=document.body,this.width=Lt.clientWidth,this.height=Lt.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(jt.prototype,"ALL_MARKER_TYPES",{get:function(){return[At,Se,Le,Ie,Ee,pn,Ue,ke,ln,Pe,xe,gn,Bn]},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[At,Se,Le,Ie,pn,Ue,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[At,Se,Le,Ie,Ue]},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Lt){var xt=this;this._availableMarkerTypes.splice(0),Lt.forEach(function(Tt){if(typeof Tt=="string"){var Ft=xt.ALL_MARKER_TYPES.find(function(yt){return yt.typeName===Tt});Ft!==void 0&&xt._availableMarkerTypes.push(Ft)}else xt._availableMarkerTypes.push(Tt)})},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Lt){this._zoomLevel=Lt,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),jt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Jt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},jt.prototype.show=function(){var Lt=this;this.styles.styleSheetRoot===void 0&&we.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=we.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(xt){return xt(new dn(Lt))})},jt.prototype.render=function(){return oe(this,void 0,void 0,function(){var Lt;return de(this,function(xt){switch(xt.label){case 0:return this.setCurrentMarker(),(Lt=new De).naturalSize=this.renderAtNaturalSize,Lt.imageType=this.renderImageType,Lt.imageQuality=this.renderImageQuality,Lt.markersOnly=this.renderMarkersOnly,Lt.width=this.renderWidth,Lt.height=this.renderHeight,[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return xt.sent(),[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,xt.sent()]}})})},jt.prototype.close=function(Lt){var xt=this;if(Lt===void 0&&(Lt=!1),this.isOpen){var Tt=!1;Lt||this.eventListeners.beforeclose.forEach(function(Ft){var yt=new dn(xt,!0);Ft(yt),yt.defaultPrevented&&(Tt=!0)}),Tt||(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(Ft){return Ft(new dn(xt))}),this.detachEvents(),this._isOpen=!1)}},jt.prototype.addMarkersToToolbar=function(){for(var Lt,xt=[],Tt=0;Tt<arguments.length;Tt++)xt[Tt]=arguments[Tt];(Lt=this._availableMarkerTypes).push.apply(Lt,xt)},jt.prototype.addRenderEventListener=function(Lt){this.addEventListener("render",function(xt){Lt(xt.dataUrl,xt.state)})},jt.prototype.removeRenderEventListener=function(Lt){},jt.prototype.addCloseEventListener=function(Lt){this.addEventListener("close",function(){Lt()})},jt.prototype.removeCloseEventListener=function(Lt){},jt.prototype.setupResizeObserver=function(){var Lt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Lt.resize(Lt.target.clientWidth,Lt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Lt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},jt.prototype.onPopupTargetResize=function(){var Lt=1*this.target.clientWidth/this.target.clientHeight,xt=this.editorCanvas.clientWidth/Lt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Lt:this.editorCanvas.clientWidth,Tt=xt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Lt;this.resize(xt,Tt)},jt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},jt.prototype.resize=function(Lt,xt){this._isResizing=!0;var Tt=Lt/this.imageWidth,Ft=xt/this.imageHeight;this.imageWidth=Math.round(Lt),this.imageHeight=Math.round(xt),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(Tt,Ft),this._isResizing=!1},jt.prototype.scaleMarkers=function(Lt,xt){var Tt,Ft=this;this._currentMarker&&this._currentMarker instanceof Ie?this._currentMarker.scale(Lt,xt):(Tt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(yt){yt!==Ft._currentMarker&&yt.scale(Lt,xt)}),Tt!==void 0&&this.setCurrentMarker(Tt)},jt.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},jt.prototype.setTopLeft=function(){var Lt=this.editingTarget.getBoundingClientRect(),xt=this.editorCanvas.getBoundingClientRect();this.left=Lt.left-xt.left,this.top=Lt.top-xt.top},jt.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},jt.prototype.addDefs=function(){for(var Lt,xt=[],Tt=0;Tt<arguments.length;Tt++)xt[Tt]=arguments[Tt];this.defs=Ut.createDefs(),this.addDefsToImage(),(Lt=this.defs).append.apply(Lt,xt)},jt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},jt.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},jt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},jt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},jt.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},jt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},jt.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},jt.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var Lt=document.createElement("a");Lt.href="https://markerjs.com/",Lt.target="_blank",Lt.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>',Lt.title="Powered by marker.js",Lt.style.display="grid",Lt.style.alignItems="center",Lt.style.justifyItems="center",Lt.style.padding="3px",Lt.style.width="20px",Lt.style.height="20px",this.logoUI.appendChild(Lt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},jt.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},jt.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},jt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},jt.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var Lt=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=Lt+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new me(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Ot(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},jt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},jt.prototype.removeMarker=function(Lt){this.markerImage.removeChild(Lt.container),this.markers.indexOf(Lt)>-1&&this.markers.splice(this.markers.indexOf(Lt),1),Lt.dispose()},jt.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},jt.prototype.toolbarButtonClicked=function(Lt,xt){if(Lt==="marker"&&xt!==void 0)this.createNewMarker(xt);else if(Lt==="action")switch(xt){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},jt.prototype.deleteSelectedMarker=function(){var Lt=this;if(this._currentMarker!==void 0){var xt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ft){var yt=new Ce(Lt,Lt._currentMarker,!0);Ft(yt),yt.defaultPrevented&&(xt=!0)}),!xt){var Tt=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(Ft){return Ft(new Ce(Lt,Tt))})}}},jt.prototype.clear=function(){var Lt=this,xt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ee){var pe=new Ce(Lt,void 0,!0);ee(pe),pe.defaultPrevented&&(xt=!0)}),!xt)){this.setCurrentMarker();for(var Tt=function(ee){var pe=Ft.markers[ee];Ft.setCurrentMarker(Ft.markers[ee]),Ft._currentMarker.dispose(),Ft.markerImage.removeChild(Ft._currentMarker.container),Ft.markers.splice(Ft.markers.indexOf(Ft._currentMarker),1),Ft.eventListeners.markerdelete.forEach(function(qt){return qt(new Ce(Lt,pe))})},Ft=this,yt=this.markers.length-1;yt>=0;yt--)Tt(yt);this.addUndoStep()}},Object.defineProperty(jt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),jt.prototype.showNotesEditor=function(){var Lt;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=(Lt=this._currentMarker.notes)!==null&&Lt!==void 0?Lt:"",this.overlayContainer.appendChild(this.notesArea))},jt.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},jt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},jt.prototype.addUndoStep=function(){var Lt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var xt=this.getState(),Tt=this.undoRedoManager.getLastUndoStep();if(!Tt||Tt.width===xt.width&&Tt.height===xt.height){var Ft=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(xt),Ft<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(yt){return yt(new dn(Lt))})}else this.undoRedoManager.replaceLastUndoStep(xt),this.eventListeners.statechange.forEach(function(yt){return yt(new dn(Lt))})}},jt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},jt.prototype.undoStep=function(){var Lt=this,xt=this.undoRedoManager.undo();xt!==void 0&&(this.restoreState(xt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Tt){return Tt(new dn(Lt))}))},jt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},jt.prototype.redoStep=function(){var Lt=this,xt=this.undoRedoManager.redo();xt!==void 0&&(this.restoreState(xt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Tt){return Tt(new dn(Lt))}))},jt.prototype.stepZoom=function(){var Lt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Lt<this.zoomSteps.length-1?this.zoomSteps[Lt+1]:this.zoomSteps[0]},jt.prototype.panTo=function(Lt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Lt.x,top:this.prevPanPoint.y-Lt.y}),this.prevPanPoint=Lt},jt.prototype.startRenderAndClose=function(){return oe(this,void 0,void 0,function(){var Lt,xt,Tt=this;return de(this,function(Ft){switch(Ft.label){case 0:return[4,this.render()];case 1:return Lt=Ft.sent(),xt=this.getState(),this.eventListeners.render.forEach(function(yt){return yt(new In(Tt,Lt,xt))}),this.close(!0),[2]}})})},jt.prototype.getState=function(Lt){Lt===!0&&this.setCurrentMarker();var xt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Tt){return xt.markers.push(Tt.getState())}),xt},jt.prototype.restoreState=function(Lt){var xt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Lt.markers.forEach(function(Tt){var Ft=xt._availableMarkerTypes.find(function(ee){return ee.typeName===Tt.typeName});if(Ft!==void 0){var yt=xt.addNewMarker(Ft);yt.restoreState(Tt),xt.markers.push(yt)}}),Lt.width&&Lt.height&&(Lt.width!==this.imageWidth||Lt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Lt.width,this.imageHeight/Lt.height),this.eventListeners.restorestate.forEach(function(Tt){return Tt(new dn(xt))})},jt.prototype.addNewMarker=function(Lt){var xt=Ut.createGroup();return this.markerImage.appendChild(xt),new Lt(xt,this.overlayContainer,this.settings)},jt.prototype.createNewMarker=function(Lt){var xt,Tt=this;(xt=typeof Lt=="string"?this._availableMarkerTypes.find(function(Ft){return Ft.typeName===Lt}):Lt)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(xt),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(xt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ft){return Ft(new Ce(Tt,Tt._currentMarker))}))},jt.prototype.markerCreated=function(Lt){var xt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Lt),this.setCurrentMarker(Lt),Lt instanceof Se&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Se):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Tt){return Tt(new Ce(xt,xt._currentMarker))})},jt.prototype.colorChanged=function(Lt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Lt,this.settings.defaultStrokeColor=Lt)},jt.prototype.fillColorChanged=function(Lt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Lt)},jt.prototype.markerStateChanged=function(Lt){var xt=this;this.eventListeners.markerchange.forEach(function(Tt){return Tt(new Ce(xt,Lt))})},jt.prototype.setCurrentMarker=function(Lt){var xt=this;this._currentMarker!==Lt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Tt){return Tt(new Ce(xt,xt._currentMarker))})),this._currentMarker=Lt,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(Tt){return Tt(new Ce(xt,xt._currentMarker))}))},jt.prototype.onPointerDown=function(Lt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Lt.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var xt=this.markers.find(function(Tt){return Tt.ownsTarget(Lt.target)});xt!==void 0?(this.setCurrentMarker(xt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY),Lt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Lt.clientX,y:Lt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY))},jt.prototype.onDblClick=function(Lt){if(this._isFocused||this.focus(),this.mode==="select"){var xt=this.markers.find(function(Tt){return Tt.ownsTarget(Lt.target)});xt!==void 0&&xt!==this._currentMarker&&this.setCurrentMarker(xt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY),Lt.target):this.setCurrentMarker()}},jt.prototype.onPointerMove=function(Lt){this.touchPoints!==1&&Lt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Lt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY)):this.zoomLevel>1&&this.panTo({x:Lt.clientX,y:Lt.clientY}))},jt.prototype.onPointerUp=function(Lt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY)),this.isDragging=!1,this.addUndoStep()},jt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},jt.prototype.onKeyUp=function(Lt){this._currentMarker===void 0||this.notesArea!==void 0||Lt.key!=="Delete"&&Lt.key!=="Backspace"||this.deleteSelectedMarker()},jt.prototype.clientToLocalCoordinates=function(Lt,xt){var Tt=this.markerImage.getBoundingClientRect();return{x:(Lt-Tt.left)/this.zoomLevel,y:(xt-Tt.top)/this.zoomLevel}},jt.prototype.onWindowResize=function(){this.positionUI()},jt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Lt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Lt+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},jt.prototype.addLicenseKey=function(Lt){Jt.addKey(Lt)},jt.prototype.addEventListener=function(Lt,xt){this.eventListeners.addEventListener(Lt,xt)},jt.prototype.removeEventListener=function(Lt,xt){this.eventListeners.removeEventListener(Lt,xt)},jt.prototype.renderState=function(Lt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Lt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(jt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),jt.prototype.focus=function(){var Lt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(xt){return xt(new dn(Lt))}))},jt.prototype.blur=function(){var Lt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(xt){return xt(new dn(Lt))}))},jt.instanceCounter=0,jt}()},17115:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{ZP:function(){return Jt}});var vt=Pt(72071),It=Pt(59301),oe=Pt(47273),de=0,$t=(0,oe.Z)();function Ut(){var De;return $t?(De=de,de+=1):De="TEST_OR_SSR",De}function Jt(De){var we=It.useState(),te=(0,vt.Z)(we,2),Fe=te[0],re=te[1];return It.useEffect(function(){re("rc_select_".concat(Ut()))},[]),De||Fe}},77861:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Ac:function(){return Ne},Xo:function(){return ni},Wx:function(){return Bi},ZP:function(){return cn},lk:function(){return wt}});var vt=Pt(96663),It=Pt(19127),oe=Pt(90493),de=Pt(44127),$t=Pt(72071),Ut=Pt(6620),Jt=Pt(20135),De=Pt(18929),we=Pt(48736),te=Pt(59301),Fe=Pt(92310),re=Pt.n(Fe),me=Pt(34280),Ot=Pt(49658),et=Pt(10228),nt=Pt(8654),ht=function(ie){var Qe=ie.className,yn=ie.customizeIcon,Nn=ie.customizeIconProps,_n=ie.onMouseDown,le=ie.onClick,mn=ie.children,Gn;return typeof yn=="function"?Gn=yn(Nn):Gn=yn,te.createElement("span",{className:Qe,onMouseDown:function(Re){Re.preventDefault(),_n&&_n(Re)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:le,"aria-hidden":!0},Gn!==void 0?Gn:te.createElement("span",{className:re()(Qe.split(/\s+/).map(function(si){return"".concat(si,"-icon")}))},mn))},at=ht;function ft(ve,ie,Qe,yn,Nn){var _n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,le=arguments.length>6?arguments[6]:void 0,mn=arguments.length>7?arguments[7]:void 0,Gn=te.useMemo(function(){if((0,Jt.Z)(yn)==="object")return yn.clearIcon;if(Nn)return Nn},[yn,Nn]),si=te.useMemo(function(){return!!(!_n&&yn&&(Qe.length||le)&&!(mn==="combobox"&&le===""))},[yn,_n,Qe.length,le,mn]);return{allowClear:si,clearIcon:te.createElement(at,{className:"".concat(ve,"-clear"),onMouseDown:ie,customizeIcon:Gn},"\xD7")}}var mt=te.createContext(null);function wt(){return te.useContext(mt)}function Et(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ie=te.useState(!1),Qe=(0,$t.Z)(ie,2),yn=Qe[0],Nn=Qe[1],_n=te.useRef(null),le=function(){window.clearTimeout(_n.current)};te.useEffect(function(){return le},[]);var mn=function(si,Re){le(),_n.current=window.setTimeout(function(){Nn(si),Re&&Re()},ve)};return[yn,mn,le]}function Nt(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ie=te.useRef(null),Qe=te.useRef(null);te.useEffect(function(){return function(){window.clearTimeout(Qe.current)}},[]);function yn(Nn){(Nn||ie.current===null)&&(ie.current=Nn),window.clearTimeout(Qe.current),Qe.current=window.setTimeout(function(){ie.current=null},ve)}return[function(){return ie.current},yn]}function Dt(ve,ie,Qe,yn){var Nn=te.useRef(null);Nn.current={open:ie,triggerOpen:Qe,customizedTrigger:yn},te.useEffect(function(){function _n(le){var mn;if(!((mn=Nn.current)!==null&&mn!==void 0&&mn.customizedTrigger)){var Gn=le.target;Gn.shadowRoot&&le.composed&&(Gn=le.composedPath()[0]||Gn),Nn.current.open&&ve().filter(function(si){return si}).every(function(si){return!si.contains(Gn)&&si!==Gn})&&Nn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",_n),function(){return window.removeEventListener("mousedown",_n)}},[])}var At=Pt(26112),Kt=Pt(11780),Wt=function(ie,Qe){var yn,Nn,_n=ie.prefixCls,le=ie.id,mn=ie.inputElement,Gn=ie.disabled,si=ie.tabIndex,Re=ie.autoFocus,fn=ie.autoComplete,He=ie.editable,je=ie.activeDescendantId,vn=ie.value,rn=ie.maxLength,bn=ie.onKeyDown,xn=ie.onMouseDown,On=ie.onChange,zn=ie.onPaste,yi=ie.onCompositionStart,Xe=ie.onCompositionEnd,Li=ie.open,ji=ie.attrs,Ei=mn||te.createElement("input",null),nn=Ei,Vn=nn.ref,ze=nn.props,Ge=ze.onKeyDown,Oe=ze.onChange,un=ze.onMouseDown,kn=ze.onCompositionStart,Tn=ze.onCompositionEnd,Rn=ze.style;return(0,we.Kp)(!("maxLength"in Ei.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ei=te.cloneElement(Ei,(0,de.Z)((0,de.Z)((0,de.Z)({type:"search"},ze),{},{id:le,ref:(0,nt.sQ)(Qe,Vn),disabled:Gn,tabIndex:si,autoComplete:fn||"off",autoFocus:Re,className:re()("".concat(_n,"-selection-search-input"),(yn=Ei)===null||yn===void 0||(Nn=yn.props)===null||Nn===void 0?void 0:Nn.className),role:"combobox","aria-label":"Search","aria-expanded":Li||!1,"aria-haspopup":"listbox","aria-owns":"".concat(le,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(le,"_list"),"aria-activedescendant":Li?je:void 0},ji),{},{value:He?vn:"",maxLength:rn,readOnly:!He,unselectable:He?null:"on",style:(0,de.Z)((0,de.Z)({},Rn),{},{opacity:He?null:0}),onKeyDown:function(qe){bn(qe),Ge&&Ge(qe)},onMouseDown:function(qe){xn(qe),un&&un(qe)},onChange:function(qe){On(qe),Oe&&Oe(qe)},onCompositionStart:function(qe){yi(qe),kn&&kn(qe)},onCompositionEnd:function(qe){Xe(qe),Tn&&Tn(qe)},onPaste:zn})),Ei},xe=te.forwardRef(Wt);xe.displayName="Input";var Vt=xe;function Ie(ve){return Array.isArray(ve)?ve:ve!==void 0?[ve]:[]}var Se=typeof window!="undefined"&&window.document&&window.document.documentElement,Ye=Se;function Le(ve){return ve!=null}function Pe(ve){return!ve&&ve!==0}function We(ve){return["string","number"].includes((0,Jt.Z)(ve))}function Ue(ve){var ie=void 0;return ve&&(We(ve.title)?ie=ve.title.toString():We(ve.label)&&(ie=ve.label.toString())),ie}function ue(ve,ie){Ye?te.useLayoutEffect(ve,ie):te.useEffect(ve,ie)}function Ht(ve){var ie;return(ie=ve.key)!==null&&ie!==void 0?ie:ve.value}var ke=function(ie){ie.preventDefault(),ie.stopPropagation()},pn=function(ie){var Qe=ie.id,yn=ie.prefixCls,Nn=ie.values,_n=ie.open,le=ie.searchValue,mn=ie.autoClearSearchValue,Gn=ie.inputRef,si=ie.placeholder,Re=ie.disabled,fn=ie.mode,He=ie.showSearch,je=ie.autoFocus,vn=ie.autoComplete,rn=ie.activeDescendantId,bn=ie.tabIndex,xn=ie.removeIcon,On=ie.maxTagCount,zn=ie.maxTagTextLength,yi=ie.maxTagPlaceholder,Xe=yi===void 0?function(Ai){return"+ ".concat(Ai.length," ...")}:yi,Li=ie.tagRender,ji=ie.onToggleOpen,Ei=ie.onRemove,nn=ie.onInputChange,Vn=ie.onInputPaste,ze=ie.onInputKeyDown,Ge=ie.onInputMouseDown,Oe=ie.onInputCompositionStart,un=ie.onInputCompositionEnd,kn=te.useRef(null),Tn=(0,te.useState)(0),Rn=(0,$t.Z)(Tn,2),ei=Rn[0],qe=Rn[1],pi=(0,te.useState)(!1),tn=(0,$t.Z)(pi,2),Ci=tn[0],Ui=tn[1],$i="".concat(yn,"-selection"),Co=_n||fn==="multiple"&&mn===!1||fn==="tags"?le:"",lo=fn==="tags"||fn==="multiple"&&mn===!1||He&&(_n||Ci);ue(function(){qe(kn.current.scrollWidth)},[Co]);function Si(Ai,vo,ao,Eo,Ho){return te.createElement("span",{className:re()("".concat($i,"-item"),(0,oe.Z)({},"".concat($i,"-item-disabled"),ao)),title:Ue(Ai)},te.createElement("span",{className:"".concat($i,"-item-content")},vo),Eo&&te.createElement(at,{className:"".concat($i,"-item-remove"),onMouseDown:ke,onClick:Ho,customizeIcon:xn},"\xD7"))}function ii(Ai,vo,ao,Eo,Ho){var Zi=function(Fi){ke(Fi),ji(!_n)};return te.createElement("span",{onMouseDown:Zi},Li({label:vo,value:Ai,disabled:ao,closable:Eo,onClose:Ho}))}function Yi(Ai){var vo=Ai.disabled,ao=Ai.label,Eo=Ai.value,Ho=!Re&&!vo,Zi=ao;if(typeof zn=="number"&&(typeof ao=="string"||typeof ao=="number")){var xi=String(Zi);xi.length>zn&&(Zi="".concat(xi.slice(0,zn),"..."))}var Fi=function(co){co&&co.stopPropagation(),Ei(Ai)};return typeof Li=="function"?ii(Eo,Zi,vo,Ho,Fi):Si(Ai,Zi,vo,Ho,Fi)}function oo(Ai){var vo=typeof Xe=="function"?Xe(Ai):Xe;return Si({title:vo},vo,!1)}var Yn=te.createElement("div",{className:"".concat($i,"-search"),style:{width:ei},onFocus:function(){Ui(!0)},onBlur:function(){Ui(!1)}},te.createElement(Vt,{ref:Gn,open:_n,prefixCls:yn,id:Qe,inputElement:null,disabled:Re,autoFocus:je,autoComplete:vn,editable:lo,activeDescendantId:rn,value:Co,onKeyDown:ze,onMouseDown:Ge,onChange:nn,onPaste:Vn,onCompositionStart:Oe,onCompositionEnd:un,tabIndex:bn,attrs:(0,At.Z)(ie,!0)}),te.createElement("span",{ref:kn,className:"".concat($i,"-search-mirror"),"aria-hidden":!0},Co,"\xA0")),zt=te.createElement(Kt.Z,{prefixCls:"".concat($i,"-overflow"),data:Nn,renderItem:Yi,renderRest:oo,suffix:Yn,itemKey:Ht,maxCount:On});return te.createElement(te.Fragment,null,zt,!Nn.length&&!Co&&te.createElement("span",{className:"".concat($i,"-placeholder")},si))},ln=pn,Ee=function(ie){var Qe=ie.inputElement,yn=ie.prefixCls,Nn=ie.id,_n=ie.inputRef,le=ie.disabled,mn=ie.autoFocus,Gn=ie.autoComplete,si=ie.activeDescendantId,Re=ie.mode,fn=ie.open,He=ie.values,je=ie.placeholder,vn=ie.tabIndex,rn=ie.showSearch,bn=ie.searchValue,xn=ie.activeValue,On=ie.maxLength,zn=ie.onInputKeyDown,yi=ie.onInputMouseDown,Xe=ie.onInputChange,Li=ie.onInputPaste,ji=ie.onInputCompositionStart,Ei=ie.onInputCompositionEnd,nn=ie.title,Vn=te.useState(!1),ze=(0,$t.Z)(Vn,2),Ge=ze[0],Oe=ze[1],un=Re==="combobox",kn=un||rn,Tn=He[0],Rn=bn||"";un&&xn&&!Ge&&(Rn=xn),te.useEffect(function(){un&&Oe(!1)},[un,xn]);var ei=Re!=="combobox"&&!fn&&!rn?!1:!!Rn,qe=nn===void 0?Ue(Tn):nn,pi=function(){if(Tn)return null;var Ci=ei?{visibility:"hidden"}:void 0;return te.createElement("span",{className:"".concat(yn,"-selection-placeholder"),style:Ci},je)};return te.createElement(te.Fragment,null,te.createElement("span",{className:"".concat(yn,"-selection-search")},te.createElement(Vt,{ref:_n,prefixCls:yn,id:Nn,open:fn,inputElement:Qe,disabled:le,autoFocus:mn,autoComplete:Gn,editable:kn,activeDescendantId:si,value:Rn,onKeyDown:zn,onMouseDown:yi,onChange:function(Ci){Oe(!0),Xe(Ci)},onPaste:Li,onCompositionStart:ji,onCompositionEnd:Ei,tabIndex:vn,attrs:(0,At.Z)(ie,!0),maxLength:un?On:void 0})),!un&&Tn?te.createElement("span",{className:"".concat(yn,"-selection-item"),title:qe,style:ei?{visibility:"hidden"}:void 0},Tn.label):null,pi())},Ke=Ee;function gn(ve){return![et.Z.ESC,et.Z.SHIFT,et.Z.BACKSPACE,et.Z.TAB,et.Z.WIN_KEY,et.Z.ALT,et.Z.META,et.Z.WIN_KEY_RIGHT,et.Z.CTRL,et.Z.SEMICOLON,et.Z.EQUALS,et.Z.CAPS_LOCK,et.Z.CONTEXT_MENU,et.Z.F1,et.Z.F2,et.Z.F3,et.Z.F4,et.Z.F5,et.Z.F6,et.Z.F7,et.Z.F8,et.Z.F9,et.Z.F10,et.Z.F11,et.Z.F12].includes(ve)}var Bn=function(ie,Qe){var yn=(0,te.useRef)(null),Nn=(0,te.useRef)(!1),_n=ie.prefixCls,le=ie.open,mn=ie.mode,Gn=ie.showSearch,si=ie.tokenWithEnter,Re=ie.autoClearSearchValue,fn=ie.onSearch,He=ie.onSearchSubmit,je=ie.onToggleOpen,vn=ie.onInputKeyDown,rn=ie.domRef;te.useImperativeHandle(Qe,function(){return{focus:function(){yn.current.focus()},blur:function(){yn.current.blur()}}});var bn=Nt(0),xn=(0,$t.Z)(bn,2),On=xn[0],zn=xn[1],yi=function(Rn){var ei=Rn.which;(ei===et.Z.UP||ei===et.Z.DOWN)&&Rn.preventDefault(),vn&&vn(Rn),ei===et.Z.ENTER&&mn==="tags"&&!Nn.current&&!le&&(He==null||He(Rn.target.value)),gn(ei)&&je(!0)},Xe=function(){zn(!0)},Li=(0,te.useRef)(null),ji=function(Rn){fn(Rn,!0,Nn.current)!==!1&&je(!0)},Ei=function(){Nn.current=!0},nn=function(Rn){Nn.current=!1,mn!=="combobox"&&ji(Rn.target.value)},Vn=function(Rn){var ei=Rn.target.value;if(si&&Li.current&&/[\r\n]/.test(Li.current)){var qe=Li.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");ei=ei.replace(qe,Li.current)}Li.current=null,ji(ei)},ze=function(Rn){var ei=Rn.clipboardData,qe=ei.getData("text");Li.current=qe},Ge=function(Rn){var ei=Rn.target;if(ei!==yn.current){var qe=document.body.style.msTouchAction!==void 0;qe?setTimeout(function(){yn.current.focus()}):yn.current.focus()}},Oe=function(Rn){var ei=On();Rn.target!==yn.current&&!ei&&mn!=="combobox"&&Rn.preventDefault(),(mn!=="combobox"&&(!Gn||!ei)||!le)&&(le&&Re!==!1&&fn("",!0,!1),je())},un={inputRef:yn,onInputKeyDown:yi,onInputMouseDown:Xe,onInputChange:Vn,onInputPaste:ze,onInputCompositionStart:Ei,onInputCompositionEnd:nn},kn=mn==="multiple"||mn==="tags"?te.createElement(ln,(0,vt.Z)({},ie,un)):te.createElement(Ke,(0,vt.Z)({},ie,un));return te.createElement("div",{ref:rn,className:"".concat(_n,"-selector"),onClick:Ge,onMouseDown:Oe},kn)},dn=te.forwardRef(Bn);dn.displayName="Selector";var In=dn,Ce=Pt(35593),$n=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Qn=function(ie){var Qe=ie===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Qe,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Qe,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Qe,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Qe,adjustY:1},htmlRegion:"scroll"}}},jt=function(ie,Qe){var yn=ie.prefixCls,Nn=ie.disabled,_n=ie.visible,le=ie.children,mn=ie.popupElement,Gn=ie.animation,si=ie.transitionName,Re=ie.dropdownStyle,fn=ie.dropdownClassName,He=ie.direction,je=He===void 0?"ltr":He,vn=ie.placement,rn=ie.builtinPlacements,bn=ie.dropdownMatchSelectWidth,xn=ie.dropdownRender,On=ie.dropdownAlign,zn=ie.getPopupContainer,yi=ie.empty,Xe=ie.getTriggerDOMNode,Li=ie.onPopupVisibleChange,ji=ie.onPopupMouseEnter,Ei=(0,Ut.Z)(ie,$n),nn="".concat(yn,"-dropdown"),Vn=mn;xn&&(Vn=xn(mn));var ze=te.useMemo(function(){return rn||Qn(bn)},[rn,bn]),Ge=Gn?"".concat(nn,"-").concat(Gn):si,Oe=typeof bn=="number",un=te.useMemo(function(){return Oe?null:bn===!1?"minWidth":"width"},[bn,Oe]),kn=Re;Oe&&(kn=(0,de.Z)((0,de.Z)({},kn),{},{width:bn}));var Tn=te.useRef(null);return te.useImperativeHandle(Qe,function(){return{getPopupElement:function(){return Tn.current}}}),te.createElement(Ce.Z,(0,vt.Z)({},Ei,{showAction:Li?["click"]:[],hideAction:Li?["click"]:[],popupPlacement:vn||(je==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ze,prefixCls:nn,popupTransitionName:Ge,popup:te.createElement("div",{ref:Tn,onMouseEnter:ji},Vn),stretch:un,popupAlign:On,popupVisible:_n,getPopupContainer:zn,popupClassName:re()(fn,(0,oe.Z)({},"".concat(nn,"-empty"),yi)),popupStyle:kn,getTriggerDOMNode:Xe,onPopupVisibleChange:Li}),le)},Lt=te.forwardRef(jt);Lt.displayName="SelectTrigger";var xt=Lt,Tt=Pt(4537);function Ft(ve,ie){var Qe=ve.key,yn;return"value"in ve&&(yn=ve.value),Qe!=null?Qe:yn!==void 0?yn:"rc-index-key-".concat(ie)}function yt(ve,ie){var Qe=ve||{},yn=Qe.label,Nn=Qe.value,_n=Qe.options,le=Qe.groupLabel,mn=yn||(ie?"children":"label");return{label:mn,value:Nn||"value",options:_n||"options",groupLabel:le||mn}}function ee(ve){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Qe=ie.fieldNames,yn=ie.childrenAsData,Nn=[],_n=yt(Qe,!1),le=_n.label,mn=_n.value,Gn=_n.options,si=_n.groupLabel;function Re(fn,He){fn.forEach(function(je){if(He||!(Gn in je)){var vn=je[mn];Nn.push({key:Ft(je,Nn.length),groupOption:He,data:je,label:je[le],value:vn})}else{var rn=je[si];rn===void 0&&yn&&(rn=je.label),Nn.push({key:Ft(je,Nn.length),group:!0,data:je,label:rn}),Re(je[Gn],!0)}})}return Re(ve,!1),Nn}function pe(ve){var ie=(0,de.Z)({},ve);return"props"in ie||Object.defineProperty(ie,"props",{get:function(){return(0,we.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),ie}}),ie}function qt(ve,ie){if(!ie||!ie.length)return null;var Qe=!1;function yn(_n,le){var mn=(0,Tt.Z)(le),Gn=mn[0],si=mn.slice(1);if(!Gn)return[_n];var Re=_n.split(Gn);return Qe=Qe||Re.length>1,Re.reduce(function(fn,He){return[].concat((0,It.Z)(fn),(0,It.Z)(yn(He,si)))},[]).filter(function(fn){return fn})}var Nn=yn(ve,ie);return Qe?Nn:null}var Zt=["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","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],fe=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function ce(ve){return ve==="tags"||ve==="multiple"}var ne=te.forwardRef(function(ve,ie){var Qe,yn,Nn=ve.id,_n=ve.prefixCls,le=ve.className,mn=ve.showSearch,Gn=ve.tagRender,si=ve.direction,Re=ve.omitDomProps,fn=ve.displayValues,He=ve.onDisplayValuesChange,je=ve.emptyOptions,vn=ve.notFoundContent,rn=vn===void 0?"Not Found":vn,bn=ve.onClear,xn=ve.mode,On=ve.disabled,zn=ve.loading,yi=ve.getInputElement,Xe=ve.getRawInputElement,Li=ve.open,ji=ve.defaultOpen,Ei=ve.onDropdownVisibleChange,nn=ve.activeValue,Vn=ve.onActiveValueChange,ze=ve.activeDescendantId,Ge=ve.searchValue,Oe=ve.autoClearSearchValue,un=ve.onSearch,kn=ve.onSearchSplit,Tn=ve.tokenSeparators,Rn=ve.allowClear,ei=ve.suffixIcon,qe=ve.clearIcon,pi=ve.OptionList,tn=ve.animation,Ci=ve.transitionName,Ui=ve.dropdownStyle,$i=ve.dropdownClassName,Co=ve.dropdownMatchSelectWidth,lo=ve.dropdownRender,Si=ve.dropdownAlign,ii=ve.placement,Yi=ve.builtinPlacements,oo=ve.getPopupContainer,Yn=ve.showAction,zt=Yn===void 0?[]:Yn,Ai=ve.onFocus,vo=ve.onBlur,ao=ve.onKeyUp,Eo=ve.onKeyDown,Ho=ve.onMouseDown,Zi=(0,Ut.Z)(ve,Zt),xi=ce(xn),Fi=(mn!==void 0?mn:xi)||xn==="combobox",Mi=(0,de.Z)({},Zi);fe.forEach(function(wi){delete Mi[wi]}),Re==null||Re.forEach(function(wi){delete Mi[wi]});var co=te.useState(!1),uo=(0,$t.Z)(co,2),Pi=uo[0],Ni=uo[1];te.useEffect(function(){Ni((0,Ot.Z)())},[]);var Wn=te.useRef(null),zi=te.useRef(null),xo=te.useRef(null),Ko=te.useRef(null),Uo=te.useRef(null),Qo=Et(),ar=(0,$t.Z)(Qo,3),Ro=ar[0],er=ar[1],nr=ar[2];te.useImperativeHandle(ie,function(){var wi,Hi;return{focus:(wi=Ko.current)===null||wi===void 0?void 0:wi.focus,blur:(Hi=Ko.current)===null||Hi===void 0?void 0:Hi.blur,scrollTo:function(lr){var fr;return(fr=Uo.current)===null||fr===void 0?void 0:fr.scrollTo(lr)}}});var qr=te.useMemo(function(){var wi;if(xn!=="combobox")return Ge;var Hi=(wi=fn[0])===null||wi===void 0?void 0:wi.value;return typeof Hi=="string"||typeof Hi=="number"?String(Hi):""},[Ge,xn,fn]),sn=xn==="combobox"&&typeof yi=="function"&&yi()||null,wr=typeof Xe=="function"&&Xe(),Sa=(0,nt.x1)(zi,wr==null||(Qe=wr.props)===null||Qe===void 0?void 0:Qe.ref),Cs=te.useState(!1),jo=(0,$t.Z)(Cs,2),Lo=jo[0],vr=jo[1];(0,me.Z)(function(){vr(!0)},[]);var Xo=(0,De.Z)(!1,{defaultValue:ji,value:Li}),bo=(0,$t.Z)(Xo,2),Ao=bo[0],ur=bo[1],no=Lo?Ao:!1,ko=!rn&&je;(On||ko&&no&&xn==="combobox")&&(no=!1);var No=ko?!1:no,mi=te.useCallback(function(wi){var Hi=wi!==void 0?wi:!no;On||(ur(Hi),no!==Hi&&(Ei==null||Ei(Hi)))},[On,no,ur,Ei]),Fr=te.useMemo(function(){return(Tn||[]).some(function(wi){return[`
|
|
|
`,`\r
|
|
|
`].includes(wi)})},[Tn]),Or=function(Hi,Fo,lr){var fr=!0,gr=Hi;Vn==null||Vn(null);var Sr=lr?null:qt(Hi,Tn);return xn!=="combobox"&&Sr&&(gr="",kn==null||kn(Sr),mi(!1),fr=!1),un&&qr!==gr&&un(gr,{source:Fo?"typing":"effect"}),fr},jr=function(Hi){!Hi||!Hi.trim()||un(Hi,{source:"submit"})};te.useEffect(function(){!no&&!xi&&xn!=="combobox"&&Or("",!1,!1)},[no]),te.useEffect(function(){Ao&&On&&ur(!1),On&&er(!1)},[On]);var xa=Nt(),Ta=(0,$t.Z)(xa,2),ri=Ta[0],hr=Ta[1],Dr=function(Hi){var Fo=ri(),lr=Hi.which;if(lr===et.Z.ENTER&&(xn!=="combobox"&&Hi.preventDefault(),no||mi(!0)),hr(!!qr),lr===et.Z.BACKSPACE&&!Fo&&xi&&!qr&&fn.length){for(var fr=(0,It.Z)(fn),gr=null,Sr=fr.length-1;Sr>=0;Sr-=1){var xr=fr[Sr];if(!xr.disabled){fr.splice(Sr,1),gr=xr;break}}gr&&He(fr,{type:"remove",values:[gr]})}for(var yr=arguments.length,Za=new Array(yr>1?yr-1:0),la=1;la<yr;la++)Za[la-1]=arguments[la];if(no&&Uo.current){var Cr;(Cr=Uo.current).onKeyDown.apply(Cr,[Hi].concat(Za))}Eo==null||Eo.apply(void 0,[Hi].concat(Za))},Js=function(Hi){for(var Fo=arguments.length,lr=new Array(Fo>1?Fo-1:0),fr=1;fr<Fo;fr++)lr[fr-1]=arguments[fr];if(no&&Uo.current){var gr;(gr=Uo.current).onKeyUp.apply(gr,[Hi].concat(lr))}ao==null||ao.apply(void 0,[Hi].concat(lr))},Nl=function(Hi){var Fo=fn.filter(function(lr){return lr!==Hi});He(Fo,{type:"remove",values:[Hi]})},sa=te.useRef(!1),po=function(){er(!0),On||(Ai&&!sa.current&&Ai.apply(void 0,arguments),zt.includes("focus")&&mi(!0)),sa.current=!0},hu=function(){er(!1,function(){sa.current=!1,mi(!1)}),!On&&(qr&&(xn==="tags"?un(qr,{source:"submit"}):xn==="multiple"&&un("",{source:"blur"})),vo&&vo.apply(void 0,arguments))},Gs=[];te.useEffect(function(){return function(){Gs.forEach(function(wi){return clearTimeout(wi)}),Gs.splice(0,Gs.length)}},[]);var bs=function(Hi){var Fo,lr=Hi.target,fr=(Fo=xo.current)===null||Fo===void 0?void 0:Fo.getPopupElement();if(fr&&fr.contains(lr)){var gr=setTimeout(function(){var Za=Gs.indexOf(gr);if(Za!==-1&&Gs.splice(Za,1),nr(),!Pi&&!fr.contains(document.activeElement)){var la;(la=Ko.current)===null||la===void 0||la.focus()}});Gs.push(gr)}for(var Sr=arguments.length,xr=new Array(Sr>1?Sr-1:0),yr=1;yr<Sr;yr++)xr[yr-1]=arguments[yr];Ho==null||Ho.apply(void 0,[Hi].concat(xr))},Ws=te.useState({}),Tl=(0,$t.Z)(Ws,2),vl=Tl[1];function Ks(){vl({})}var aa;wr&&(aa=function(Hi){mi(Hi)}),Dt(function(){var wi;return[Wn.current,(wi=xo.current)===null||wi===void 0?void 0:wi.getPopupElement()]},No,mi,!!wr);var Kl=te.useMemo(function(){return(0,de.Z)((0,de.Z)({},ve),{},{notFoundContent:rn,open:no,triggerOpen:No,id:Nn,showSearch:Fi,multiple:xi,toggleOpen:mi})},[ve,rn,No,no,Nn,Fi,xi,mi]),Du=!!ei||zn,hs;Du&&(hs=te.createElement(at,{className:re()("".concat(_n,"-arrow"),(0,oe.Z)({},"".concat(_n,"-arrow-loading"),zn)),customizeIcon:ei,customizeIconProps:{loading:zn,searchValue:qr,open:no,focused:Ro,showSearch:Fi}}));var xh=function(){var Hi;bn==null||bn(),(Hi=Ko.current)===null||Hi===void 0||Hi.focus(),He([],{type:"clear",values:fn}),Or("",!1,!1)},$l=ft(_n,xh,fn,Rn,qe,On,qr,xn),du=$l.allowClear,$a=$l.clearIcon,Qs=te.createElement(pi,{ref:Uo}),qn=re()(_n,le,(yn={},(0,oe.Z)(yn,"".concat(_n,"-focused"),Ro),(0,oe.Z)(yn,"".concat(_n,"-multiple"),xi),(0,oe.Z)(yn,"".concat(_n,"-single"),!xi),(0,oe.Z)(yn,"".concat(_n,"-allow-clear"),Rn),(0,oe.Z)(yn,"".concat(_n,"-show-arrow"),Du),(0,oe.Z)(yn,"".concat(_n,"-disabled"),On),(0,oe.Z)(yn,"".concat(_n,"-loading"),zn),(0,oe.Z)(yn,"".concat(_n,"-open"),no),(0,oe.Z)(yn,"".concat(_n,"-customize-input"),sn),(0,oe.Z)(yn,"".concat(_n,"-show-search"),Fi),yn)),li=te.createElement(xt,{ref:xo,disabled:On,prefixCls:_n,visible:No,popupElement:Qs,animation:tn,transitionName:Ci,dropdownStyle:Ui,dropdownClassName:$i,direction:si,dropdownMatchSelectWidth:Co,dropdownRender:lo,dropdownAlign:Si,placement:ii,builtinPlacements:Yi,getPopupContainer:oo,empty:je,getTriggerDOMNode:function(){return zi.current},onPopupVisibleChange:aa,onPopupMouseEnter:Ks},wr?te.cloneElement(wr,{ref:Sa}):te.createElement(In,(0,vt.Z)({},ve,{domRef:zi,prefixCls:_n,inputElement:sn,ref:Ko,id:Nn,showSearch:Fi,autoClearSearchValue:Oe,mode:xn,activeDescendantId:ze,tagRender:Gn,values:fn,open:no,onToggleOpen:mi,activeValue:nn,searchValue:qr,onSearch:Or,onSearchSubmit:jr,onRemove:Nl,tokenWithEnter:Fr}))),Vi;return wr?Vi=li:Vi=te.createElement("div",(0,vt.Z)({className:qn},Mi,{ref:Wn,onMouseDown:bs,onKeyDown:Dr,onKeyUp:Js,onFocus:po,onBlur:hu}),Ro&&!no&&te.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(fn.map(function(wi){var Hi=wi.label,Fo=wi.value;return["number","string"].includes((0,Jt.Z)(Hi))?Hi:Fo}).join(", "))),li,hs,du&&$a),te.createElement(mt.Provider,{value:Kl},Vi)}),Ne=ne,hn=function(ve,ie){var Qe=te.useRef({values:new Map,options:new Map}),yn=te.useMemo(function(){var _n=Qe.current,le=_n.values,mn=_n.options,Gn=ve.map(function(fn){if(fn.label===void 0){var He;return(0,de.Z)((0,de.Z)({},fn),{},{label:(He=le.get(fn.value))===null||He===void 0?void 0:He.label})}return fn}),si=new Map,Re=new Map;return Gn.forEach(function(fn){si.set(fn.value,fn),Re.set(fn.value,ie.get(fn.value)||mn.get(fn.value))}),Qe.current.values=si,Qe.current.options=Re,Gn},[ve,ie]),Nn=te.useCallback(function(_n){return ie.get(_n)||Qe.current.options.get(_n)},[ie]);return[yn,Nn]};function an(ve,ie){return Ie(ve).join("").toUpperCase().includes(ie)}var _e=function(ve,ie,Qe,yn,Nn){return te.useMemo(function(){if(!Qe||yn===!1)return ve;var _n=ie.options,le=ie.label,mn=ie.value,Gn=[],si=typeof yn=="function",Re=Qe.toUpperCase(),fn=si?yn:function(je,vn){return Nn?an(vn[Nn],Re):vn[_n]?an(vn[le!=="children"?le:"label"],Re):an(vn[mn],Re)},He=si?function(je){return pe(je)}:function(je){return je};return ve.forEach(function(je){if(je[_n]){var vn=fn(Qe,He(je));if(vn)Gn.push(je);else{var rn=je[_n].filter(function(bn){return fn(Qe,He(bn))});rn.length&&Gn.push((0,de.Z)((0,de.Z)({},je),{},(0,oe.Z)({},_n,rn)))}return}fn(Qe,He(je))&&Gn.push(je)}),Gn},[ve,yn,Nn,Qe,ie])},En=Pt(17115),Ln=Pt(11592),ye=["children","value"],on=["children"];function Pn(ve){var ie=ve,Qe=ie.key,yn=ie.props,Nn=yn.children,_n=yn.value,le=(0,Ut.Z)(yn,ye);return(0,de.Z)({key:Qe,value:_n!==void 0?_n:Qe,children:Nn},le)}function Cn(ve){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Ln.Z)(ve).map(function(Qe,yn){if(!te.isValidElement(Qe)||!Qe.type)return null;var Nn=Qe,_n=Nn.type.isSelectOptGroup,le=Nn.key,mn=Nn.props,Gn=mn.children,si=(0,Ut.Z)(mn,on);return ie||!_n?Pn(Qe):(0,de.Z)((0,de.Z)({key:"__RC_SELECT_GRP__".concat(le===null?yn:le,"__"),label:le},si),{},{options:Cn(Gn)})}).filter(function(Qe){return Qe})}function An(ve,ie,Qe,yn,Nn){return te.useMemo(function(){var _n=ve,le=!ve;le&&(_n=Cn(ie));var mn=new Map,Gn=new Map,si=function(He,je,vn){vn&&typeof vn=="string"&&He.set(je[vn],je)};function Re(fn){for(var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,je=0;je<fn.length;je+=1){var vn=fn[je];!vn[Qe.options]||He?(mn.set(vn[Qe.value],vn),si(Gn,vn,Qe.label),si(Gn,vn,yn),si(Gn,vn,Nn)):Re(vn[Qe.options],!0)}}return Re(_n),{options:_n,valueOptions:mn,labelOptions:Gn}},[ve,ie,Qe,yn,Nn])}function Jn(ve){var ie=te.useRef();ie.current=ve;var Qe=te.useCallback(function(){return ie.current.apply(ie,arguments)},[]);return Qe}var ui=function(){return null};ui.isSelectOptGroup=!0;var ni=ui,fi=function(){return null};fi.isSelectOption=!0;var Bi=fi,Ti=Pt(80547),Di=Pt(2738),io=Pt(24916),to=te.createContext(null),Ri=to;function Qi(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Zn=["disabled","title","children","style","className"];function Mt(ve){return typeof ve=="string"||typeof ve=="number"}var so=function(ie,Qe){var yn=wt(),Nn=yn.prefixCls,_n=yn.id,le=yn.open,mn=yn.multiple,Gn=yn.mode,si=yn.searchValue,Re=yn.toggleOpen,fn=yn.notFoundContent,He=yn.onPopupScroll,je=te.useContext(Ri),vn=je.flattenOptions,rn=je.onActiveValue,bn=je.defaultActiveFirstOption,xn=je.onSelect,On=je.menuItemSelectedIcon,zn=je.rawValues,yi=je.fieldNames,Xe=je.virtual,Li=je.direction,ji=je.listHeight,Ei=je.listItemHeight,nn="".concat(Nn,"-item"),Vn=(0,Ti.Z)(function(){return vn},[le,vn],function(Si,ii){return ii[0]&&Si[1]!==ii[1]}),ze=te.useRef(null),Ge=function(ii){ii.preventDefault()},Oe=function(ii){ze.current&&ze.current.scrollTo(typeof ii=="number"?{index:ii}:ii)},un=function(ii){for(var Yi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,oo=Vn.length,Yn=0;Yn<oo;Yn+=1){var zt=(ii+Yn*Yi+oo)%oo,Ai=Vn[zt],vo=Ai.group,ao=Ai.data;if(!vo&&!ao.disabled)return zt}return-1},kn=te.useState(function(){return un(0)}),Tn=(0,$t.Z)(kn,2),Rn=Tn[0],ei=Tn[1],qe=function(ii){var Yi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;ei(ii);var oo={source:Yi?"keyboard":"mouse"},Yn=Vn[ii];if(!Yn){rn(null,-1,oo);return}rn(Yn.value,ii,oo)};(0,te.useEffect)(function(){qe(bn!==!1?un(0):-1)},[Vn.length,si]);var pi=te.useCallback(function(Si){return zn.has(Si)&&Gn!=="combobox"},[Gn,(0,It.Z)(zn).toString(),zn.size]);(0,te.useEffect)(function(){var Si=setTimeout(function(){if(!mn&&le&&zn.size===1){var Yi=Array.from(zn)[0],oo=Vn.findIndex(function(Yn){var zt=Yn.data;return zt.value===Yi});oo!==-1&&(qe(oo),Oe(oo))}});if(le){var ii;(ii=ze.current)===null||ii===void 0||ii.scrollTo(void 0)}return function(){return clearTimeout(Si)}},[le,si,vn.length]);var tn=function(ii){ii!==void 0&&xn(ii,{selected:!zn.has(ii)}),mn||Re(!1)};if(te.useImperativeHandle(Qe,function(){return{onKeyDown:function(ii){var Yi=ii.which,oo=ii.ctrlKey;switch(Yi){case et.Z.N:case et.Z.P:case et.Z.UP:case et.Z.DOWN:{var Yn=0;if(Yi===et.Z.UP?Yn=-1:Yi===et.Z.DOWN?Yn=1:Qi()&&oo&&(Yi===et.Z.N?Yn=1:Yi===et.Z.P&&(Yn=-1)),Yn!==0){var zt=un(Rn+Yn,Yn);Oe(zt),qe(zt,!0)}break}case et.Z.ENTER:{var Ai=Vn[Rn];Ai&&!Ai.data.disabled?tn(Ai.value):tn(void 0),le&&ii.preventDefault();break}case et.Z.ESC:Re(!1),le&&ii.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ii){Oe(ii)}}}),Vn.length===0)return te.createElement("div",{role:"listbox",id:"".concat(_n,"_list"),className:"".concat(nn,"-empty"),onMouseDown:Ge},fn);var Ci=Object.keys(yi).map(function(Si){return yi[Si]}),Ui=function(ii){return ii.label};function $i(Si,ii){var Yi=Si.group;return{role:Yi?"presentation":"option",id:"".concat(_n,"_list_").concat(ii)}}var Co=function(ii){var Yi=Vn[ii];if(!Yi)return null;var oo=Yi.data||{},Yn=oo.value,zt=Yi.group,Ai=(0,At.Z)(oo,!0),vo=Ui(Yi);return Yi?te.createElement("div",(0,vt.Z)({"aria-label":typeof vo=="string"&&!zt?vo:null},Ai,{key:ii},$i(Yi,ii),{"aria-selected":pi(Yn)}),Yn):null},lo={role:"listbox",id:"".concat(_n,"_list")};return te.createElement(te.Fragment,null,Xe&&te.createElement("div",(0,vt.Z)({},lo,{style:{height:0,width:0,overflow:"hidden"}}),Co(Rn-1),Co(Rn),Co(Rn+1)),te.createElement(io.Z,{itemKey:"key",ref:ze,data:Vn,height:ji,itemHeight:Ei,fullHeight:!1,onMouseDown:Ge,onScroll:He,virtual:Xe,direction:Li,innerProps:Xe?null:lo},function(Si,ii){var Yi,oo=Si.group,Yn=Si.groupOption,zt=Si.data,Ai=Si.label,vo=Si.value,ao=zt.key;if(oo){var Eo,Ho=(Eo=zt.title)!==null&&Eo!==void 0?Eo:Mt(Ai)?Ai.toString():void 0;return te.createElement("div",{className:re()(nn,"".concat(nn,"-group")),title:Ho},Ai!==void 0?Ai:ao)}var Zi=zt.disabled,xi=zt.title,Fi=zt.children,Mi=zt.style,co=zt.className,uo=(0,Ut.Z)(zt,Zn),Pi=(0,Di.Z)(uo,Ci),Ni=pi(vo),Wn="".concat(nn,"-option"),zi=re()(nn,Wn,co,(Yi={},(0,oe.Z)(Yi,"".concat(Wn,"-grouped"),Yn),(0,oe.Z)(Yi,"".concat(Wn,"-active"),Rn===ii&&!Zi),(0,oe.Z)(Yi,"".concat(Wn,"-disabled"),Zi),(0,oe.Z)(Yi,"".concat(Wn,"-selected"),Ni),Yi)),xo=Ui(Si),Ko=!On||typeof On=="function"||Ni,Uo=typeof xo=="number"?xo:xo||vo,Qo=Mt(Uo)?Uo.toString():void 0;return xi!==void 0&&(Qo=xi),te.createElement("div",(0,vt.Z)({},(0,At.Z)(Pi),Xe?{}:$i(Si,ii),{"aria-selected":Ni,className:zi,title:Qo,onMouseMove:function(){Rn===ii||Zi||qe(ii)},onClick:function(){Zi||tn(vo)},style:Mi}),te.createElement("div",{className:"".concat(Wn,"-content")},Uo),te.isValidElement(On)||Ni,Ko&&te.createElement(at,{className:"".concat(nn,"-option-state"),customizeIcon:On,customizeIconProps:{isSelected:Ni}},Ni?"\u2713":null))}))},Ii=te.forwardRef(so);Ii.displayName="OptionList";var Wi=Ii;function ki(ve){var ie=ve.mode,Qe=ve.options,yn=ve.children,Nn=ve.backfill,_n=ve.allowClear,le=ve.placeholder,mn=ve.getInputElement,Gn=ve.showSearch,si=ve.onSearch,Re=ve.defaultOpen,fn=ve.autoFocus,He=ve.labelInValue,je=ve.value,vn=ve.inputValue,rn=ve.optionLabelProp,bn=isMultiple(ie),xn=Gn!==void 0?Gn:bn||ie==="combobox",On=Qe||convertChildrenToData(yn);if(warning(ie!=="tags"||On.every(function(Li){return!Li.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ie==="tags"||ie==="combobox"){var zn=On.some(function(Li){return Li.options?Li.options.some(function(ji){return typeof("value"in ji?ji.value:ji.key)=="number"}):typeof("value"in Li?Li.value:Li.key)=="number"});warning(!zn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ie!=="combobox"||!rn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ie==="combobox"||!Nn,"`backfill` only works with `combobox` mode."),warning(ie==="combobox"||!mn,"`getInputElement` only work with `combobox` mode."),noteOnce(ie!=="combobox"||!mn||!_n||!le,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),si&&!xn&&ie!=="combobox"&&ie!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Re||fn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),je!=null){var yi=toArray(je);warning(!He||yi.every(function(Li){return _typeof(Li)==="object"&&("key"in Li||"value"in Li)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!bn||Array.isArray(je),"`value` should be array when `mode` is `multiple` or `tags`")}if(yn){var Xe=null;toNodeArray(yn).some(function(Li){if(!React.isValidElement(Li)||!Li.type)return!1;var ji=Li,Ei=ji.type;if(Ei.isSelectOption)return!1;if(Ei.isSelectOptGroup){var nn=toNodeArray(Li.props.children).every(function(Vn){return!React.isValidElement(Vn)||!Li.type||Vn.type.isSelectOption?!0:(Xe=Vn.type,!1)});return!nn}return Xe=Ei,!0}),Xe&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Xe.displayName||Xe.name||Xe,"`.")),warning(vn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Bo(ve,ie){if(ve){var Qe=function yn(Nn){for(var _n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,le=0;le<Nn.length;le++){var mn=Nn[le];if(mn[ie==null?void 0:ie.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!_n&&Array.isArray(mn[ie==null?void 0:ie.options])&&yn(mn[ie==null?void 0:ie.options],!0))break}};Qe(ve)}}var Mo=null,ai=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],di=["inputValue"];function Ae(ve){return!ve||(0,Jt.Z)(ve)!=="object"}var Be=te.forwardRef(function(ve,ie){var Qe=ve.id,yn=ve.mode,Nn=ve.prefixCls,_n=Nn===void 0?"rc-select":Nn,le=ve.backfill,mn=ve.fieldNames,Gn=ve.inputValue,si=ve.searchValue,Re=ve.onSearch,fn=ve.autoClearSearchValue,He=fn===void 0?!0:fn,je=ve.onSelect,vn=ve.onDeselect,rn=ve.dropdownMatchSelectWidth,bn=rn===void 0?!0:rn,xn=ve.filterOption,On=ve.filterSort,zn=ve.optionFilterProp,yi=ve.optionLabelProp,Xe=ve.options,Li=ve.children,ji=ve.defaultActiveFirstOption,Ei=ve.menuItemSelectedIcon,nn=ve.virtual,Vn=ve.direction,ze=ve.listHeight,Ge=ze===void 0?200:ze,Oe=ve.listItemHeight,un=Oe===void 0?20:Oe,kn=ve.value,Tn=ve.defaultValue,Rn=ve.labelInValue,ei=ve.onChange,qe=(0,Ut.Z)(ve,ai),pi=(0,En.ZP)(Qe),tn=ce(yn),Ci=!!(!Xe&&Li),Ui=te.useMemo(function(){return xn===void 0&&yn==="combobox"?!1:xn},[xn,yn]),$i=te.useMemo(function(){return yt(mn,Ci)},[JSON.stringify(mn),Ci]),Co=(0,De.Z)("",{value:si!==void 0?si:Gn,postState:function(ko){return ko||""}}),lo=(0,$t.Z)(Co,2),Si=lo[0],ii=lo[1],Yi=An(Xe,Li,$i,zn,yi),oo=Yi.valueOptions,Yn=Yi.labelOptions,zt=Yi.options,Ai=te.useCallback(function(no){var ko=Ie(no);return ko.map(function(No){var mi,Fr,Or,jr,xa;if(Ae(No))mi=No;else{var Ta;Or=No.key,Fr=No.label,mi=(Ta=No.value)!==null&&Ta!==void 0?Ta:Or}var ri=oo.get(mi);if(ri){var hr;if(Fr===void 0&&(Fr=ri==null?void 0:ri[yi||$i.label]),Or===void 0&&(Or=(hr=ri==null?void 0:ri.key)!==null&&hr!==void 0?hr:mi),jr=ri==null?void 0:ri.disabled,xa=ri==null?void 0:ri.title,0)var Dr}return{label:Fr,value:mi,key:Or,disabled:jr,title:xa}})},[$i,yi,oo]),vo=(0,De.Z)(Tn,{value:kn}),ao=(0,$t.Z)(vo,2),Eo=ao[0],Ho=ao[1],Zi=te.useMemo(function(){var no,ko=Ai(Eo);return yn==="combobox"&&Pe((no=ko[0])===null||no===void 0?void 0:no.value)?[]:ko},[Eo,Ai,yn]),xi=hn(Zi,oo),Fi=(0,$t.Z)(xi,2),Mi=Fi[0],co=Fi[1],uo=te.useMemo(function(){if(!yn&&Mi.length===1){var no=Mi[0];if(no.value===null&&(no.label===null||no.label===void 0))return[]}return Mi.map(function(ko){var No;return(0,de.Z)((0,de.Z)({},ko),{},{label:(No=ko.label)!==null&&No!==void 0?No:ko.value})})},[yn,Mi]),Pi=te.useMemo(function(){return new Set(Mi.map(function(no){return no.value}))},[Mi]);te.useEffect(function(){if(yn==="combobox"){var no,ko=(no=Mi[0])===null||no===void 0?void 0:no.value;ii(Le(ko)?String(ko):"")}},[Mi]);var Ni=Jn(function(no,ko){var No,mi=ko!=null?ko:no;return No={},(0,oe.Z)(No,$i.value,no),(0,oe.Z)(No,$i.label,mi),No}),Wn=te.useMemo(function(){if(yn!=="tags")return zt;var no=(0,It.Z)(zt),ko=function(mi){return oo.has(mi)};return(0,It.Z)(Mi).sort(function(No,mi){return No.value<mi.value?-1:1}).forEach(function(No){var mi=No.value;ko(mi)||no.push(Ni(mi,No.label))}),no},[Ni,zt,oo,Mi,yn]),zi=_e(Wn,$i,Si,Ui,zn),xo=te.useMemo(function(){return yn!=="tags"||!Si||zi.some(function(no){return no[zn||"value"]===Si})||zi.some(function(no){return no[$i.value]===Si})?zi:[Ni(Si)].concat((0,It.Z)(zi))},[Ni,zn,yn,zi,Si,$i]),Ko=te.useMemo(function(){return On?(0,It.Z)(xo).sort(function(no,ko){return On(no,ko)}):xo},[xo,On]),Uo=te.useMemo(function(){return ee(Ko,{fieldNames:$i,childrenAsData:Ci})},[Ko,$i,Ci]),Qo=function(ko){var No=Ai(ko);if(Ho(No),ei&&(No.length!==Mi.length||No.some(function(Or,jr){var xa;return((xa=Mi[jr])===null||xa===void 0?void 0:xa.value)!==(Or==null?void 0:Or.value)}))){var mi=Rn?No:No.map(function(Or){return Or.value}),Fr=No.map(function(Or){return pe(co(Or.value))});ei(tn?mi:mi[0],tn?Fr:Fr[0])}},ar=te.useState(null),Ro=(0,$t.Z)(ar,2),er=Ro[0],nr=Ro[1],qr=te.useState(0),sn=(0,$t.Z)(qr,2),wr=sn[0],Sa=sn[1],Cs=ji!==void 0?ji:yn!=="combobox",jo=te.useCallback(function(no,ko){var No=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},mi=No.source,Fr=mi===void 0?"keyboard":mi;Sa(ko),le&&yn==="combobox"&&no!==null&&Fr==="keyboard"&&nr(String(no))},[le,yn]),Lo=function(ko,No,mi){var Fr=function(){var sa,po=co(ko);return[Rn?{label:po==null?void 0:po[$i.label],value:ko,key:(sa=po==null?void 0:po.key)!==null&&sa!==void 0?sa:ko}:ko,pe(po)]};if(No&&je){var Or=Fr(),jr=(0,$t.Z)(Or,2),xa=jr[0],Ta=jr[1];je(xa,Ta)}else if(!No&&vn&&mi!=="clear"){var ri=Fr(),hr=(0,$t.Z)(ri,2),Dr=hr[0],Js=hr[1];vn(Dr,Js)}},vr=Jn(function(no,ko){var No,mi=tn?ko.selected:!0;mi?No=tn?[].concat((0,It.Z)(Mi),[no]):[no]:No=Mi.filter(function(Fr){return Fr.value!==no}),Qo(No),Lo(no,mi),yn==="combobox"?nr(""):(!ce||He)&&(ii(""),nr(""))}),Xo=function(ko,No){Qo(ko);var mi=No.type,Fr=No.values;(mi==="remove"||mi==="clear")&&Fr.forEach(function(Or){Lo(Or.value,!1,mi)})},bo=function(ko,No){if(ii(ko),nr(null),No.source==="submit"){var mi=(ko||"").trim();if(mi){var Fr=Array.from(new Set([].concat((0,It.Z)(Pi),[mi])));Qo(Fr),Lo(mi,!0),ii("")}return}No.source!=="blur"&&(yn==="combobox"&&Qo(ko),Re==null||Re(ko))},Ao=function(ko){var No=ko;yn!=="tags"&&(No=ko.map(function(Fr){var Or=Yn.get(Fr);return Or==null?void 0:Or.value}).filter(function(Fr){return Fr!==void 0}));var mi=Array.from(new Set([].concat((0,It.Z)(Pi),(0,It.Z)(No))));Qo(mi),mi.forEach(function(Fr){Lo(Fr,!0)})},ur=te.useMemo(function(){var no=nn!==!1&&bn!==!1;return(0,de.Z)((0,de.Z)({},Yi),{},{flattenOptions:Uo,onActiveValue:jo,defaultActiveFirstOption:Cs,onSelect:vr,menuItemSelectedIcon:Ei,rawValues:Pi,fieldNames:$i,virtual:no,direction:Vn,listHeight:Ge,listItemHeight:un,childrenAsData:Ci})},[Yi,Uo,jo,Cs,vr,Ei,Pi,$i,nn,bn,Ge,un,Ci]);return te.createElement(Ri.Provider,{value:ur},te.createElement(Ne,(0,vt.Z)({},qe,{id:pi,prefixCls:_n,ref:ie,omitDomProps:di,mode:yn,displayValues:uo,onDisplayValuesChange:Xo,direction:Vn,searchValue:Si,onSearch:bo,autoClearSearchValue:He,onSearchSplit:Ao,dropdownMatchSelectWidth:bn,OptionList:Wi,emptyOptions:!Uo.length,activeValue:er,activeDescendantId:"".concat(pi,"_list_").concat(wr)})))}),_t=Be;_t.Option=Bi,_t.OptGroup=ni;var Je=_t,cn=Je},9296:function(Sn,Ve,Pt){"use strict";Pt.r(Ve),Pt.d(Ve,{ResizableTextArea:function(){return xe},default:function(){return Pe}});var vt=Pt(96663),It=Pt(44127),oe=Pt(90493),de=Pt(20135),$t=Pt(72071),Ut=Pt(6620),Jt=Pt(19127),De=Pt(92310),we=Pt.n(De),te=Pt(93681),Fe=Pt(5643),re=Pt(18929),me=Pt(59301),Ot=Pt(29301),et=Pt(34280),nt=Pt(16089),ht=`
|
|
|
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;
|
|
|
`,at=["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"],ft={},mt;function wt(We){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ue=We.getAttribute("id")||We.getAttribute("data-reactid")||We.getAttribute("name");if(Ue&&ft[ue])return ft[ue];var Ht=window.getComputedStyle(We),ke=Ht.getPropertyValue("box-sizing")||Ht.getPropertyValue("-moz-box-sizing")||Ht.getPropertyValue("-webkit-box-sizing"),pn=parseFloat(Ht.getPropertyValue("padding-bottom"))+parseFloat(Ht.getPropertyValue("padding-top")),ln=parseFloat(Ht.getPropertyValue("border-bottom-width"))+parseFloat(Ht.getPropertyValue("border-top-width")),Ee=at.map(function(gn){return"".concat(gn,":").concat(Ht.getPropertyValue(gn))}).join(";"),Ke={sizingStyle:Ee,paddingSize:pn,borderSize:ln,boxSizing:ke};return Ue&&ue&&(ft[ue]=Ke),Ke}function Et(We){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ht=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;mt||(mt=document.createElement("textarea"),mt.setAttribute("tab-index","-1"),mt.setAttribute("aria-hidden","true"),document.body.appendChild(mt)),We.getAttribute("wrap")?mt.setAttribute("wrap",We.getAttribute("wrap")):mt.removeAttribute("wrap");var ke=wt(We,Ue),pn=ke.paddingSize,ln=ke.borderSize,Ee=ke.boxSizing,Ke=ke.sizingStyle;mt.setAttribute("style","".concat(Ke,";").concat(ht)),mt.value=We.value||We.placeholder||"";var gn=void 0,Bn=void 0,dn,In=mt.scrollHeight;if(Ee==="border-box"?In+=ln:Ee==="content-box"&&(In-=pn),ue!==null||Ht!==null){mt.value=" ";var Ce=mt.scrollHeight-pn;ue!==null&&(gn=Ce*ue,Ee==="border-box"&&(gn=gn+pn+ln),In=Math.max(gn,In)),Ht!==null&&(Bn=Ce*Ht,Ee==="border-box"&&(Bn=Bn+pn+ln),dn=In>Bn?"":"hidden",In=Math.min(Bn,In))}var $n={height:In,overflowY:dn,resize:"none"};return gn&&($n.minHeight=gn),Bn&&($n.maxHeight=Bn),$n}var Nt=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Dt=0,At=1,Kt=2,Wt=me.forwardRef(function(We,Ue){var ue=We,Ht=ue.prefixCls,ke=ue.onPressEnter,pn=ue.defaultValue,ln=ue.value,Ee=ue.autoSize,Ke=ue.onResize,gn=ue.className,Bn=ue.style,dn=ue.disabled,In=ue.onChange,Ce=ue.onInternalAutoSize,$n=(0,Ut.Z)(ue,Nt),Qn=(0,re.Z)(pn,{value:ln,postState:function(ni){return ni!=null?ni:""}}),jt=(0,$t.Z)(Qn,2),Lt=jt[0],xt=jt[1],Tt=function(ni){xt(ni.target.value),In==null||In(ni)},Ft=me.useRef();me.useImperativeHandle(Ue,function(){return{textArea:Ft.current}});var yt=me.useMemo(function(){return Ee&&(0,de.Z)(Ee)==="object"?[Ee.minRows,Ee.maxRows]:[]},[Ee]),ee=(0,$t.Z)(yt,2),pe=ee[0],qt=ee[1],Zt=!!Ee,fe=function(){try{if(document.activeElement===Ft.current){var ni=Ft.current,fi=ni.selectionStart,Bi=ni.selectionEnd,Ti=ni.scrollTop;Ft.current.setSelectionRange(fi,Bi),Ft.current.scrollTop=Ti}}catch(Di){}},ce=me.useState(Kt),ne=(0,$t.Z)(ce,2),Ne=ne[0],hn=ne[1],an=me.useState(),_e=(0,$t.Z)(an,2),En=_e[0],Ln=_e[1],ye=function(){hn(Dt)};(0,et.Z)(function(){Zt&&ye()},[ln,pe,qt,Zt]),(0,et.Z)(function(){if(Ne===Dt)hn(At);else if(Ne===At){var ui=Et(Ft.current,!1,pe,qt);hn(Kt),Ln(ui)}else fe()},[Ne]);var on=me.useRef(),Pn=function(){nt.Z.cancel(on.current)},Cn=function(ni){Ne===Kt&&(Ke==null||Ke(ni),Ee&&(Pn(),on.current=(0,nt.Z)(function(){ye()})))};me.useEffect(function(){return Pn},[]);var An=Zt?En:null,Jn=(0,It.Z)((0,It.Z)({},Bn),An);return(Ne===Dt||Ne===At)&&(Jn.overflowY="hidden",Jn.overflowX="hidden"),me.createElement(Ot.Z,{onResize:Cn,disabled:!(Ee||Ke)},me.createElement("textarea",(0,vt.Z)({},$n,{ref:Ft,style:Jn,className:we()(Ht,gn,(0,oe.Z)({},"".concat(Ht,"-disabled"),dn)),disabled:dn,value:Lt,onChange:Tt})))}),xe=Wt,Vt=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Ie(We,Ue){return(0,Jt.Z)(We||"").slice(0,Ue).join("")}function Se(We,Ue,ue,Ht){var ke=ue;return We?ke=Ie(ue,Ht):(0,Jt.Z)(Ue||"").length<ue.length&&(0,Jt.Z)(ue||"").length>Ht&&(ke=Ue),ke}var Ye=me.forwardRef(function(We,Ue){var ue,Ht=We.defaultValue,ke=We.value,pn=We.onFocus,ln=We.onBlur,Ee=We.onChange,Ke=We.allowClear,gn=We.maxLength,Bn=We.onCompositionStart,dn=We.onCompositionEnd,In=We.suffix,Ce=We.prefixCls,$n=Ce===void 0?"rc-textarea":Ce,Qn=We.classes,jt=We.showCount,Lt=We.className,xt=We.style,Tt=We.disabled,Ft=We.hidden,yt=We.classNames,ee=We.styles,pe=We.onResize,qt=(0,Ut.Z)(We,Vt),Zt=(0,re.Z)(Ht,{value:ke,defaultValue:Ht}),fe=(0,$t.Z)(Zt,2),ce=fe[0],ne=fe[1],Ne=(0,me.useRef)(null),hn=me.useState(!1),an=(0,$t.Z)(hn,2),_e=an[0],En=an[1],Ln=me.useState(!1),ye=(0,$t.Z)(Ln,2),on=ye[0],Pn=ye[1],Cn=me.useRef(),An=me.useRef(0),Jn=me.useState(null),ui=(0,$t.Z)(Jn,2),ni=ui[0],fi=ui[1],Bi=function(){var Ae;(Ae=Ne.current)===null||Ae===void 0||Ae.textArea.focus()};(0,me.useImperativeHandle)(Ue,function(){return{resizableTextArea:Ne.current,focus:Bi,blur:function(){var Ae;(Ae=Ne.current)===null||Ae===void 0||Ae.textArea.blur()}}}),(0,me.useEffect)(function(){En(function(di){return!Tt&&di})},[Tt]);var Ti=Number(gn)>0,Di=function(Ae){Pn(!0),Cn.current=ce,An.current=Ae.currentTarget.selectionStart,Bn==null||Bn(Ae)},io=function(Ae){Pn(!1);var Be=Ae.currentTarget.value;if(Ti){var _t,Je=An.current>=gn+1||An.current===((_t=Cn.current)===null||_t===void 0?void 0:_t.length);Be=Se(Je,Cn.current,Be,gn)}Be!==ce&&(ne(Be),(0,Fe.rJ)(Ae.currentTarget,Ae,Ee,Be)),dn==null||dn(Ae)},to=function(Ae){var Be=Ae.target.value;if(!on&&Ti){var _t=Ae.target.selectionStart>=gn+1||Ae.target.selectionStart===Be.length||!Ae.target.selectionStart;Be=Se(_t,ce,Be,gn)}ne(Be),(0,Fe.rJ)(Ae.currentTarget,Ae,Ee,Be)},Ri=function(Ae){var Be=qt.onPressEnter,_t=qt.onKeyDown;Ae.key==="Enter"&&Be&&Be(Ae),_t==null||_t(Ae)},Qi=function(Ae){En(!0),pn==null||pn(Ae)},Zn=function(Ae){En(!1),ln==null||ln(Ae)},Mt=function(Ae){var Be;ne(""),Bi(),(0,Fe.rJ)((Be=Ne.current)===null||Be===void 0?void 0:Be.textArea,Ae,Ee)},so=(0,Fe.D7)(ce);!on&&Ti&&ke==null&&(so=Ie(so,gn));var Ii=In,Wi;if(jt){var ki=(0,Jt.Z)(so).length;(0,de.Z)(jt)==="object"?Wi=jt.formatter({value:so,count:ki,maxLength:gn}):Wi="".concat(ki).concat(Ti?" / ".concat(gn):""),Ii=me.createElement(me.Fragment,null,Ii,me.createElement("span",{className:we()("".concat($n,"-data-count"),yt==null?void 0:yt.count),style:ee==null?void 0:ee.count},Wi))}var Bo=function(Ae){var Be;pe==null||pe(Ae),(Be=Ne.current)!==null&&Be!==void 0&&Be.textArea.style.height&&fi(!0)},Mo=!qt.autoSize&&!jt&&!Ke,ai=me.createElement(te.BaseInput,{value:so,allowClear:Ke,handleReset:Mt,suffix:Ii,prefixCls:$n,classes:{affixWrapper:we()(Qn==null?void 0:Qn.affixWrapper,(ue={},(0,oe.Z)(ue,"".concat($n,"-show-count"),jt),(0,oe.Z)(ue,"".concat($n,"-textarea-allow-clear"),Ke),ue))},disabled:Tt,focused:_e,className:Lt,style:(0,It.Z)((0,It.Z)({},xt),ni&&!Mo?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Wi=="string"?Wi:void 0}},hidden:Ft,inputElement:me.createElement(xe,(0,vt.Z)({},qt,{onKeyDown:Ri,onChange:to,onFocus:Qi,onBlur:Zn,onCompositionStart:Di,onCompositionEnd:io,className:yt==null?void 0:yt.textarea,style:(0,It.Z)((0,It.Z)({},ee==null?void 0:ee.textarea),{},{resize:xt==null?void 0:xt.resize}),disabled:Tt,prefixCls:$n,onResize:Bo,ref:Ne}))});return ai}),Le=Ye,Pe=Le},39417:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return At}});var vt=Pt(96663),It=Pt(90493),oe=Pt(6620),de=Pt(44127),$t=Pt(52884),Ut=Pt(95727),Jt=Pt(89866),De=Pt(65711),we=Pt(85745),te=Pt(92310),Fe=Pt.n(te),re=Pt(26112),me=Pt(59301),Ot=Pt(39378),et=function(Wt){for(var xe=Wt.prefixCls,Vt=Wt.level,Ie=Wt.isStart,Se=Wt.isEnd,Ye="".concat(xe,"-indent-unit"),Le=[],Pe=0;Pe<Vt;Pe+=1){var We;Le.push(me.createElement("span",{key:Pe,className:Fe()(Ye,(We={},(0,It.Z)(We,"".concat(Ye,"-start"),Ie[Pe]),(0,It.Z)(We,"".concat(Ye,"-end"),Se[Pe]),We))}))}return me.createElement("span",{"aria-hidden":"true",className:"".concat(xe,"-indent")},Le)},nt=me.memo(et),ht=Pt(67841),at=Pt(71430),ft=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],mt="open",wt="close",Et="---",Nt=function(Kt){(0,De.Z)(xe,Kt);var Wt=(0,we.Z)(xe);function xe(){var Vt;(0,$t.Z)(this,xe);for(var Ie=arguments.length,Se=new Array(Ie),Ye=0;Ye<Ie;Ye++)Se[Ye]=arguments[Ye];return Vt=Wt.call.apply(Wt,[this].concat(Se)),Vt.state={dragNodeHighlight:!1},Vt.selectHandle=void 0,Vt.cacheIndent=void 0,Vt.onSelectorClick=function(Le){var Pe=Vt.props.context.onNodeClick;Pe(Le,(0,at.F)(Vt.props)),Vt.isSelectable()?Vt.onSelect(Le):Vt.onCheck(Le)},Vt.onSelectorDoubleClick=function(Le){var Pe=Vt.props.context.onNodeDoubleClick;Pe(Le,(0,at.F)(Vt.props))},Vt.onSelect=function(Le){if(!Vt.isDisabled()){var Pe=Vt.props.context.onNodeSelect;Pe(Le,(0,at.F)(Vt.props))}},Vt.onCheck=function(Le){if(!Vt.isDisabled()){var Pe=Vt.props,We=Pe.disableCheckbox,Ue=Pe.checked,ue=Vt.props.context.onNodeCheck;if(!(!Vt.isCheckable()||We)){var Ht=!Ue;ue(Le,(0,at.F)(Vt.props),Ht)}}},Vt.onMouseEnter=function(Le){var Pe=Vt.props.context.onNodeMouseEnter;Pe(Le,(0,at.F)(Vt.props))},Vt.onMouseLeave=function(Le){var Pe=Vt.props.context.onNodeMouseLeave;Pe(Le,(0,at.F)(Vt.props))},Vt.onContextMenu=function(Le){var Pe=Vt.props.context.onNodeContextMenu;Pe(Le,(0,at.F)(Vt.props))},Vt.onDragStart=function(Le){var Pe=Vt.props.context.onNodeDragStart;Le.stopPropagation(),Vt.setState({dragNodeHighlight:!0}),Pe(Le,(0,Jt.Z)(Vt));try{Le.dataTransfer.setData("text/plain","")}catch(We){}},Vt.onDragEnter=function(Le){var Pe=Vt.props.context.onNodeDragEnter;Le.preventDefault(),Le.stopPropagation(),Pe(Le,(0,Jt.Z)(Vt))},Vt.onDragOver=function(Le){var Pe=Vt.props.context.onNodeDragOver;Le.preventDefault(),Le.stopPropagation(),Pe(Le,(0,Jt.Z)(Vt))},Vt.onDragLeave=function(Le){var Pe=Vt.props.context.onNodeDragLeave;Le.stopPropagation(),Pe(Le,(0,Jt.Z)(Vt))},Vt.onDragEnd=function(Le){var Pe=Vt.props.context.onNodeDragEnd;Le.stopPropagation(),Vt.setState({dragNodeHighlight:!1}),Pe(Le,(0,Jt.Z)(Vt))},Vt.onDrop=function(Le){var Pe=Vt.props.context.onNodeDrop;Le.preventDefault(),Le.stopPropagation(),Vt.setState({dragNodeHighlight:!1}),Pe(Le,(0,Jt.Z)(Vt))},Vt.onExpand=function(Le){var Pe=Vt.props,We=Pe.loading,Ue=Pe.context.onNodeExpand;We||Ue(Le,(0,at.F)(Vt.props))},Vt.setSelectHandle=function(Le){Vt.selectHandle=Le},Vt.getNodeState=function(){var Le=Vt.props.expanded;return Vt.isLeaf()?null:Le?mt:wt},Vt.hasChildren=function(){var Le=Vt.props.eventKey,Pe=Vt.props.context.keyEntities,We=(0,ht.Z)(Pe,Le)||{},Ue=We.children;return!!(Ue||[]).length},Vt.isLeaf=function(){var Le=Vt.props,Pe=Le.isLeaf,We=Le.loaded,Ue=Vt.props.context.loadData,ue=Vt.hasChildren();return Pe===!1?!1:Pe||!Ue&&!ue||Ue&&We&&!ue},Vt.isDisabled=function(){var Le=Vt.props.disabled,Pe=Vt.props.context.disabled;return!!(Pe||Le)},Vt.isCheckable=function(){var Le=Vt.props.checkable,Pe=Vt.props.context.checkable;return!Pe||Le===!1?!1:Pe},Vt.syncLoadData=function(Le){var Pe=Le.expanded,We=Le.loading,Ue=Le.loaded,ue=Vt.props.context,Ht=ue.loadData,ke=ue.onNodeLoad;We||Ht&&Pe&&!Vt.isLeaf()&&!Vt.hasChildren()&&!Ue&&ke((0,at.F)(Vt.props))},Vt.isDraggable=function(){var Le=Vt.props,Pe=Le.data,We=Le.context.draggable;return!!(We&&(!We.nodeDraggable||We.nodeDraggable(Pe)))},Vt.renderDragHandler=function(){var Le=Vt.props.context,Pe=Le.draggable,We=Le.prefixCls;return Pe!=null&&Pe.icon?me.createElement("span",{className:"".concat(We,"-draggable-icon")},Pe.icon):null},Vt.renderSwitcherIconDom=function(Le){var Pe=Vt.props.switcherIcon,We=Vt.props.context.switcherIcon,Ue=Pe||We;return typeof Ue=="function"?Ue((0,de.Z)((0,de.Z)({},Vt.props),{},{isLeaf:Le})):Ue},Vt.renderSwitcher=function(){var Le=Vt.props.expanded,Pe=Vt.props.context.prefixCls;if(Vt.isLeaf()){var We=Vt.renderSwitcherIconDom(!0);return We!==!1?me.createElement("span",{className:Fe()("".concat(Pe,"-switcher"),"".concat(Pe,"-switcher-noop"))},We):null}var Ue=Fe()("".concat(Pe,"-switcher"),"".concat(Pe,"-switcher_").concat(Le?mt:wt)),ue=Vt.renderSwitcherIconDom(!1);return ue!==!1?me.createElement("span",{onClick:Vt.onExpand,className:Ue},ue):null},Vt.renderCheckbox=function(){var Le=Vt.props,Pe=Le.checked,We=Le.halfChecked,Ue=Le.disableCheckbox,ue=Vt.props.context.prefixCls,Ht=Vt.isDisabled(),ke=Vt.isCheckable();if(!ke)return null;var pn=typeof ke!="boolean"?ke:null;return me.createElement("span",{className:Fe()("".concat(ue,"-checkbox"),Pe&&"".concat(ue,"-checkbox-checked"),!Pe&&We&&"".concat(ue,"-checkbox-indeterminate"),(Ht||Ue)&&"".concat(ue,"-checkbox-disabled")),onClick:Vt.onCheck},pn)},Vt.renderIcon=function(){var Le=Vt.props.loading,Pe=Vt.props.context.prefixCls;return me.createElement("span",{className:Fe()("".concat(Pe,"-iconEle"),"".concat(Pe,"-icon__").concat(Vt.getNodeState()||"docu"),Le&&"".concat(Pe,"-icon_loading"))})},Vt.renderSelector=function(){var Le=Vt.state.dragNodeHighlight,Pe=Vt.props,We=Pe.title,Ue=We===void 0?Et:We,ue=Pe.selected,Ht=Pe.icon,ke=Pe.loading,pn=Pe.data,ln=Vt.props.context,Ee=ln.prefixCls,Ke=ln.showIcon,gn=ln.icon,Bn=ln.loadData,dn=ln.titleRender,In=Vt.isDisabled(),Ce="".concat(Ee,"-node-content-wrapper"),$n;if(Ke){var Qn=Ht||gn;$n=Qn?me.createElement("span",{className:Fe()("".concat(Ee,"-iconEle"),"".concat(Ee,"-icon__customize"))},typeof Qn=="function"?Qn(Vt.props):Qn):Vt.renderIcon()}else Bn&&ke&&($n=Vt.renderIcon());var jt;typeof Ue=="function"?jt=Ue(pn):dn?jt=dn(pn):jt=Ue;var Lt=me.createElement("span",{className:"".concat(Ee,"-title")},jt);return me.createElement("span",{ref:Vt.setSelectHandle,title:typeof Ue=="string"?Ue:"",className:Fe()("".concat(Ce),"".concat(Ce,"-").concat(Vt.getNodeState()||"normal"),!In&&(ue||Le)&&"".concat(Ee,"-node-selected")),onMouseEnter:Vt.onMouseEnter,onMouseLeave:Vt.onMouseLeave,onContextMenu:Vt.onContextMenu,onClick:Vt.onSelectorClick,onDoubleClick:Vt.onSelectorDoubleClick},$n,Lt,Vt.renderDropIndicator())},Vt.renderDropIndicator=function(){var Le=Vt.props,Pe=Le.disabled,We=Le.eventKey,Ue=Vt.props.context,ue=Ue.draggable,Ht=Ue.dropLevelOffset,ke=Ue.dropPosition,pn=Ue.prefixCls,ln=Ue.indent,Ee=Ue.dropIndicatorRender,Ke=Ue.dragOverNodeKey,gn=Ue.direction,Bn=!!ue,dn=!Pe&&Bn&&Ke===We,In=ln!=null?ln:Vt.cacheIndent;return Vt.cacheIndent=ln,dn?Ee({dropPosition:ke,dropLevelOffset:Ht,indent:In,prefixCls:pn,direction:gn}):null},Vt}return(0,Ut.Z)(xe,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Ie=this.props.selectable,Se=this.props.context.selectable;return typeof Ie=="boolean"?Ie:Se}},{key:"render",value:function(){var Ie,Se=this.props,Ye=Se.eventKey,Le=Se.className,Pe=Se.style,We=Se.dragOver,Ue=Se.dragOverGapTop,ue=Se.dragOverGapBottom,Ht=Se.isLeaf,ke=Se.isStart,pn=Se.isEnd,ln=Se.expanded,Ee=Se.selected,Ke=Se.checked,gn=Se.halfChecked,Bn=Se.loading,dn=Se.domRef,In=Se.active,Ce=Se.data,$n=Se.onMouseMove,Qn=Se.selectable,jt=(0,oe.Z)(Se,ft),Lt=this.props.context,xt=Lt.prefixCls,Tt=Lt.filterTreeNode,Ft=Lt.keyEntities,yt=Lt.dropContainerKey,ee=Lt.dropTargetKey,pe=Lt.draggingNodeKey,qt=this.isDisabled(),Zt=(0,re.Z)(jt,{aria:!0,data:!0}),fe=(0,ht.Z)(Ft,Ye)||{},ce=fe.level,ne=pn[pn.length-1],Ne=this.isDraggable(),hn=!qt&&Ne,an=pe===Ye,_e=Qn!==void 0?{"aria-selected":!!Qn}:void 0;return me.createElement("div",(0,vt.Z)({ref:dn,className:Fe()(Le,"".concat(xt,"-treenode"),(Ie={},(0,It.Z)(Ie,"".concat(xt,"-treenode-disabled"),qt),(0,It.Z)(Ie,"".concat(xt,"-treenode-switcher-").concat(ln?"open":"close"),!Ht),(0,It.Z)(Ie,"".concat(xt,"-treenode-checkbox-checked"),Ke),(0,It.Z)(Ie,"".concat(xt,"-treenode-checkbox-indeterminate"),gn),(0,It.Z)(Ie,"".concat(xt,"-treenode-selected"),Ee),(0,It.Z)(Ie,"".concat(xt,"-treenode-loading"),Bn),(0,It.Z)(Ie,"".concat(xt,"-treenode-active"),In),(0,It.Z)(Ie,"".concat(xt,"-treenode-leaf-last"),ne),(0,It.Z)(Ie,"".concat(xt,"-treenode-draggable"),Ne),(0,It.Z)(Ie,"dragging",an),(0,It.Z)(Ie,"drop-target",ee===Ye),(0,It.Z)(Ie,"drop-container",yt===Ye),(0,It.Z)(Ie,"drag-over",!qt&&We),(0,It.Z)(Ie,"drag-over-gap-top",!qt&&Ue),(0,It.Z)(Ie,"drag-over-gap-bottom",!qt&&ue),(0,It.Z)(Ie,"filter-node",Tt&&Tt((0,at.F)(this.props))),Ie)),style:Pe,draggable:hn,"aria-grabbed":an,onDragStart:hn?this.onDragStart:void 0,onDragEnter:Ne?this.onDragEnter:void 0,onDragOver:Ne?this.onDragOver:void 0,onDragLeave:Ne?this.onDragLeave:void 0,onDrop:Ne?this.onDrop:void 0,onDragEnd:Ne?this.onDragEnd:void 0,onMouseMove:$n},_e,Zt),me.createElement(nt,{prefixCls:xt,level:ce,isStart:ke,isEnd:pn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),xe}(me.Component),Dt=function(Wt){return me.createElement(Ot.k.Consumer,null,function(xe){return me.createElement(Nt,(0,vt.Z)({},Wt,{context:xe}))})};Dt.displayName="TreeNode",Dt.isTreeNode=1;var At=Dt},39378:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{k:function(){return It}});var vt=Pt(59301),It=vt.createContext(null)},43858:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{O:function(){return At.Z},Z:function(){return Lt}});var vt=Pt(96663),It=Pt(90493),oe=Pt(20135),de=Pt(44127),$t=Pt(19127),Ut=Pt(52884),Jt=Pt(95727),De=Pt(89866),we=Pt(65711),te=Pt(85745),Fe=Pt(92310),re=Pt.n(Fe),me=Pt(10228),Ot=Pt(26112),et=Pt(48736),nt=Pt(59301),ht=Pt(39378);function at(xt){var Tt=xt.dropPosition,Ft=xt.dropLevelOffset,yt=xt.indent,ee={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Tt){case-1:ee.top=0,ee.left=-Ft*yt;break;case 1:ee.bottom=0,ee.left=-Ft*yt;break;case 0:ee.bottom=0,ee.left=yt;break}return nt.createElement("div",{style:ee})}function ft(xt){if(xt==null)throw new TypeError("Cannot destructure "+xt)}var mt=Pt(72071),wt=Pt(6620),Et=Pt(34280),Nt=Pt(24916),Dt=Pt(77900),At=Pt(39417);function Kt(xt,Tt){var Ft=nt.useState(!1),yt=(0,mt.Z)(Ft,2),ee=yt[0],pe=yt[1];nt.useLayoutEffect(function(){if(ee)return xt(),function(){Tt()}},[ee]),nt.useLayoutEffect(function(){return pe(!0),function(){pe(!1)}},[])}var Wt=Pt(71430),xe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Vt=function(Tt,Ft){var yt=Tt.className,ee=Tt.style,pe=Tt.motion,qt=Tt.motionNodes,Zt=Tt.motionType,fe=Tt.onMotionStart,ce=Tt.onMotionEnd,ne=Tt.active,Ne=Tt.treeNodeRequiredProps,hn=(0,wt.Z)(Tt,xe),an=nt.useState(!0),_e=(0,mt.Z)(an,2),En=_e[0],Ln=_e[1],ye=nt.useContext(ht.k),on=ye.prefixCls,Pn=qt&&Zt!=="hide";(0,Et.Z)(function(){qt&&Pn!==En&&Ln(Pn)},[qt]);var Cn=function(){qt&&fe()},An=nt.useRef(!1),Jn=function(){qt&&!An.current&&(An.current=!0,ce())};Kt(Cn,Jn);var ui=function(fi){Pn===fi&&Jn()};return qt?nt.createElement(Dt.default,(0,vt.Z)({ref:Ft,visible:En},pe,{motionAppear:Zt==="show",onVisibleChanged:ui}),function(ni,fi){var Bi=ni.className,Ti=ni.style;return nt.createElement("div",{ref:fi,className:re()("".concat(on,"-treenode-motion"),Bi),style:Ti},qt.map(function(Di){var io=(0,vt.Z)({},(ft(Di.data),Di.data)),to=Di.title,Ri=Di.key,Qi=Di.isStart,Zn=Di.isEnd;delete io.children;var Mt=(0,Wt.H8)(Ri,Ne);return nt.createElement(At.Z,(0,vt.Z)({},io,Mt,{title:to,active:ne,data:Di.data,key:Ri,isStart:Qi,isEnd:Zn}))}))}):nt.createElement(At.Z,(0,vt.Z)({domRef:Ft,className:yt,style:ee},hn,{active:ne}))};Vt.displayName="MotionTreeNode";var Ie=nt.forwardRef(Vt),Se=Ie;function Ye(){var xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ft=xt.length,yt=Tt.length;if(Math.abs(Ft-yt)!==1)return{add:!1,key:null};function ee(pe,qt){var Zt=new Map;pe.forEach(function(ce){Zt.set(ce,!0)});var fe=qt.filter(function(ce){return!Zt.has(ce)});return fe.length===1?fe[0]:null}return Ft<yt?{add:!0,key:ee(xt,Tt)}:{add:!1,key:ee(Tt,xt)}}function Le(xt,Tt,Ft){var yt=xt.findIndex(function(Zt){return Zt.key===Ft}),ee=xt[yt+1],pe=Tt.findIndex(function(Zt){return Zt.key===Ft});if(ee){var qt=Tt.findIndex(function(Zt){return Zt.key===ee.key});return Tt.slice(pe+1,qt)}return Tt.slice(pe+1)}var Pe=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],We={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ue=function(){},ue="RC_TREE_MOTION_".concat(Math.random()),Ht={key:ue},ke={key:ue,level:0,index:0,pos:"0",node:Ht,nodes:[Ht]},pn={parent:null,children:[],pos:ke.pos,data:Ht,title:null,key:ue,isStart:[],isEnd:[]};function ln(xt,Tt,Ft,yt){return Tt===!1||!Ft?xt:xt.slice(0,Math.ceil(Ft/yt)+1)}function Ee(xt){var Tt=xt.key,Ft=xt.pos;return(0,Wt.km)(Tt,Ft)}function Ke(xt){for(var Tt=String(xt.data.key),Ft=xt;Ft.parent;)Ft=Ft.parent,Tt="".concat(Ft.data.key," > ").concat(Tt);return Tt}var gn=nt.forwardRef(function(xt,Tt){var Ft=xt.prefixCls,yt=xt.data,ee=xt.selectable,pe=xt.checkable,qt=xt.expandedKeys,Zt=xt.selectedKeys,fe=xt.checkedKeys,ce=xt.loadedKeys,ne=xt.loadingKeys,Ne=xt.halfCheckedKeys,hn=xt.keyEntities,an=xt.disabled,_e=xt.dragging,En=xt.dragOverNodeKey,Ln=xt.dropPosition,ye=xt.motion,on=xt.height,Pn=xt.itemHeight,Cn=xt.virtual,An=xt.focusable,Jn=xt.activeItem,ui=xt.focused,ni=xt.tabIndex,fi=xt.onKeyDown,Bi=xt.onFocus,Ti=xt.onBlur,Di=xt.onActiveChange,io=xt.onListChangeStart,to=xt.onListChangeEnd,Ri=(0,wt.Z)(xt,Pe),Qi=nt.useRef(null),Zn=nt.useRef(null);nt.useImperativeHandle(Tt,function(){return{scrollTo:function(fn){Qi.current.scrollTo(fn)},getIndentWidth:function(){return Zn.current.offsetWidth}}});var Mt=nt.useState(qt),so=(0,mt.Z)(Mt,2),Ii=so[0],Wi=so[1],ki=nt.useState(yt),Bo=(0,mt.Z)(ki,2),Mo=Bo[0],ai=Bo[1],di=nt.useState(yt),Ae=(0,mt.Z)(di,2),Be=Ae[0],_t=Ae[1],Je=nt.useState([]),cn=(0,mt.Z)(Je,2),ve=cn[0],ie=cn[1],Qe=nt.useState(null),yn=(0,mt.Z)(Qe,2),Nn=yn[0],_n=yn[1],le=nt.useRef(yt);le.current=yt;function mn(){var Re=le.current;ai(Re),_t(Re),ie([]),_n(null),to()}(0,Et.Z)(function(){Wi(qt);var Re=Ye(Ii,qt);if(Re.key!==null)if(Re.add){var fn=Mo.findIndex(function(xn){var On=xn.key;return On===Re.key}),He=ln(Le(Mo,yt,Re.key),Cn,on,Pn),je=Mo.slice();je.splice(fn+1,0,pn),_t(je),ie(He),_n("show")}else{var vn=yt.findIndex(function(xn){var On=xn.key;return On===Re.key}),rn=ln(Le(yt,Mo,Re.key),Cn,on,Pn),bn=yt.slice();bn.splice(vn+1,0,pn),_t(bn),ie(rn),_n("hide")}else Mo!==yt&&(ai(yt),_t(yt))},[qt,yt]),nt.useEffect(function(){_e||mn()},[_e]);var Gn=ye?Be:yt,si={expandedKeys:qt,selectedKeys:Zt,loadedKeys:ce,loadingKeys:ne,checkedKeys:fe,halfCheckedKeys:Ne,dragOverNodeKey:En,dropPosition:Ln,keyEntities:hn};return nt.createElement(nt.Fragment,null,ui&&Jn&&nt.createElement("span",{style:We,"aria-live":"assertive"},Ke(Jn)),nt.createElement("div",null,nt.createElement("input",{style:We,disabled:An===!1||an,tabIndex:An!==!1?ni:null,onKeyDown:fi,onFocus:Bi,onBlur:Ti,value:"",onChange:Ue,"aria-label":"for screen reader"})),nt.createElement("div",{className:"".concat(Ft,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},nt.createElement("div",{className:"".concat(Ft,"-indent")},nt.createElement("div",{ref:Zn,className:"".concat(Ft,"-indent-unit")}))),nt.createElement(Nt.Z,(0,vt.Z)({},Ri,{data:Gn,itemKey:Ee,height:on,fullHeight:!1,virtual:Cn,itemHeight:Pn,prefixCls:"".concat(Ft,"-list"),ref:Qi,onVisibleChange:function(fn,He){var je=new Set(fn),vn=He.filter(function(rn){return!je.has(rn)});vn.some(function(rn){return Ee(rn)===ue})&&mn()}}),function(Re){var fn=Re.pos,He=(0,vt.Z)({},(ft(Re.data),Re.data)),je=Re.title,vn=Re.key,rn=Re.isStart,bn=Re.isEnd,xn=(0,Wt.km)(vn,fn);delete He.key,delete He.children;var On=(0,Wt.H8)(xn,si);return nt.createElement(Se,(0,vt.Z)({},He,On,{title:je,active:!!Jn&&vn===Jn.key,pos:fn,data:Re.data,isStart:rn,isEnd:bn,motion:ye,motionNodes:vn===ue?ve:null,motionType:Nn,onMotionStart:io,onMotionEnd:mn,treeNodeRequiredProps:si,onMouseMove:function(){Di(null)}}))}))});gn.displayName="NodeList";var Bn=gn,dn=Pt(35654),In=Pt(90782),Ce=Pt(67841),$n=10,Qn=function(xt){(0,we.Z)(Ft,xt);var Tt=(0,te.Z)(Ft);function Ft(){var yt;(0,Ut.Z)(this,Ft);for(var ee=arguments.length,pe=new Array(ee),qt=0;qt<ee;qt++)pe[qt]=arguments[qt];return yt=Tt.call.apply(Tt,[this].concat(pe)),yt.destroyed=!1,yt.delayedDragEnterLogic=void 0,yt.loadingRetryTimes={},yt.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Wt.w$)()},yt.dragStartMousePosition=null,yt.dragNode=void 0,yt.currentMouseOverDroppableNodeKey=null,yt.listRef=nt.createRef(),yt.onNodeDragStart=function(Zt,fe){var ce=yt.state,ne=ce.expandedKeys,Ne=ce.keyEntities,hn=yt.props.onDragStart,an=fe.props.eventKey;yt.dragNode=fe,yt.dragStartMousePosition={x:Zt.clientX,y:Zt.clientY};var _e=(0,dn._5)(ne,an);yt.setState({draggingNodeKey:an,dragChildrenKeys:(0,dn.wA)(an,Ne),indent:yt.listRef.current.getIndentWidth()}),yt.setExpandedKeys(_e),window.addEventListener("dragend",yt.onWindowDragEnd),hn==null||hn({event:Zt,node:(0,Wt.F)(fe.props)})},yt.onNodeDragEnter=function(Zt,fe){var ce=yt.state,ne=ce.expandedKeys,Ne=ce.keyEntities,hn=ce.dragChildrenKeys,an=ce.flattenNodes,_e=ce.indent,En=yt.props,Ln=En.onDragEnter,ye=En.onExpand,on=En.allowDrop,Pn=En.direction,Cn=fe.props,An=Cn.pos,Jn=Cn.eventKey,ui=(0,De.Z)(yt),ni=ui.dragNode;if(yt.currentMouseOverDroppableNodeKey!==Jn&&(yt.currentMouseOverDroppableNodeKey=Jn),!ni){yt.resetDragState();return}var fi=(0,dn.OM)(Zt,ni,fe,_e,yt.dragStartMousePosition,on,an,Ne,ne,Pn),Bi=fi.dropPosition,Ti=fi.dropLevelOffset,Di=fi.dropTargetKey,io=fi.dropContainerKey,to=fi.dropTargetPos,Ri=fi.dropAllowed,Qi=fi.dragOverNodeKey;if(hn.indexOf(Di)!==-1||!Ri){yt.resetDragState();return}if(yt.delayedDragEnterLogic||(yt.delayedDragEnterLogic={}),Object.keys(yt.delayedDragEnterLogic).forEach(function(Zn){clearTimeout(yt.delayedDragEnterLogic[Zn])}),ni.props.eventKey!==fe.props.eventKey&&(Zt.persist(),yt.delayedDragEnterLogic[An]=window.setTimeout(function(){if(yt.state.draggingNodeKey!==null){var Zn=(0,$t.Z)(ne),Mt=(0,Ce.Z)(Ne,fe.props.eventKey);Mt&&(Mt.children||[]).length&&(Zn=(0,dn.L0)(ne,fe.props.eventKey)),"expandedKeys"in yt.props||yt.setExpandedKeys(Zn),ye==null||ye(Zn,{node:(0,Wt.F)(fe.props),expanded:!0,nativeEvent:Zt.nativeEvent})}},800)),ni.props.eventKey===Di&&Ti===0){yt.resetDragState();return}yt.setState({dragOverNodeKey:Qi,dropPosition:Bi,dropLevelOffset:Ti,dropTargetKey:Di,dropContainerKey:io,dropTargetPos:to,dropAllowed:Ri}),Ln==null||Ln({event:Zt,node:(0,Wt.F)(fe.props),expandedKeys:ne})},yt.onNodeDragOver=function(Zt,fe){var ce=yt.state,ne=ce.dragChildrenKeys,Ne=ce.flattenNodes,hn=ce.keyEntities,an=ce.expandedKeys,_e=ce.indent,En=yt.props,Ln=En.onDragOver,ye=En.allowDrop,on=En.direction,Pn=(0,De.Z)(yt),Cn=Pn.dragNode;if(Cn){var An=(0,dn.OM)(Zt,Cn,fe,_e,yt.dragStartMousePosition,ye,Ne,hn,an,on),Jn=An.dropPosition,ui=An.dropLevelOffset,ni=An.dropTargetKey,fi=An.dropContainerKey,Bi=An.dropAllowed,Ti=An.dropTargetPos,Di=An.dragOverNodeKey;ne.indexOf(ni)!==-1||!Bi||(Cn.props.eventKey===ni&&ui===0?yt.state.dropPosition===null&&yt.state.dropLevelOffset===null&&yt.state.dropTargetKey===null&&yt.state.dropContainerKey===null&&yt.state.dropTargetPos===null&&yt.state.dropAllowed===!1&&yt.state.dragOverNodeKey===null||yt.resetDragState():Jn===yt.state.dropPosition&&ui===yt.state.dropLevelOffset&&ni===yt.state.dropTargetKey&&fi===yt.state.dropContainerKey&&Ti===yt.state.dropTargetPos&&Bi===yt.state.dropAllowed&&Di===yt.state.dragOverNodeKey||yt.setState({dropPosition:Jn,dropLevelOffset:ui,dropTargetKey:ni,dropContainerKey:fi,dropTargetPos:Ti,dropAllowed:Bi,dragOverNodeKey:Di}),Ln==null||Ln({event:Zt,node:(0,Wt.F)(fe.props)}))}},yt.onNodeDragLeave=function(Zt,fe){yt.currentMouseOverDroppableNodeKey===fe.props.eventKey&&!Zt.currentTarget.contains(Zt.relatedTarget)&&(yt.resetDragState(),yt.currentMouseOverDroppableNodeKey=null);var ce=yt.props.onDragLeave;ce==null||ce({event:Zt,node:(0,Wt.F)(fe.props)})},yt.onWindowDragEnd=function(Zt){yt.onNodeDragEnd(Zt,null,!0),window.removeEventListener("dragend",yt.onWindowDragEnd)},yt.onNodeDragEnd=function(Zt,fe){var ce=yt.props.onDragEnd;yt.setState({dragOverNodeKey:null}),yt.cleanDragState(),ce==null||ce({event:Zt,node:(0,Wt.F)(fe.props)}),yt.dragNode=null,window.removeEventListener("dragend",yt.onWindowDragEnd)},yt.onNodeDrop=function(Zt,fe){var ce,ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ne=yt.state,hn=Ne.dragChildrenKeys,an=Ne.dropPosition,_e=Ne.dropTargetKey,En=Ne.dropTargetPos,Ln=Ne.dropAllowed;if(Ln){var ye=yt.props.onDrop;if(yt.setState({dragOverNodeKey:null}),yt.cleanDragState(),_e!==null){var on=(0,de.Z)((0,de.Z)({},(0,Wt.H8)(_e,yt.getTreeNodeRequiredProps())),{},{active:((ce=yt.getActiveItem())===null||ce===void 0?void 0:ce.key)===_e,data:(0,Ce.Z)(yt.state.keyEntities,_e).node}),Pn=hn.indexOf(_e)!==-1;(0,et.ZP)(!Pn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Cn=(0,dn.yx)(En),An={event:Zt,node:(0,Wt.F)(on),dragNode:yt.dragNode?(0,Wt.F)(yt.dragNode.props):null,dragNodesKeys:[yt.dragNode.props.eventKey].concat(hn),dropToGap:an!==0,dropPosition:an+Number(Cn[Cn.length-1])};ne||ye==null||ye(An),yt.dragNode=null}}},yt.cleanDragState=function(){var Zt=yt.state.draggingNodeKey;Zt!==null&&yt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),yt.dragStartMousePosition=null,yt.currentMouseOverDroppableNodeKey=null},yt.triggerExpandActionExpand=function(Zt,fe){var ce=yt.state,ne=ce.expandedKeys,Ne=ce.flattenNodes,hn=fe.expanded,an=fe.key,_e=fe.isLeaf;if(!(_e||Zt.shiftKey||Zt.metaKey||Zt.ctrlKey)){var En=Ne.filter(function(ye){return ye.key===an})[0],Ln=(0,Wt.F)((0,de.Z)((0,de.Z)({},(0,Wt.H8)(an,yt.getTreeNodeRequiredProps())),{},{data:En.data}));yt.setExpandedKeys(hn?(0,dn._5)(ne,an):(0,dn.L0)(ne,an)),yt.onNodeExpand(Zt,Ln)}},yt.onNodeClick=function(Zt,fe){var ce=yt.props,ne=ce.onClick,Ne=ce.expandAction;Ne==="click"&&yt.triggerExpandActionExpand(Zt,fe),ne==null||ne(Zt,fe)},yt.onNodeDoubleClick=function(Zt,fe){var ce=yt.props,ne=ce.onDoubleClick,Ne=ce.expandAction;Ne==="doubleClick"&&yt.triggerExpandActionExpand(Zt,fe),ne==null||ne(Zt,fe)},yt.onNodeSelect=function(Zt,fe){var ce=yt.state.selectedKeys,ne=yt.state,Ne=ne.keyEntities,hn=ne.fieldNames,an=yt.props,_e=an.onSelect,En=an.multiple,Ln=fe.selected,ye=fe[hn.key],on=!Ln;on?En?ce=(0,dn.L0)(ce,ye):ce=[ye]:ce=(0,dn._5)(ce,ye);var Pn=ce.map(function(Cn){var An=(0,Ce.Z)(Ne,Cn);return An?An.node:null}).filter(function(Cn){return Cn});yt.setUncontrolledState({selectedKeys:ce}),_e==null||_e(ce,{event:"select",selected:on,node:fe,selectedNodes:Pn,nativeEvent:Zt.nativeEvent})},yt.onNodeCheck=function(Zt,fe,ce){var ne=yt.state,Ne=ne.keyEntities,hn=ne.checkedKeys,an=ne.halfCheckedKeys,_e=yt.props,En=_e.checkStrictly,Ln=_e.onCheck,ye=fe.key,on,Pn={event:"check",node:fe,checked:ce,nativeEvent:Zt.nativeEvent};if(En){var Cn=ce?(0,dn.L0)(hn,ye):(0,dn._5)(hn,ye),An=(0,dn._5)(an,ye);on={checked:Cn,halfChecked:An},Pn.checkedNodes=Cn.map(function(Ti){return(0,Ce.Z)(Ne,Ti)}).filter(function(Ti){return Ti}).map(function(Ti){return Ti.node}),yt.setUncontrolledState({checkedKeys:Cn})}else{var Jn=(0,In.S)([].concat((0,$t.Z)(hn),[ye]),!0,Ne),ui=Jn.checkedKeys,ni=Jn.halfCheckedKeys;if(!ce){var fi=new Set(ui);fi.delete(ye);var Bi=(0,In.S)(Array.from(fi),{checked:!1,halfCheckedKeys:ni},Ne);ui=Bi.checkedKeys,ni=Bi.halfCheckedKeys}on=ui,Pn.checkedNodes=[],Pn.checkedNodesPositions=[],Pn.halfCheckedKeys=ni,ui.forEach(function(Ti){var Di=(0,Ce.Z)(Ne,Ti);if(Di){var io=Di.node,to=Di.pos;Pn.checkedNodes.push(io),Pn.checkedNodesPositions.push({node:io,pos:to})}}),yt.setUncontrolledState({checkedKeys:ui},!1,{halfCheckedKeys:ni})}Ln==null||Ln(on,Pn)},yt.onNodeLoad=function(Zt){var fe=Zt.key,ce=new Promise(function(ne,Ne){yt.setState(function(hn){var an=hn.loadedKeys,_e=an===void 0?[]:an,En=hn.loadingKeys,Ln=En===void 0?[]:En,ye=yt.props,on=ye.loadData,Pn=ye.onLoad;if(!on||_e.indexOf(fe)!==-1||Ln.indexOf(fe)!==-1)return null;var Cn=on(Zt);return Cn.then(function(){var An=yt.state.loadedKeys,Jn=(0,dn.L0)(An,fe);Pn==null||Pn(Jn,{event:"load",node:Zt}),yt.setUncontrolledState({loadedKeys:Jn}),yt.setState(function(ui){return{loadingKeys:(0,dn._5)(ui.loadingKeys,fe)}}),ne()}).catch(function(An){if(yt.setState(function(ui){return{loadingKeys:(0,dn._5)(ui.loadingKeys,fe)}}),yt.loadingRetryTimes[fe]=(yt.loadingRetryTimes[fe]||0)+1,yt.loadingRetryTimes[fe]>=$n){var Jn=yt.state.loadedKeys;(0,et.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),yt.setUncontrolledState({loadedKeys:(0,dn.L0)(Jn,fe)}),ne()}Ne(An)}),{loadingKeys:(0,dn.L0)(Ln,fe)}})});return ce.catch(function(){}),ce},yt.onNodeMouseEnter=function(Zt,fe){var ce=yt.props.onMouseEnter;ce==null||ce({event:Zt,node:fe})},yt.onNodeMouseLeave=function(Zt,fe){var ce=yt.props.onMouseLeave;ce==null||ce({event:Zt,node:fe})},yt.onNodeContextMenu=function(Zt,fe){var ce=yt.props.onRightClick;ce&&(Zt.preventDefault(),ce({event:Zt,node:fe}))},yt.onFocus=function(){var Zt=yt.props.onFocus;yt.setState({focused:!0});for(var fe=arguments.length,ce=new Array(fe),ne=0;ne<fe;ne++)ce[ne]=arguments[ne];Zt==null||Zt.apply(void 0,ce)},yt.onBlur=function(){var Zt=yt.props.onBlur;yt.setState({focused:!1}),yt.onActiveChange(null);for(var fe=arguments.length,ce=new Array(fe),ne=0;ne<fe;ne++)ce[ne]=arguments[ne];Zt==null||Zt.apply(void 0,ce)},yt.getTreeNodeRequiredProps=function(){var Zt=yt.state,fe=Zt.expandedKeys,ce=Zt.selectedKeys,ne=Zt.loadedKeys,Ne=Zt.loadingKeys,hn=Zt.checkedKeys,an=Zt.halfCheckedKeys,_e=Zt.dragOverNodeKey,En=Zt.dropPosition,Ln=Zt.keyEntities;return{expandedKeys:fe||[],selectedKeys:ce||[],loadedKeys:ne||[],loadingKeys:Ne||[],checkedKeys:hn||[],halfCheckedKeys:an||[],dragOverNodeKey:_e,dropPosition:En,keyEntities:Ln}},yt.setExpandedKeys=function(Zt){var fe=yt.state,ce=fe.treeData,ne=fe.fieldNames,Ne=(0,Wt.oH)(ce,Zt,ne);yt.setUncontrolledState({expandedKeys:Zt,flattenNodes:Ne},!0)},yt.onNodeExpand=function(Zt,fe){var ce=yt.state.expandedKeys,ne=yt.state,Ne=ne.listChanging,hn=ne.fieldNames,an=yt.props,_e=an.onExpand,En=an.loadData,Ln=fe.expanded,ye=fe[hn.key];if(!Ne){var on=ce.indexOf(ye),Pn=!Ln;if((0,et.ZP)(Ln&&on!==-1||!Ln&&on===-1,"Expand state not sync with index check"),Pn?ce=(0,dn.L0)(ce,ye):ce=(0,dn._5)(ce,ye),yt.setExpandedKeys(ce),_e==null||_e(ce,{node:fe,expanded:Pn,nativeEvent:Zt.nativeEvent}),Pn&&En){var Cn=yt.onNodeLoad(fe);Cn&&Cn.then(function(){var An=(0,Wt.oH)(yt.state.treeData,ce,hn);yt.setUncontrolledState({flattenNodes:An})}).catch(function(){var An=yt.state.expandedKeys,Jn=(0,dn._5)(An,ye);yt.setExpandedKeys(Jn)})}}},yt.onListChangeStart=function(){yt.setUncontrolledState({listChanging:!0})},yt.onListChangeEnd=function(){setTimeout(function(){yt.setUncontrolledState({listChanging:!1})})},yt.onActiveChange=function(Zt){var fe=yt.state.activeKey,ce=yt.props.onActiveChange;fe!==Zt&&(yt.setState({activeKey:Zt}),Zt!==null&&yt.scrollTo({key:Zt}),ce==null||ce(Zt))},yt.getActiveItem=function(){var Zt=yt.state,fe=Zt.activeKey,ce=Zt.flattenNodes;return fe===null?null:ce.find(function(ne){var Ne=ne.key;return Ne===fe})||null},yt.offsetActiveKey=function(Zt){var fe=yt.state,ce=fe.flattenNodes,ne=fe.activeKey,Ne=ce.findIndex(function(_e){var En=_e.key;return En===ne});Ne===-1&&Zt<0&&(Ne=ce.length),Ne=(Ne+Zt+ce.length)%ce.length;var hn=ce[Ne];if(hn){var an=hn.key;yt.onActiveChange(an)}else yt.onActiveChange(null)},yt.onKeyDown=function(Zt){var fe=yt.state,ce=fe.activeKey,ne=fe.expandedKeys,Ne=fe.checkedKeys,hn=fe.fieldNames,an=yt.props,_e=an.onKeyDown,En=an.checkable,Ln=an.selectable;switch(Zt.which){case me.Z.UP:{yt.offsetActiveKey(-1),Zt.preventDefault();break}case me.Z.DOWN:{yt.offsetActiveKey(1),Zt.preventDefault();break}}var ye=yt.getActiveItem();if(ye&&ye.data){var on=yt.getTreeNodeRequiredProps(),Pn=ye.data.isLeaf===!1||!!(ye.data[hn.children]||[]).length,Cn=(0,Wt.F)((0,de.Z)((0,de.Z)({},(0,Wt.H8)(ce,on)),{},{data:ye.data,active:!0}));switch(Zt.which){case me.Z.LEFT:{Pn&&ne.includes(ce)?yt.onNodeExpand({},Cn):ye.parent&&yt.onActiveChange(ye.parent.key),Zt.preventDefault();break}case me.Z.RIGHT:{Pn&&!ne.includes(ce)?yt.onNodeExpand({},Cn):ye.children&&ye.children.length&&yt.onActiveChange(ye.children[0].key),Zt.preventDefault();break}case me.Z.ENTER:case me.Z.SPACE:{En&&!Cn.disabled&&Cn.checkable!==!1&&!Cn.disableCheckbox?yt.onNodeCheck({},Cn,!Ne.includes(ce)):!En&&Ln&&!Cn.disabled&&Cn.selectable!==!1&&yt.onNodeSelect({},Cn);break}}}_e==null||_e(Zt)},yt.setUncontrolledState=function(Zt){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!yt.destroyed){var ne=!1,Ne=!0,hn={};Object.keys(Zt).forEach(function(an){if(an in yt.props){Ne=!1;return}ne=!0,hn[an]=Zt[an]}),ne&&(!fe||Ne)&&yt.setState((0,de.Z)((0,de.Z)({},hn),ce))}},yt.scrollTo=function(Zt){yt.listRef.current.scrollTo(Zt)},yt}return(0,Jt.Z)(Ft,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var ee=this.props.activeKey;ee!==void 0&&ee!==this.state.activeKey&&(this.setState({activeKey:ee}),ee!==null&&this.scrollTo({key:ee}))}},{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 ee,pe=this.state,qt=pe.focused,Zt=pe.flattenNodes,fe=pe.keyEntities,ce=pe.draggingNodeKey,ne=pe.activeKey,Ne=pe.dropLevelOffset,hn=pe.dropContainerKey,an=pe.dropTargetKey,_e=pe.dropPosition,En=pe.dragOverNodeKey,Ln=pe.indent,ye=this.props,on=ye.prefixCls,Pn=ye.className,Cn=ye.style,An=ye.showLine,Jn=ye.focusable,ui=ye.tabIndex,ni=ui===void 0?0:ui,fi=ye.selectable,Bi=ye.showIcon,Ti=ye.icon,Di=ye.switcherIcon,io=ye.draggable,to=ye.checkable,Ri=ye.checkStrictly,Qi=ye.disabled,Zn=ye.motion,Mt=ye.loadData,so=ye.filterTreeNode,Ii=ye.height,Wi=ye.itemHeight,ki=ye.virtual,Bo=ye.titleRender,Mo=ye.dropIndicatorRender,ai=ye.onContextMenu,di=ye.onScroll,Ae=ye.direction,Be=ye.rootClassName,_t=ye.rootStyle,Je=(0,Ot.Z)(this.props,{aria:!0,data:!0}),cn;return io&&((0,oe.Z)(io)==="object"?cn=io:typeof io=="function"?cn={nodeDraggable:io}:cn={}),nt.createElement(ht.k.Provider,{value:{prefixCls:on,selectable:fi,showIcon:Bi,icon:Ti,switcherIcon:Di,draggable:cn,draggingNodeKey:ce,checkable:to,checkStrictly:Ri,disabled:Qi,keyEntities:fe,dropLevelOffset:Ne,dropContainerKey:hn,dropTargetKey:an,dropPosition:_e,dragOverNodeKey:En,indent:Ln,direction:Ae,dropIndicatorRender:Mo,loadData:Mt,filterTreeNode:so,titleRender:Bo,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}},nt.createElement("div",{role:"tree",className:re()(on,Pn,Be,(ee={},(0,It.Z)(ee,"".concat(on,"-show-line"),An),(0,It.Z)(ee,"".concat(on,"-focused"),qt),(0,It.Z)(ee,"".concat(on,"-active-focused"),ne!==null),ee)),style:_t},nt.createElement(Bn,(0,vt.Z)({ref:this.listRef,prefixCls:on,style:Cn,data:Zt,disabled:Qi,selectable:fi,checkable:!!to,motion:Zn,dragging:ce!==null,height:Ii,itemHeight:Wi,virtual:ki,focusable:Jn,focused:qt,tabIndex:ni,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ai,onScroll:di},this.getTreeNodeRequiredProps(),Je))))}}],[{key:"getDerivedStateFromProps",value:function(ee,pe){var qt=pe.prevProps,Zt={prevProps:ee};function fe(Jn){return!qt&&Jn in ee||qt&&qt[Jn]!==ee[Jn]}var ce,ne=pe.fieldNames;if(fe("fieldNames")&&(ne=(0,Wt.w$)(ee.fieldNames),Zt.fieldNames=ne),fe("treeData")?ce=ee.treeData:fe("children")&&((0,et.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),ce=(0,Wt.zn)(ee.children)),ce){Zt.treeData=ce;var Ne=(0,Wt.I8)(ce,{fieldNames:ne});Zt.keyEntities=(0,de.Z)((0,It.Z)({},ue,ke),Ne.keyEntities)}var hn=Zt.keyEntities||pe.keyEntities;if(fe("expandedKeys")||qt&&fe("autoExpandParent"))Zt.expandedKeys=ee.autoExpandParent||!qt&&ee.defaultExpandParent?(0,dn.r7)(ee.expandedKeys,hn):ee.expandedKeys;else if(!qt&&ee.defaultExpandAll){var an=(0,de.Z)({},hn);delete an[ue],Zt.expandedKeys=Object.keys(an).map(function(Jn){return an[Jn].key})}else!qt&&ee.defaultExpandedKeys&&(Zt.expandedKeys=ee.autoExpandParent||ee.defaultExpandParent?(0,dn.r7)(ee.defaultExpandedKeys,hn):ee.defaultExpandedKeys);if(Zt.expandedKeys||delete Zt.expandedKeys,ce||Zt.expandedKeys){var _e=(0,Wt.oH)(ce||pe.treeData,Zt.expandedKeys||pe.expandedKeys,ne);Zt.flattenNodes=_e}if(ee.selectable&&(fe("selectedKeys")?Zt.selectedKeys=(0,dn.BT)(ee.selectedKeys,ee):!qt&&ee.defaultSelectedKeys&&(Zt.selectedKeys=(0,dn.BT)(ee.defaultSelectedKeys,ee))),ee.checkable){var En;if(fe("checkedKeys")?En=(0,dn.E6)(ee.checkedKeys)||{}:!qt&&ee.defaultCheckedKeys?En=(0,dn.E6)(ee.defaultCheckedKeys)||{}:ce&&(En=(0,dn.E6)(ee.checkedKeys)||{checkedKeys:pe.checkedKeys,halfCheckedKeys:pe.halfCheckedKeys}),En){var Ln=En,ye=Ln.checkedKeys,on=ye===void 0?[]:ye,Pn=Ln.halfCheckedKeys,Cn=Pn===void 0?[]:Pn;if(!ee.checkStrictly){var An=(0,In.S)(on,!0,hn);on=An.checkedKeys,Cn=An.halfCheckedKeys}Zt.checkedKeys=on,Zt.halfCheckedKeys=Cn}}return fe("loadedKeys")&&(Zt.loadedKeys=ee.loadedKeys),Zt}}]),Ft}(nt.Component);Qn.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:at,allowDrop:function(){return!0},expandAction:!1},Qn.TreeNode=At.Z;var jt=Qn,Lt=jt},35654:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{BT:function(){return nt},E6:function(){return ft},L0:function(){return te},OM:function(){return et},_5:function(){return we},r7:function(){return mt},wA:function(){return re},yx:function(){return Fe}});var vt=Pt(19127),It=Pt(20135),oe=Pt(48736),de=Pt(59301),$t=Pt(39417),Ut=Pt(67841),Jt=Pt(71430),De=null;function we(wt,Et){if(!wt)return[];var Nt=wt.slice(),Dt=Nt.indexOf(Et);return Dt>=0&&Nt.splice(Dt,1),Nt}function te(wt,Et){var Nt=(wt||[]).slice();return Nt.indexOf(Et)===-1&&Nt.push(Et),Nt}function Fe(wt){return wt.split("-")}function re(wt,Et){var Nt=[],Dt=(0,Ut.Z)(Et,wt);function At(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Kt.forEach(function(Wt){var xe=Wt.key,Vt=Wt.children;Nt.push(xe),At(Vt)})}return At(Dt.children),Nt}function me(wt){if(wt.parent){var Et=Fe(wt.pos);return Number(Et[Et.length-1])===wt.parent.children.length-1}return!1}function Ot(wt){var Et=Fe(wt.pos);return Number(Et[Et.length-1])===0}function et(wt,Et,Nt,Dt,At,Kt,Wt,xe,Vt,Ie){var Se,Ye=wt.clientX,Le=wt.clientY,Pe=wt.target.getBoundingClientRect(),We=Pe.top,Ue=Pe.height,ue=(Ie==="rtl"?-1:1)*(((At==null?void 0:At.x)||0)-Ye),Ht=(ue-12)/Dt,ke=(0,Ut.Z)(xe,Nt.props.eventKey);if(Le<We+Ue/2){var pn=Wt.findIndex(function(Lt){return Lt.key===ke.key}),ln=pn<=0?0:pn-1,Ee=Wt[ln].key;ke=(0,Ut.Z)(xe,Ee)}var Ke=ke.key,gn=ke,Bn=ke.key,dn=0,In=0;if(!Vt.includes(Ke))for(var Ce=0;Ce<Ht&&me(ke);Ce+=1)ke=ke.parent,In+=1;var $n=Et.props.data,Qn=ke.node,jt=!0;return Ot(ke)&&ke.level===0&&Le<We+Ue/2&&Kt({dragNode:$n,dropNode:Qn,dropPosition:-1})&&ke.key===Nt.props.eventKey?dn=-1:(gn.children||[]).length&&Vt.includes(Bn)?Kt({dragNode:$n,dropNode:Qn,dropPosition:0})?dn=0:jt=!1:In===0?Ht>-1.5?Kt({dragNode:$n,dropNode:Qn,dropPosition:1})?dn=1:jt=!1:Kt({dragNode:$n,dropNode:Qn,dropPosition:0})?dn=0:Kt({dragNode:$n,dropNode:Qn,dropPosition:1})?dn=1:jt=!1:Kt({dragNode:$n,dropNode:Qn,dropPosition:1})?dn=1:jt=!1,{dropPosition:dn,dropLevelOffset:In,dropTargetKey:ke.key,dropTargetPos:ke.pos,dragOverNodeKey:Bn,dropContainerKey:dn===0?null:((Se=ke.parent)===null||Se===void 0?void 0:Se.key)||null,dropAllowed:jt}}function nt(wt,Et){if(wt){var Nt=Et.multiple;return Nt?wt.slice():wt.length?[wt[0]]:wt}}var ht=function(Et){return Et};function at(wt,Et){if(!wt)return[];var Nt=Et||{},Dt=Nt.processProps,At=Dt===void 0?ht:Dt,Kt=Array.isArray(wt)?wt:[wt];return Kt.map(function(Wt){var xe=Wt.children,Vt=_objectWithoutProperties(Wt,De),Ie=at(xe,Et);return React.createElement(TreeNode,_extends({key:Vt.key},At(Vt)),Ie)})}function ft(wt){if(!wt)return null;var Et;if(Array.isArray(wt))Et={checkedKeys:wt,halfCheckedKeys:void 0};else if((0,It.Z)(wt)==="object")Et={checkedKeys:wt.checked||void 0,halfCheckedKeys:wt.halfChecked||void 0};else return(0,oe.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Et}function mt(wt,Et){var Nt=new Set;function Dt(At){if(!Nt.has(At)){var Kt=(0,Ut.Z)(Et,At);if(Kt){Nt.add(At);var Wt=Kt.parent,xe=Kt.node;xe.disabled||Wt&&Dt(Wt.key)}}}return(wt||[]).forEach(function(At){Dt(At)}),(0,vt.Z)(Nt)}},90782:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{S:function(){return Jt}});var vt=Pt(48736),It=Pt(67841);function oe(De,we){var te=new Set;return De.forEach(function(Fe){we.has(Fe)||te.add(Fe)}),te}function de(De){var we=De||{},te=we.disabled,Fe=we.disableCheckbox,re=we.checkable;return!!(te||Fe)||re===!1}function $t(De,we,te,Fe){for(var re=new Set(De),me=new Set,Ot=0;Ot<=te;Ot+=1){var et=we.get(Ot)||new Set;et.forEach(function(ft){var mt=ft.key,wt=ft.node,Et=ft.children,Nt=Et===void 0?[]:Et;re.has(mt)&&!Fe(wt)&&Nt.filter(function(Dt){return!Fe(Dt.node)}).forEach(function(Dt){re.add(Dt.key)})})}for(var nt=new Set,ht=te;ht>=0;ht-=1){var at=we.get(ht)||new Set;at.forEach(function(ft){var mt=ft.parent,wt=ft.node;if(!(Fe(wt)||!ft.parent||nt.has(ft.parent.key))){if(Fe(ft.parent.node)){nt.add(mt.key);return}var Et=!0,Nt=!1;(mt.children||[]).filter(function(Dt){return!Fe(Dt.node)}).forEach(function(Dt){var At=Dt.key,Kt=re.has(At);Et&&!Kt&&(Et=!1),!Nt&&(Kt||me.has(At))&&(Nt=!0)}),Et&&re.add(mt.key),Nt&&me.add(mt.key),nt.add(mt.key)}})}return{checkedKeys:Array.from(re),halfCheckedKeys:Array.from(oe(me,re))}}function Ut(De,we,te,Fe,re){for(var me=new Set(De),Ot=new Set(we),et=0;et<=Fe;et+=1){var nt=te.get(et)||new Set;nt.forEach(function(mt){var wt=mt.key,Et=mt.node,Nt=mt.children,Dt=Nt===void 0?[]:Nt;!me.has(wt)&&!Ot.has(wt)&&!re(Et)&&Dt.filter(function(At){return!re(At.node)}).forEach(function(At){me.delete(At.key)})})}Ot=new Set;for(var ht=new Set,at=Fe;at>=0;at-=1){var ft=te.get(at)||new Set;ft.forEach(function(mt){var wt=mt.parent,Et=mt.node;if(!(re(Et)||!mt.parent||ht.has(mt.parent.key))){if(re(mt.parent.node)){ht.add(wt.key);return}var Nt=!0,Dt=!1;(wt.children||[]).filter(function(At){return!re(At.node)}).forEach(function(At){var Kt=At.key,Wt=me.has(Kt);Nt&&!Wt&&(Nt=!1),!Dt&&(Wt||Ot.has(Kt))&&(Dt=!0)}),Nt||me.delete(wt.key),Dt&&Ot.add(wt.key),ht.add(wt.key)}})}return{checkedKeys:Array.from(me),halfCheckedKeys:Array.from(oe(Ot,me))}}function Jt(De,we,te,Fe){var re=[],me;Fe?me=Fe:me=de;var Ot=new Set(De.filter(function(at){var ft=!!(0,It.Z)(te,at);return ft||re.push(at),ft})),et=new Map,nt=0;Object.keys(te).forEach(function(at){var ft=te[at],mt=ft.level,wt=et.get(mt);wt||(wt=new Set,et.set(mt,wt)),wt.add(ft),nt=Math.max(nt,mt)}),(0,vt.ZP)(!re.length,"Tree missing follow keys: ".concat(re.slice(0,100).map(function(at){return"'".concat(at,"'")}).join(", ")));var ht;return we===!0?ht=$t(Ot,et,nt,me):ht=Ut(Ot,we.halfCheckedKeys,et,nt,me),ht}},67841:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return vt}});function vt(It,oe){return It[oe]}},71430:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{F:function(){return mt},H8:function(){return ft},I8:function(){return at},km:function(){return re},oH:function(){return nt},w$:function(){return me},zn:function(){return et}});var vt=Pt(20135),It=Pt(19127),oe=Pt(44127),de=Pt(6620),$t=Pt(11592),Ut=Pt(2738),Jt=Pt(48736),De=Pt(67841),we=["children"];function te(wt,Et){return"".concat(wt,"-").concat(Et)}function Fe(wt){return wt&&wt.type&&wt.type.isTreeNode}function re(wt,Et){return wt!=null?wt:Et}function me(wt){var Et=wt||{},Nt=Et.title,Dt=Et._title,At=Et.key,Kt=Et.children,Wt=Nt||"title";return{title:Wt,_title:Dt||[Wt],key:At||"key",children:Kt||"children"}}function Ot(wt,Et){var Nt=new Map;function Dt(At){var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(At||[]).forEach(function(Wt){var xe=Wt[Et.key],Vt=Wt[Et.children];warning(xe!=null,"Tree node must have a certain key: [".concat(Kt).concat(xe,"]"));var Ie=String(xe);warning(!Nt.has(Ie)||xe===null||xe===void 0,"Same 'key' exist in the Tree: ".concat(Ie)),Nt.set(Ie,!0),Dt(Vt,"".concat(Kt).concat(Ie," > "))})}Dt(wt)}function et(wt){function Et(Nt){var Dt=(0,$t.Z)(Nt);return Dt.map(function(At){if(!Fe(At))return(0,Jt.ZP)(!At,"Tree/TreeNode can only accept TreeNode as children."),null;var Kt=At.key,Wt=At.props,xe=Wt.children,Vt=(0,de.Z)(Wt,we),Ie=(0,oe.Z)({key:Kt},Vt),Se=Et(xe);return Se.length&&(Ie.children=Se),Ie}).filter(function(At){return At})}return Et(wt)}function nt(wt,Et,Nt){var Dt=me(Nt),At=Dt._title,Kt=Dt.key,Wt=Dt.children,xe=new Set(Et===!0?[]:Et),Vt=[];function Ie(Se){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Se.map(function(Le,Pe){for(var We=te(Ye?Ye.pos:"0",Pe),Ue=re(Le[Kt],We),ue,Ht=0;Ht<At.length;Ht+=1){var ke=At[Ht];if(Le[ke]!==void 0){ue=Le[ke];break}}var pn=(0,oe.Z)((0,oe.Z)({},(0,Ut.Z)(Le,[].concat((0,It.Z)(At),[Kt,Wt]))),{},{title:ue,key:Ue,parent:Ye,pos:We,children:null,data:Le,isStart:[].concat((0,It.Z)(Ye?Ye.isStart:[]),[Pe===0]),isEnd:[].concat((0,It.Z)(Ye?Ye.isEnd:[]),[Pe===Se.length-1])});return Vt.push(pn),Et===!0||xe.has(Ue)?pn.children=Ie(Le[Wt]||[],pn):pn.children=[],pn})}return Ie(wt),Vt}function ht(wt,Et,Nt){var Dt={};(0,vt.Z)(Nt)==="object"?Dt=Nt:Dt={externalGetKey:Nt},Dt=Dt||{};var At=Dt,Kt=At.childrenPropName,Wt=At.externalGetKey,xe=At.fieldNames,Vt=me(xe),Ie=Vt.key,Se=Vt.children,Ye=Kt||Se,Le;Wt?typeof Wt=="string"?Le=function(Ue){return Ue[Wt]}:typeof Wt=="function"&&(Le=function(Ue){return Wt(Ue)}):Le=function(Ue,ue){return re(Ue[Ie],ue)};function Pe(We,Ue,ue,Ht){var ke=We?We[Ye]:wt,pn=We?te(ue.pos,Ue):"0",ln=We?[].concat((0,It.Z)(Ht),[We]):[];if(We){var Ee=Le(We,pn),Ke={node:We,index:Ue,pos:pn,key:Ee,parentPos:ue.node?ue.pos:null,level:ue.level+1,nodes:ln};Et(Ke)}ke&&ke.forEach(function(gn,Bn){Pe(gn,Bn,{node:We,pos:pn,level:ue?ue.level+1:-1},ln)})}Pe(null)}function at(wt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Nt=Et.initWrapper,Dt=Et.processEntity,At=Et.onProcessFinished,Kt=Et.externalGetKey,Wt=Et.childrenPropName,xe=Et.fieldNames,Vt=arguments.length>2?arguments[2]:void 0,Ie=Kt||Vt,Se={},Ye={},Le={posEntities:Se,keyEntities:Ye};return Nt&&(Le=Nt(Le)||Le),ht(wt,function(Pe){var We=Pe.node,Ue=Pe.index,ue=Pe.pos,Ht=Pe.key,ke=Pe.parentPos,pn=Pe.level,ln=Pe.nodes,Ee={node:We,nodes:ln,index:Ue,key:Ht,pos:ue,level:pn},Ke=re(Ht,ue);Se[ue]=Ee,Ye[Ke]=Ee,Ee.parent=Se[ke],Ee.parent&&(Ee.parent.children=Ee.parent.children||[],Ee.parent.children.push(Ee)),Dt&&Dt(Ee,Le)},{externalGetKey:Ie,childrenPropName:Wt,fieldNames:xe}),At&&At(Le),Le}function ft(wt,Et){var Nt=Et.expandedKeys,Dt=Et.selectedKeys,At=Et.loadedKeys,Kt=Et.loadingKeys,Wt=Et.checkedKeys,xe=Et.halfCheckedKeys,Vt=Et.dragOverNodeKey,Ie=Et.dropPosition,Se=Et.keyEntities,Ye=(0,De.Z)(Se,wt),Le={eventKey:wt,expanded:Nt.indexOf(wt)!==-1,selected:Dt.indexOf(wt)!==-1,loaded:At.indexOf(wt)!==-1,loading:Kt.indexOf(wt)!==-1,checked:Wt.indexOf(wt)!==-1,halfChecked:xe.indexOf(wt)!==-1,pos:String(Ye?Ye.pos:""),dragOver:Vt===wt&&Ie===0,dragOverGapTop:Vt===wt&&Ie===-1,dragOverGapBottom:Vt===wt&&Ie===1};return Le}function mt(wt){var Et=wt.data,Nt=wt.expanded,Dt=wt.selected,At=wt.checked,Kt=wt.loaded,Wt=wt.loading,xe=wt.halfChecked,Vt=wt.dragOver,Ie=wt.dragOverGapTop,Se=wt.dragOverGapBottom,Ye=wt.pos,Le=wt.active,Pe=wt.eventKey,We=(0,oe.Z)((0,oe.Z)({},Et),{},{expanded:Nt,selected:Dt,checked:At,loaded:Kt,loading:Wt,halfChecked:xe,dragOver:Vt,dragOverGapTop:Ie,dragOverGapBottom:Se,pos:Ye,active:Le,key:Pe});return"props"in We||Object.defineProperty(We,"props",{get:function(){return(0,Jt.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),wt}}),We}},24916:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return Qn}});var vt=Pt(96663),It=Pt(20135),oe=Pt(44127),de=Pt(90493),$t=Pt(72071),Ut=Pt(6620),Jt=Pt(92310),De=Pt.n(Jt),we=Pt(29301),te=Pt(70425),Fe=Pt(34280),re=Pt(59301),me=Pt(4676),Ot=re.forwardRef(function(jt,Lt){var xt=jt.height,Tt=jt.offsetY,Ft=jt.offsetX,yt=jt.children,ee=jt.prefixCls,pe=jt.onInnerResize,qt=jt.innerProps,Zt=jt.rtl,fe=jt.extra,ce={},ne={display:"flex",flexDirection:"column"};return Tt!==void 0&&(ce={height:xt,position:"relative",overflow:"hidden"},ne=(0,oe.Z)((0,oe.Z)({},ne),{},(0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)({transform:"translateY(".concat(Tt,"px)")},Zt?"marginRight":"marginLeft",-Ft),"position","absolute"),"left",0),"right",0),"top",0))),re.createElement("div",{style:ce},re.createElement(we.Z,{onResize:function(hn){var an=hn.offsetHeight;an&&pe&&pe()}},re.createElement("div",(0,vt.Z)({style:ne,className:De()((0,de.Z)({},"".concat(ee,"-holder-inner"),ee)),ref:Lt},qt),yt,fe)))});Ot.displayName="Filler";var et=Ot;function nt(jt){var Lt=jt.children,xt=jt.setRef,Tt=re.useCallback(function(Ft){xt(Ft)},[]);return re.cloneElement(Lt,{ref:Tt})}function ht(jt,Lt,xt,Tt,Ft,yt,ee,pe){var qt=pe.getKey;return jt.slice(Lt,xt+1).map(function(Zt,fe){var ce=Lt+fe,ne=ee(Zt,ce,{style:{width:Tt},offsetX:Ft}),Ne=qt(Zt);return re.createElement(nt,{key:Ne,setRef:function(an){return yt(Zt,an)}},ne)})}function at(jt,Lt,xt,Tt){var Ft=xt-jt,yt=Lt-xt,ee=Math.min(Ft,yt)*2;if(Tt<=ee){var pe=Math.floor(Tt/2);return Tt%2?xt+pe+1:xt-pe}return Ft>yt?xt-(Tt-yt):xt+(Tt-Ft)}function ft(jt,Lt,xt){var Tt=jt.length,Ft=Lt.length,yt,ee;if(Tt===0&&Ft===0)return null;Tt<Ft?(yt=jt,ee=Lt):(yt=Lt,ee=jt);var pe={__EMPTY_ITEM__:!0};function qt(hn){return hn!==void 0?xt(hn):pe}for(var Zt=null,fe=Math.abs(Tt-Ft)!==1,ce=0;ce<ee.length;ce+=1){var ne=qt(yt[ce]),Ne=qt(ee[ce]);if(ne!==Ne){Zt=ce,fe=fe||ne!==qt(ee[ce+1]);break}}return Zt===null?null:{index:Zt,multiple:fe}}function mt(jt,Lt,xt){var Tt=re.useState(jt),Ft=(0,$t.Z)(Tt,2),yt=Ft[0],ee=Ft[1],pe=re.useState(null),qt=(0,$t.Z)(pe,2),Zt=qt[0],fe=qt[1];return re.useEffect(function(){var ce=ft(yt||[],jt||[],Lt);(ce==null?void 0:ce.index)!==void 0&&(xt==null||xt(ce.index),fe(jt[ce.index])),ee(jt)},[jt]),[Zt]}var wt=Pt(16089),Et=(typeof navigator=="undefined"?"undefined":(0,It.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Nt=Et,Dt=function(jt,Lt,xt,Tt){var Ft=(0,re.useRef)(!1),yt=(0,re.useRef)(null);function ee(){clearTimeout(yt.current),Ft.current=!0,yt.current=setTimeout(function(){Ft.current=!1},50)}var pe=(0,re.useRef)({top:jt,bottom:Lt,left:xt,right:Tt});return pe.current.top=jt,pe.current.bottom=Lt,pe.current.left=xt,pe.current.right=Tt,function(qt,Zt){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ce=qt?Zt<0&&pe.current.left||Zt>0&&pe.current.right:Zt<0&&pe.current.top||Zt>0&&pe.current.bottom;return fe&&ce?(clearTimeout(yt.current),Ft.current=!1):(!ce||Ft.current)&&ee(),!Ft.current&&ce}};function At(jt,Lt,xt,Tt,Ft,yt,ee){var pe=(0,re.useRef)(0),qt=(0,re.useRef)(null),Zt=(0,re.useRef)(null),fe=(0,re.useRef)(!1),ce=Dt(Lt,xt,Tt,Ft);function ne(Ln,ye){if(wt.Z.cancel(qt.current),!ce(!1,ye)){var on=Ln;if(!on._virtualHandled)on._virtualHandled=!0;else return;pe.current+=ye,Zt.current=ye,Nt||on.preventDefault(),qt.current=(0,wt.Z)(function(){var Pn=fe.current?10:1;ee(pe.current*Pn,!1),pe.current=0})}}function Ne(Ln,ye){ee(ye,!0),Nt||Ln.preventDefault()}var hn=(0,re.useRef)(null),an=(0,re.useRef)(null);function _e(Ln){if(jt){wt.Z.cancel(an.current),an.current=(0,wt.Z)(function(){hn.current=null},2);var ye=Ln.deltaX,on=Ln.deltaY,Pn=Ln.shiftKey,Cn=ye,An=on;(hn.current==="sx"||!hn.current&&Pn&&on&&!ye)&&(Cn=on,An=0,hn.current="sx");var Jn=Math.abs(Cn),ui=Math.abs(An);hn.current===null&&(hn.current=yt&&Jn>ui?"x":"y"),hn.current==="y"?ne(Ln,An):Ne(Ln,Cn)}}function En(Ln){jt&&(fe.current=Ln.detail===Zt.current)}return[_e,En]}function Kt(jt,Lt,xt,Tt){var Ft=re.useMemo(function(){return[new Map,[]]},[jt,xt.id,Tt]),yt=(0,$t.Z)(Ft,2),ee=yt[0],pe=yt[1],qt=function(fe){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fe,ne=ee.get(fe),Ne=ee.get(ce);if(ne===void 0||Ne===void 0)for(var hn=jt.length,an=pe.length;an<hn;an+=1){var _e,En=jt[an],Ln=Lt(En);ee.set(Ln,an);var ye=(_e=xt.get(Ln))!==null&&_e!==void 0?_e:Tt;if(pe[an]=(pe[an-1]||0)+ye,Ln===fe&&(ne=an),Ln===ce&&(Ne=an),ne!==void 0&&Ne!==void 0)break}return{top:pe[ne-1]||0,bottom:pe[Ne]}};return qt}var Wt=Pt(52884),xe=Pt(95727),Vt=function(){function jt(){(0,Wt.Z)(this,jt),(0,de.Z)(this,"maps",void 0),(0,de.Z)(this,"id",0),(0,de.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,xe.Z)(jt,[{key:"set",value:function(xt,Tt){this.maps[xt]=Tt,this.id+=1,this.diffKeys.add(xt)}},{key:"get",value:function(xt){return this.maps[xt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),jt}(),Ie=Vt;function Se(jt){var Lt=parseFloat(jt);return isNaN(Lt)?0:Lt}function Ye(jt,Lt,xt){var Tt=re.useState(0),Ft=(0,$t.Z)(Tt,2),yt=Ft[0],ee=Ft[1],pe=(0,re.useRef)(new Map),qt=(0,re.useRef)(new Ie),Zt=(0,re.useRef)(0);function fe(){Zt.current+=1}function ce(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;fe();var hn=function(){var En=!1;pe.current.forEach(function(Ln,ye){if(Ln&&Ln.offsetParent){var on=Ln.offsetHeight,Pn=getComputedStyle(Ln),Cn=Pn.marginTop,An=Pn.marginBottom,Jn=Se(Cn),ui=Se(An),ni=on+Jn+ui;qt.current.get(ye)!==ni&&(qt.current.set(ye,ni),En=!0)}}),En&&ee(function(Ln){return Ln+1})};if(Ne)hn();else{Zt.current+=1;var an=Zt.current;Promise.resolve().then(function(){an===Zt.current&&hn()})}}function ne(Ne,hn){var an=jt(Ne),_e=pe.current.get(an);hn?(pe.current.set(an,hn),ce()):pe.current.delete(an),!_e!=!hn&&(hn?Lt==null||Lt(Ne):xt==null||xt(Ne))}return(0,re.useEffect)(function(){return fe},[]),[ne,ce,qt.current,yt]}var Le=14/15;function Pe(jt,Lt,xt){var Tt=(0,re.useRef)(!1),Ft=(0,re.useRef)(0),yt=(0,re.useRef)(0),ee=(0,re.useRef)(null),pe=(0,re.useRef)(null),qt,Zt=function(Ne){if(Tt.current){var hn=Math.ceil(Ne.touches[0].pageX),an=Math.ceil(Ne.touches[0].pageY),_e=Ft.current-hn,En=yt.current-an,Ln=Math.abs(_e)>Math.abs(En);Ln?Ft.current=hn:yt.current=an;var ye=xt(Ln,Ln?_e:En,!1,Ne);ye&&Ne.preventDefault(),clearInterval(pe.current),ye&&(pe.current=setInterval(function(){Ln?_e*=Le:En*=Le;var on=Math.floor(Ln?_e:En);(!xt(Ln,on,!0)||Math.abs(on)<=.1)&&clearInterval(pe.current)},16))}},fe=function(){Tt.current=!1,qt()},ce=function(Ne){qt(),Ne.touches.length===1&&!Tt.current&&(Tt.current=!0,Ft.current=Math.ceil(Ne.touches[0].pageX),yt.current=Math.ceil(Ne.touches[0].pageY),ee.current=Ne.target,ee.current.addEventListener("touchmove",Zt,{passive:!1}),ee.current.addEventListener("touchend",fe,{passive:!0}))};qt=function(){ee.current&&(ee.current.removeEventListener("touchmove",Zt),ee.current.removeEventListener("touchend",fe))},(0,Fe.Z)(function(){return jt&&Lt.current.addEventListener("touchstart",ce,{passive:!0}),function(){var ne;(ne=Lt.current)===null||ne===void 0||ne.removeEventListener("touchstart",ce),qt(),clearInterval(pe.current)}},[jt])}function We(jt){return Math.floor(Math.pow(jt,.5))}function Ue(jt,Lt){var xt="touches"in jt?jt.touches[0]:jt;return xt[Lt?"pageX":"pageY"]-window[Lt?"scrollX":"scrollY"]}function ue(jt,Lt,xt){re.useEffect(function(){var Tt=Lt.current;if(jt&&Tt){var Ft=!1,yt,ee,pe=function(){wt.Z.cancel(yt)},qt=function ne(){pe(),yt=(0,wt.Z)(function(){xt(ee),ne()})},Zt=function(Ne){if(!Ne.target.draggable){var hn=Ne;hn._virtualHandled||(hn._virtualHandled=!0,Ft=!0)}},fe=function(){Ft=!1,pe()},ce=function(Ne){if(Ft){var hn=Ue(Ne,!1),an=Tt.getBoundingClientRect(),_e=an.top,En=an.bottom;if(hn<=_e){var Ln=_e-hn;ee=-We(Ln),qt()}else if(hn>=En){var ye=hn-En;ee=We(ye),qt()}else pe()}};return Tt.addEventListener("mousedown",Zt),Tt.ownerDocument.addEventListener("mouseup",fe),Tt.ownerDocument.addEventListener("mousemove",ce),function(){Tt.removeEventListener("mousedown",Zt),Tt.ownerDocument.removeEventListener("mouseup",fe),Tt.ownerDocument.removeEventListener("mousemove",ce),pe()}}},[jt])}var Ht=10;function ke(jt,Lt,xt,Tt,Ft,yt,ee,pe){var qt=re.useRef(),Zt=re.useState(null),fe=(0,$t.Z)(Zt,2),ce=fe[0],ne=fe[1];return(0,Fe.Z)(function(){if(ce&&ce.times<Ht){if(!jt.current){ne(function(Zn){return(0,oe.Z)({},Zn)});return}yt();var Ne=ce.targetAlign,hn=ce.originAlign,an=ce.index,_e=ce.offset,En=jt.current.clientHeight,Ln=!1,ye=Ne,on=null;if(En){for(var Pn=Ne||hn,Cn=0,An=0,Jn=0,ui=Math.min(Lt.length-1,an),ni=0;ni<=ui;ni+=1){var fi=Ft(Lt[ni]);An=Cn;var Bi=xt.get(fi);Jn=An+(Bi===void 0?Tt:Bi),Cn=Jn}for(var Ti=Pn==="top"?_e:En-_e,Di=ui;Di>=0;Di-=1){var io=Ft(Lt[Di]),to=xt.get(io);if(to===void 0){Ln=!0;break}if(Ti-=to,Ti<=0)break}switch(Pn){case"top":on=An-_e;break;case"bottom":on=Jn-En+_e;break;default:{var Ri=jt.current.scrollTop,Qi=Ri+En;An<Ri?ye="top":Jn>Qi&&(ye="bottom")}}on!==null&&ee(on),on!==ce.lastTop&&(Ln=!0)}Ln&&ne((0,oe.Z)((0,oe.Z)({},ce),{},{times:ce.times+1,targetAlign:ye,lastTop:on}))}},[ce,jt.current]),function(Ne){if(Ne==null){pe();return}if(wt.Z.cancel(qt.current),typeof Ne=="number")ee(Ne);else if(Ne&&(0,It.Z)(Ne)==="object"){var hn,an=Ne.align;"index"in Ne?hn=Ne.index:hn=Lt.findIndex(function(Ln){return Ft(Ln)===Ne.key});var _e=Ne.offset,En=_e===void 0?0:_e;ne({times:0,index:hn,offset:En,originAlign:an})}}}var pn=re.forwardRef(function(jt,Lt){var xt=jt.prefixCls,Tt=jt.rtl,Ft=jt.scrollOffset,yt=jt.scrollRange,ee=jt.onStartMove,pe=jt.onStopMove,qt=jt.onScroll,Zt=jt.horizontal,fe=jt.spinSize,ce=jt.containerSize,ne=jt.style,Ne=jt.thumbStyle,hn=jt.showScrollBar,an=re.useState(!1),_e=(0,$t.Z)(an,2),En=_e[0],Ln=_e[1],ye=re.useState(null),on=(0,$t.Z)(ye,2),Pn=on[0],Cn=on[1],An=re.useState(null),Jn=(0,$t.Z)(An,2),ui=Jn[0],ni=Jn[1],fi=!Tt,Bi=re.useRef(),Ti=re.useRef(),Di=re.useState(hn),io=(0,$t.Z)(Di,2),to=io[0],Ri=io[1],Qi=re.useRef(),Zn=function(){hn===!0||hn===!1||(clearTimeout(Qi.current),Ri(!0),Qi.current=setTimeout(function(){Ri(!1)},3e3))},Mt=yt-ce||0,so=ce-fe||0,Ii=re.useMemo(function(){if(Ft===0||Mt===0)return 0;var _t=Ft/Mt;return _t*so},[Ft,Mt,so]),Wi=function(Je){Je.stopPropagation(),Je.preventDefault()},ki=re.useRef({top:Ii,dragging:En,pageY:Pn,startTop:ui});ki.current={top:Ii,dragging:En,pageY:Pn,startTop:ui};var Bo=function(Je){Ln(!0),Cn(Ue(Je,Zt)),ni(ki.current.top),ee(),Je.stopPropagation(),Je.preventDefault()};re.useEffect(function(){var _t=function(ie){ie.preventDefault()},Je=Bi.current,cn=Ti.current;return Je.addEventListener("touchstart",_t,{passive:!1}),cn.addEventListener("touchstart",Bo,{passive:!1}),function(){Je.removeEventListener("touchstart",_t),cn.removeEventListener("touchstart",Bo)}},[]);var Mo=re.useRef();Mo.current=Mt;var ai=re.useRef();ai.current=so,re.useEffect(function(){if(En){var _t,Je=function(ie){var Qe=ki.current,yn=Qe.dragging,Nn=Qe.pageY,_n=Qe.startTop;wt.Z.cancel(_t);var le=Bi.current.getBoundingClientRect(),mn=ce/(Zt?le.width:le.height);if(yn){var Gn=(Ue(ie,Zt)-Nn)*mn,si=_n;!fi&&Zt?si-=Gn:si+=Gn;var Re=Mo.current,fn=ai.current,He=fn?si/fn:0,je=Math.ceil(He*Re);je=Math.max(je,0),je=Math.min(je,Re),_t=(0,wt.Z)(function(){qt(je,Zt)})}},cn=function(){Ln(!1),pe()};return window.addEventListener("mousemove",Je,{passive:!0}),window.addEventListener("touchmove",Je,{passive:!0}),window.addEventListener("mouseup",cn,{passive:!0}),window.addEventListener("touchend",cn,{passive:!0}),function(){window.removeEventListener("mousemove",Je),window.removeEventListener("touchmove",Je),window.removeEventListener("mouseup",cn),window.removeEventListener("touchend",cn),wt.Z.cancel(_t)}}},[En]),re.useEffect(function(){return Zn(),function(){clearTimeout(Qi.current)}},[Ft]),re.useImperativeHandle(Lt,function(){return{delayHidden:Zn}});var di="".concat(xt,"-scrollbar"),Ae={position:"absolute",visibility:to?null:"hidden"},Be={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Zt?(Ae.height=8,Ae.left=0,Ae.right=0,Ae.bottom=0,Be.height="100%",Be.width=fe,fi?Be.left=Ii:Be.right=Ii):(Ae.width=8,Ae.top=0,Ae.bottom=0,fi?Ae.right=0:Ae.left=0,Be.width="100%",Be.height=fe,Be.top=Ii),re.createElement("div",{ref:Bi,className:De()(di,(0,de.Z)((0,de.Z)((0,de.Z)({},"".concat(di,"-horizontal"),Zt),"".concat(di,"-vertical"),!Zt),"".concat(di,"-visible"),to)),style:(0,oe.Z)((0,oe.Z)({},Ae),ne),onMouseDown:Wi,onMouseMove:Zn},re.createElement("div",{ref:Ti,className:De()("".concat(di,"-thumb"),(0,de.Z)({},"".concat(di,"-thumb-moving"),En)),style:(0,oe.Z)((0,oe.Z)({},Be),Ne),onMouseDown:Bo}))}),ln=pn,Ee=20;function Ke(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,xt=jt/Lt*jt;return isNaN(xt)&&(xt=0),xt=Math.max(xt,Ee),Math.floor(xt)}var gn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Bn=[],dn={overflowY:"auto",overflowAnchor:"none"};function In(jt,Lt){var xt=jt.prefixCls,Tt=xt===void 0?"rc-virtual-list":xt,Ft=jt.className,yt=jt.height,ee=jt.itemHeight,pe=jt.fullHeight,qt=pe===void 0?!0:pe,Zt=jt.style,fe=jt.data,ce=jt.children,ne=jt.itemKey,Ne=jt.virtual,hn=jt.direction,an=jt.scrollWidth,_e=jt.component,En=_e===void 0?"div":_e,Ln=jt.onScroll,ye=jt.onVirtualScroll,on=jt.onVisibleChange,Pn=jt.innerProps,Cn=jt.extraRender,An=jt.styles,Jn=jt.showScrollBar,ui=Jn===void 0?"optional":Jn,ni=(0,Ut.Z)(jt,gn),fi=re.useCallback(function(Zi){return typeof ne=="function"?ne(Zi):Zi==null?void 0:Zi[ne]},[ne]),Bi=Ye(fi,null,null),Ti=(0,$t.Z)(Bi,4),Di=Ti[0],io=Ti[1],to=Ti[2],Ri=Ti[3],Qi=!!(Ne!==!1&&yt&&ee),Zn=re.useMemo(function(){return Object.values(to.maps).reduce(function(Zi,xi){return Zi+xi},0)},[to.id,to.maps]),Mt=Qi&&fe&&(Math.max(ee*fe.length,Zn)>yt||!!an),so=hn==="rtl",Ii=De()(Tt,(0,de.Z)({},"".concat(Tt,"-rtl"),so),Ft),Wi=fe||Bn,ki=(0,re.useRef)(),Bo=(0,re.useRef)(),Mo=(0,re.useRef)(),ai=(0,re.useState)(0),di=(0,$t.Z)(ai,2),Ae=di[0],Be=di[1],_t=(0,re.useState)(0),Je=(0,$t.Z)(_t,2),cn=Je[0],ve=Je[1],ie=(0,re.useState)(!1),Qe=(0,$t.Z)(ie,2),yn=Qe[0],Nn=Qe[1],_n=function(){Nn(!0)},le=function(){Nn(!1)},mn={getKey:fi};function Gn(Zi){Be(function(xi){var Fi;typeof Zi=="function"?Fi=Zi(xi):Fi=Zi;var Mi=un(Fi);return ki.current.scrollTop=Mi,Mi})}var si=(0,re.useRef)({start:0,end:Wi.length}),Re=(0,re.useRef)(),fn=mt(Wi,fi),He=(0,$t.Z)(fn,1),je=He[0];Re.current=je;var vn=re.useMemo(function(){if(!Qi)return{scrollHeight:void 0,start:0,end:Wi.length-1,offset:void 0};if(!Mt){var Zi;return{scrollHeight:((Zi=Bo.current)===null||Zi===void 0?void 0:Zi.offsetHeight)||0,start:0,end:Wi.length-1,offset:void 0}}for(var xi=0,Fi,Mi,co,uo=Wi.length,Pi=0;Pi<uo;Pi+=1){var Ni=Wi[Pi],Wn=fi(Ni),zi=to.get(Wn),xo=xi+(zi===void 0?ee:zi);xo>=Ae&&Fi===void 0&&(Fi=Pi,Mi=xi),xo>Ae+yt&&co===void 0&&(co=Pi),xi=xo}return Fi===void 0&&(Fi=0,Mi=0,co=Math.ceil(yt/ee)),co===void 0&&(co=Wi.length-1),co=Math.min(co+1,Wi.length-1),{scrollHeight:xi,start:Fi,end:co,offset:Mi}},[Mt,Qi,Ae,Wi,Ri,yt]),rn=vn.scrollHeight,bn=vn.start,xn=vn.end,On=vn.offset;si.current.start=bn,si.current.end=xn,re.useLayoutEffect(function(){var Zi=to.getRecord();if(Zi.size===1){var xi=Array.from(Zi)[0],Fi=Wi[bn];if(Fi){var Mi=fi(Fi);if(Mi===xi){var co=to.get(xi),uo=co-ee;Gn(function(Pi){return Pi+uo})}}}to.resetRecord()},[rn]);var zn=re.useState({width:0,height:yt}),yi=(0,$t.Z)(zn,2),Xe=yi[0],Li=yi[1],ji=function(xi){Li({width:xi.offsetWidth,height:xi.offsetHeight})},Ei=(0,re.useRef)(),nn=(0,re.useRef)(),Vn=re.useMemo(function(){return Ke(Xe.width,an)},[Xe.width,an]),ze=re.useMemo(function(){return Ke(Xe.height,rn)},[Xe.height,rn]),Ge=rn-yt,Oe=(0,re.useRef)(Ge);Oe.current=Ge;function un(Zi){var xi=Zi;return Number.isNaN(Oe.current)||(xi=Math.min(xi,Oe.current)),xi=Math.max(xi,0),xi}var kn=Ae<=0,Tn=Ae>=Ge,Rn=cn<=0,ei=cn>=an,qe=Dt(kn,Tn,Rn,ei),pi=function(){return{x:so?-cn:cn,y:Ae}},tn=(0,re.useRef)(pi()),Ci=(0,te.useEvent)(function(Zi){if(ye){var xi=(0,oe.Z)((0,oe.Z)({},pi()),Zi);(tn.current.x!==xi.x||tn.current.y!==xi.y)&&(ye(xi),tn.current=xi)}});function Ui(Zi,xi){var Fi=Zi;xi?((0,me.flushSync)(function(){ve(Fi)}),Ci()):Gn(Fi)}function $i(Zi){var xi=Zi.currentTarget.scrollTop;xi!==Ae&&Gn(xi),Ln==null||Ln(Zi),Ci()}var Co=function(xi){var Fi=xi,Mi=an?an-Xe.width:0;return Fi=Math.max(Fi,0),Fi=Math.min(Fi,Mi),Fi},lo=(0,te.useEvent)(function(Zi,xi){xi?((0,me.flushSync)(function(){ve(function(Fi){var Mi=Fi+(so?-Zi:Zi);return Co(Mi)})}),Ci()):Gn(function(Fi){var Mi=Fi+Zi;return Mi})}),Si=At(Qi,kn,Tn,Rn,ei,!!an,lo),ii=(0,$t.Z)(Si,2),Yi=ii[0],oo=ii[1];Pe(Qi,ki,function(Zi,xi,Fi,Mi){var co=Mi;return qe(Zi,xi,Fi)?!1:!co||!co._virtualHandled?(co&&(co._virtualHandled=!0),Yi({preventDefault:function(){},deltaX:Zi?xi:0,deltaY:Zi?0:xi}),!0):!1}),ue(Mt,ki,function(Zi){Gn(function(xi){return xi+Zi})}),(0,Fe.Z)(function(){function Zi(Fi){var Mi=kn&&Fi.detail<0,co=Tn&&Fi.detail>0;Qi&&!Mi&&!co&&Fi.preventDefault()}var xi=ki.current;return xi.addEventListener("wheel",Yi,{passive:!1}),xi.addEventListener("DOMMouseScroll",oo,{passive:!0}),xi.addEventListener("MozMousePixelScroll",Zi,{passive:!1}),function(){xi.removeEventListener("wheel",Yi),xi.removeEventListener("DOMMouseScroll",oo),xi.removeEventListener("MozMousePixelScroll",Zi)}},[Qi,kn,Tn]),(0,Fe.Z)(function(){if(an){var Zi=Co(cn);ve(Zi),Ci({x:Zi})}},[Xe.width,an]);var Yn=function(){var xi,Fi;(xi=Ei.current)===null||xi===void 0||xi.delayHidden(),(Fi=nn.current)===null||Fi===void 0||Fi.delayHidden()},zt=ke(ki,Wi,to,ee,fi,function(){return io(!0)},Gn,Yn);re.useImperativeHandle(Lt,function(){return{nativeElement:Mo.current,getScrollInfo:pi,scrollTo:function(xi){function Fi(Mi){return Mi&&(0,It.Z)(Mi)==="object"&&("left"in Mi||"top"in Mi)}Fi(xi)?(xi.left!==void 0&&ve(Co(xi.left)),zt(xi.top)):zt(xi)}}}),(0,Fe.Z)(function(){if(on){var Zi=Wi.slice(bn,xn+1);on(Zi,Wi)}},[bn,xn,Wi]);var Ai=Kt(Wi,fi,to,ee),vo=Cn==null?void 0:Cn({start:bn,end:xn,virtual:Mt,offsetX:cn,offsetY:On,rtl:so,getSize:Ai}),ao=ht(Wi,bn,xn,an,cn,Di,ce,mn),Eo=null;yt&&(Eo=(0,oe.Z)((0,de.Z)({},qt?"height":"maxHeight",yt),dn),Qi&&(Eo.overflowY="hidden",an&&(Eo.overflowX="hidden"),yn&&(Eo.pointerEvents="none")));var Ho={};return so&&(Ho.dir="rtl"),re.createElement("div",(0,vt.Z)({ref:Mo,style:(0,oe.Z)((0,oe.Z)({},Zt),{},{position:"relative"}),className:Ii},Ho,ni),re.createElement(we.Z,{onResize:ji},re.createElement(En,{className:"".concat(Tt,"-holder"),style:Eo,ref:ki,onScroll:$i,onMouseEnter:Yn},re.createElement(et,{prefixCls:Tt,height:rn,offsetX:cn,offsetY:On,scrollWidth:an,onInnerResize:io,ref:Bo,innerProps:Pn,rtl:so,extra:vo},ao))),Mt&&rn>yt&&re.createElement(ln,{ref:Ei,prefixCls:Tt,scrollOffset:Ae,scrollRange:rn,rtl:so,onScroll:Ui,onStartMove:_n,onStopMove:le,spinSize:ze,containerSize:Xe.height,style:An==null?void 0:An.verticalScrollBar,thumbStyle:An==null?void 0:An.verticalScrollBarThumb,showScrollBar:ui}),Mt&&an>Xe.width&&re.createElement(ln,{ref:nn,prefixCls:Tt,scrollOffset:cn,scrollRange:an,rtl:so,onScroll:Ui,onStartMove:_n,onStopMove:le,spinSize:Vn,containerSize:Xe.width,horizontal:!0,style:An==null?void 0:An.horizontalScrollBar,thumbStyle:An==null?void 0:An.horizontalScrollBarThumb,showScrollBar:ui}))}var Ce=re.forwardRef(In);Ce.displayName="List";var $n=Ce,Qn=$n},2637:function(Sn,Ve,Pt){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Object.defineProperty(Ve,"DraggableCore",{enumerable:!0,get:function(){return De.default}}),Ve.default=void 0;var vt=re(Pt(59301)),It=te(Pt(12708)),oe=te(Pt(4676)),de=te(Pt(57780)),$t=Pt(13957),Ut=Pt(60976),Jt=Pt(36641),De=te(Pt(80486)),we=te(Pt(94187));function te(at){return at&&at.__esModule?at:{default:at}}function Fe(at){if(typeof WeakMap!="function")return null;var ft=new WeakMap,mt=new WeakMap;return(Fe=function(wt){return wt?mt:ft})(at)}function re(at,ft){if(!ft&&at&&at.__esModule)return at;if(at===null||typeof at!="object"&&typeof at!="function")return{default:at};var mt=Fe(ft);if(mt&&mt.has(at))return mt.get(at);var wt={},Et=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Nt in at)if(Nt!=="default"&&Object.prototype.hasOwnProperty.call(at,Nt)){var Dt=Et?Object.getOwnPropertyDescriptor(at,Nt):null;Dt&&(Dt.get||Dt.set)?Object.defineProperty(wt,Nt,Dt):wt[Nt]=at[Nt]}return wt.default=at,mt&&mt.set(at,wt),wt}function me(){return me=Object.assign?Object.assign.bind():function(at){for(var ft=1;ft<arguments.length;ft++){var mt=arguments[ft];for(var wt in mt)Object.prototype.hasOwnProperty.call(mt,wt)&&(at[wt]=mt[wt])}return at},me.apply(this,arguments)}function Ot(at,ft,mt){return ft=et(ft),ft in at?Object.defineProperty(at,ft,{value:mt,enumerable:!0,configurable:!0,writable:!0}):at[ft]=mt,at}function et(at){var ft=nt(at,"string");return typeof ft=="symbol"?ft:String(ft)}function nt(at,ft){if(typeof at!="object"||at===null)return at;var mt=at[Symbol.toPrimitive];if(mt!==void 0){var wt=mt.call(at,ft||"default");if(typeof wt!="object")return wt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ft==="string"?String:Number)(at)}class ht extends vt.Component{static getDerivedStateFromProps(ft,mt){let{position:wt}=ft,{prevPropsPosition:Et}=mt;return wt&&(!Et||wt.x!==Et.x||wt.y!==Et.y)?((0,we.default)("Draggable: getDerivedStateFromProps %j",{position:wt,prevPropsPosition:Et}),{x:wt.x,y:wt.y,prevPropsPosition:ud({},wt)}):null}constructor(ft){super(ft),Ot(this,"onDragStart",(mt,wt)=>{if((0,we.default)("Draggable: onDragStart: %j",wt),this.props.onStart(mt,(0,Ut.createDraggableData)(this,wt))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),Ot(this,"onDrag",(mt,wt)=>{if(!this.state.dragging)return!1;(0,we.default)("Draggable: onDrag: %j",wt);const Et=(0,Ut.createDraggableData)(this,wt),Nt={x:Et.x,y:Et.y,slackX:0,slackY:0};if(this.props.bounds){const{x:At,y:Kt}=Nt;Nt.x+=this.state.slackX,Nt.y+=this.state.slackY;const[Wt,xe]=(0,Ut.getBoundPosition)(this,Nt.x,Nt.y);Nt.x=Wt,Nt.y=xe,Nt.slackX=this.state.slackX+(At-Nt.x),Nt.slackY=this.state.slackY+(Kt-Nt.y),Et.x=Nt.x,Et.y=Nt.y,Et.deltaX=Nt.x-this.state.x,Et.deltaY=Nt.y-this.state.y}if(this.props.onDrag(mt,Et)===!1)return!1;this.setState(Nt)}),Ot(this,"onDragStop",(mt,wt)=>{if(!this.state.dragging||this.props.onStop(mt,(0,Ut.createDraggableData)(this,wt))===!1)return!1;(0,we.default)("Draggable: onDragStop: %j",wt);const Nt={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:At,y:Kt}=this.props.position;Nt.x=At,Nt.y=Kt}this.setState(Nt)}),this.state={dragging:!1,dragged:!1,x:ft.position?ft.position.x:ft.defaultPosition.x,y:ft.position?ft.position.y:ft.defaultPosition.y,prevPropsPosition:ud({},ft.position),slackX:0,slackY:0,isElementSVG:!1},ft.position&&!(ft.onDrag||ft.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement!="undefined"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var ft,mt;return(ft=(mt=this.props)===null||mt===void 0||(mt=mt.nodeRef)===null||mt===void 0?void 0:mt.current)!==null&&ft!==void 0?ft:oe.default.findDOMNode(this)}render(){const ue=this.props,{axis:ft,bounds:mt,children:wt,defaultPosition:Et,defaultClassName:Nt,defaultClassNameDragging:Dt,defaultClassNameDragged:At,position:Kt,positionOffset:Wt,scale:xe}=ue,Vt=Px(ue,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"]);let Ie={},Se=null;const Le=!!!Kt||this.state.dragging,Pe=Kt||Et,We={x:(0,Ut.canDragX)(this)&&Le?this.state.x:Pe.x,y:(0,Ut.canDragY)(this)&&Le?this.state.y:Pe.y};this.state.isElementSVG?Se=(0,$t.createSVGTransform)(We,Wt):Ie=(0,$t.createCSSTransform)(We,Wt);const Ue=(0,de.default)(wt.props.className||"",Nt,{[Dt]:this.state.dragging,[At]:this.state.dragged});return vt.createElement(De.default,me({},Vt,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),vt.cloneElement(vt.Children.only(wt),{className:Ue,style:ud(ud({},wt.props.style),Ie),transform:Se}))}}Ve.default=ht,Ot(ht,"displayName","Draggable"),Ot(ht,"propTypes",Xy(ud({},De.default.propTypes),{axis:It.default.oneOf(["both","x","y","none"]),bounds:It.default.oneOfType([It.default.shape({left:It.default.number,right:It.default.number,top:It.default.number,bottom:It.default.number}),It.default.string,It.default.oneOf([!1])]),defaultClassName:It.default.string,defaultClassNameDragging:It.default.string,defaultClassNameDragged:It.default.string,defaultPosition:It.default.shape({x:It.default.number,y:It.default.number}),positionOffset:It.default.shape({x:It.default.oneOfType([It.default.number,It.default.string]),y:It.default.oneOfType([It.default.number,It.default.string])}),position:It.default.shape({x:It.default.number,y:It.default.number}),className:Jt.dontSetMe,style:Jt.dontSetMe,transform:Jt.dontSetMe})),Ot(ht,"defaultProps",Xy(ud({},De.default.defaultProps),{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},80486:function(Sn,Ve,Pt){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=void 0;var vt=te(Pt(59301)),It=De(Pt(12708)),oe=De(Pt(4676)),de=Pt(13957),$t=Pt(60976),Ut=Pt(36641),Jt=De(Pt(94187));function De(ht){return ht&&ht.__esModule?ht:{default:ht}}function we(ht){if(typeof WeakMap!="function")return null;var at=new WeakMap,ft=new WeakMap;return(we=function(mt){return mt?ft:at})(ht)}function te(ht,at){if(!at&&ht&&ht.__esModule)return ht;if(ht===null||typeof ht!="object"&&typeof ht!="function")return{default:ht};var ft=we(at);if(ft&&ft.has(ht))return ft.get(ht);var mt={},wt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Et in ht)if(Et!=="default"&&Object.prototype.hasOwnProperty.call(ht,Et)){var Nt=wt?Object.getOwnPropertyDescriptor(ht,Et):null;Nt&&(Nt.get||Nt.set)?Object.defineProperty(mt,Et,Nt):mt[Et]=ht[Et]}return mt.default=ht,ft&&ft.set(ht,mt),mt}function Fe(ht,at,ft){return at=re(at),at in ht?Object.defineProperty(ht,at,{value:ft,enumerable:!0,configurable:!0,writable:!0}):ht[at]=ft,ht}function re(ht){var at=me(ht,"string");return typeof at=="symbol"?at:String(at)}function me(ht,at){if(typeof ht!="object"||ht===null)return ht;var ft=ht[Symbol.toPrimitive];if(ft!==void 0){var mt=ft.call(ht,at||"default");if(typeof mt!="object")return mt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(at==="string"?String:Number)(ht)}const Ot={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let et=Ot.mouse;class nt extends vt.Component{constructor(){super(...arguments),Fe(this,"dragging",!1),Fe(this,"lastX",NaN),Fe(this,"lastY",NaN),Fe(this,"touchIdentifier",null),Fe(this,"mounted",!1),Fe(this,"handleDragStart",at=>{if(this.props.onMouseDown(at),!this.props.allowAnyClick&&typeof at.button=="number"&&at.button!==0)return!1;const ft=this.findDOMNode();if(!ft||!ft.ownerDocument||!ft.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:mt}=ft;if(this.props.disabled||!(at.target instanceof mt.defaultView.Node)||this.props.handle&&!(0,de.matchesSelectorAndParentsTo)(at.target,this.props.handle,ft)||this.props.cancel&&(0,de.matchesSelectorAndParentsTo)(at.target,this.props.cancel,ft))return;at.type==="touchstart"&&at.preventDefault();const wt=(0,de.getTouchIdentifier)(at);this.touchIdentifier=wt;const Et=(0,$t.getControlPosition)(at,wt,this);if(Et==null)return;const{x:Nt,y:Dt}=Et,At=(0,$t.createCoreData)(this,Nt,Dt);(0,Jt.default)("DraggableCore: handleDragStart: %j",At),(0,Jt.default)("calling",this.props.onStart),!(this.props.onStart(at,At)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,de.addUserSelectStyles)(mt),this.dragging=!0,this.lastX=Nt,this.lastY=Dt,(0,de.addEvent)(mt,et.move,this.handleDrag),(0,de.addEvent)(mt,et.stop,this.handleDragStop))}),Fe(this,"handleDrag",at=>{const ft=(0,$t.getControlPosition)(at,this.touchIdentifier,this);if(ft==null)return;let{x:mt,y:wt}=ft;if(Array.isArray(this.props.grid)){let Dt=mt-this.lastX,At=wt-this.lastY;if([Dt,At]=(0,$t.snapToGrid)(this.props.grid,Dt,At),!Dt&&!At)return;mt=this.lastX+Dt,wt=this.lastY+At}const Et=(0,$t.createCoreData)(this,mt,wt);if((0,Jt.default)("DraggableCore: handleDrag: %j",Et),this.props.onDrag(at,Et)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch(Dt){const At=document.createEvent("MouseEvents");At.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(At)}return}this.lastX=mt,this.lastY=wt}),Fe(this,"handleDragStop",at=>{if(!this.dragging)return;const ft=(0,$t.getControlPosition)(at,this.touchIdentifier,this);if(ft==null)return;let{x:mt,y:wt}=ft;if(Array.isArray(this.props.grid)){let At=mt-this.lastX||0,Kt=wt-this.lastY||0;[At,Kt]=(0,$t.snapToGrid)(this.props.grid,At,Kt),mt=this.lastX+At,wt=this.lastY+Kt}const Et=(0,$t.createCoreData)(this,mt,wt);if(this.props.onStop(at,Et)===!1||this.mounted===!1)return!1;const Dt=this.findDOMNode();Dt&&this.props.enableUserSelectHack&&(0,de.removeUserSelectStyles)(Dt.ownerDocument),(0,Jt.default)("DraggableCore: handleDragStop: %j",Et),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,Dt&&((0,Jt.default)("DraggableCore: Removing handlers"),(0,de.removeEvent)(Dt.ownerDocument,et.move,this.handleDrag),(0,de.removeEvent)(Dt.ownerDocument,et.stop,this.handleDragStop))}),Fe(this,"onMouseDown",at=>(et=Ot.mouse,this.handleDragStart(at))),Fe(this,"onMouseUp",at=>(et=Ot.mouse,this.handleDragStop(at))),Fe(this,"onTouchStart",at=>(et=Ot.touch,this.handleDragStart(at))),Fe(this,"onTouchEnd",at=>(et=Ot.touch,this.handleDragStop(at)))}componentDidMount(){this.mounted=!0;const at=this.findDOMNode();at&&(0,de.addEvent)(at,Ot.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const at=this.findDOMNode();if(at){const{ownerDocument:ft}=at;(0,de.removeEvent)(ft,Ot.mouse.move,this.handleDrag),(0,de.removeEvent)(ft,Ot.touch.move,this.handleDrag),(0,de.removeEvent)(ft,Ot.mouse.stop,this.handleDragStop),(0,de.removeEvent)(ft,Ot.touch.stop,this.handleDragStop),(0,de.removeEvent)(at,Ot.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,de.removeUserSelectStyles)(ft)}}findDOMNode(){var at,ft;return(at=this.props)!==null&&at!==void 0&&at.nodeRef?(ft=this.props)===null||ft===void 0||(ft=ft.nodeRef)===null||ft===void 0?void 0:ft.current:oe.default.findDOMNode(this)}render(){return vt.cloneElement(vt.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}Ve.default=nt,Fe(nt,"displayName","DraggableCore"),Fe(nt,"propTypes",{allowAnyClick:It.default.bool,children:It.default.node.isRequired,disabled:It.default.bool,enableUserSelectHack:It.default.bool,offsetParent:function(ht,at){if(ht[at]&&ht[at].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:It.default.arrayOf(It.default.number),handle:It.default.string,cancel:It.default.string,nodeRef:It.default.object,onStart:It.default.func,onDrag:It.default.func,onStop:It.default.func,onMouseDown:It.default.func,scale:It.default.number,className:Ut.dontSetMe,style:Ut.dontSetMe,transform:Ut.dontSetMe}),Fe(nt,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},12911:function(Sn,Ve,Pt){"use strict";const{default:vt,DraggableCore:It}=Pt(2637);Sn.exports=vt,Sn.exports.default=vt,Sn.exports.DraggableCore=It},13957:function(Sn,Ve,Pt){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.addClassName=Et,Ve.addEvent=De,Ve.addUserSelectStyles=mt,Ve.createCSSTransform=et,Ve.createSVGTransform=nt,Ve.getTouch=at,Ve.getTouchIdentifier=ft,Ve.getTranslation=ht,Ve.innerHeight=re,Ve.innerWidth=me,Ve.matchesSelector=Ut,Ve.matchesSelectorAndParentsTo=Jt,Ve.offsetXYFromParent=Ot,Ve.outerHeight=te,Ve.outerWidth=Fe,Ve.removeClassName=Nt,Ve.removeEvent=we,Ve.removeUserSelectStyles=wt;var vt=Pt(36641),It=de(Pt(32092));function oe(Dt){if(typeof WeakMap!="function")return null;var At=new WeakMap,Kt=new WeakMap;return(oe=function(Wt){return Wt?Kt:At})(Dt)}function de(Dt,At){if(!At&&Dt&&Dt.__esModule)return Dt;if(Dt===null||typeof Dt!="object"&&typeof Dt!="function")return{default:Dt};var Kt=oe(At);if(Kt&&Kt.has(Dt))return Kt.get(Dt);var Wt={},xe=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Vt in Dt)if(Vt!=="default"&&Object.prototype.hasOwnProperty.call(Dt,Vt)){var Ie=xe?Object.getOwnPropertyDescriptor(Dt,Vt):null;Ie&&(Ie.get||Ie.set)?Object.defineProperty(Wt,Vt,Ie):Wt[Vt]=Dt[Vt]}return Wt.default=Dt,Kt&&Kt.set(Dt,Wt),Wt}let $t="";function Ut(Dt,At){return $t||($t=(0,vt.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(Kt){return(0,vt.isFunction)(Dt[Kt])})),(0,vt.isFunction)(Dt[$t])?Dt[$t](At):!1}function Jt(Dt,At,Kt){let Wt=Dt;do{if(Ut(Wt,At))return!0;if(Wt===Kt)return!1;Wt=Wt.parentNode}while(Wt);return!1}function De(Dt,At,Kt,Wt){if(!Dt)return;const xe=ud({capture:!0},Wt);Dt.addEventListener?Dt.addEventListener(At,Kt,xe):Dt.attachEvent?Dt.attachEvent("on"+At,Kt):Dt["on"+At]=Kt}function we(Dt,At,Kt,Wt){if(!Dt)return;const xe=ud({capture:!0},Wt);Dt.removeEventListener?Dt.removeEventListener(At,Kt,xe):Dt.detachEvent?Dt.detachEvent("on"+At,Kt):Dt["on"+At]=null}function te(Dt){let At=Dt.clientHeight;const Kt=Dt.ownerDocument.defaultView.getComputedStyle(Dt);return At+=(0,vt.int)(Kt.borderTopWidth),At+=(0,vt.int)(Kt.borderBottomWidth),At}function Fe(Dt){let At=Dt.clientWidth;const Kt=Dt.ownerDocument.defaultView.getComputedStyle(Dt);return At+=(0,vt.int)(Kt.borderLeftWidth),At+=(0,vt.int)(Kt.borderRightWidth),At}function re(Dt){let At=Dt.clientHeight;const Kt=Dt.ownerDocument.defaultView.getComputedStyle(Dt);return At-=(0,vt.int)(Kt.paddingTop),At-=(0,vt.int)(Kt.paddingBottom),At}function me(Dt){let At=Dt.clientWidth;const Kt=Dt.ownerDocument.defaultView.getComputedStyle(Dt);return At-=(0,vt.int)(Kt.paddingLeft),At-=(0,vt.int)(Kt.paddingRight),At}function Ot(Dt,At,Kt){const xe=At===At.ownerDocument.body?{left:0,top:0}:At.getBoundingClientRect(),Vt=(Dt.clientX+At.scrollLeft-xe.left)/Kt,Ie=(Dt.clientY+At.scrollTop-xe.top)/Kt;return{x:Vt,y:Ie}}function et(Dt,At){const Kt=ht(Dt,At,"px");return{[(0,It.browserPrefixToKey)("transform",It.default)]:Kt}}function nt(Dt,At){return ht(Dt,At,"")}function ht(Dt,At,Kt){let{x:Wt,y:xe}=Dt,Vt="translate(".concat(Wt).concat(Kt,",").concat(xe).concat(Kt,")");if(At){const Ie="".concat(typeof At.x=="string"?At.x:At.x+Kt),Se="".concat(typeof At.y=="string"?At.y:At.y+Kt);Vt="translate(".concat(Ie,", ").concat(Se,")")+Vt}return Vt}function at(Dt,At){return Dt.targetTouches&&(0,vt.findInArray)(Dt.targetTouches,Kt=>At===Kt.identifier)||Dt.changedTouches&&(0,vt.findInArray)(Dt.changedTouches,Kt=>At===Kt.identifier)}function ft(Dt){if(Dt.targetTouches&&Dt.targetTouches[0])return Dt.targetTouches[0].identifier;if(Dt.changedTouches&&Dt.changedTouches[0])return Dt.changedTouches[0].identifier}function mt(Dt){if(!Dt)return;let At=Dt.getElementById("react-draggable-style-el");At||(At=Dt.createElement("style"),At.type="text/css",At.id="react-draggable-style-el",At.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
|
`,At.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
|
`,Dt.getElementsByTagName("head")[0].appendChild(At)),Dt.body&&Et(Dt.body,"react-draggable-transparent-selection")}function wt(Dt){if(Dt)try{if(Dt.body&&Nt(Dt.body,"react-draggable-transparent-selection"),Dt.selection)Dt.selection.empty();else{const At=(Dt.defaultView||window).getSelection();At&&At.type!=="Caret"&&At.removeAllRanges()}}catch(At){}}function Et(Dt,At){Dt.classList?Dt.classList.add(At):Dt.className.match(new RegExp("(?:^|\\s)".concat(At,"(?!\\S)")))||(Dt.className+=" ".concat(At))}function Nt(Dt,At){Dt.classList?Dt.classList.remove(At):Dt.className=Dt.className.replace(new RegExp("(?:^|\\s)".concat(At,"(?!\\S)"),"g"),"")}},32092:function(Sn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.browserPrefixToKey=It,Ve.browserPrefixToStyle=oe,Ve.default=void 0,Ve.getPrefix=vt;const Pt=["Moz","Webkit","O","ms"];function vt(){var Ut;let Jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";const De=(Ut=window.document)===null||Ut===void 0||(Ut=Ut.documentElement)===null||Ut===void 0?void 0:Ut.style;if(!De||Jt in De)return"";for(let we=0;we<Pt.length;we++)if(It(Jt,Pt[we])in De)return Pt[we];return""}function It(Ut,Jt){return Jt?"".concat(Jt).concat(de(Ut)):Ut}function oe(Ut,Jt){return Jt?"-".concat(Jt.toLowerCase(),"-").concat(Ut):Ut}function de(Ut){let Jt="",De=!0;for(let we=0;we<Ut.length;we++)De?(Jt+=Ut[we].toUpperCase(),De=!1):Ut[we]==="-"?De=!0:Jt+=Ut[we];return Jt}var $t=Ve.default=vt()},94187:function(Sn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=Pt;function Pt(){}},60976:function(Sn,Ve,Pt){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.canDragX=$t,Ve.canDragY=Ut,Ve.createCoreData=De,Ve.createDraggableData=we,Ve.getBoundPosition=oe,Ve.getControlPosition=Jt,Ve.snapToGrid=de;var vt=Pt(36641),It=Pt(13957);function oe(re,me,Ot){if(!re.props.bounds)return[me,Ot];let{bounds:et}=re.props;et=typeof et=="string"?et:te(et);const nt=Fe(re);if(typeof et=="string"){const{ownerDocument:ht}=nt,at=ht.defaultView;let ft;if(et==="parent"?ft=nt.parentNode:ft=ht.querySelector(et),!(ft instanceof at.HTMLElement))throw new Error('Bounds selector "'+et+'" could not find an element.');const mt=ft,wt=at.getComputedStyle(nt),Et=at.getComputedStyle(mt);et={left:-nt.offsetLeft+(0,vt.int)(Et.paddingLeft)+(0,vt.int)(wt.marginLeft),top:-nt.offsetTop+(0,vt.int)(Et.paddingTop)+(0,vt.int)(wt.marginTop),right:(0,It.innerWidth)(mt)-(0,It.outerWidth)(nt)-nt.offsetLeft+(0,vt.int)(Et.paddingRight)-(0,vt.int)(wt.marginRight),bottom:(0,It.innerHeight)(mt)-(0,It.outerHeight)(nt)-nt.offsetTop+(0,vt.int)(Et.paddingBottom)-(0,vt.int)(wt.marginBottom)}}return(0,vt.isNum)(et.right)&&(me=Math.min(me,et.right)),(0,vt.isNum)(et.bottom)&&(Ot=Math.min(Ot,et.bottom)),(0,vt.isNum)(et.left)&&(me=Math.max(me,et.left)),(0,vt.isNum)(et.top)&&(Ot=Math.max(Ot,et.top)),[me,Ot]}function de(re,me,Ot){const et=Math.round(me/re[0])*re[0],nt=Math.round(Ot/re[1])*re[1];return[et,nt]}function $t(re){return re.props.axis==="both"||re.props.axis==="x"}function Ut(re){return re.props.axis==="both"||re.props.axis==="y"}function Jt(re,me,Ot){const et=typeof me=="number"?(0,It.getTouch)(re,me):null;if(typeof me=="number"&&!et)return null;const nt=Fe(Ot),ht=Ot.props.offsetParent||nt.offsetParent||nt.ownerDocument.body;return(0,It.offsetXYFromParent)(et||re,ht,Ot.props.scale)}function De(re,me,Ot){const et=!(0,vt.isNum)(re.lastX),nt=Fe(re);return et?{node:nt,deltaX:0,deltaY:0,lastX:me,lastY:Ot,x:me,y:Ot}:{node:nt,deltaX:me-re.lastX,deltaY:Ot-re.lastY,lastX:re.lastX,lastY:re.lastY,x:me,y:Ot}}function we(re,me){const Ot=re.props.scale;return{node:me.node,x:re.state.x+me.deltaX/Ot,y:re.state.y+me.deltaY/Ot,deltaX:me.deltaX/Ot,deltaY:me.deltaY/Ot,lastX:re.state.x,lastY:re.state.y}}function te(re){return{left:re.left,top:re.top,right:re.right,bottom:re.bottom}}function Fe(re){const me=re.findDOMNode();if(!me)throw new Error("<DraggableCore>: Unmounted during event!");return me}},36641:function(Sn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.dontSetMe=de,Ve.findInArray=Pt,Ve.int=oe,Ve.isFunction=vt,Ve.isNum=It;function Pt($t,Ut){for(let Jt=0,De=$t.length;Jt<De;Jt++)if(Ut.apply(Ut,[$t[Jt],Jt,$t]))return $t[Jt]}function vt($t){return typeof $t=="function"||Object.prototype.toString.call($t)==="[object Function]"}function It($t){return typeof $t=="number"&&!isNaN($t)}function oe($t){return parseInt($t,10)}function de($t,Ut,Jt){if($t[Ut])return new Error("Invalid prop ".concat(Ut," passed to ").concat(Jt," - do not set this, set it on the child."))}},51581:function(Sn,Ve,Pt){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});var vt=function(){function re(me,Ot){for(var et=0;et<Ot.length;et++){var nt=Ot[et];nt.enumerable=nt.enumerable||!1,nt.configurable=!0,"value"in nt&&(nt.writable=!0),Object.defineProperty(me,nt.key,nt)}}return function(me,Ot,et){return Ot&&re(me.prototype,Ot),et&&re(me,et),me}}(),It=Pt(59301),oe=Ut(It),de=Pt(12708),$t=Ut(de);function Ut(re){return re&&re.__esModule?re:{default:re}}function Jt(re,me){var Ot={};for(var et in re)me.indexOf(et)>=0||Object.prototype.hasOwnProperty.call(re,et)&&(Ot[et]=re[et]);return Ot}function De(re,me){if(!(re instanceof me))throw new TypeError("Cannot call a class as a function")}function we(re,me){if(!re)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return me&&(typeof me=="object"||typeof me=="function")?me:re}function te(re,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof me);re.prototype=Object.create(me&&me.prototype,{constructor:{value:re,enumerable:!1,writable:!0,configurable:!0}}),me&&(Object.setPrototypeOf?Object.setPrototypeOf(re,me):re.__proto__=me)}var Fe=function(re){te(me,re);function me(Ot){De(this,me);var et=we(this,(me.__proto__||Object.getPrototypeOf(me)).call(this,Ot));return et.scrollListener=et.scrollListener.bind(et),et.eventListenerOptions=et.eventListenerOptions.bind(et),et.mousewheelListener=et.mousewheelListener.bind(et),et}return vt(me,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var et=this.getParentElement(this.scrollComponent);et.scrollTop=et.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var et=!1,nt={get passive(){et=!0}};try{document.addEventListener("test",null,nt),document.removeEventListener("test",null,nt)}catch(ht){}return et}},{key:"eventListenerOptions",value:function(){var et=this.props.useCapture;return this.isPassiveSupported()&&(et={useCapture:this.props.useCapture,passive:!0}),et}},{key:"setDefaultLoader",value:function(et){this.defaultLoader=et}},{key:"detachMousewheelListener",value:function(){var et=window;this.props.useWindow===!1&&(et=this.scrollComponent.parentNode),et.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var et=window;this.props.useWindow===!1&&(et=this.getParentElement(this.scrollComponent)),et.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),et.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(et){var nt=this.props.getScrollParent&&this.props.getScrollParent();return nt!=null?nt:et&&et.parentNode}},{key:"filterProps",value:function(et){return et}},{key:"attachScrollListener",value:function(){var et=this.getParentElement(this.scrollComponent);if(!(!this.props.hasMore||!et)){var nt=window;this.props.useWindow===!1&&(nt=et),nt.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),nt.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),nt.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(et){et.deltaY===1&&!this.isPassiveSupported()&&et.preventDefault()}},{key:"scrollListener",value:function(){var et=this.scrollComponent,nt=window,ht=this.getParentElement(et),at=void 0;if(this.props.useWindow){var ft=document.documentElement||document.body.parentNode||document.body,mt=nt.pageYOffset!==void 0?nt.pageYOffset:ft.scrollTop;this.props.isReverse?at=mt:at=this.calculateOffset(et,mt)}else this.props.isReverse?at=ht.scrollTop:at=et.scrollHeight-ht.scrollTop-ht.clientHeight;at<Number(this.props.threshold)&&et&&et.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=ht.scrollHeight,this.beforeScrollTop=ht.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(et,nt){return et?this.calculateTopPosition(et)+(et.offsetHeight-nt-window.innerHeight):0}},{key:"calculateTopPosition",value:function(et){return et?et.offsetTop+this.calculateTopPosition(et.offsetParent):0}},{key:"render",value:function(){var et=this,nt=this.filterProps(this.props),ht=nt.children,at=nt.element,ft=nt.hasMore,mt=nt.initialLoad,wt=nt.isReverse,Et=nt.loader,Nt=nt.loadMore,Dt=nt.pageStart,At=nt.ref,Kt=nt.threshold,Wt=nt.useCapture,xe=nt.useWindow,Vt=nt.getScrollParent,Ie=Jt(nt,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);Ie.ref=function(Ye){et.scrollComponent=Ye,At&&At(Ye)};var Se=[ht];return ft&&(Et?wt?Se.unshift(Et):Se.push(Et):this.defaultLoader&&(wt?Se.unshift(this.defaultLoader):Se.push(this.defaultLoader))),oe.default.createElement(at,Ie,Se)}}]),me}(It.Component);Fe.propTypes={children:$t.default.node.isRequired,element:$t.default.node,hasMore:$t.default.bool,initialLoad:$t.default.bool,isReverse:$t.default.bool,loader:$t.default.node,loadMore:$t.default.func.isRequired,pageStart:$t.default.number,ref:$t.default.func,getScrollParent:$t.default.func,threshold:$t.default.number,useCapture:$t.default.bool,useWindow:$t.default.bool},Fe.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},Ve.default=Fe,Sn.exports=Ve.default},26724:function(Sn,Ve,Pt){Sn.exports=Pt(51581)},93314:function(Sn){"use strict";Sn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},96908:function(Sn){"use strict";Sn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(Sn){"use strict";Sn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(Sn){"use strict";Sn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(Sn,Ve,Pt){"use strict";Pt.d(Ve,{Z:function(){return De}});const vt=we=>typeof we=="object"&&we!=null&&we.nodeType===1,It=(we,te)=>(!te||we!=="hidden")&&we!=="visible"&&we!=="clip",oe=(we,te)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const Fe=getComputedStyle(we,null);return It(Fe.overflowY,te)||It(Fe.overflowX,te)||(re=>{const me=(Ot=>{if(!Ot.ownerDocument||!Ot.ownerDocument.defaultView)return null;try{return Ot.ownerDocument.defaultView.frameElement}catch(et){return null}})(re);return!!me&&(me.clientHeight<re.scrollHeight||me.clientWidth<re.scrollWidth)})(we)}return!1},de=(we,te,Fe,re,me,Ot,et,nt)=>Ot<we&&et>te||Ot>we&&et<te?0:Ot<=we&&nt<=Fe||et>=te&&nt>=Fe?Ot-we-re:et>te&&nt<Fe||Ot<we&&nt>Fe?et-te+me:0,$t=we=>{const te=we.parentElement;return te==null?we.getRootNode().host||null:te},Ut=(we,te)=>{var Fe,re,me,Ot;if(typeof document=="undefined")return[];const{scrollMode:et,block:nt,inline:ht,boundary:at,skipOverflowHiddenElements:ft}=te,mt=typeof at=="function"?at:ln=>ln!==at;if(!vt(we))throw new TypeError("Invalid target");const wt=document.scrollingElement||document.documentElement,Et=[];let Nt=we;for(;vt(Nt)&&mt(Nt);){if(Nt=$t(Nt),Nt===wt){Et.push(Nt);break}Nt!=null&&Nt===document.body&&oe(Nt)&&!oe(document.documentElement)||Nt!=null&&oe(Nt,ft)&&Et.push(Nt)}const Dt=(re=(Fe=window.visualViewport)==null?void 0:Fe.width)!=null?re:innerWidth,At=(Ot=(me=window.visualViewport)==null?void 0:me.height)!=null?Ot:innerHeight,{scrollX:Kt,scrollY:Wt}=window,{height:xe,width:Vt,top:Ie,right:Se,bottom:Ye,left:Le}=we.getBoundingClientRect(),{top:Pe,right:We,bottom:Ue,left:ue}=(ln=>{const Ee=window.getComputedStyle(ln);return{top:parseFloat(Ee.scrollMarginTop)||0,right:parseFloat(Ee.scrollMarginRight)||0,bottom:parseFloat(Ee.scrollMarginBottom)||0,left:parseFloat(Ee.scrollMarginLeft)||0}})(we);let Ht=nt==="start"||nt==="nearest"?Ie-Pe:nt==="end"?Ye+Ue:Ie+xe/2-Pe+Ue,ke=ht==="center"?Le+Vt/2-ue+We:ht==="end"?Se+We:Le-ue;const pn=[];for(let ln=0;ln<Et.length;ln++){const Ee=Et[ln],{height:Ke,width:gn,top:Bn,right:dn,bottom:In,left:Ce}=Ee.getBoundingClientRect();if(et==="if-needed"&&Ie>=0&&Le>=0&&Ye<=At&&Se<=Dt&&(Ee===wt&&!oe(Ee)||Ie>=Bn&&Ye<=In&&Le>=Ce&&Se<=dn))return pn;const $n=getComputedStyle(Ee),Qn=parseInt($n.borderLeftWidth,10),jt=parseInt($n.borderTopWidth,10),Lt=parseInt($n.borderRightWidth,10),xt=parseInt($n.borderBottomWidth,10);let Tt=0,Ft=0;const yt="offsetWidth"in Ee?Ee.offsetWidth-Ee.clientWidth-Qn-Lt:0,ee="offsetHeight"in Ee?Ee.offsetHeight-Ee.clientHeight-jt-xt:0,pe="offsetWidth"in Ee?Ee.offsetWidth===0?0:gn/Ee.offsetWidth:0,qt="offsetHeight"in Ee?Ee.offsetHeight===0?0:Ke/Ee.offsetHeight:0;if(wt===Ee)Tt=nt==="start"?Ht:nt==="end"?Ht-At:nt==="nearest"?de(Wt,Wt+At,At,jt,xt,Wt+Ht,Wt+Ht+xe,xe):Ht-At/2,Ft=ht==="start"?ke:ht==="center"?ke-Dt/2:ht==="end"?ke-Dt:de(Kt,Kt+Dt,Dt,Qn,Lt,Kt+ke,Kt+ke+Vt,Vt),Tt=Math.max(0,Tt+Wt),Ft=Math.max(0,Ft+Kt);else{Tt=nt==="start"?Ht-Bn-jt:nt==="end"?Ht-In+xt+ee:nt==="nearest"?de(Bn,In,Ke,jt,xt+ee,Ht,Ht+xe,xe):Ht-(Bn+Ke/2)+ee/2,Ft=ht==="start"?ke-Ce-Qn:ht==="center"?ke-(Ce+gn/2)+yt/2:ht==="end"?ke-dn+Lt+yt:de(Ce,dn,gn,Qn,Lt+yt,ke,ke+Vt,Vt);const{scrollLeft:Zt,scrollTop:fe}=Ee;Tt=qt===0?0:Math.max(0,Math.min(fe+Tt/qt,Ee.scrollHeight-Ke/qt+ee)),Ft=pe===0?0:Math.max(0,Math.min(Zt+Ft/pe,Ee.scrollWidth-gn/pe+yt)),Ht+=fe-Tt,ke+=Zt-Ft}pn.push({el:Ee,top:Tt,left:Ft})}return pn},Jt=we=>we===!1?{block:"end",inline:"nearest"}:(te=>te===Object(te)&&Object.keys(te).length!==0)(we)?we:{block:"start",inline:"nearest"};function De(we,te){if(!we.isConnected||!(me=>{let Ot=me;for(;Ot&&Ot.parentNode;){if(Ot.parentNode===document)return!0;Ot=Ot.parentNode instanceof ShadowRoot?Ot.parentNode.host:Ot.parentNode}return!1})(we))return;const Fe=(me=>{const Ot=window.getComputedStyle(me);return{top:parseFloat(Ot.scrollMarginTop)||0,right:parseFloat(Ot.scrollMarginRight)||0,bottom:parseFloat(Ot.scrollMarginBottom)||0,left:parseFloat(Ot.scrollMarginLeft)||0}})(we);if((me=>typeof me=="object"&&typeof me.behavior=="function")(te))return te.behavior(Ut(we,te));const re=typeof te=="boolean"||te==null?void 0:te.behavior;for(const{el:me,top:Ot,left:et}of Ut(we,Jt(te))){const nt=Ot-Fe.top+Fe.bottom,ht=et-Fe.left+Fe.right;me.scroll({top:nt,left:ht,behavior:re})}}}}]);
|
|
|
}()); |