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

1323 lines
2.4 MiB

This file contains ambiguous Unicode characters!

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

(self.webpackChunk=self.webpackChunk||[]).push([[337],{89489:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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:"outlined"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},59477:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},40001:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},49198:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},87169:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},73331:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},15277:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},52671:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},8657:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},56082:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},33853:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},12893:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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"}}]},name:"minus-circle",theme:"outlined"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},15075:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},32134:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-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 8h152v152c0 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-8z"}},{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"}}]},name:"plus-circle",theme:"outlined"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},43531:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},61485:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},38819:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},47472:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Ze,Et){return De.createElement(_e.Z,(0,ce.Z)({},Ze,{ref:Et,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be},78780:function(){"use strict"},19136:function(){"use strict"},11570:function(Sn,an){"use strict";an.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},31687:function(Sn,an){"use strict";an.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},64686:function(Sn,an,ve){"use strict";var ce=ve(59301),De=Object.defineProperty,ze=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ke=(ct,Ze,Et)=>Ze in ct?De(ct,Ze,{enumerable:!0,configurable:!0,writable:!0,value:Et}):ct[Ze]=Et,Be=(ct,Ze)=>{for(var Et in Ze||(Ze={}))Ct.call(Ze,Et)&&Ke(ct,Et,Ze[Et]);if(ze)for(var Et of ze(Ze))_e.call(Ze,Et)&&Ke(ct,Et,Ze[Et]);return ct};const mt=ct=>React.createElement("svg",Be({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},ct),React.createElement("title",null,"\u7F16\u7EC4 18"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("circle",{fill:"#FCB041",cx:7,cy:7,r:7}),React.createElement("path",{d:"M7.531 9.638a.616.616 0 1 1-1.231 0v-.02a.616.616 0 1 1 1.231 0v.02Zm0-2.25a.616.616 0 1 1-1.231 0V4.117a.616.616 0 1 1 1.231 0v3.273Z",fill:"#FFF",fillRule:"nonzero"})));an.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},29277:function(){"use strict";function Sn(Ae,te,ee,he){ee===void 0&&(ee=0),he===void 0&&(he=1/0),this._name=Ae,this._defaultValue=te,this._minimum=ee,this._maximum=he}Object.defineProperty(Sn.prototype,"name",{get:function(){return this._name},set:function(Ae){if(typeof Ae!="string"||Ae==="")throw new Error("Shape name must be a valid string.");this._name=Ae}}),Object.defineProperty(Sn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("The default value must be a real number, not: "+Ae);this._defaultValue=Ae}}),Object.defineProperty(Sn.prototype,"minimum",{get:function(){return this._minimum},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("Minimum must be a real number, not: "+Ae);this._minimum=Ae}}),Object.defineProperty(Sn.prototype,"maximum",{get:function(){return this._maximum},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("Maximum must be a real number, not: "+Ae);this._maximum=Ae}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ae,te){var ee=go.Shape._FigureParameters[Ae];return ee?ee[te]:null},go.Shape.setFigureParameter=function(Ae,te,ee){if(!(ee instanceof Sn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var he=go.Shape._FigureParameters[Ae];he||(he=[],go.Shape._FigureParameters[Ae]=he),he[te]=ee};var an=[];function ve(Ae,te){var ee=an.pop();return ee===void 0?new go.Point(Ae,te):(ee.x=Ae,ee.y=te,ee)}function ce(){var Ae=an.pop();return Ae===void 0?new go.Point:Ae}function De(Ae){an.push(Ae)}function ze(Ae,te,ee,he,se,de,me,we,Me){Me||(Me=new go.Point);var be=Ae-ee,Ie=se-me,je=NaN,qe=NaN;if(be===0)if(Ie===0)Ae===ee&&(je=Ae,qe=te);else{var $e=(de-we)/Ie,ft=de-$e*se;je=Ae,qe=$e*je+ft}else if(Ie===0){var Re=(te-he)/be,Tt=te-Re*Ae;je=se,qe=Re*je+Tt}else{var Re=(te-he)/be,$e=(de-we)/Ie,Tt=te-Re*Ae,ft=de-$e*se;je=(ft-Tt)/(Re-$e),qe=Re*je+Tt}return Me.x=je,Me.y=qe,Me}function Ct(Ae,te,ee,he,se,de,me,we,Me,be,Ie,je,qe,$e){var ft=1-Me,Re=Me,Tt=Ae*ft+ee*Re,et=te*ft+he*Re,bt=ee*ft+se*Re,Bt=he*ft+de*Re,Nt=se*ft+me*Re,Zt=de*ft+we*Re,Ut=Tt*ft+bt*Re,lt=et*ft+Bt*Re,Ge=bt*ft+Nt*Re,kt=Bt*ft+Zt*Re,un=Ut*ft+Ge*Re,ln=lt*ft+kt*Re;be.x=Tt,be.y=et,Ie.x=Ut,Ie.y=lt,je.x=un,je.y=ln,qe.x=Ge,qe.y=kt,$e.x=Nt,$e.y=Zt}var _e=new go.Spot(.156,.156),Ke=new go.Spot(.844,.844),Be=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Sn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=5),he=Math.min(he,te/3),he=Math.min(he,ee/3);var se=he*Be,de=new go.Geometry().add(new go.PathFigure(he,0,!0).add(new go.PathSegment(go.PathSegment.Line,te-he,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,he,te-se,0,te,se)).add(new go.PathSegment(go.PathSegment.Line,te,ee-he)).add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te,ee-se,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-he,se,ee,0,ee-se)).add(new go.PathSegment(go.PathSegment.Line,0,he)).add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,se,se,0).close()));return se>1&&(de.spot1=new go.Spot(0,0,se,se),de.spot2=new go.Spot(1,1,-se,-se)),de}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=0,he.startY=ee/2,he.endX=te,he.endY=ee/2,he}),go.Shape.defineFigureGenerator("LineV",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=te/2,he.startY=0,he.endX=te/2,he.endY=ee,he}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.25*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.75*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ae,te,ee){var he=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(he*te,(1-he)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,he*ee)).add(new go.PathSegment(go.PathSegment.Move,he*te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,(1-he)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ae,te,ee){var he=te/2,se=new go.Geometry().add(new go.PathFigure(te,te/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,he,he,he,he).close()));return se.spot1=_e,se.spot2=Ke,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}),go.Shape.defineFigureGenerator("Line2",function(Ae,te,ee){var he=new go.Geometry(go.Geometry.Line);return he.startX=te,he.startY=0,he.endX=0,he.endY=ee,he}),go.Shape.defineFigureGenerator("Curve1",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Be*te,0,te,(1-Be)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,0,Be*ee,(1-Be)*te,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,Be*ee,Be*te,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Be)*te,0,0,(1-Be)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee).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(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=.1:he<-1?he=-1:he>1&&(he=1);var se=Math.abs(he)*te;if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Sn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=10:he<-te?he=-te:he>te&&(he=te);var se=Math.abs(he);if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.setFigureParameter("Trapezoid1",0,new Sn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=.2:he<.5?he=-.5:he>.5&&(he=.5);var se=Math.abs(he)*te;if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Sn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=20:he<-te?he=-te/2:he>te&&(he=te/2);var se=Math.abs(he);if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}}),go.Shape.setFigureParameter("ManualOperation",0,new Sn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)?he=10:he<-te?he=-te/2:he>te&&(he=te/2);var se=Math.abs(he);if(he===0){var de=new go.Geometry(go.Geometry.Rectangle);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}else{var de=new go.Geometry;return he>0?de.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())):de.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),se<te/2&&de.setSpots(se/te,0,(te-se)/te,1),de}});var mt=[];function ct(){var Ae=mt.pop();return Ae===void 0?[]:Ae}function Ze(Ae){Ae.length=0,mt.push(Ae)}function Et(Ae){for(var te=ct(),ee=.5,he=.5,se=Math.PI*1.5,de=0,me=0;me<Ae;me++)de=2*Math.PI/Ae*me+se,te[me]=new go.Point(he+ee*Math.cos(de),he+ee*Math.sin(de));return te.push(te[0]),te}function ht(Ae){var te=dt(Ae),ee=ct();ee[0]=te[0];for(var he=1,se=1;he<te.length;he+=2,se+=3)ee[se]=te[he],ee[se+1]=te[he],ee[se+2]=te[he+1];return Ze(te),ee}function dt(Ae){for(var te=Et(Ae),ee=ct(),he=Math.floor(te.length/2),se=te.length-1,de=Ae%2===0?2:1,me=0;me<se;me++){var we=te[me],Me=te[me+1],be=te[(he+me-1)%se],Ie=te[(he+me+de)%se];ee[me*2]=we,ee[me*2+1]=ze(we.x,we.y,be.x,be.y,Me.x,Me.y,Ie.x,Ie.y,new go.Point)}return ee[ee.length]=ee[0],Ze(te),ee}go.Shape.defineFigureGenerator("Pentagon",function(Ae,te,ee){var he=Et(5),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<5;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Ae,te,ee){var he=Et(6),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<6;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Ae,te,ee){var he=Et(7),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<7;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Ae,te,ee){var he=Et(8),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<8;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Ae,te,ee){var he=Et(9),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<9;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Ae,te,ee){var he=Et(10),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<10;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Ae,te,ee){var he=Et(12),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<12;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ae,te,ee){var he=dt(5),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<10;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ae,te,ee){var he=dt(6),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<12;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ae,te,ee){var he=dt(7),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<14;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ae,te,ee){var he=dt(8),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<16;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ae,te,ee){var he=dt(9),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<18;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ae,te,ee){var he=dt(10),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<20;me++)de.add(new go.PathSegment(go.PathSegment.Line,he[me].x*te,he[me].y*ee));return de.add(new go.PathSegment(go.PathSegment.Line,he[0].x*te,he[0].y*ee).close()),Ze(he),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ae,te,ee){var he=ht(5),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),Ze(he),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ae,te,ee){var he=ht(6),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),Ze(he),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ae,te,ee){var he=ht(7),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),Ze(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ae,te,ee){var he=ht(8),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),Ze(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ae,te,ee){var he=ht(9),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),Ze(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ae,te,ee){var he=ht(10),se=new go.Geometry,de=new go.PathFigure(he[0].x*te,he[0].y*ee,!0);se.add(de);for(var me=1;me<he.length;me+=3)de.add(new go.PathSegment(go.PathSegment.Bezier,he[me+2].x*te,he[me+2].y*ee,he[me].x*te,he[me].y*ee,he[me+1].x*te,he[me+1].y*ee));return de.segments.last().close(),Ze(he),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new Sn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Sn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN,se=Ae?Ae.parameter2:NaN;isNaN(he)&&(he=8),isNaN(se)&&(se=8);var de=new go.Geometry,me=new go.PathFigure(0,0,!0);return de.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he<te/2&&se<ee/2&&(me.add(new go.PathSegment(go.PathSegment.Move,he,se)),me.add(new go.PathSegment(go.PathSegment.Line,he,ee-se)),me.add(new go.PathSegment(go.PathSegment.Line,te-he,ee-se)),me.add(new go.PathSegment(go.PathSegment.Line,te-he,se).close())),de.setSpots(0,0,1,1,he,se,-he,-se),de}),go.Shape.setFigureParameter("Ring",0,new Sn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=8);var se=te/2,de=new go.Geometry,me=new go.PathFigure(te,te/2,!0);de.add(me),me.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var we=Math.max(se-he,0);return we>0&&(me.add(new go.PathSegment(go.PathSegment.Move,te/2+we,te/2)),me.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,we,we).close())),de.spot1=_e,de.spot2=Ke,de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Cloud",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.08034461*te,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*te,.05349299*ee,-.09239631*te,.07836421*ee,.1406031*te,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*te,.074219*ee,.2450511*te,-.00697547*ee,.3776197*te,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*te,.07004196*ee,.4539471*te,0,.6066018*te,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*te,.08370865*ee,.6914277*te,-.01904177*ee,.8921095*te,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*te,.3194596*ee,1.036446*te,.04105738*ee,1.020377*te,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*te,.562044*ee,1.04448*te,.360238*ee,.992256*te,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*te,.8217117*ee,1.032337*te,.5771781*ee,1.018411*te,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*te,.9156953*ee,1.028411*te,.9571472*ee,.8556702*te,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*te,.9310455*ee,.7431877*te,1.009325*ee,.5624123*te,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*te,.9344623*ee,.4820677*te,1.031761*ee,.3030112*te,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.870098*ee,.2329994*te,1.01518*ee,.03213784*te,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*te,.6545475*ee,-.02812061*te,.9032597*ee,-.01205169*te,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*te,.4265613*ee,-.01812061*te,.6089503*ee,-.00606892*te,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.1944299*ee,-.01606892*te,.3892545*ee,-.01205169*te,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ae,te,ee){var he=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(he*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,te,(1-he)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)).add(new go.PathSegment(go.PathSegment.Line,he*te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-he)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,he*ee).close())).setSpots(he/2,he/2,1-he/2,1-he/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(Ae,te,ee){var he=Ae?Ae.parameter1:NaN,se=Ae?Ae.parameter2:NaN;isNaN(he)&&(he=0),isNaN(se)&&(se=315);var de=he%360;de<0&&(de+=360);var me=se%360,we=Math.min(te,ee)/2;return new go.Geometry().add(new go.PathFigure(we,we).add(new go.PathSegment(go.PathSegment.Arc,de,me,we,we,we,we).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ae,te,ee){var he=Be/Math.SQRT2*.5,se=Math.SQRT2/2,de=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*te,de*ee,te,(1-he)*ee,(se+he)*te,(de+he)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=30);var se=Math.min(he,te)/2,de=te/2,me=ee/2;return new go.Geometry().add(new go.PathFigure(de-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,de+se,0)).add(new go.PathSegment(go.PathSegment.Line,de+se,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me-se)).add(new go.PathSegment(go.PathSegment.Line,de-se,me-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Sn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=10);var se=Math.min(he,te)/2,de=te/2,me=ee/2;return new go.Geometry().add(new go.PathFigure(de-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,de+se,0)).add(new go.PathSegment(go.PathSegment.Line,de+se,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me-se)).add(new go.PathSegment(go.PathSegment.Line,te,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,me+se)).add(new go.PathSegment(go.PathSegment.Line,de+se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,ee)).add(new go.PathSegment(go.PathSegment.Line,de-se,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me-se)).add(new go.PathSegment(go.PathSegment.Line,de-se,me-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;if((isNaN(he)||he<0)&&(he=30),te===0||ee===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=te,se.endY=ee,se}else{var de=te/2,me=ee/2,we=Math.atan2(ee,te),Me=he-Math.min(Math.cos(we)*he/2,de),be=he-Math.min(Math.sin(we)*he/2,me),se=new go.Geometry,Ie=new go.PathFigure(Me,0,!0);return se.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,de,.2*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,te-Me,0)),Ie.add(new go.PathSegment(go.PathSegment.Line,te,be)),Ie.add(new go.PathSegment(go.PathSegment.Line,.8*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,te,ee-be)),Ie.add(new go.PathSegment(go.PathSegment.Line,te-Me,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,de,.8*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,Me,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,ee-be)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new Sn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=10);var se=new go.Geometry,de=new go.PathFigure(.1*te,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new Sn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.2);var se=new go.Geometry,de=new go.PathFigure(0,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5+he/2)*te,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5+he/2)*te,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5-he/2)*te,(1-he)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(.5-he/2)*te,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,he*ee).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new Sn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.5);var se=new go.Geometry,de=new go.PathFigure(0,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Math.abs(1-he)*te,.25*ee,Math.abs(1-he)*te,.75*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,0,0,he*te,.75*ee,he*te,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,Be*te,0,te,(.5-Be/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,(.5+Be/2)*ee,Be*te,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,0,te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*te,.75*ee,.5*te,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*te,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,0,0,.45*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.55*te,0,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.5*ee,.9*te,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*te,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.6*te,.2*ee,te,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.7*ee,te,.8*ee,.6*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,.5*te,.75*ee,.55*te,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.7*ee,.45*te,.95*ee,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*te,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*te,.01*ee,0,.25*ee,.4*te,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.4*te,.6*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.15*te,ee,.5*te,.75*ee,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.6*ee,.55*te,.95*ee,.5*te,.75*ee));var de=.2,me=.3,we=0,Me=de*Be;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5+de+we)*ee,(.5-de+me)*te,(.5+Me+we)*ee,(.5-Me+me)*te,(.5+de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+de+me)*te,(.5+we)*ee,(.5+Me+me)*te,(.5+de+we)*ee,(.5+de+me)*te,(.5+Me+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5-de+we)*ee,(1-.5+de+me)*te,(.5-Me+we)*ee,(.5+Me+me)*te,(.5-de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*te,.36771243*ee,(.5-Me+me)*te,(.5-de+we)*ee,(.5-de+me+.05)*te,(.5-Me+we-.02)*ee)),de=.2,me=0,we=-.3,Me=de*Be,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+de+me)*te,(.5+we)*ee,(.5+Me+me)*te,(.5+de+we)*ee,(.5+de+me)*te,(.5+Me+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5-de+we)*ee,(1-.5+de+me)*te,(.5-Me+we)*ee,(.5+Me+me)*te,(.5-de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-de+me)*te,(.5+we)*ee,(.5-Me+me)*te,(.5-de+we)*ee,(.5-de+me)*te,(.5-Me+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Me+me)*te,(.5+de+we)*ee,(.5-de+me)*te,(.5+Me+we)*ee,(.5-Me+me)*te,(.5+de+we)*ee)),de=.2,me=-.3,we=0,Me=de*Be,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5-de+we)*ee,(1-.5+de+me-.05)*te,(.5-Me+we-.02)*ee,(.5+Me+me)*te,(.5-de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-de+me)*te,(.5+we)*ee,(.5-Me+me)*te,(.5-de+we)*ee,(.5-de+me)*te,(.5-Me+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*te,(.5+de+we)*ee,(.5-de+me)*te,(.5+Me+we)*ee,(.5-Me+me)*te,(.5+de+we)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.6*ee,(.5+Me+me)*te,(.5+de+we)*ee,(.5+de+me)*te,(.5+Me+we)*ee).close()),he.setSpots(.06,.33,.93,.68),he}),go.Shape.defineFigureGenerator("YinYang",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.5,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*.5,te*.5,te*.5,te*.5)),se.add(new go.PathSegment(go.PathSegment.Arc,90,-180,te*.5,te*.75,te*.25,te*.25)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,te*.5,te*.25,te*.25,te*.25));var de=.1,me=.5,we=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(me+de)*te,we*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,te*me,ee*we,de*te,de*te).close()),se=new go.PathFigure(te*.5,0,!1),he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*.5,te*.5,te*.5,te*.5)),we=.75,se=new go.PathFigure((me+de)*te,we*ee,!0),he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,te*me,ee*we,de*te,de*te).close()),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Peace",function(Ae,te,ee){var he=.8535533905932737,se=.5*te,de=.5*ee;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,de,se,de)).add(new go.PathSegment(go.PathSegment.Line,se,ee)).add(new go.PathSegment(go.PathSegment.Move,se,de)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,he*ee)).add(new go.PathSegment(go.PathSegment.Move,se,de)).add(new go.PathSegment(go.PathSegment.Line,he*te,he*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=.5,me=.5,we=.5,Me=new go.PathFigure(me*te,(we-de)*ee);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),de=.4,se=Be*.4;var be=ce(),Ie=ce(),je=ce(),qe=ce();Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.42,be,Ie,je,qe,qe);var $e=ce(),ft=ce(),Re=ce();Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.58,qe,qe,Re,$e,ft);var Tt=ce(),et=ce(),bt=ce();Ct(me,we+de,me-se,we+de,me-de,we+se,me-de,we,.42,Tt,et,bt,qe,qe);var Bt=ce(),Nt=ce(),Zt=ce();return Ct(me,we+de,me-se,we+de,me-de,we+se,me-de,we,.58,qe,qe,Zt,Bt,Nt),Me.add(new go.PathSegment(go.PathSegment.Move,Zt.x*te,Zt.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,Bt.x*te,Bt.y*ee,Nt.x*te,Nt.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,je.x*te,je.y*ee,be.x*te,be.y*ee,Ie.x*te,Ie.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,Zt.x*te,Zt.y*ee).close()),Me.add(new go.PathSegment(go.PathSegment.Move,bt.x*te,bt.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,Re.x*te,Re.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,$e.x*te,$e.y*ee,ft.x*te,ft.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,bt.x*te,bt.y*ee,Tt.x*te,Tt.y*ee,et.x*te,et.y*ee).close()),De(be),De(Ie),De(je),De(qe),De($e),De(ft),De(Re),De(Tt),De(et),De(bt),De(Bt),De(Nt),De(Zt),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Fragile",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*te,0)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*te,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.5*ee,te,.25*ee,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=30),he>te&&(he=te);var se=(te-he)/2,de=se+he;return new go.Geometry().add(new go.PathFigure(de,.5*ee).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,se,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*te,0)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ae,te,ee){var he=new go.Geometry,se=Be*.4,de=.4,me=.5,we=.5,Me=ce(),be=ce(),Ie=ce(),je=ce(),qe=new go.PathFigure((me-de)*te,we*ee,!1);he.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.44,Ie,je,be,Me,Me),qe.add(new go.PathSegment(go.PathSegment.Bezier,be.x*te,be.y*ee,Ie.x*te,Ie.y*ee,je.x*te,je.y*ee));var $e=ve(be.x,be.y);Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.56,Me,Me,be,Ie,je);var ft=ve(be.x,be.y);qe.add(new go.PathSegment(go.PathSegment.Line,($e.x*.1+.95*.9)*te,$e.y*.1*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.85*te,$e.y*.1*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,.85*te,0)),qe.add(new go.PathSegment(go.PathSegment.Line,te,0)),qe.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,(ft.x*.1+.9)*te,.15*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,(ft.x*.1+.9)*te,(ft.y*.1+.05*.9)*ee)),qe.add(new go.PathSegment(go.PathSegment.Line,ft.x*te,ft.y*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,Ie.x*te,Ie.y*ee,je.x*te,je.y*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),de=.35,se=Be*.35;var Re=new go.PathFigure(me*te,(we-de)*ee,!1);he.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee));var Tt=new go.PathFigure((me-de)*te,we*ee,!1);return he.add(Tt),De(Me),De(be),De(Ie),De(je),De($e),De(ft),he.spot1=new go.Spot(.202,.257),he.spot2=new go.Spot(.792,.739),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("GenderFemale",function(Ae,te,ee){var he=new go.Geometry,se=.375,de=0,me=-.125,we=se*Be,Me=new go.PathFigure((.525+de)*te,(.5+se+me)*ee,!1);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+de)*te,(.5+me)*ee,(.5+we+de)*te,(.5+se+me)*ee,(.5+se+de)*te,(.5+we+me)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5+de)*te,(.5-se+me)*ee,(1-.5+se+de)*te,(.5-we+me)*ee,(.5+we+de)*te,(.5-se+me)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+de)*te,(.5+me)*ee,(.5-we+de)*te,(.5-se+me)*ee,(.5-se+de)*te,(.5-we+me)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.475+de)*te,(.5+se+me)*ee,(.5-se+de)*te,(.5+we+me)*ee,(.5-we+de)*te,(.5+se+me)*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.475*te,.85*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.425*te,.85*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.425*te,.9*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.475*te,.9*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.475*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.525*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.525*te,.9*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.575*te,.9*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.575*te,.85*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee).close()),se=.325,de=0,me=-.125,we=se*Be;var Me=new go.PathFigure((1-.5+se+de)*te,(.5+me)*ee,!1);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5+de)*te,(.5+se+me)*ee,(.5+se+de)*te,(.5+we+me)*ee,(.5+we+de)*te,(.5+se+me)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+de)*te,(.5+me)*ee,(.5-we+de)*te,(.5+se+me)*ee,(.5-se+de)*te,(.5+we+me)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5+de)*te,(.5-se+me)*ee,(.5-se+de)*te,(.5-we+me)*ee,(.5-we+de)*te,(.5-se+me)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+de)*te,(.5+me)*ee,(.5+we+de)*te,(.5-se+me)*ee,(1-.5+se+de)*te,(.5-we+me)*ee));var Me=new go.PathFigure((.525+de)*te,(.5+se+me)*ee,!1);return he.add(Me),he.spot1=new go.Spot(.232,.136),he.spot2=new go.Spot(.682,.611),he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("LogicImplies",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;return isNaN(he)&&(he=.2),new go.Geometry().add(new go.PathFigure((1-he)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;return isNaN(he)&&(he=.2),new go.Geometry().add(new go.PathFigure((1-he)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,he*te,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,he*te,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ae,te,ee){var he=new go.Geometry().add(new go.PathFigure(.5*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*te,.5*ee,.5*te,.5*ee)));return he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("LogicTruth",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ae,te,ee){var he=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,he*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,he*te,he*ee,he*te,he*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ae,te,ee){var he=.5;return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,he*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,he*te,he*ee,he*te,he*ee)).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(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.3);var de=(1-he)*te,me=(.5-se/2)*ee,we=(.5+se/2)*ee,Me=new go.Geometry,be=new go.PathFigure(0,me,!0);Me.add(be),be.add(new go.PathSegment(go.PathSegment.Line,de,me)),be.add(new go.PathSegment(go.PathSegment.Line,de,0)),be.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,de,ee)),be.add(new go.PathSegment(go.PathSegment.Line,de,we)),be.add(new go.PathSegment(go.PathSegment.Line,0,we).close()),Me.spot1=new go.Spot(0,me/ee);var Ie=ze(0,we/ee,1,we/ee,de/te,1,1,.5,ce());return Me.spot2=new go.Spot(Ie.x,Ie.y),De(Ie),Me}),go.Shape.setFigureParameter("Arrow2",0,new Sn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Sn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=30),he>te&&(he=te);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var de=te-he,me=(ee-se)/2,we=me+se,Me=new go.Geometry,be=new go.PathFigure(0,me,!0);Me.add(be),be.add(new go.PathSegment(go.PathSegment.Line,de,me)),be.add(new go.PathSegment(go.PathSegment.Line,de,0)),be.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,de,ee)),be.add(new go.PathSegment(go.PathSegment.Line,de,we)),be.add(new go.PathSegment(go.PathSegment.Line,0,we).close()),Me.spot1=new go.Spot(0,me/ee);var Ie=ze(0,we/ee,1,we/ee,de/te,1,1,.5,ce());return Me.spot2=new go.Spot(Ie.x,Ie.y),De(Ie),Me}),go.Shape.defineFigureGenerator("Chevron",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.214*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.786*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),he}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Sn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=(.5-he/2)*ee,de=(.5+he/2)*ee,me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),we.add(new go.PathSegment(go.PathSegment.Line,.3*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close());var Me=ze(0,.5,.3,0,0,se/ee,.1,se/ee,ce());return me.spot1=new go.Spot(Me.x,Me.y),Me=ze(.7,1,1,.5,0,de/ee,1,de/ee,Me),me.spot2=new go.Spot(Me.x,Me.y),De(Me),me}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Sn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Sn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=40);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=100);var de=(ee-he)/2,me=de+he,we=(ee-se)/2,Me=we+se;(he>ee||se>ee)&&(se>he?(he=he*ee/se,de=(ee-he)/2,me=de+he,we=0,Me=ee):(de=0,me=ee,we=0,Me=ee));var be=new go.Geometry,Ie=new go.PathFigure(te,.5*ee,!0);be.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,Me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,Me)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,we)),Ie.add(new go.PathSegment(go.PathSegment.Line,.3*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,we).close());var je=ze(0,.5,.3,we/ee,0,de/ee,1,de/ee,ce());return be.spot1=new go.Spot(je.x,je.y),je=ze(.7,Me/ee,1,.5,0,me/ee,1,me/ee,je),be.spot2=new go.Spot(je.x,je.y),De(je),be}),go.Shape.setFigureParameter("IBeamArrow",0,new Sn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=(.5-he/2)*ee,de=(.5+he/2)*ee,me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,0)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),me.spot1=new go.Spot(0,se/ee);var Me=ze(.7,1,1,.5,0,de/ee,1,de/ee,ce());return me.spot2=new go.Spot(Me.x,Me.y),De(Me),me}),go.Shape.setFigureParameter("IBeamArrow2",0,new Sn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Sn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=40);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=100);var de=(ee-he)/2,me=de+he,we=(ee-se)/2,Me=we+se;(he>ee||se>ee)&&(se>he?(he=he*ee/se,de=(ee-he)/2,me=de+he,we=0,Me=ee):(de=0,me=ee,we=0,Me=ee));var be=new go.Geometry,Ie=new go.PathFigure(te,.5*ee,!0);be.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,Me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,me)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,Me)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,Me)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,we)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,we)),Ie.add(new go.PathSegment(go.PathSegment.Line,.2*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),Ie.add(new go.PathSegment(go.PathSegment.Line,.7*te,we).close()),be.spot1=new go.Spot(0,de/ee);var je=ze(.7,Me/ee,1,.5,0,me/ee,1,me/ee,ce());return be.spot2=new go.Spot(je.x,je.y),De(je),be}),go.Shape.setFigureParameter("Pointer",0,new Sn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.1);var se=new go.Geometry,de=new go.PathFigure(te,.5*ee,!0);se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,he*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(he,.35);var me=ze(.2,.65,1,.65,0,1,1,.5,ce());return se.spot2=new go.Spot(me.x,me.y),De(me),se}),go.Shape.setFigureParameter("RoundedPointer",0,new Sn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.3);var se=new go.Geometry,de=new go.PathFigure(te,.5*ee,!0);se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,0,0,he*te,.75*ee,he*te,.25*ee).close()),se.spot1=new go.Spot(he,.35);var me=ze(0,.65,1,.65,0,1,1,.5,ce());return se.spot2=new go.Spot(me.x,me.y),De(me),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new Sn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.4);var se=(.5-he/2)*ee,de=(.5+he/2)*ee,me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,0,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),me.spot1=new go.Spot(.2,.3);var Me=ze(.7,1,1,.5,0,de/ee,1,de/ee,ce());return me.spot2=new go.Spot(Me.x,Me.y),De(Me),me}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Sn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=50);var se=(ee-he)/2,de=se+he;he>ee&&(se=0,de=ee);var me=new go.Geometry,we=new go.PathFigure(te,.5*ee,!0);me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,de)),we.add(new go.PathSegment(go.PathSegment.Line,0,de)),we.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,0,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),me.spot1=new go.Spot(.2,se/ee);var Me=ze(.7,1,1,.5,0,de/ee,1,de/ee,ce());return me.spot2=new go.Spot(Me.x,Me.y),De(Me),me}),go.Shape.setFigureParameter("SquareArrow",0,new Sn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.7);var se=new go.Geometry,de=new go.PathFigure(te,.5*ee,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,he*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,0)),de.add(new go.PathSegment(go.PathSegment.Line,he*te,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(he,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=Be*.1,me=new go.PathFigure(0,.9*ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+de)*ee,(.5+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+de)*ee).close()),he.spot1=new go.Spot(.25,.5),he.spot2=new go.Spot(.75,.97),he}),go.Shape.defineFigureGenerator("Cone2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.9*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,ee,.85/.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var de=new go.PathFigure(0,.9*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,.8*ee,.85/.9*te,.8*ee)),he.spot1=new go.Spot(.25,.5),he.spot2=new go.Spot(.75,.82),he}),go.Shape.defineFigureGenerator("Cube1",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var de=new go.PathFigure(.5*te,ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.5*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),he.spot1=new go.Spot(0,.3),he.spot2=new go.Spot(.5,.85),he}),go.Shape.defineFigureGenerator("Cube2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.3*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0).close());var de=new go.PathFigure(0,.3*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.7*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Move,.7*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),he.spot1=new go.Spot(0,.3),he.spot2=new go.Spot(.7,1),he}),go.Shape.defineFigureGenerator("Cylinder1",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,ee/3);var se=new go.Geometry,de=Be*.5,me=new go.PathFigure(0,he,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Be*he,(.5-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,1*te,he,(.5+de)*te,0,1*te,Be*he)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-he)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,1*ee,1*te,ee-Be*he,(.5+de)*te,1*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-he,(.5-de)*te,1*ee,0,ee-Be*he)),me.add(new go.PathSegment(go.PathSegment.Line,0,he));var we=new go.PathFigure(te,he,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,2*he,1*te,2*he-Be*he,(.5+de)*te,2*he)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,he,(.5-de)*te,2*he,0,2*he-Be*he)),se.spot1=new go.Spot(0,0,0,2*he),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,ee/3);var se=new go.Geometry,de=Be*.5,me=new go.PathFigure(0,ee-he,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Line,0,he)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Be*he,(.5-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,he,(.5+de)*te,0,te,Be*he)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-he)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,ee-Be*he,(.5+de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-he,(.5-de)*te,ee,0,ee-Be*he));var we=new go.PathFigure(0,ee-he,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee-2*he,0,ee-he-Be*he,(.5-de)*te,ee-2*he)),we.add(new go.PathSegment(go.PathSegment.Bezier,te,ee-he,(.5+de)*te,ee-2*he,te,ee-he-Be*he)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*he),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,te/3);var se=new go.Geometry,de=Be*.5,me=new go.PathFigure(he,0,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te-he,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Be*he,0,te,(.5-de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te,(.5+de)*ee,te-Be*he,ee)),me.add(new go.PathSegment(go.PathSegment.Line,he,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Be*he,ee,0,(.5+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,(.5-de)*ee,Be*he,0));var we=new go.PathFigure(he,0,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,2*he,.5*ee,he+Be*he,0,2*he,(.5-de)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,he,ee,2*he,(.5+de)*ee,he+Be*he,ee)),se.spot1=new go.Spot(0,0,2*he,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=5),he=Math.min(he,te/3);var se=new go.Geometry,de=Be*.5,me=new go.PathFigure(te-he,0,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Be*he,0,te,(.5-de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te,(.5+de)*ee,te-Be*he,ee)),me.add(new go.PathSegment(go.PathSegment.Line,he,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Be*he,ee,0,(.5+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,(.5-de)*ee,Be*he,0)),me.add(new go.PathSegment(go.PathSegment.Line,te-he,0));var we=new go.PathFigure(te-he,0,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,te-2*he,.5*ee,te-he-Be*he,0,te-2*he,(.5-de)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,te-he,ee,te-2*he,(.5+de)*ee,te-he-Be*he,ee)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*he,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.25*te,.25*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(.25*te,.25*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),he.spot1=new go.Spot(.408,.172),he.spot2=new go.Spot(.833,.662),he}),go.Shape.defineFigureGenerator("Prism2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.25*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(0,ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),de.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),he.spot1=new go.Spot(.25,.5),he.spot2=new go.Spot(.75,.75),he}),go.Shape.defineFigureGenerator("Pyramid1",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var de=new go.PathFigure(.5*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),he.spot1=new go.Spot(.25,.367),he.spot2=new go.Spot(.75,.875),he}),go.Shape.defineFigureGenerator("Pyramid2",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var de=new go.PathFigure(.5*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),he.spot1=new go.Spot(.25,.367),he.spot2=new go.Spot(.75,.875),he}),go.Shape.defineFigureGenerator("Actor",function(Ae,te,ee){var he=new go.Geometry,se=.2,de=.1,me=Be*se,we=Be*de,Me=.5,be=.1,Ie=new go.PathFigure(Me*te,(be+de)*ee,!0);he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Me-se)*te,be*ee,(Me-me)*te,(be+de)*ee,(Me-se)*te,(be+we)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be-de)*ee,(Me-se)*te,(be-we)*ee,(Me-me)*te,(be-de)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Me+se)*te,be*ee,(Me+me)*te,(be-de)*ee,(Me+se)*te,(be-we)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be+de)*ee,(Me+se)*te,(be+we)*ee,(Me+me)*te,(be+de)*ee));var je=.05,qe=Be*je;Me=.05,be=.25;var $e=new go.PathFigure(.5*te,.2*ee,!0);return he.add($e),$e.add(new go.PathSegment(go.PathSegment.Line,.95*te,.2*ee)),Me=.95,be=.25,$e.add(new go.PathSegment(go.PathSegment.Bezier,(Me+je)*te,be*ee,(Me+qe)*te,(be-je)*ee,(Me+je)*te,(be-qe)*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.85*te,.35*ee)),je=.025,qe=Be*je,Me=.825,be=.35,$e.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be-je)*ee,(Me+je)*te,(be-qe)*ee,(Me+qe)*te,(be-je)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Me-je)*te,be*ee,(Me-qe)*te,(be-je)*ee,(Me-je)*te,(be-qe)*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee)),je=.05,qe=Be*je,Me=.5,be=.7,$e.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be-je)*ee,(Me+je)*te,(be-qe)*ee,(Me+qe)*te,(be-je)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Me-je)*te,be*ee,(Me-qe)*te,(be-je)*ee,(Me-je)*te,(be-qe)*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.45*te,ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.2*te,.35*ee)),je=.025,qe=Be*je,Me=.175,be=.35,$e.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be-je)*ee,(Me+je)*te,(be-qe)*ee,(Me+qe)*te,(be-je)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Me-je)*te,be*ee,(Me-qe)*te,(be-je)*ee,(Me-je)*te,(be-qe)*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),je=.05,qe=Be*je,Me=.05,be=.25,$e.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be-je)*ee,(Me-je)*te,(be-qe)*ee,(Me-qe)*te,(be-je)*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),he.spot1=new go.Spot(.2,.2),he.spot2=new go.Spot(.8,.65),he}),go.Shape.setFigureParameter("Card",0,new Sn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;isNaN(he)&&(he=.2);var se=new go.Geometry,de=new go.PathFigure(te,0,!0);return se.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,he*ee)),de.add(new go.PathSegment(go.PathSegment.Line,he*te,0).close()),se.spot1=new go.Spot(0,he),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee));var de=new go.PathFigure(.5*te,.5*ee,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),he.spot1=new go.Spot(.25,0),he.spot2=new go.Spot(.75,.25),he}),go.Shape.defineFigureGenerator("CreateRequest",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(0,se*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),me.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),he}),go.Shape.defineFigureGenerator("Database",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=Be*.1,me=new go.PathFigure(te,.1*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+de)*ee,(.5+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-de)*ee,(.5-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-de)*ee));var we=new go.PathFigure(te,.1*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+de)*ee,(.5+se)*te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+de)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+de)*ee,(.5+se)*te,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+de)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.4*ee,te,(.3+de)*ee,(.5+se)*te,.4*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-se)*te,.4*ee,0,(.3+de)*ee)),he.spot1=new go.Spot(0,.4),he.spot2=new go.Spot(1,.9),he}),go.Shape.defineFigureGenerator("DataStorage",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.9*ee,.25*te,.1*ee).close()),he.spot1=new go.Spot(.226,0),he.spot2=new go.Spot(.81,1),he}),go.Shape.defineFigureGenerator("DiskStorage",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=Be*.1,me=new go.PathFigure(te,.1*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+de)*ee,(.5+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-de)*ee,(.5-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-de)*ee));var we=new go.PathFigure(te,.1*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+de)*ee,(.5+se)*te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+de)*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+de)*ee,(.5+se)*te,.3*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+de)*ee)),he.spot1=new go.Spot(0,.3),he.spot2=new go.Spot(1,.9),he}),go.Shape.defineFigureGenerator("Display",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),he.spot1=new go.Spot(.25,0),he.spot2=new go.Spot(.75,1),he}),go.Shape.defineFigureGenerator("DividedEvent",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var de=Be*.2,me=new go.PathFigure(0,.2*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,0,(.2-de)*ee,(.2-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.2*ee,(.8+de)*te,0,te,(.2-de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,ee,te,(.8+de)*ee,(.8+de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-de)*te,ee,0,(.8+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var we=new go.PathFigure(0,se*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),he}),go.Shape.defineFigureGenerator("DividedProcess",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(0,se*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),he}),go.Shape.defineFigureGenerator("Document",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),he.spot1=go.Spot.TopLeft,he.spot2=new go.Spot(1,.6),he}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(se*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,0,se*ee)),me.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),me.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),he}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var de=new go.PathFigure(.1*te,.4*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.9*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.6*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.4*te,.9*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.9*ee)),he.spot1=new go.Spot(.25,.25),he.spot2=new go.Spot(.75,.75),he}),go.Shape.defineFigureGenerator("File",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(.75*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),he.spot1=new go.Spot(0,.25),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("Interrupt",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee));var de=new go.PathFigure(te,.5*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,ee));var me=new go.PathFigure(te,.5*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.5,.75),he}),go.Shape.defineFigureGenerator("InternalStorage",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN,de=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(de)&&(de=.1);var me=new go.PathFigure(0,0,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var we=new go.PathFigure(se*te,0,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),we.add(new go.PathSegment(go.PathSegment.Move,0,de*ee)),we.add(new go.PathSegment(go.PathSegment.Line,te,de*ee)),he}),go.Shape.defineFigureGenerator("Junction",function(Ae,te,ee){var he=new go.Geometry,se=1/Math.SQRT2,de=(1-1/Math.SQRT2)/2,me=Be*.5,we=.5,Me=new go.PathFigure(te,we*ee,!0);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,we*te,ee,te,(we+me)*ee,(we+me)*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,0,we*ee,(we-me)*te,ee,0,(we+me)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,we*te,0,0,(we-me)*ee,(we-me)*te,0)),Me.add(new go.PathSegment(go.PathSegment.Bezier,te,we*ee,(we+me)*te,0,te,(we-me)*ee));var be=new go.PathFigure((de+se)*te,(de+se)*ee,!1);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Line,de*te,de*ee)),be.add(new go.PathSegment(go.PathSegment.Move,de*te,(de+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Line,(de+se)*te,de*ee)),he}),go.Shape.defineFigureGenerator("LinedDocument",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close());var de=new go.PathFigure(.1*te,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,.75*ee)),he.spot1=new go.Spot(.1,0),he.spot2=new go.Spot(1,.6),he}),go.Shape.defineFigureGenerator("LoopLimit",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("MagneticTape",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=.5,me=new go.PathFigure(.5*te,ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,0,de*ee,(de-se)*te,ee,0,(de+se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,0,0,(de-se)*ee,(de-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,de*ee,(de+se)*te,0,te,(de-se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,(de+.1)*te,.9*ee,te,(de+se)*ee,(de+se)*te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),he.spot1=new go.Spot(.15,.15),he.spot2=new go.Spot(.85,.8),he}),go.Shape.defineFigureGenerator("ManualInput",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.7);var de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,se*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=go.Spot.TopLeft,he}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.25);var de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,se*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,(1-se)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(1,.75),he}),go.Shape.defineFigureGenerator("MultiDocument",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.44*ee,.96*te,.47*ee,.93*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.54*ee,.86*te,.57*ee,.83*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*te,.4*ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0).close());var de=new go.PathFigure(.1*te,.2*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.54*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.44*ee)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.8,.77),he}),go.Shape.defineFigureGenerator("MultiProcess",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,.1*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close());var de=new go.PathFigure(.2*te,.1*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.1*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),he.spot1=new go.Spot(0,.2),he.spot2=new go.Spot(.8,1),he}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=1-se,me=new go.PathFigure(0,0,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close());var we=new go.PathFigure(.5*se*te,se*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*te,se*ee)),he}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=go.Spot.TopLeft,he.spot2=new go.Spot(.75,1),he}),go.Shape.defineFigureGenerator("Or",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=.5,me=new go.PathFigure(te,de*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,ee,te,(de+se)*ee,(de+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,de*ee,(de-se)*te,ee,0,(de+se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,0,0,(de-se)*ee,(de-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,de*ee,(de+se)*te,0,te,(de-se)*ee));var we=new go.PathFigure(te,.5*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),he}),go.Shape.defineFigureGenerator("PaperTape",function(Ae,te,ee){var he=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.5*te,.6*ee,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),he.spot1=new go.Spot(0,.49),he.spot2=new go.Spot(1,.75),he}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN,de=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(de)&&(de=.3);var me=new go.PathFigure(0,0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,0)),me.add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN,de=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(de)&&(de=.3);var me=new go.PathFigure(0,0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("Procedure",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure((1-se)*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Move,se*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),he}),go.Shape.defineFigureGenerator("Process",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var me=new go.PathFigure(se*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),he.spot2=go.Spot.BottomRight,he}),go.Shape.defineFigureGenerator("Sort",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var de=new go.PathFigure(0,.5*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),he.spot1=new go.Spot(.25,.25),he.spot2=new go.Spot(.75,.5),he}),go.Shape.defineFigureGenerator("Start",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.25);var de=new go.PathFigure(se*te,0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee));var me=new go.PathFigure(se*te,0,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),me.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),he.spot1=new go.Spot(se,0),he.spot2=new go.Spot(1-se,1),he}),go.Shape.defineFigureGenerator("Terminator",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee)),he.spot1=new go.Spot(.23,0),he.spot2=new go.Spot(.77,1),he}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ae,te,ee){var he=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.75*te,(1-se)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*ee).close()),he.spot1=go.Spot.TopLeft,he}),go.Shape.defineFigureGenerator("AndGate",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=new go.PathFigure(0,0,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),de.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(.5+se)*te,0,te,(.5-se)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.5+se)*ee,(.5+se)*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=go.Spot.TopLeft,he.spot2=new go.Spot(.55,1),he}),go.Shape.defineFigureGenerator("Buffer",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.5,.75),he}),go.Shape.defineFigureGenerator("Clock",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=.5,me=new go.PathFigure(te,de*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,ee,te,(de+se)*ee,(de+se)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,de*ee,(de-se)*te,ee,0,(de+se)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,de*te,0,0,(de-se)*ee,(de-se)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,de*ee,(de+se)*te,0,te,(de-se)*ee));var we=new go.PathFigure(te,de*ee,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,de*ee));var Me=new go.PathFigure(.8*te,.75*ee,!1);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,.8*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.6*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.6*te,.75*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.4*te,.75*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.4*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.2*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.2*te,.75*ee)),he}),go.Shape.defineFigureGenerator("Ground",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.3*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),he}),go.Shape.defineFigureGenerator("Inverter",function(Ae,te,ee){var he=new go.Geometry,se=Be*.1,de=.1,me=.9,we=.5,Me=new go.PathFigure(.8*te,.5*ee,!0);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Me.add(new go.PathSegment(go.PathSegment.Line,0,0)),Me.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee));var be=new go.PathFigure((me+de)*te,we*ee,!0);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we-de)*ee,(me+de)*te,(we-se)*ee)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.4,.75),he}),go.Shape.defineFigureGenerator("NandGate",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=Be*.4,me=Be*.1,we=.1,Me=.9,be=.5,Ie=new go.PathFigure(.8*te,.5*ee,!0);he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,.8*te,(.5+de)*ee,(.4+se)*te,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ie.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(.4+se)*te,0,.8*te,(.5-de)*ee));var je=new go.PathFigure((Me+we)*te,be*ee,!0);return he.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be+we)*ee,(Me+we)*te,(be+me)*ee,(Me+me)*te,(be+we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Me-we)*te,be*ee,(Me-me)*te,(be+we)*ee,(Me-we)*te,(be+me)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be-we)*ee,(Me-we)*te,(be-me)*ee,(Me-me)*te,(be-we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Me+we)*te,be*ee,(Me+me)*te,(be-we)*ee,(Me+we)*te,(be-me)*ee)),he.spot1=new go.Spot(0,.05),he.spot2=new go.Spot(.55,.95),he}),go.Shape.defineFigureGenerator("NorGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*se,me=0,we=.5,Me=new go.PathFigure(.8*te,.5*ee,!0);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(me+de)*te,(we-se)*ee,.7*te,(we-de)*ee)),se=.1,de=Be*.1,me=.9,we=.5;var be=new go.PathFigure((me-se)*te,we*ee,!0);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),he.spot1=new go.Spot(.2,.25),he.spot2=new go.Spot(.6,.75),he}),go.Shape.defineFigureGenerator("OrGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*se,me=0,we=.5,Me=new go.PathFigure(0,0,!0);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(me+de+de)*te,(we-se)*ee,.8*te,(we-de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*te,(we+de)*ee,(me+de+de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee).close()),he.spot1=new go.Spot(.2,.25),he.spot2=new go.Spot(.75,.75),he}),go.Shape.defineFigureGenerator("XnorGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*se,me=.2,we=.5,Me=new go.PathFigure(.1*te,0,!1);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var be=new go.PathFigure(.8*te,.5*ee,!0);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.7*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(me+de)*te,(we-se)*ee,.7*te,(we-de)*ee)),se=.1,de=Be*.1,me=.9,we=.5;var Ie=new go.PathFigure((me-se)*te,we*ee,!0);return he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),he.spot1=new go.Spot(.4,.25),he.spot2=new go.Spot(.65,.75),he}),go.Shape.defineFigureGenerator("XorGate",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*se,me=.2,we=.5,Me=new go.PathFigure(.1*te,0,!1);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var be=new go.PathFigure(.2*te,0,!0);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(me+de)*te,(we-se)*ee,.9*te,(we-de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.9*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee).close()),he.spot1=new go.Spot(.4,.25),he.spot2=new go.Spot(.8,.75),he}),go.Shape.defineFigureGenerator("Capacitor",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("Resistor",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),he}),go.Shape.defineFigureGenerator("Inductor",function(Ae,te,ee){var he=new go.Geometry,se=Be*.1,de=.1,me=.1,we=.5,Me=new go.PathFigure((me-se*.5)*te,ee,!1);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.3,Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,ee,(me+de)*te,0,(me+se)*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.5,Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,ee,(me+de)*te,0,(me+se)*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.7,Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,ee,(me+de)*te,0,(me+se)*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,0,(me-se)*te,ee,(me-de)*te,0)),me=.9,Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+se*.5)*te,ee,(me+de)*te,0,(me+se)*te,ee)),he}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ae,te,ee){var he=new go.Geometry,se=Be*.5,de=.5,me=.5,we=.5,Me=new go.PathFigure((me-de)*te,we*ee,!1);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-de)*ee,(me-de)*te,(we-se)*ee,(me-se)*te,(we-de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we-de)*ee,(me+de)*te,(we-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Move,(me-de+.1)*te,we*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+de-.1)*te,we*ee,me*te,(we-de)*ee,me*te,(we+de)*ee)),he}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("Diode",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.spot1=new go.Spot(0,.25),he.spot2=new go.Spot(.5,.75),he}),go.Shape.defineFigureGenerator("Wifi",function(Ae,te,ee){var he=new go.Geometry,se=te,de=ee;te=te*.38,ee=ee*.6;var me=Be*.8,we=.8,Me=0,be=.5,Ie=(se-te)/2,je=(de-ee)/2,qe=new go.PathFigure(Me*te+Ie,(be+we)*ee+je,!0);he.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Me-we)*te+Ie,be*ee+je,(Me-me)*te+Ie,(be+we)*ee+je,(Me-we)*te+Ie,(be+me)*ee+je)),qe.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+Ie,(be-we)*ee+je,(Me-we)*te+Ie,(be-me)*ee+je,(Me-me)*te+Ie,(be-we)*ee+je)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Me-we+me*.5)*te+Ie,be*ee+je,Me*te+Ie,(be-we)*ee+je,(Me-we+me*.5)*te+Ie,(be-me)*ee+je)),qe.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+Ie,(be+we)*ee+je,(Me-we+me*.5)*te+Ie,(be+me)*ee+je,Me*te+Ie,(be+we)*ee+je).close()),me=Be*.4,we=.4,Me=.2,be=.5;var $e=new go.PathFigure(Me*te+Ie,(be+we)*ee+je,!0);he.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Me-we)*te+Ie,be*ee+je,(Me-me)*te+Ie,(be+we)*ee+je,(Me-we)*te+Ie,(be+me)*ee+je)),$e.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+Ie,(be-we)*ee+je,(Me-we)*te+Ie,(be-me)*ee+je,(Me-me)*te+Ie,(be-we)*ee+je)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Me-we+me*.5)*te+Ie,be*ee+je,Me*te+Ie,(be-we)*ee+je,(Me-we+me*.5)*te+Ie,(be-me)*ee+je)),$e.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+Ie,(be+we)*ee+je,(Me-we+me*.5)*te+Ie,(be+me)*ee+je,Me*te+Ie,(be+we)*ee+je).close()),me=Be*.2,we=.2,Me=.5,be=.5;var ft=new go.PathFigure((Me-we)*te+Ie,be*ee+je,!0);he.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+Ie,(be-we)*ee+je,(Me-we)*te+Ie,(be-me)*ee+je,(Me-me)*te+Ie,(be-we)*ee+je)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(Me+we)*te+Ie,be*ee+je,(Me+me)*te+Ie,(be-we)*ee+je,(Me+we)*te+Ie,(be-me)*ee+je)),ft.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+Ie,(be+we)*ee+je,(Me+we)*te+Ie,(be+me)*ee+je,(Me+me)*te+Ie,(be+we)*ee+je)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(Me-we)*te+Ie,be*ee+je,(Me-me)*te+Ie,(be+we)*ee+je,(Me-we)*te+Ie,(be+me)*ee+je)),me=Be*.4,we=.4,Me=.8,be=.5;var Re=new go.PathFigure(Me*te+Ie,(be-we)*ee+je,!0);he.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Me+we)*te+Ie,be*ee+je,(Me+me)*te+Ie,(be-we)*ee+je,(Me+we)*te+Ie,(be-me)*ee+je)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+Ie,(be+we)*ee+je,(Me+we)*te+Ie,(be+me)*ee+je,(Me+me)*te+Ie,(be+we)*ee+je)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Me+we-me*.5)*te+Ie,be*ee+je,Me*te+Ie,(be+we)*ee+je,(Me+we-me*.5)*te+Ie,(be+me)*ee+je)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+Ie,(be-we)*ee+je,(Me+we-me*.5)*te+Ie,(be-me)*ee+je,Me*te+Ie,(be-we)*ee+je).close()),me=Be*.8,we=.8,Me=1,be=.5;var Tt=new go.PathFigure(Me*te+Ie,(be-we)*ee+je,!0);return he.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(Me+we)*te+Ie,be*ee+je,(Me+me)*te+Ie,(be-we)*ee+je,(Me+we)*te+Ie,(be-me)*ee+je)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+Ie,(be+we)*ee+je,(Me+we)*te+Ie,(be+me)*ee+je,(Me+me)*te+Ie,(be+we)*ee+je)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,(Me+we-me*.5)*te+Ie,be*ee+je,Me*te+Ie,(be+we)*ee+je,(Me+we-me*.5)*te+Ie,(be+me)*ee+je)),Tt.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+Ie,(be-we)*ee+je,(Me+we-me*.5)*te+Ie,(be-me)*ee+je,Me*te+Ie,(be-we)*ee+je).close()),he}),go.Shape.defineFigureGenerator("Email",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(0,0,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.add(new go.PathSegment(go.PathSegment.Move,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.45*te,.54*ee)),de.add(new go.PathSegment(go.PathSegment.Move,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.55*te,.54*ee)),he}),go.Shape.defineFigureGenerator("Ethernet",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.35*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,0).close());var de=new go.PathFigure(.1*te,ee,!0,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var me=new go.PathFigure(.6*te,ee,!0,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.6*te,.6*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee).close());var we=new go.PathFigure(0,.5*ee,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.75*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.75*te,.6*ee)),we.add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.25*te,.6*ee)),he}),go.Shape.defineFigureGenerator("Power",function(Ae,te,ee){var he=new go.Geometry,se=Be*.4,de=.4,me=.5,we=.5,Me=ce(),be=ce(),Ie=ce(),je=ce();Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.5,Me,Me,be,Ie,je);var qe=ve(be.x,be.y),$e=new go.PathFigure(be.x*te,be.y*ee,!0);he.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,Ie.x*te,Ie.y*ee,je.x*te,je.y*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me+de)*te,(we+se)*ee,(me+se)*te,(we+de)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,(me-se)*te,(we+de)*ee,(me-de)*te,(we+se)*ee)),Ct(me-de,we,me-de,we-se,me-se,we-de,me,we-de,.5,Ie,je,be,Me,Me),$e.add(new go.PathSegment(go.PathSegment.Bezier,be.x*te,be.y*ee,Ie.x*te,Ie.y*ee,je.x*te,je.y*ee)),se=Be*.3,de=.3,Ct(me-de,we,me-de,we-se,me-se,we-de,me,we-de,.5,Ie,je,be,Me,Me),$e.add(new go.PathSegment(go.PathSegment.Line,be.x*te,be.y*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(me-de)*te,we*ee,je.x*te,je.y*ee,Ie.x*te,Ie.y*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+de)*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(me+de)*te,we*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Ct(me,we-de,me+se,we-de,me+de,we-se,me+de,we,.5,Me,Me,be,Ie,je),$e.add(new go.PathSegment(go.PathSegment.Bezier,be.x*te,be.y*ee,je.x*te,je.y*ee,Ie.x*te,Ie.y*ee).close());var $e=new go.PathFigure(.45*te,0,!0);return he.add($e),$e.add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.55*te,.5*ee)),$e.add(new go.PathSegment(go.PathSegment.Line,.55*te,0).close()),De(Me),De(be),De(Ie),De(je),De(qe),he.spot1=new go.Spot(.25,.45),he.spot2=new go.Spot(.75,.8),he}),go.Shape.defineFigureGenerator("Fallout",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee/2,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,te/2,ee/2,te/2,ee/2));function de(me,we,Me){me.add(new go.PathSegment(go.PathSegment.Move,(.3+we)*te,(.8+Me)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(.5+we)*te,(.5+Me)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(.1+we)*te,(.5+Me)*ee)),me.add(new go.PathSegment(go.PathSegment.Line,(.3+we)*te,(.8+Me)*ee).close())}return de(se,0,0),de(se,.4,0),de(se,.2,-.3),he}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.2*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),he.spot1=new go.Spot(.3,.3),he.spot2=new go.Spot(.7,.7),he}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.37*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.11*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.04*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.49*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.37*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.63*te,.86*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.91*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,.78*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.44*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.56*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),he}),go.Shape.defineFigureGenerator("FireHazard",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.29*te,0,-.25*te,.63*ee,.45*te,.44*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.51*te,.42*ee,.48*te,.17*ee,.54*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.59*te,.18*ee,.59*te,.29*ee,.58*te,.28*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,.6*ee,.8*te,.34*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.88*te,.31*ee,.87*te,.48*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,1.17*te,.76*ee,.82*te,.8*ee).close()),he.spot1=new go.Spot(.07,.445),he.spot2=new go.Spot(.884,.958),he}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=0,me=0,we=se*Be,Me=.4*Math.SQRT2/2+.5,be=.5-.5*Math.SQRT2/2,Ie=1,je=.5,qe=.5,$e=0,ft=new go.PathFigure(Me*te,(1-be)*ee,!1);return he.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,je*ee,Ie*te,.7*ee,Ie*te,je*ee)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(qe+de)*te,($e+de)*ee,(.5+se+de)*te,(.5-we+de)*ee,(.5+we+de)*te,(.5-se+de)*ee)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+de)*te,(.5+me)*ee,(.5-we+de)*te,(.5-se+me)*ee,(.5-se+de)*te,(.5-we+me)*ee)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(.35+de)*te,.9*ee,(.5-se+de)*te,(.5+we+me)*ee,(.5-we+de)*te,.9*ee)),ft.add(new go.PathSegment(go.PathSegment.Move,(.25+de)*te,.8*ee)),ft.add(new go.PathSegment(go.PathSegment.Line,(.35+de)*te,.9*ee)),ft.add(new go.PathSegment(go.PathSegment.Line,(.2+de)*te,.95*ee)),he}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se);var de=new go.PathFigure(te,ee,!1);he.add(de);var me=new go.PathFigure(0,.5*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.2*te,.35*ee,.3*te,.35*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.7*te,.65*ee,.8*te,.65*ee)),he}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close()),he}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var se=new go.PathFigure(0,.2*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),he}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.7*te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,0,.6*te,.5*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,ee,.4*te,.5*ee,te,.5*ee).close());var de=new go.PathFigure(.45*te,.73*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.7*te,.73*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.38*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.63*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.31*te,.27*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.56*te,.27*ee)),he}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se);var de=new go.PathFigure(.335*te,(1-.555)*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,te,.68*ee,(1-.12)*te,.46*ee,(1-.02)*te,.54*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.335*te,(1-.555)*ee,.02*te,.54*ee,.12*te,.46*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.365*te,(1-.595)*ee));var me=.5-.285,we=.5,Me=me,be=Math.PI/4,Ie=4*(1-Math.cos(be))/(3*Math.sin(be)),je=Ie*.5,qe=me,$e=me,ft=Ie*qe,Re=Ie*$e;de.add(new go.PathSegment(go.PathSegment.Bezier,(we-qe)*te,Me*ee,(we-(ft+qe)/2)*te,(Me+($e+Re)/2)*ee,(we-qe)*te,(Me+Re)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,we*te,(Me-$e)*ee,(we-qe)*te,(Me-Re)*ee,(we-ft)*te,(Me-$e)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,(we+qe)*te,Me*ee,(we+ft)*te,(Me-$e)*ee,(we+qe)*te,(Me-Re)*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*te,(1-.595)*ee,(we+qe)*te,(Me+Re)*ee,(we+(ft+qe)/2)*te,(Me+($e+Re)/2)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*te,(1-.595)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee));var Tt=new go.PathFigure(.2*te,ee,!1);he.add(Tt),Tt.add(new go.PathSegment(go.PathSegment.Line,.2*te,.8*ee));var et=new go.PathFigure(.8*te,ee,!1);return he.add(et),et.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),he}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var de=new go.PathFigure(.2*te,.2*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),he}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se);var de=new go.PathFigure(te,ee,!1);he.add(de);var me=new go.PathFigure(.1*te,ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("Caution",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.05*te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.8*ee,0,ee,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.1*ee,.5*te,0,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.95*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,te,ee,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,ee));var de=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-de)*te,.875*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*te,.875*ee,de*te,de*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.325*ee,.575*te,.725*ee,.625*te,.375*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.75*ee,.375*te,.375*ee,.425*te,.725*ee)),he}),go.Shape.defineFigureGenerator("Recycle",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.45*te,.95*ee,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.185*te,.85*ee,.17*te,.95*ee,.15*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.235*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.625*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.275*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.1875*te,.95*ee,0,.675*ee,0,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.775*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.22*te,.775*ee));var de=new go.PathFigure(.475*te,.2*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.4*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.225*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.275*te,.175*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.325*te,.05*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.05*ee,.35*te,0,.375*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.575*te,.375*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.525*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.75*te,.475*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.85*te,.315*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.32*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.65*te,.05*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,0,.65*te,.05*ee,.625*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.38*te,.0105*ee));var me=new go.PathFigure(.675*te,.575*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.875*te,.525*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,.85*te,.95*ee,te,.8*ee,te,.85*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,.95*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.85*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,.725*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.65*te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.7*te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),me.add(new go.PathSegment(go.PathSegment.Move,.675*te,.575*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.775*te,.775*ee)),he}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*.5,me=new go.PathFigure(te,se*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,se*te,ee,te,(se+de)*ee,(se+de)*te,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-de)*te,ee,0,(se+de)*ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,se*te,0,0,(se-de)*ee,(se-de)*te,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,te,se*ee,(se+de)*te,0,te,(se-de)*ee));var we=new go.PathFigure(se*te,0,!1);return he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,se*te,.15*ee)),we.add(new go.PathSegment(go.PathSegment.Move,se*te,ee)),we.add(new go.PathSegment(go.PathSegment.Line,se*te,.85*ee)),we.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.15*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.85*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.58*te,.1*ee)),we.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.78*te,.54*ee)),he}),go.Shape.defineFigureGenerator("Package",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.15*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var de=new go.PathFigure(0,.15*ee,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,0)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.65*te,.15*ee).close()),he.spot1=new go.Spot(0,.1),he.spot2=new go.Spot(1,1),he}),go.Shape.defineFigureGenerator("Class",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(0,.2*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var me=new go.PathFigure(0,.5*ee,!1);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close()),he}),go.Shape.defineFigureGenerator("Component",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close());var de=new go.PathFigure(0,.2*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.45*te,.2*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var me=new go.PathFigure(0,.6*ee,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.45*te,.6*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.45*te,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),he}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.15*te,.6*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee));var de=new go.PathFigure(.15*te,.6*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),he}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),he}),go.Shape.defineFigureGenerator("Workcell",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),he}),go.Shape.defineFigureGenerator("Supermarket",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he}),go.Shape.defineFigureGenerator("TruckShipment",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(te,.8*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee).close());var me=.1,we=Be*.1,Me=.2,be=.9,Ie=new go.PathFigure((Me-me)*te,be*ee,!0);he.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be-me)*ee,(Me-me)*te,(be-we)*ee,(Me-we)*te,(be-me)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Me+me)*te,be*ee,(Me+we)*te,(be-me)*ee,(Me+me)*te,(be-we)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be+me)*ee,(Me+me)*te,(be+we)*ee,(Me+we)*te,(be+me)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Me-me)*te,be*ee,(Me-we)*te,(be+me)*ee,(Me-me)*te,(be+we)*ee).close()),me=.1,we=Be*.1,Me=.8,be=.9;var je=new go.PathFigure((Me-me)*te,be*ee,!0);return he.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be-me)*ee,(Me-me)*te,(be-we)*ee,(Me-we)*te,(be-me)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Me+me)*te,be*ee,(Me+we)*te,(be-me)*ee,(Me+me)*te,(be-we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(be+me)*ee,(Me+me)*te,(be+we)*ee,(Me+we)*te,(be+me)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Me-me)*te,be*ee,(Me-we)*te,(be+me)*ee,(Me-me)*te,(be+we)*ee).close()),he}),go.Shape.defineFigureGenerator("KanbanPost",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.2*te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),he}),go.Shape.defineFigureGenerator("Forklift",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0));var de=new go.PathFigure(0,.5*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var me=new go.PathFigure(.5*te,.8*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.1*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.8*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee));var we=new go.PathFigure(.5*te,.7*ee,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee));var Me=.1,be=Be*.1,Ie=.1,je=.9,qe=new go.PathFigure((Ie-Me)*te,je*ee,!0);he.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(je-Me)*ee,(Ie-Me)*te,(je-be)*ee,(Ie-be)*te,(je-Me)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Me)*te,je*ee,(Ie+be)*te,(je-Me)*ee,(Ie+Me)*te,(je-be)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(je+Me)*ee,(Ie+Me)*te,(je+be)*ee,(Ie+be)*te,(je+Me)*ee)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-Me)*te,je*ee,(Ie-be)*te,(je+Me)*ee,(Ie-Me)*te,(je+be)*ee)),Me=.1,be=Be*.1,Ie=.4,je=.9;var $e=new go.PathFigure((Ie-Me)*te,je*ee,!0);return he.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(je-Me)*ee,(Ie-Me)*te,(je-be)*ee,(Ie-be)*te,(je-Me)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Me)*te,je*ee,(Ie+be)*te,(je-Me)*ee,(Ie+Me)*te,(je-be)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,Ie*te,(je+Me)*ee,(Ie+Me)*te,(je+be)*ee,(Ie+be)*te,(je+Me)*ee)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-Me)*te,je*ee,(Ie-be)*te,(je+Me)*ee,(Ie-Me)*te,(je+be)*ee)),he}),go.Shape.defineFigureGenerator("RailShipment",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.1*te,.4*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.4*ee).close());var de=new go.PathFigure(.45*te,.7*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee));var me=new go.PathFigure(.55*te,.4*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.55*te,.4*ee).close());var Ie=.05,je=Be*.05,qe=.175,$e=.95,we=new go.PathFigure((qe-Ie)*te,$e*ee,!0);he.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,qe*te,($e-Ie)*ee,(qe-Ie)*te,($e-je)*ee,(qe-je)*te,($e-Ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(qe+Ie)*te,$e*ee,(qe+je)*te,($e-Ie)*ee,(qe+Ie)*te,($e-je)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,qe*te,($e+Ie)*ee,(qe+Ie)*te,($e+je)*ee,(qe+je)*te,($e+Ie)*ee)),we.add(new go.PathSegment(go.PathSegment.Bezier,(qe-Ie)*te,$e*ee,(qe-je)*te,($e+Ie)*ee,(qe-Ie)*te,($e+je)*ee));var Ie=.05,je=Be*.05,qe=.375,$e=.95,Me=new go.PathFigure((qe-Ie)*te,$e*ee,!0);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,qe*te,($e-Ie)*ee,(qe-Ie)*te,($e-je)*ee,(qe-je)*te,($e-Ie)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(qe+Ie)*te,$e*ee,(qe+je)*te,($e-Ie)*ee,(qe+Ie)*te,($e-je)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,qe*te,($e+Ie)*ee,(qe+Ie)*te,($e+je)*ee,(qe+je)*te,($e+Ie)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(qe-Ie)*te,$e*ee,(qe-je)*te,($e+Ie)*ee,(qe-Ie)*te,($e+je)*ee));var Ie=.05,je=Be*.05,qe=.625,$e=.95,be=new go.PathFigure((qe-Ie)*te,$e*ee,!0);he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,qe*te,($e-Ie)*ee,(qe-Ie)*te,($e-je)*ee,(qe-je)*te,($e-Ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(qe+Ie)*te,$e*ee,(qe+je)*te,($e-Ie)*ee,(qe+Ie)*te,($e-je)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,qe*te,($e+Ie)*ee,(qe+Ie)*te,($e+je)*ee,(qe+je)*te,($e+Ie)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(qe-Ie)*te,$e*ee,(qe-je)*te,($e+Ie)*ee,(qe-Ie)*te,($e+je)*ee));var Ie=.05,je=Be*.05,qe=.825,$e=.95,ft=new go.PathFigure((qe-Ie)*te,$e*ee,!0);he.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,qe*te,($e-Ie)*ee,(qe-Ie)*te,($e-je)*ee,(qe-je)*te,($e-Ie)*ee)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(qe+Ie)*te,$e*ee,(qe+je)*te,($e-Ie)*ee,(qe+Ie)*te,($e-je)*ee)),ft.add(new go.PathSegment(go.PathSegment.Bezier,qe*te,($e+Ie)*ee,(qe+Ie)*te,($e+je)*ee,(qe+je)*te,($e+Ie)*ee)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(qe-Ie)*te,$e*ee,(qe-je)*te,($e+Ie)*ee,(qe-Ie)*te,($e+je)*ee).close());var Re=new go.PathFigure(0,ee,!1);return he.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),he}),go.Shape.defineFigureGenerator("Warehouse",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var de=new go.PathFigure(0,.2*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var me=new go.PathFigure(.15*te,ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.15*te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),me.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee).close());var we=.05,Me=Be*.05,be=.35,Ie=.775,je=new go.PathFigure((be-we)*te,Ie*ee,!0);return he.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Ie-we)*ee,(be-we)*te,(Ie-Me)*ee,(be-Me)*te,(Ie-we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(be+we)*te,Ie*ee,(be+Me)*te,(Ie-we)*ee,(be+we)*te,(Ie-Me)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Ie+we)*ee,(be+we)*te,(Ie+Me)*ee,(be+Me)*te,(Ie+we)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(be-we)*te,Ie*ee,(be-Me)*te,(Ie+we)*ee,(be-we)*te,(Ie+Me)*ee).close()),he}),go.Shape.defineFigureGenerator("ControlCenter",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee).close()),he}),go.Shape.defineFigureGenerator("Bluetooth",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),he}),go.Shape.defineFigureGenerator("Bookmark",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),he}),go.Shape.defineFigureGenerator("Bookmark",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),he}),go.Shape.defineFigureGenerator("Globe",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.75*te,0,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.75*ee,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*te,ee,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,.25*ee,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,.15*te,.25*ee,.15*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.85*te,.75*ee,.85*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.15*ee,.35*te,.3*ee,.65*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.85*ee,.35*te,.7*ee,.65*te,.7*ee)),he}),go.Shape.defineFigureGenerator("Wave",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.25*ee,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.25*ee,.1*te,0,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.25*ee,.425*te,.5*ee,.575*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.25*ee,.8*te,0,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.75*ee,.1*te,.5*ee,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.75*ee,.425*te,ee,.575*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.75*ee,.8*te,.5*ee,.9*te,.5*ee)),he}),go.Shape.defineFigureGenerator("Operator",function(Ae,te,ee){var he=new go.Geometry,se=.3,de=Be*.3,me=.5,we=.7,Me=new go.PathFigure((me-se)*te,we*ee,!0);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee));var be=new go.PathFigure(0,.7*ee,!1);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,te,.7*ee,0,0,te,0)),he}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.65*te,.3*ee,.65*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.35*te,.5*ee,.35*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*te,.6*ee,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.2*te,ee,.35*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,.7*te,.6*ee,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.8*te,ee,.65*te,.95*ee)),he}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te,0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,0,ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.4*ee,.8*te,ee,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),he}),go.Shape.defineFigureGenerator("Battery",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.1*ee));var de=new go.PathFigure(0,.6*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),de.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),he}),go.Shape.defineFigureGenerator("Delete",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*.5,me=.5,we=.5,Me=new go.PathFigure((me-se)*te,we*ee,!0);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee));var be=new go.PathFigure(.15*te,.5*ee,!1);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.85*te,.5*ee)),he}),go.Shape.defineFigureGenerator("Flag",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.1*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.1*ee,.15*te,0,.35*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,.65*te,.2*ee,.85*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.85*te,.6*ee,.65*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*te,.4*ee,.15*te,.4*ee).close()),he}),go.Shape.defineFigureGenerator("Help",function(Ae,te,ee){var he=new go.Geometry,se=.5,de=Be*.5,me=.5,we=.5,Me=new go.PathFigure((me-se)*te,we*ee,!1);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee).close()),se=.05,de=Be*.05,me=.5,we=.8;var be=new go.PathFigure((me-se)*te,we*ee,!1);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we-se)*ee,(me-se)*te,(we-de)*ee,(me-de)*te,(we-se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*te,we*ee,(me+de)*te,(we-se)*ee,(me+se)*te,(we-de)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,me*te,(we+se)*ee,(me+se)*te,(we+de)*ee,(me+de)*te,(we+se)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*te,we*ee,(me-de)*te,(we+se)*ee,(me-se)*te,(we+de)*ee).close()),be.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,.75*te,.475*ee,.75*te,.225*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.35*ee,.4*te,.2*ee,.3*te,.25*ee)),he}),go.Shape.defineFigureGenerator("Location",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.975*te,.025*ee,.5*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*te,.5*ee,.5*te,0,.025*te,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*te,.3*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var de=new go.PathFigure(.2*te,.5*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.3*ee)),he}),go.Shape.defineFigureGenerator("Unlocked",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var de=new go.PathFigure(.2*te,.5*ee,!1);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),de.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),de.add(new go.PathSegment(go.PathSegment.Line,.8*te,.35*ee)),he}),go.Shape.defineFigureGenerator("Gear",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(.9375*te,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*te,.3316875*ee,.79840625*te,.39915625*ee,.7834375*te,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*te,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*te,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*te,.19378125*ee,.64228125*te,.2188125*ee,.603875*te,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*te,.239375*ee,.39759375*te,.20190625*ee,.36053125*te,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*te,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*te,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*te,.4375*ee,.21765625*te,.36059375*ee,.201875*te,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*te,.67596875*ee,.20221875*te,.603875*ee,.21884375*te,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*te,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*te,.80621875*ee,.36353125*te,.78340625*ee,.3991875*te,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*te,.760625*ee,.602375*te,.79809375*ee,.63946875*te,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*te,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*te,.56246875*ee,.78234375*te,.63940625*ee,.798125*te,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*te,.5*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.3*ee,0,.375*ee,.05*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.075*ee,.3*te,.225*ee,.4*te,.175*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.525*te,.075*ee,.46*te,.05*ee,.525*te,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.4*ee,.525*te,.275*ee,.475*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.55*ee,te,.4*ee,te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.425*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.7*ee,.675*te,.55*ee,.675*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.575*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,.85*ee,.65*te,.7*ee,.65*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.535*te,ee,.61*te,.85*ee,.61*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*te,ee,0,ee).close()),he}),go.Shape.defineFigureGenerator("Map",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),he}),go.Shape.defineFigureGenerator("Eject",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.7)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var de=new go.PathFigure(0,ee*.6,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close()),he}),go.Shape.defineFigureGenerator("Pencil",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*1,ee*1,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.85).close());var de=new go.PathFigure(.126*te,.85*ee,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,.126*te,.45*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.322*te,.45*ee)),de.add(new go.PathSegment(go.PathSegment.Line,.322*te,.85*ee).close());var me=new go.PathFigure(.402*te,.85*ee,!1);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.402*te,.45*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.598*te,.45*ee)),me.add(new go.PathSegment(go.PathSegment.Line,.598*te,.85*ee).close());var we=new go.PathFigure(.678*te,.85*ee,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.678*te,.45*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.874*te,.45*ee)),we.add(new go.PathSegment(go.PathSegment.Line,.874*te,.85*ee).close());var Me=new go.PathFigure(.5*te,.1*ee,!1);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*te,.3*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*te,.3*ee).close()),he}),go.Shape.defineFigureGenerator("Staircase",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),he}),go.Shape.defineFigureGenerator("5Bars",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*(1-.184)).close());var de=new go.PathFigure(te*.204,ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.204,ee*(1-.184))),de.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*(1-.184*2))),de.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*1).close());var me=new go.PathFigure(te*.408,ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.408,ee*(1-.184*2))),me.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*(1-.184*3))),me.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*1).close());var we=new go.PathFigure(te*.612,ee,!0);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*.612,ee*(1-.184*3))),we.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*(1-.184*4))),we.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*1).close());var Me=new go.PathFigure(te*.816,ee,!0);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,te*.816,ee*(1-.184*4))),Me.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-.184*5))),Me.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1).close()),he}),go.Shape.defineFigureGenerator("PC",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,0).close());var de=new go.PathFigure(te*.055,.07*ee,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.07)),de.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.1).close());var me=new go.PathFigure(te*.055,.13*ee,!0);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.13)),me.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.16)),me.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.16).close());var we=new go.PathFigure(te*.055,.18*ee,!0);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.18)),we.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.21)),we.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.21).close());var Me=new go.PathFigure(te*1,0,!0);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,te*.4,0)),Me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.65)),Me.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.65).close()),he}),go.Shape.defineFigureGenerator("Plane",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(.55*te,ee,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.35*te,.525*ee,0,.4*ee,.225*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.2*ee,.975*te,0,te,.08*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee).close()),he}),go.Shape.defineFigureGenerator("Key",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*1,ee*.5,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.6*ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.17*te,.425*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*te,.5*ee,.075*te,.075*ee).close()),he}),go.Shape.defineFigureGenerator("FilmTape",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(0,0,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*0,te*.3,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var de=new go.PathFigure(0,0,!1);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*0)),de.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*1,te*.3,te*.055)),de.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var me=new go.PathFigure(te*.11,ee*.1,!1);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.1)),me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.8)),me.add(new go.PathSegment(go.PathSegment.Line,te*.11,ee*.8).close());var we=new go.PathFigure(te*(.11+.24133333*1+.028*1),ee*.1,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.1)),we.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.8)),we.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*1),ee*.8).close());var Me=new go.PathFigure(te*(.11+.24133333*2+.028*2),ee*.1,!1);return he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.1)),Me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.8)),Me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*2),ee*.8).close()),he}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ae,te,ee){var he=new go.Geometry,se=8,de=se*Be,me=new go.PathFigure(se,0,!1);he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.86,0)),me.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.14)),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-de,te-de,ee)),me.add(new go.PathSegment(go.PathSegment.Line,se,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,de,ee,0,ee-de)),me.add(new go.PathSegment(go.PathSegment.Line,0,se)),me.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,de,de,0).close());var we=new go.PathFigure(te*.83,0,!1);he.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.3)),we.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.3)),we.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*0).close());var Me=new go.PathFigure(te*.83,ee*1,!1);he.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.5)),Me.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.5)),Me.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*1).close());var be=new go.PathFigure(te*.78,ee*.05,!1);return he.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.05)),be.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.25)),be.add(new go.PathSegment(go.PathSegment.Line,te*.78,ee*.25).close()),he}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ae,te,ee){var he=Ae?Ae.parameter1:NaN;(isNaN(he)||he<0)&&(he=15),he=Math.min(he,te/3),he=Math.min(he,ee/3);var se=he*Be,de=ee*.8,me=new go.Geometry,we=new go.PathFigure(he,0,!0);return me.add(we),we.add(new go.PathSegment(go.PathSegment.Line,te-he,0)),we.add(new go.PathSegment(go.PathSegment.Bezier,te,he,te-se,0,te,se)),we.add(new go.PathSegment(go.PathSegment.Line,te,de-he)),we.add(new go.PathSegment(go.PathSegment.Bezier,te-he,de,te,de-se,te-se,de)),we.add(new go.PathSegment(go.PathSegment.Line,te*.7,de)),we.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee)),we.add(new go.PathSegment(go.PathSegment.Line,te*.55,de)),we.add(new go.PathSegment(go.PathSegment.Line,he,de)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,de-he,se,de,0,de-se)),we.add(new go.PathSegment(go.PathSegment.Line,0,he)),we.add(new go.PathSegment(go.PathSegment.Bezier,he,0,0,se,se,0).close()),se>1?(me.spot1=new go.Spot(0,0,se,se),me.spot2=new go.Spot(1,.8,-se,-se)):(me.spot1=go.Spot.TopLeft,me.spot2=new go.Spot(1,.8)),me}),go.Shape.defineFigureGenerator("Repeat",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*.45,!0);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.45).close());var de=new go.PathFigure(te*1,ee*.55,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.55)),de.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.55)),de.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.1)),de.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*0)),de.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),de.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.55).close()),he}),go.Shape.defineFigureGenerator("Windows",function(Ae,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*te,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*.1,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.9).close());var de=new go.PathFigure(te*.1,ee*.2,!0);he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.25)),de.add(new go.PathSegment(go.PathSegment.Line,te*.22,ee*.285)),de.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.32)),de.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.37)),de.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.32)),de.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.25).close());var me=new go.PathFigure(te*.28,ee*.37,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.37)),me.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.41)),me.add(new go.PathSegment(go.PathSegment.Line,te*.28,ee*.41).close()),he}),go.Shape.defineFigureGenerator("Beaker",function(Ae,te,ee){var he=new go.Geometry,se=15,de=se*Be,me=new go.PathFigure(te*.62,ee*.475,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),me.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-de,te-de,ee)),me.add(new go.PathSegment(go.PathSegment.Line,se,ee)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,de,ee,0,ee-de)),me.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.475)),me.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.03)),me.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*0)),me.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*0)),me.add(new go.PathSegment(go.PathSegment.Line,te*.62,ee*.03).close()),de>1?(he.spot1=new go.Spot(0,0,de,de),he.spot2=new go.Spot(1,1,-de,-de)):(he.spot1=go.Spot.TopLeft,he.spot2=go.Spot.BottomRight),he}),go.Shape.defineFigureGenerator("Download",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);he.add(se);var de=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-de)).close());var me=new go.PathFigure(te*.4,ee*0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.66)),me.add(new go.PathSegment(go.PathSegment.Line,te*(1-.26),ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.44)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*0).close()),he}),go.Shape.defineFigureGenerator("Bin",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);he.add(se);var de=.1/.3;return se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-de)).close()),he}),go.Shape.defineFigureGenerator("Upload",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);he.add(se);var de=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-de))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-de)).close());var me=new go.PathFigure(te*.5,ee*0,!0);return he.add(me),me.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.25)),me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.25)),me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.63)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.63)),me.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.25)),me.add(new go.PathSegment(go.PathSegment.Line,te*.74,ee*.25).close()),he}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close()),he}),go.Shape.defineFigureGenerator("Drink",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close());var de=new go.PathFigure(te*.235,ee*.28,!0);return he.add(de),de.add(new go.PathSegment(go.PathSegment.Line,te*.765,ee*.28)),de.add(new go.PathSegment(go.PathSegment.Line,te*.655,ee*.97)),de.add(new go.PathSegment(go.PathSegment.Line,te*.345,ee*.97).close()),he}),go.Shape.defineFigureGenerator("4Arrows",function(Ae,te,ee){var he=new go.Geometry,se=new go.PathFigure(te*.5,ee*0,!0);return he.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.25).close()),he}),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")},5559: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={},an="5.0",ve={},ce=null,De=!1,ze=!1,Ct=null,_e=!1,Ke=null,Be=null,mt=0;mt<arguments.length;mt++){var ct=arguments[mt];if(ct!==null)switch(typeof ct){case"number":an=ct.toFixed(1);break;case"string":ct.match(new RegExp("^[0-9]\\.[0-9]+$"))?an=ct:Ct=ct;break;case"object":typeof ct.is3D!="undefined"?ce=ct:ve=ct;break;case"boolean":De=ct,ze=!0;break}}ce===null&&(ce={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ve.material_id!==void 0&&!ze&&(De=!0)),Ct!==null&&ve.id===void 0&&(ve.id=Ct);var Ze="",Et="",ht=!1,dt=null,Ae=null,te=null,ee=!1,he=null,se=null,de=null,me=null,we=null;ve.height!==void 0&&(ve.height=Math.round(ve.height)),ve.width!==void 0&&(ve.width=Math.round(ve.width));var Me=function(Ft){return parseFloat(Ft)>4?parseFloat(Ft):5};Sn.setHTML5Codebase=function(Ft,$t){Be=Ft,kt(Ft,$t)},Sn.setJavaCodebase=Sn.setJavaCodebaseVersion=Sn.isCompiledInstalled=Sn.setPreCompiledScriptPath=Sn.setPreCompiledResourcePath=function(){},Sn.setHTML5CodebaseVersion=function(Ft,$t){var Qt=parseFloat(Ft);if(Qt!==NaN&&Qt<5){console.log("The GeoGebra HTML5 codebase version "+Qt+" is deprecated. Using version latest instead.");return}Ke=Ft,Ge(Ft,$t)},Sn.getHTML5CodebaseVersion=function(){return Ae},Sn.getParameters=function(){return ve},Sn.setFontsCSSURL=function(Ft){me=Ft},Sn.setGiacJSURL=function(Ft){},Sn.setJNLPFile=function(Ft){Ze=Ft},Sn.setJNLPBaseDir=function(Ft){},Sn.inject=function(){function Ft(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var $t="auto",Qt=ve.id,Bn,on=!1,Cn=0;Cn<arguments.length;Cn++){var gt=arguments[Cn];typeof gt=="string"?(gt=gt.toLowerCase(),gt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?$t=gt:Qt=arguments[Cn]):typeof gt=="boolean"?on=gt:gt instanceof HTMLElement&&(Bn=gt)}En();function En(){if(!_e){setTimeout(En,200);return}$t=Ut($t);var Vn=Bn||document.getElementById(Qt);if(!Vn){console.log("possibly bug on ajax loading? ");return}if(Sn.removeExistingApplet(Vn,!1),ve.width===void 0&&Vn.clientWidth&&(ve.width=Vn.clientWidth),ve.height===void 0&&Vn.clientHeight&&(ve.height=Vn.clientHeight),!(ve.width&&ve.height)&&$t==="html5"&&(delete ve.width,delete ve.height),dt=$t,$t==="screenshot")et(Vn,ve);else{var He=!1;ve.hasOwnProperty("playButton")&&ve.playButton||ve.hasOwnProperty("clickToLoad")&&ve.clickToLoad?He=!0:ve.hasOwnProperty("playButtonAutoDecide")&&ve.playButtonAutoDecide&&(He=(!be()||Ft())&&Ie()),He?(dt="screenshot",Bt(Vn,ve,on,$t)):Tt(Vn,ve,on)}}};function be(){try{return window.self!==window.top}catch(Ft){return!0}}function Ie(){return ve.hasOwnProperty("screenshotGenerator")&&ve.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Sn.getViews=function(){return ce},Sn.isJavaInstalled=function(){return!1};var je=function(Ft){var $t=function(Cn){var gt=JSON.parse(Cn),En=function(Ce){return Ce.type=="G"||Ce.type=="E"},Vn=gt.elements?gt.elements.filter(En)[0]:gt;if(!Vn||!Vn.url){Qt();return}ve.fileName=Vn.url,qe(Vn.settings||{}),ce.is3D=!0;var He="https://www.geogebra.org/images/";Sn.setPreviewImage(he||Vn.previewUrl,He+"GeoGebra_loading.png",He+"applet_play.png"),Ft()},Qt=function(){ve.onError&&ve.onError(),un("Error: Fetching material (id "+ve.material_id+") failed.",ve)},Bn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",on="/materials/"+ve.material_id+"?scope=basic";$e("https://"+Bn+"/api/proxy.php?path="+encodeURIComponent(on),$t,Qt)};function qe(Ft){var $t=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Qt){Ft[Qt]=!!Ft[Qt]}),$t.forEach(function(Qt){ve[Qt]===void 0&&Ft[Qt]!==void 0&&(ve[Qt]=Ft[Qt])}),ve.showToolBarHelp===void 0&&(ve.showToolBarHelp=ve.showToolBar)}function $e(Ft,$t,Qt){var Bn=new XMLHttpRequest;Bn.open("GET",Ft),Bn.onload=function(){$t(Bn.responseText)},Bn.onerror=Qt,Bn.send()}Sn.isHTML5Installed=function(){return!0},Sn.getLoadedAppletType=function(){return dt},Sn.setPreviewImage=function(Ft,$t,Qt){he=Ft,se=$t,de=Qt},Sn.removeExistingApplet=function(Ft,$t){var Qt;typeof Ft=="string"&&(Ft=document.getElementById(Ft)),dt=null;var Bn=null;for(Qt=0;Qt<Ft.childNodes.length;Qt++){var on=Ft.childNodes[Qt],Cn=on.className;Cn==="applet_screenshot"?$t?(on.style.display="block",dt="screenshot"):on.style.display="none":Cn!=="applet_scaler prerender"&&(Ft.removeChild(on),Bn=Cn&&Cn.indexOf("appletParameters")!=-1?on.id:null,Qt--)}var gt=ve.id!==void 0?ve.id:Bn,En=window[gt];En&&typeof En.getBase64=="function"&&(En.remove(),window[gt]=null)},Sn.refreshHitPoints=function(){if(Me(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ft=Sn.getAppletObject();return Ft&&typeof Ft.recalculateEnvironments=="function"?(Ft.recalculateEnvironments(),!0):!1},Sn.startAnimation=function(){var Ft=Sn.getAppletObject();return Ft&&typeof Ft.startAnimation=="function"?(Ft.startAnimation(),!0):!1},Sn.stopAnimation=function(){var Ft=Sn.getAppletObject();return Ft&&typeof Ft.stopAnimation=="function"?(Ft.stopAnimation(),!0):!1},Sn.getAppletObject=function(){var Ft=ve.id!==void 0?ve.id:"ggbApplet";return window[Ft]},Sn.resize=function(){};var ft=function(Ft,$t,Qt){var Bn=document.createElement("param");Bn.setAttribute("name",$t),Bn.setAttribute("value",Qt),Ft.appendChild(Bn)},Re=function(Ft){return Ft&&Ft!=="false"},Tt=function(Ft,$t,Qt){Me(Ae)<=4.2&&(Qt=!0);var Bn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ae||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Bn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var on=document.createElement("div");on.classList.add("appletParameters","notranslate");var Cn=$t.width,gt=$t.height;if($t.disableAutoScale=$t.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():$t.disableAutoScale,$t.width!==void 0)if(Me(Ae)<=4.4)Re($t.showToolBar)&&($t.height-=7),Re($t.showAlgebraInput)&&($t.height-=37),$t.width<605&&Re($t.showToolBar)&&($t.width=605,Cn=605);else{var En=100;(Re($t.showToolBar)||Re($t.showMenuBar))&&($t.hasOwnProperty("customToolBar")&&($t.customToolbar=$t.customToolBar),En=Re($t.showMenuBar)?245:155),Cn<En&&($t.width=En,Cn=En)}on.style.border="none",on.style.display="inline-block";for(var Vn in $t)$t.hasOwnProperty(Vn)&&Vn!=="appletOnLoad"&&on.setAttribute("data-param-"+Vn,$t[Vn]);me&&on.setAttribute("data-param-fontscssurl",me),Sn.resize=function(){GGBAppletUtils.responsiveResize(Ft,$t)},window.addEventListener("resize",function(ot){Sn.resize()});var He=typeof $t.appletOnLoad=="function"?$t.appletOnLoad:function(){};if(!Qt&&$t.width!==void 0){$t.hasOwnProperty("showSplash")||on.setAttribute("data-param-showSplash","false");var Ce=Ft.querySelector(".applet_scaler.prerender"),Pe=Ce!==null;if(Pe)var Ne=Ce.querySelector(".ggb_preview");else{var Ne=Zt(Cn,gt,$t.borderColor,!1);Ce=document.createElement("div"),Ce.className="applet_scaler",Ce.style.position="relative",Ce.style.display="block",Ce.style.width=Cn+"px",Ce.style.height=gt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ce,"66%"),Me(Ae)>=5?($t.appletOnLoad=function(ot){var It=Ft.querySelector(".ggb_preview");It&&It.parentNode.removeChild(It),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ce),window.GGBT_wsf_view&&$(window).trigger("resize"),He(ot)},Pe||Ce.appendChild(Ne)):on.appendChild(Ne),Ce.appendChild(on),Pe||Ft.appendChild(Ce),setTimeout(function(){Sn.resize()},1)}else{var ke=document.createElement("div");ke.className="applet_scaler",ke.style.position="relative",ke.style.display="block",ke.appendChild(on),Ft.appendChild(ke),$t.appletOnLoad=function(ot){Sn.resize(),He(ot)}}function Se(ot,It){It&&typeof It.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ot,It.appletOnLoad):renderGGBElement(ot),un("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",It)}function nt(ot,It){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ot,params:It}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(sn){Se(sn.article,sn.params)}),html5AppletsToProcess=null)},Me(Ae)<5&&(ot.className+=" geogebraweb")):Se(ot,It)}if(Bn){scriptLoadStarted=!0;for(var Pt=0;Pt<on.childNodes.length;Pt++){var Xe=on.childNodes[Pt].tagName;Xe==="TABLE"&&(on.removeChild(on.childNodes[Pt]),Pt--)}if(ggbHTML5LoadedScript!==null){var Je=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Je!=null&&Je.parentNode.removeChild(Je)}var yt=document.createElement("script"),wt=function(){nt(on,$t)};yt.src=Et+te,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=Ae,ggbHTML5LoadedScript=yt.src,un("GeoGebra HTML5 codebase loaded: '"+Et+"'.",$t),!Be&&(!Ke||Ke=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),wt()):Et.requirejs?__webpack_require__.e(777).then(function(){var ot=[__webpack_require__(70777)];wt.apply(null,ot)}.bind(this)).catch(__webpack_require__.oe):(yt.onload=wt,Ft.appendChild(yt))}else nt(on,$t);$t.height=gt,$t.width=Cn},et=function(Ft,$t,Qt){var Bn=Zt($t.width,$t.height,$t.borderColor,Qt),on=document.createElement("div");on.style.position="relative",on.style.display="block",on.style.width=$t.width+"px",on.style.height=$t.height+"px",on.className="applet_screenshot applet_scaler"+(Qt?" applet_screenshot_play":""),on.appendChild(Bn);var Cn=GGBAppletUtils.getScale($t,Ft,Qt);Qt?(Ft.appendChild(Nt()),window.GGBT_wsf_view||(Ft.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(on,"66%"),Ft.appendChild(on),Cn!==1&&!isNaN(Cn)&&(GGBAppletUtils.scaleElement(on,Cn),on.style.width=$t.width+"px",on.style.height=$t.height+"px",on.parentNode.style.width=$t.width*Cn+"px",on.parentNode.style.height=$t.height*Cn+"px"),Sn.resize=function(){bt(Ft,Bn,on,Qt)},window.addEventListener("resize",function(gt){Sn.resize()}),Sn.resize()};function bt(Ft,$t,Qt,Bn){if(Ft.contains($t)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ft.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ft)}var on=GGBAppletUtils.getScale(ve,Ft,Bn);Qt.parentNode!==null&&(!isNaN(on)&&on!==1?(GGBAppletUtils.scaleElement(Qt,on),Qt.parentNode.style.width=ve.width*on+"px",Qt.parentNode.style.height=ve.height*on+"px"):(GGBAppletUtils.scaleElement(Qt,1),Qt.parentNode.style.width=ve.width+"px",Qt.parentNode.style.height=ve.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ft),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Sn.onExitFullscreen=function(Ft,$t){$t.appendChild(Ft)};var Bt=function(Ft,$t,Qt,Bn){et(Ft,$t,!0);for(var on=function(){var En=[];for(gt=0;gt<Ft.childNodes.length;gt++)En.push(Ft.childNodes[gt]);if(window.GGBT_wsf_view){var Vn=window.GGBT_wsf_view.renderFullScreen(Ft,$t.id),He=document.getElementById("fullscreencontainer"),Ce=jQuery(Ft).find(".fullscreencontent");Ce.length>0?(Vn.remove(),Ce.attr("id","fullscreencontent").show(),jQuery(He).append(Ce),window.dispatchEvent(new Event("resize"))):Tt(Vn,$t,!1),window.GGBT_wsf_view.launchFullScreen(He)}else dt=Bn,Tt(Ft,$t,!1);if(!window.GGBT_wsf_view)for(gt=0;gt<En.length;gt++)Ft.removeChild(En[gt])},Cn=Ft.getElementsByClassName("ggb_preview_play"),gt=0;gt<Cn.length;gt++)Cn[gt].addEventListener("click",on,!1),Cn[gt].addEventListener("ontouchstart",on,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ft),Ie()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Nt=function(){var Ft=document.createElement("div");if(Ft.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var $t='.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");}',Qt=document.createElement("style");Qt.styleSheet?Qt.styleSheet.cssText=$t:Qt.appendChild(document.createTextNode($t)),document.getElementsByTagName("head")[0].appendChild(Qt)}return Ft},Zt=function(Ft,$t,Qt,Bn){var on=document.createElement("div");on.className="ggb_preview",on.style.position="absolute",on.style.zIndex="90",on.style.width=Ft-2+"px",on.style.height=$t-2+"px",on.style.top="0px",on.style.left="0px",on.style.overflow="hidden",on.style.backgroundColor="white";var Cn="lightgrey";Qt!==void 0&&(Qt==="none"?Cn="transparent":Cn=Qt),on.style.border="1px solid "+Cn;var gt=document.createElement("img");if(gt.style.position="relative",gt.style.zIndex="1000",gt.style.top="-1px",gt.style.left="-1px",he!==null&&gt.setAttribute("src",he),gt.style.opacity=.7,se!==null){var En,Vn,He;if(!Bn){En=document.createElement("img"),En.style.position="absolute",En.style.zIndex="1001",En.style.opacity=1,gt.style.opacity=.3,Vn=360,Vn>Ft/4*3&&(Vn=Ft/4*3),He=Vn/5.8,En.setAttribute("src",se),En.setAttribute("width",Vn),En.setAttribute("height",He);var Ce=(Ft-Vn)/2,Pe=($t-He)/2;En.style.left=Ce+"px",En.style.top=Pe+"px",on.appendChild(En)}}return on.appendChild(gt),on},Ut=function(Ft){return Ft=Ft.toLowerCase(),Ft==="html5"||Ft==="screenshot"?Ft:"html5"},lt=["web","webSimple","web3d","tablet","tablet3d","phone"],Ge=function(Ft,$t){if(Ae=Ft,$t){kt(Ae,!0);return}var Qt=!De;if(Qt){var Bn=Me(Ae);!isNaN(Bn)&&Bn<4.4&&(Qt=!1)}var on,Cn;window.location.protocol.substr(0,4)==="http"?on=window.location.protocol:on="http:";var gt=Ae.indexOf("//");gt>0?Cn=Ae:gt===0?Cn=on+Ae:Cn="https://www.geogebra.org/apps/5.2.814.0/";for(var En in lt)if(Ae.slice(lt[En].length*-1)===lt[En]||Ae.slice((lt[En].length+1)*-1)===lt[En]+"/"){kt(Cn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Qt&&!ce.is3D&&!ce.AV&&!ce.SV&&!ce.CV&&!ce.EV2&&!ce.CP&&!ce.PC&&!ce.DA&&!ce.FI&&!ce.PV&&!Re(ve.showToolBar)&&!Re(ve.showMenuBar)&&!Re(ve.showAlgebraInput)&&!Re(ve.enableRightClick)&&(!ve.appName||ve.appName=="classic")?Cn+="webSimple/":Cn+="web3d/",kt(Cn,!1)},kt=function(Ft,$t){if(Ft.requirejs){Et=Ft;return}Ft.slice(-1)!=="/"&&(Ft+="/"),Et=Ft,$t===null&&($t=Ft.indexOf("http")===-1),ht=$t,te="web.nocache.js",ee=!1;var Qt=Et.split("/");Qt.length>1&&(!$t&&Qt[Qt.length-2]==="webSimple"?(te="webSimple.nocache.js",ee=!0):lt.indexOf(Qt[Qt.length-2])>=0&&(te=Qt[Qt.length-2]+".nocache.js")),Qt=Ft.split("/"),Ae=Qt[Qt.length-3],Ae.substr(0,4)==="test"?Ae=Ae.substr(4,1)+"."+Ae.substr(5,1):(Ae.substr(0,3)==="war"||Ae.substr(0,4)==="beta")&&(Ae="5.0");var Bn=parseFloat(Ae);Bn!==NaN&&Bn<5&&Ft.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Bn+" is deprecated. Using version latest instead."),Ge("5.0",$t))},un=function(Ft,$t){window.console&&window.console.log&&(!$t||typeof $t.showLogging=="undefined"||$t.showLogging&&$t.showLogging!=="false")&&console.log(Ft)};ve.material_id!==void 0?je(ln):ln();function ln(){var Ft=an;Ke!==null?Ft=Ke:parseFloat(Ft)<5&&(Ft="5.0"),Ge(Ft,!1),Be!==null&&kt(Be,ht),_e=!0}return Sn},GGBAppletUtils=function(){"use strict";function Sn(){return window.GGBT_wsf_edit!==void 0}function an(_e,Ke){Ke!=1?(_e.style.transformOrigin="0% 0% 0px",_e.style.webkitTransformOrigin="0% 0% 0px",_e.style.transform="scale("+Ke+","+Ke+")",_e.style.webkitTransform="scale("+Ke+","+Ke+")",_e.style.maxWidth="initial",_e.querySelector(".ggb_preview")!==null&&(_e.querySelector(".ggb_preview").style.maxWidth="initial"),_e.querySelectorAll(".ggb_preview img")[0]!==void 0&&(_e.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),_e.querySelectorAll(".ggb_preview img")[1]!==void 0&&(_e.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(_e.style.transform="none",_e.style.webkitTransform="none")}function ve(_e,Ke,Be,mt,ct,Ze){var Et=null;if(Ze!=null&&Ze!="")for(var ht=_e.parentNode;ht!=null;)if((" "+ht.className+" ").indexOf(" "+Ze+" ")>-1){Et=ht;break}else ht=ht.parentNode;var dt=0,Ae=0,te=0,ee=0,he=0,se=0,de=0;if(Et)dt=Et.offsetWidth,Ae=Math.max(mt?Et.offsetWidth:0,Et.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(dt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ae=Math.min(window.innerHeight,document.documentElement.clientHeight),te=dt):(dt=window.innerWidth,Ae=window.innerHeight,te=window.innerWidth),_e){var me=_e.getBoundingClientRect();me.left>0&&me.left<=dt&&(ct===void 0||!ct)&&(document.dir==="rtl"?(he=dt-me.width-me.left,se=te<=480?10:30):(se=me.left,he=te<=480?10:30),ee=se+he)}if(_e&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var we=_e.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,de=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,de=40)}}return _e&&((Be===void 0||!Be)&&Ke>0&&Ke+ee<dt?dt=Ke:dt-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Be===void 0||!Be)&&(Ae-=de)),{width:dt,height:Ae}}function ce(_e,Ke,Be,mt,ct){if(_e.isScreenshoGenerator)return 1;var Ze=mt!==void 0&&mt,Et=_e.noScaleMargin!=null&&_e.noScaleMargin,ht=function(we){return we&&we!=="false"},dt=ht(_e.autoHeight),Ae=ve(Ke,_e.width,Be,dt,Ze&&window.GGBT_wsf_view||Et,ct),te=parseInt(Ae.width),ee=_e.width,he=_e.height;if(ee===void 0){var se=Ke.querySelector(".appletParameters");se&&(ee=se.offsetWidth,he=se.offsetHeight)}var de=te/ee,me=Ze?1:Ae.height/he;return Be!==void 0&&!Be&&(de=Math.min(1,de),me=Math.min(1,me)),Math.min(de,me)}function De(_e,Ke,Be){var mt=1,ct,Ze=!1;if(_e.hasOwnProperty("allowUpscale")&&(Ze=_e.allowUpscale),_e.hasOwnProperty("scale")&&(mt=parseFloat(_e.scale),(isNaN(mt)||mt===null||mt===0)&&(mt=1),mt>1&&(Ze=!0)),Ke&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ze=!0),!(_e.hasOwnProperty("disableAutoScale")&&_e.disableAutoScale))ct=ce(_e,Ke,Ze,Be,_e.scaleContainerClass);else return mt;return Ze&&(!_e.hasOwnProperty("scale")||mt===1)?ct:Math.min(mt,ct)}function ze(_e){var Ke=Math.min(window.innerWidth,document.documentElement.clientWidth),Be=Math.min(window.innerHeight,document.documentElement.clientHeight),mt=_e.getBoundingClientRect(),ct=(Ke-mt.width)/2,Ze=(Be-mt.height)/2;Ze<0&&(Ze=0),_e.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ct<40?_e.style.left="40px":_e.style.left=ct+"px",_e.style.top=Ze+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ze<40?_e.style.top="40px":_e.style.top=Ze+"px",_e.style.left=ct+"px")}function Ct(_e,Ke){var Be=_e.querySelector(".appletParameters");if(Be){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ke.id!==Be.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(_e)}if(Be.parentElement&&/fullscreen/.test(Be.parentElement.className))return;var mt=De(Ke,_e);Sn()&&Be.setAttribute("data-param-scale",mt);for(var ct=null,Ze=0;Ze<_e.childNodes.length;Ze++)if(_e.childNodes[Ze].className!==void 0&&_e.childNodes[Ze].className.match(/^applet_scaler/)){ct=_e.childNodes[Ze];break}if(ct!==null&&ct.querySelector(".noscale")!==null)return;var Et=Ke.id!==void 0?Ke.id:"ggbApplet",ht=window[Et];(ht==null||!ht.recalculateEnvironments)&&ct!==null&&!ct.className.match(/fullscreen/)&&(ct.parentNode.style.transform="",!isNaN(mt)&&mt!==1?(ct.parentNode.style.width=Ke.width*mt+"px",ct.parentNode.style.height=Ke.height*mt+"px",an(ct,mt)):(an(ct,1),ct.parentNode.style.width=Ke.width+"px",ct.parentNode.style.height=Ke.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ze(_e),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Be).parents(".content-added-content"))}}return{responsiveResize:Ct,isFlexibleWorksheetEditor:Sn,positionCenter:ze,getScale:De,scaleElement:an}}();__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,an){}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 an=s[L].bindings;s[L].bindings=function(){for(var ve=an?an():{},ce=Sn[webModule.__softPermutationId],De=O;De<ce.length;De++){var ze=ce[De];ve[ze[O]]=ze[P]}return ve}};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 an=document.compatMode==U?V:W;t.write(an+X),t.close()}}}function w(Sn){function an(ce){function De(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ze=De();if(ze){ce();return}function Ct(){if(!ze){if(!De())return;ze=!0,ce(),o.removeEventListener&&o.removeEventListener(Z,Ct,!1),_e&&clearInterval(_e)}}o.addEventListener&&o.addEventListener(Z,Ct,!1);var _e=setInterval(function(){Ct()},$)}function ve(ce){var De=u(),ze=De.body,Ct=De.createElement(_);Ct.language=ab,Ct.crossOrigin=W,Ct.src=ce,webModule.__errFn&&(Ct.onerror=function(){webModule.__errFn(L,new Error(bb+ce))}),ze.appendChild(Ct)}an(function(){ve(Sn)})}webModule.__startLoadingFragment=function(Sn){return C(Sn)},webModule.__installRunAsyncCode=function(Sn){var an=u(),ve=an.body,ce=an.createElement(_);ce.language=ab,ce.text=Sn,ve.appendChild(ce),ve.removeChild(ce)};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 an=c[Sn];return an==null?null:an},r=d,webModule.__errFn=e}function B(){function Sn(_e){var Ke=_e.lastIndexOf(rb);Ke==-1&&(Ke=_e.length);var Be=_e.indexOf(sb);Be==-1&&(Be=_e.length);var mt=_e.lastIndexOf(tb,Math.min(Be,Ke));return mt>=O?_e.substring(O,mt+P):W}function an(_e){if(!_e.match(/^\w+:\/\//)){var Ke=o.createElement(ub);Ke.src=_e+vb,_e=Sn(Ke.src)}return _e}function ve(){var _e=__gwt_getMetaProperty(wb);return _e!=null?_e:W}function ce(){for(var _e=o.getElementsByTagName(_),Ke=O;Ke<_e.length;++Ke)if(_e[Ke].src.indexOf(xb)!=-1)return Sn(_e[Ke].src);return W}function De(){var _e=o.getElementsByTagName(yb);return _e.length>O?_e[_e.length-P].href:W}function ze(){var _e=o.location;return _e.href==_e.protocol+zb+_e.host+_e.pathname+_e.search+_e.hash}var Ct=ve();return Ct==W&&(Ct=ce()),Ct==W&&(Ct=De()),Ct==W&&ze()&&(Ct=Sn(o.location.href)),Ct=an(Ct),Ct}function C(Sn){return Sn.match(/^\//)||Sn.match(/^[a-zA-Z]+:\/\//)?Sn:webModule.__moduleBase+Sn}function D(){var Sn=[],an=O,ve=[],ce=[];function De(_e){var Ke=ce[_e](),Be=ve[_e];if(Ke in Be)return Ke;var mt=[];for(var ct in Be)mt[Be[ct]]=ct;throw r&&r(_e,mt,Ke),null}if(__gwt_isKnownPropertyValue=function(_e,Ke){return Ke in ve[_e]},webModule.__getPropMap=function(){var _e={};for(var Ke in ve)ve.hasOwnProperty(Ke)&&(_e[Ke]=De(Ke));return _e},webModule.__computePropValue=De,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ze;try{ze=Cb;var Ct=ze.indexOf(Db);Ct!=-1&&(an=parseInt(ze.substring(Ct+P),$),ze=ze.substring(O,Ct))}catch(_e){}return webModule.__softPermutationId=an,C(ze+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})()},49291:function(Sn,an,ve){"use strict";ve.d(an,{Ax:function(){return Ct},Ds:function(){return _e},KI:function(){return Be},SI:function(){return ze},f1:function(){return De}});var ce=ve(38446);function De(mt){let ct=!0;if(mt.length>0){for(let Ze=0;Ze<mt.length;Ze++)if(mt[Ze].compile_success==0||!mt[Ze].compile_success){ct=!1;break}}else ct=!1;return ct}function ze(mt,ct=""){let Ze=[];for(let Et=0;Et<mt.length;Et++){let ht=mt[Et],dt=ct?`${ct}/${ht.name}`:`${ht.name}`;Ze.push({title:ht.name,type:ht.type,isLeaf:ht.type!=="tree",key:dt})}return Ze}function Ct(mt,ct,Ze){for(let Et=0;Et<mt.length;Et++){let ht=mt[Et];if(ht.key===ct){ht.children=Ze;break}ht.children&&Ct(ht.children,ct,Ze)}return mt}function _e(mt,ct,Ze){let Et;return function(){let ht=this,dt=arguments,Ae=function(){Et=null,Ze||mt.apply(ht,dt)},te=Ze&&!Et;clearTimeout(Et),Et=setTimeout(Ae,ct),te&&mt.apply(ht,dt)}}const Ke=!0,Be=ce.Z.API_SERVER},75872:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Ae}});var ce=ve(3113),De=ve(59301),ze=Object.defineProperty,Ct=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,ct=(te,ee,he)=>ee in te?ze(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:he}):te[ee]=he,Ze=(te,ee)=>{for(var he in ee||(ee={}))Be.call(ee,he)&&ct(te,he,ee[he]);if(Ke)for(var he of Ke(ee))mt.call(ee,he)&&ct(te,he,ee[he]);return te},Et=(te,ee)=>Ct(te,_e(ee)),ht=(te,ee)=>{var he={};for(var se in te)Be.call(te,se)&&ee.indexOf(se)<0&&(he[se]=te[se]);if(te!=null&&Ke)for(var se of Ke(te))ee.indexOf(se)<0&&mt.call(te,se)&&(he[se]=te[se]);return he},dt=(te,ee,he)=>new Promise((se,de)=>{var me=be=>{try{Me(he.next(be))}catch(Ie){de(Ie)}},we=be=>{try{Me(he.throw(be))}catch(Ie){de(Ie)}},Me=be=>be.done?se(be.value):Promise.resolve(be.value).then(me,we);Me((he=he.apply(te,ee)).next())});const Ae=te=>{var ee=te,{children:he}=ee,se=ht(ee,["children"]);const[de,me]=(0,De.useState)(!1);return De.createElement(ce.ZP,Et(Ze({},se),{loading:de,onClick:we=>dt(void 0,null,function*(){try{me(!0),yield se.onClick(we),me(!1)}catch(Me){console.error(Me),me(!1)}})}),he)}},95750:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return dt}});var ce=ve(59301),De=ve(8591),ze=ve(92832),Ct={codeBox:"codeBox___WpkVl"},_e=ve(92310),Ke=ve.n(_e),Be=Object.defineProperty,mt=(Ae,te,ee)=>te in Ae?Be(Ae,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Ae[te]=ee,ct=(Ae,te,ee)=>mt(Ae,typeof te!="symbol"?te+"":te,ee),Ze=(Ae,te,ee)=>new Promise((he,se)=>{var de=Me=>{try{we(ee.next(Me))}catch(be){se(be)}},me=Me=>{try{we(ee.throw(Me))}catch(be){se(be)}},we=Me=>Me.done?he(Me.value):Promise.resolve(Me.value).then(de,me);we((ee=ee.apply(Ae,te)).next())});class Et extends ce.Component{constructor(te){super(te),ct(this,"canvas"),ct(this,"randomNum",(ee,he)=>Math.floor(Math.random()*(he-ee)+ee)),ct(this,"drawPic",()=>{this.randomCode()}),ct(this,"reloadPic",()=>{this.drawPic()}),ct(this,"changeCode",ee=>{console.log(ee.target.value,222),this.setState({value:ee.target.value,showError:!1})}),ct(this,"onVerify",()=>{let ee;return this.state.value.toLowerCase()!==""&&this.state.value.toLowerCase()!==this.state.code.toLowerCase()?(ee=!0,De.ZP.error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u9A8C\u8BC1\u7801"),this.reloadPic()):this.state.value.toLowerCase()===""?(ee=!0,De.ZP.error("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801")):this.state.value.toLowerCase()===this.state.code.toLowerCase()&&(ee=!1),this.setState({showError:ee}),ee}),this.canvas=ce.createRef(),this.state={value:"",code:"",codeLength:4,fontSizeMin:20,fontSizeMax:22,backgroundColorMin:240,backgroundColorMax:250,colorMin:10,colorMax:20,lineColorMin:40,lineColorMax:180,contentWidth:96,contentHeight:38,showError:!1}}componentDidMount(){this.drawPic()}randomColor(te,ee){const he=this.randomNum(te,ee),se=this.randomNum(te,ee),de=this.randomNum(te,ee);return`rgb(${he}, ${se}, ${de})`}drawText(te,ee,he){te.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);const se=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);te.font=se+"px SimHei";const de=10,me=(this.state.contentWidth-40)/(this.state.code.length-1);let we=de;he>0&&(we=de+he*me);let Me=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);se>40&&(Me=40);const be=this.randomNum(-10,10);te.translate(we,Me),te.rotate(be*Math.PI/180),te.fillText(ee,0,0),te.rotate(-be*Math.PI/180),te.translate(-we,-Me)}drawLine(te){for(let ee=0;ee<1;ee++)te.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),te.beginPath(),te.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),te.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),te.stroke()}drawDot(te){for(let ee=0;ee<100;ee++)te.fillStyle=this.randomColor(0,255),te.beginPath(),te.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),te.fill()}randomCode(){let te="";const ee="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890";for(let he=0;he<this.state.codeLength;he++){const se=Math.floor(Math.random()*57);te+=ee[se]}this.setState({code:te},()=>{const se=this.canvas.current.getContext("2d");se.textBaseline="bottom",se.fillStyle=this.randomColor(this.state.backgroundColorMin,this.state.backgroundColorMax),se.fillRect(0,0,this.state.contentWidth,this.state.contentHeight);for(let de=0;de<this.state.code.length;de++)this.drawText(se,this.state.code[de],de);this.drawLine(se),this.drawDot(se)})}render(){const{className:te,width:ee=300}=this.props;return ce.createElement("div",{className:Ke()(Ct.codeBox,te),style:{width:ee}},ce.createElement("aside",null,ce.createElement(ze.default,{value:this.state.value,onChange:this.changeCode,placeholder:"\u8BF7\u8F93\u5165\u56FE\u7247\u4E2D\u7684\u9A8C\u8BC1\u7801"})),ce.createElement("div",null,ce.createElement("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),ce.createElement("div",{className:"current",onClick:this.reloadPic},"\u770B\u4E0D\u6E05\uFF1F\u6362\u4E00\u5F20")))}}const ht=(Ae,te)=>{let ee;Modal.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:React.createElement("div",null,React.createElement("p",null,te),React.createElement(Et,{ref:he=>ee=he})),onOk:()=>Ze(void 0,null,function*(){if(ee.onVerify())return Promise.reject();Ae()})})};var dt=Et},40928:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return ct}});var ce=ve(59301),De=ve(92832),ze=ve(12563),Ct=ve(8591),_e={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},Ke=ve(62772);const{TextArea:Be}=De.default;class mt extends ce.Component{constructor(Et){super(Et),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:Et,onAnswerChange:ht,addChildAnswer:dt,exerciseIsPublish:Ae,answers:te,activeOptionErrorIndex:ee,flex:he="0 0 1000px"}=this.props;console.log("----",te);let{inputVisible:se,EditInputIndex:de}=this.state;return ce.createElement("div",{className:_e.flex},ce.createElement("div",{className:`${_e.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",Et+1,"):"),ce.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},te==null?void 0:te.map((me,we)=>ce.createElement(ce.Fragment,null,de!==we?(me==null?void 0:me.length)>0?ce.createElement(ze.default,{className:"edit-tag",key:me,closable:!((te==null?void 0:te.length)===1&&we===0),onClose:Me=>{Me.preventDefault(),(te==null?void 0:te.length)===1&&we===0?this.props.deleteChildAnswermain(Et,we):this.props.deleteChildAnswer(Et,we)}},ce.createElement("span",{onDoubleClick:Me=>{this.setState({EditInputIndex:we}),Me.preventDefault()}},me)):ce.createElement(De.default,{defaultValue:me,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Me=>{if(Me.target.value.replaceAll(" ","").length<=0){Ct.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}ht(Et,we,Me.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):ce.createElement(De.default,{defaultValue:me,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Me=>{if(Me.target.value.replaceAll(" ","").length<=0){Ct.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}ht(Et,we,Me.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!se&&ce.createElement(ze.default,{className:"site-tag-plus",onClick:()=>{dt(Et),this.setState({inputVisible:!0})}},ce.createElement(Ke.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var ct=mt},60355:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Ae}});var ce=ve(59301),De=ve(64726),ze=Object.defineProperty,Ct=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,ct=(te,ee,he)=>ee in te?ze(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:he}):te[ee]=he,Ze=(te,ee)=>{for(var he in ee||(ee={}))Be.call(ee,he)&&ct(te,he,ee[he]);if(Ke)for(var he of Ke(ee))mt.call(ee,he)&&ct(te,he,ee[he]);return te},Et=(te,ee)=>Ct(te,_e(ee)),ht=(te,ee,he)=>ct(te,typeof ee!="symbol"?ee+"":ee,he);const dt="\u2581";class Ae extends ce.Component{constructor(){super(...arguments),ht(this,"getChCountBeforeCursor",(ee,he)=>{const se=he.line;let de=0;for(let we=0;we<se;we++)de+=ee.getLine(we).split(dt).length-1;const me=ee.getLine(se).substring(0,he.ch);return de+=me.split(dt).length-1,de}),ht(this,"onCMBeforeChange",(ee,he)=>{const se=ee.getRange(he.from,he.to);let de=0;if(he.text.forEach(me=>{de+=me.split(dt).length-1}),se&&se.indexOf(dt)!=-1){const me=se.split(dt).length-1,we=this.getChCountBeforeCursor(ee,he.from);console.log(`\u5220\u9664${me}\u4E2A\uFF0C \u4E4B\u524D\u6709${we}\u4E2A\uFF0C\u65B0\u589E${de}\u4E2A`),this.props.deleteEmptyDisabled?he.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(we,me,de)}else if(de){const me=this.getChCountBeforeCursor(ee,he.from);console.log(`\u65B0\u589E${de}\u4E2A\uFF0C\u4E4B\u524D\u6709${me}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(me,0,de)}})}render(){return ce.createElement(De.Z,Et(Ze({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},72559:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Ke}});var ce=ve(60324),De={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},ze=ve(32637),Ct=ve(59301),Ke=({type:Be,style:mt})=>{const ct=Ct.createElement("div",{className:De.wrap,onClick:Ze=>{Ze.preventDefault(),Ze.stopPropagation()}},Ct.createElement("p",null,Be==="shixun"||Be==="paths"?"\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u662F\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002":"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",Ct.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Be==="paths"?"\u53D1\u9001\u5230\u8BFE\u5802":"\u53D1\u5E03","\u4F7F\u7528\u4E4B\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),Ct.createElement("div",{className:De.contact},Ct.createElement("div",{className:De.img},Ct.createElement("img",{src:ze,width:"124px",height:"124px"})),Ct.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return Ct.createElement(ce.Z,{content:ct},Ct.createElement("span",{className:De.text,style:mt},"\u9AD8\u6D88\u8017"))}},14573:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Et}});var ce=ve(59301),De={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ze=ve(92310),Ct=ve.n(ze),_e=ve(71418),Ke=ve(2859),Be=ve(7660),mt=ve(88230),ct=(ht,dt,Ae)=>new Promise((te,ee)=>{var he=me=>{try{de(Ae.next(me))}catch(we){ee(we)}},se=me=>{try{de(Ae.throw(me))}catch(we){ee(we)}},de=me=>me.done?te(me.value):Promise.resolve(me.value).then(he,se);de((Ae=Ae.apply(ht,dt)).next())}),Et=({data:ht,className:dt,fullWidth:Ae,style:te={},onClose:ee,onOk:he,showFullTools:se,noAssociationId:de})=>{const me=(0,ce.useRef)(null),we=(0,ce.useRef)(null),Me=(0,ce.useRef)(null),be=(0,ce.useRef)(null),[Ie,je]=(0,ce.useState)(!1),[qe,$e]=(0,ce.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ce.useEffect)(()=>{Me.current||(Me.current=document.createElement("style"),document.head.appendChild(Me.current)),ht!=null&&ht.visible?(document.body.setAttribute("data-custom","y-hidden"),Me.current.innerHTML=" html { overflow-y: hidden; }",ht!=null&&ht.src&&ft()):(document.body.removeAttribute("data-custom"),Me.current&&(document.head.removeChild(Me.current),Me.current=null))},[ht==null?void 0:ht.visible]);const ft=()=>ct(void 0,null,function*(){je(!0),$e("\u6B63\u5728\u52A0\u8F7D\u4E2D");const bt=yield(0,mt.ZJ)(ht==null?void 0:ht.src);me.current.src="",me.current.src=bt,me.current.onload=function(){et()},je(!1),$e("")}),Re=bt=>ct(void 0,null,function*(){je(!0),$e("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Bt=yield(0,Be.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ht.title,file:bt.dataUrl}});Bt!=null&&Bt.id&&!de?(yield(0,Be.ZP)(`/api/attachments/${ht.id}/add_subitem.json`,{method:"post",body:{subitem_id:Bt==null?void 0:Bt.id,settings:JSON.stringify(bt.state)}})).status===0&&he():Bt!=null&&Bt.id&&he(Bt),je(!1),$e("")}),Tt=()=>{const bt=document.querySelector('a[href="https://markerjs.com/"]');bt&&bt.parentNode&&(bt.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(Nt=>{const Zt=document.querySelector(Nt.name);Zt&&Zt.setAttribute("title",Nt.title)})},et=()=>{we.current=new Ke.hP(me.current),we.current.targetRoot=be.current,we.current.addEventListener("render",Re),we.current.addEventListener("beforeclose",ee),se&&(we.current.availableMarkerTypes=we.current.ALL_MARKER_TYPES,we.current.uiStyleSettings.redoButtonVisible=!0,we.current.uiStyleSettings.notesButtonVisible=!0,we.current.uiStyleSettings.zoomButtonVisible=!0,we.current.uiStyleSettings.zoomOutButtonVisible=!0,we.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=we.current.uiStyleSettings,we.current.show(),ht!=null&&ht.snapshotData&&we.current.restoreState(ht.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Tt()},300)};return ce.createElement(ce.Fragment,null,(ht==null?void 0:ht.visible)&&ce.createElement(_e.Z,{spinning:Ie,tip:qe,style:{position:"absolute"}},ce.createElement("div",{ref:be,className:Ct()(De.imageDimensions,dt,Ae?De.fullWidth:""),style:te},ce.createElement("img",{className:De.img,ref:me}))))}},72714:function(Sn,an,ve){"use strict";var ce=ve(59301),De=ve(11570),ze=ve(48136),Ct=ve(46531),_e=ve(43418),Ke=ve(59301);const Be=(0,ce.forwardRef)(({callback:mt,width:ct,onChange:Ze,disabled:Et,readOnly:ht,type:dt="",value:Ae="",style:te={}},ee)=>{const he=(0,ce.useRef)(),se=(0,ce.useRef)(),[de,me]=(0,ce.useState)(0),[we,Me]=(0,ce.useState)(0),[be,Ie]=(0,ce.useState)(!1),je=()=>{var Re=document.createElement("div");Re.innerHTML=he.current.getValue();var Tt=Re.innerText;return mt&&mt(Tt),Tt};(0,ce.useImperativeHandle)(ee,()=>({getData:je}));const qe=Re=>{Re.preventDefault();const Tt=Re.clientX-de,et=Re.clientY-we;document.body.onmousemove=bt=>{let Bt=bt.clientX-Tt,Nt=bt.clientY-et;const Zt=document.getElementsByClassName("markdown-popup-form")[0],Ut=window.innerWidth-Zt.offsetWidth,lt=window.innerHeight-Zt.offsetHeight;Bt=Math.max(0,Math.min(Bt,Ut)),Nt=Math.max(0,Math.min(Nt,lt)),$e(bt.clientX,bt.clientY,Tt,et)&&(me(Bt),Me(Nt))},document.body.onmouseup=function(){document.body.onmousemove=null}},$e=(Re,Tt,et,bt)=>{const Bt=document.body.clientHeight,Nt=document.body.clientWidth;return Re<20&&et>Re||Re>Nt-20&&et<Re||Tt<20&&bt>Tt||Tt>Bt-20&&bt<Tt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,ce.useEffect)(()=>{be&&setTimeout(()=>{const Re=document.getElementsByClassName("markdown-popup-form")[0],Tt=window.innerWidth/2-Re.offsetWidth/2,et=window.innerHeight/2-Re.offsetHeight/2;me(Tt),Me(et)},0)},[be]);const ft=()=>{Et||ht||Ie(!0)};return Ke.createElement("div",{style:te},Ke.createElement("div",{style:{width:ct||"100%",position:"relative"},className:`${De.Z.mathFillWrap} ${Et||ht?"cursorDefault":""}`,onClick:()=>ft()},Ke.createElement("math-field",{disabled:Et,locale:"zh_cn",class:`${De.Z.mathField} ${dt}`,readOnly:ht,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:he,style:{width:"100%",fontSize:Ae?18:14},value:Ae||""})),Ke.createElement(_e.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:de,top:we},title:Ke.createElement("div",{style:{cursor:"move"},onMouseDown:qe},"\u8F93\u5165\u516C\u5F0F"),open:be,onOk:()=>{const Re=se.current.getData();he.current.setValue(Re),Ze(Re),Ie(!1)},onCancel:()=>{Ie(!1)},destroyOnClose:!0,className:"markdown-popup-form"},Ke.createElement(Ct.Z,{value:Ae,ref:se,onChange:Ze,showSaveButton:!1})))});an.Z=Be},46531:function(Sn,an,ve){"use strict";var ce=ve(59301),De=ve(95237),ze=ve(43604),Ct=ve(99313),_e=ve(3113),Ke=ve(99325),Be=ve(11570),mt=ve(48136),ct=ve(59301);const Ze=(0,ce.forwardRef)(({callback:Et,showSaveButton:ht,value:dt=""},Ae)=>{const te=(0,ce.useRef)(),ee=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],he=[{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}`}]}]}],se=we=>{te.current.setValue(te.current.getValue()+" "+we.value+" ")},de=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ct.createElement(De.Z,{className:Be.Z.lists,gutter:[10,10]},ee.map((we,Me)=>ct.createElement(ze.Z,{flex:"110px",className:Be.Z.item},ct.createElement("div",null,ct.createElement(Ke.Z,{value:`$$${we.value}$$`}),we.name),ct.createElement("div",{className:Be.Z.children},we.children.map((be,Ie)=>ct.createElement("div",{key:Ie},ct.createElement("h1",null,be.name),ct.createElement(De.Z,{gutter:[10,10]},be.data.map((je,qe)=>ct.createElement(ze.Z,{key:qe,onClick:()=>se(je),className:Be.Z.diamond},ct.createElement(Ke.Z,{value:"`$$"+je.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ct.createElement(De.Z,{className:Be.Z.lists,gutter:[10,10]},he.map((we,Me)=>ct.createElement(ze.Z,{flex:"110px",className:Be.Z.item},ct.createElement("div",null,ct.createElement(Ke.Z,{value:"`$$"+we.value+"$$`"}),we.name),ct.createElement("div",{className:Be.Z.children},we.children.map((be,Ie)=>ct.createElement("div",{key:Ie},be.name&&ct.createElement("h1",null,be.name),ct.createElement(De.Z,{gutter:[10,10]},be.data.map((je,qe)=>ct.createElement(ze.Z,{key:qe,onClick:()=>se(je),className:Be.Z.diamond},ct.createElement(Ke.Z,{value:"`$$"+je.value+"$$`"}))))))))))}],me=()=>{var we=document.createElement("div");we.innerHTML=te.current.getValue();var Me=we.innerText;return Et&&Et(Me),Me};return(0,ce.useImperativeHandle)(Ae,()=>({getData:me})),ct.createElement("div",{className:Be.Z.mathWrap},ct.createElement(Ct.default,{defaultActiveKey:"1",items:de}),ct.createElement("math-field",{locale:"zh_cn",className:Be.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:te,style:{width:800,marginTop:30,fontSize:18}},dt||""),ht&&ct.createElement("div",{className:Be.Z.button},ct.createElement(_e.ZP,{size:"large",onClick:me,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});an.Z=Ze},57816:function(Sn,an,ve){"use strict";var ce=ve(59301),De=ve(93314),ze=ve(3113),Ct=Object.defineProperty,_e=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,Ze=(Ae,te,ee)=>te in Ae?Ct(Ae,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Ae[te]=ee,Et=(Ae,te)=>{for(var ee in te||(te={}))mt.call(te,ee)&&Ze(Ae,ee,te[ee]);if(Be)for(var ee of Be(te))ct.call(te,ee)&&Ze(Ae,ee,te[ee]);return Ae},ht=(Ae,te)=>_e(Ae,Ke(te));const dt=({img:Ae,buttonProps:te={},styles:ee={},customText:he,ButtonText:se,ButtonClick:de,Buttonclass:me,ButtonTwo:we,imgStyles:Me,loading:be=!1})=>ce.createElement("section",{className:"tc animated fadeIn",style:Et(Et({},{color:"#999",margin:"100px auto",visibility:be?"hidden":"visible"}),ee)},ce.createElement("img",{src:Ae||De,style:ht(Et({},Me),{pointerEvents:"none",userSelect:"none"})}),ce.createElement("p",{className:"mt20 font14"},he||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&ce.createElement(ze.ZP,Et({className:me,onClick:de},te),se),we&&we);an.Z=dt},90853:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return me}});var ce=ve(59301),De={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ze=ve(3113),Ct=ve(70557),_e=ve(57800),Ke=ve(6848),Be=ve(88230),mt=ve(30897),ct=ve(57816),Ze=ve(38446),Et=ve(89282),ht=ve(59301),dt=Object.defineProperty,Ae=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,he=(we,Me,be)=>Me in we?dt(we,Me,{enumerable:!0,configurable:!0,writable:!0,value:be}):we[Me]=be,se=(we,Me)=>{for(var be in Me||(Me={}))te.call(Me,be)&&he(we,be,Me[be]);if(Ae)for(var be of Ae(Me))ee.call(Me,be)&&he(we,be,Me[be]);return we},de=(we,Me,be)=>new Promise((Ie,je)=>{var qe=Re=>{try{ft(be.next(Re))}catch(Tt){je(Tt)}},$e=Re=>{try{ft(be.throw(Re))}catch(Tt){je(Tt)}},ft=Re=>Re.done?Ie(Re.value):Promise.resolve(Re.value).then(qe,$e);ft((be=be.apply(we,Me)).next())}),me=({editOffice:we="view",data:Me,theme:be,type:Ie,filename:je,monacoEditor:qe,className:$e,style:ft,close:Re,onClose:Tt,hasMask:et,disabledDownload:bt,onImgDimensions:Bt,showNodata:Nt,recordInfo:Zt})=>{const[Ut,lt]=(0,ce.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ge,kt]=(0,ce.useState)(""),[un,ln]=(0,ce.useState)(),Ft=window.ENV==="build"?"/react/build":"",$t=location.host.startsWith("localhost")?Ze.Z.PROXY_SERVER:Ze.Z.API_SERVER,Bn=10*(1024*1024),on=(0,ce.useRef)();Me!=null&&Me.startsWith("/api")&&Ie!=="txt"&&(Me=Ze.Z.API_SERVER+Me);const Cn=He=>He.substring(He.lastIndexOf("/")+1).split(".").pop();je&&qe&&(qe.filename=je),(0,ce.useEffect)(()=>{var He,Ce;const Pe=(Ce=(He=document.cookie)==null?void 0:He.replace(/\s/g,""))==null?void 0:Ce.split(";");Pe==null||Pe.map(Ne=>{let ke=Ne.split("=");ke[0]==="_educoder_session"&&kt(ke[1])})},[]),(0,ce.useEffect)(()=>{Ie==="office"&&(Me.indexOf("bigfilescdn.")>-1||Me.indexOf("bigfiles1")>-1?ln({url:Me,fileType:Cn(Me),model:Me.indexOf("model=edit")?"edit":"view"}):gt())},[Ie,Me]);const gt=()=>de(void 0,null,function*(){console.log("data:",Me);let He=Me;Me.startsWith("http")||(He=location.origin+He);let Ce=new URL(He).pathname.split("/").pop();const Pe=yield(0,mt.gJ)({attachment_id:Ce});Pe.url=$t+Pe.url,ln(Pe)}),En=()=>{if(Me.startsWith("http")||Me.startsWith("blob:")){Vn();return}(0,Be.Sv)(je||"educoder",Me,je)},Vn=()=>{Zt&&(0,Et.fc)({id:Zt==null?void 0:Zt.id,watch_type:1,course_id:Zt==null?void 0:Zt.course_id}),(0,Be.Nd)(je||"educoder",decodeURIComponent(Me))};return ht.createElement("div",{style:se({},ft||{}),className:`${et&&De.bgBlack} ${Ie?De.wrp:"hide"}`},Re&&ht.createElement("div",{className:De.close,ref:on},!!Bt&&ht.createElement(Ke.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>on.current},ht.createElement("span",{onClick:()=>{Tt(),Bt()}},ht.createElement("i",{className:"icon-yulanpizhu"}))),!bt&&ht.createElement(Ke.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>on.current},ht.createElement("span",{onClick:Vn},ht.createElement("i",{className:"icon-quxiaozhiding"}))),ht.createElement(Ke.Z,{title:"\u5173\u95ED",getPopupContainer:()=>on.current},ht.createElement("span",{className:"",onClick:Tt},ht.createElement("i",{className:"icon-guanbi1"})))),ht.createElement("div",{className:`${De[$e]} ${$e} ${De.monaco} ${Ie==="txt"?"show":"hide"}`},Ie==="txt"&&ht.createElement(ht.Fragment,null,ht.createElement(_e.ZP,se({},qe)))),Ie==="audio"&&ht.createElement("audio",{src:`${(Me==null?void 0:Me.indexOf("http://"))>-1||(Me==null?void 0:Me.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Me}`,autoPlay:!0}),Ie==="video"&&ht.createElement(ht.Fragment,null,(Me==null?void 0:Me.indexOf("http"))>-1?ht.createElement("video",{controls:!0,src:`${Me}`,autoPlay:!0}):ht.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Me}`,autoPlay:!0})),Ie==="office"&&un&&ht.createElement("iframe",{src:`${Ft}/office.html?key=${un.key}&url=${btoa(un.url)}&callbackUrl=${$t+(un.callbackUrl||"")}&fileType=${un.fileType}&title=${un.title||""}&model=${we}&officeServer=${Ze.Z.ONLYOFFICE}&disabledDownload=${!!bt}`}),Ie==="html"&&ht.createElement("iframe",{src:Me+"&disposition=inline"}),Ie==="pdf"&&ht.createElement("iframe",{src:`${Ft}/js/pdfview/index.html?filename=${je||"educoder.pdf"}&url=${encodeURIComponent(Me)}&disabledDownload=${!!bt}`}),Ie==="image"&&ht.createElement("img",{src:`${(Me==null?void 0:Me.indexOf("http://"))>-1||(Me==null?void 0:Me.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Me}`}),(Ie==="other"||Ie==="download")&&ht.createElement(ht.Fragment,null,Nt?ht.createElement(ct.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ht.createElement(ze.ZP,{icon:ht.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:En,disabled:bt},"\u4E0B\u8F7D")}):ht.createElement(ze.ZP,{type:"primary",size:"middle",onClick:En,disabled:bt},ht.createElement(Ct.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},32285:function(Sn,an,ve){"use strict";ve.d(an,{t:function(){return Pe}});var ce=ve(59301),De=ve(92832),ze=ve(78241),Ct=ve(43418),_e=ve(95237),Ke=ve(43604),Be=ve(5871),mt=ve(57809),ct=ve(5112),Ze=ve(70941),Et=ve(24459),ht=ve(31687),dt=ve(8591),Ae=ve(3113),te=ve(71418),ee=ve(24334),he={flex_box_center:"flex_box_center___kOQ8P",flex_space_between:"flex_space_between___fY6jt",flex_box_vertical_center:"flex_box_vertical_center___bDSSI",flex_box_center_end:"flex_box_center_end___mQ6mU",flex_box_column:"flex_box_column___F15G0",result:"result___UYRo8",left:"left___TRaH5",right:"right___twp9s",box:"box___vwndt",li:"li___hRe2d"},se=ve(7660),de=ve(5247),me=ve(64726),we=ve(56102),Me=ve(76826),be=ve(59301),Ie=Object.defineProperty,je=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Tt=(Ne,ke,Se)=>ke in Ne?Ie(Ne,ke,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Ne[ke]=Se,et=(Ne,ke)=>{for(var Se in ke||(ke={}))ft.call(ke,Se)&&Tt(Ne,Se,ke[Se]);if($e)for(var Se of $e(ke))Re.call(ke,Se)&&Tt(Ne,Se,ke[Se]);return Ne},bt=(Ne,ke)=>je(Ne,qe(ke)),Bt=(Ne,ke,Se)=>new Promise((nt,Pt)=>{var Xe=wt=>{try{yt(Se.next(wt))}catch(ot){Pt(ot)}},Je=wt=>{try{yt(Se.throw(wt))}catch(ot){Pt(ot)}},yt=wt=>wt.done?nt(wt.value):Promise.resolve(wt.value).then(Xe,Je);yt((Se=Se.apply(Ne,ke)).next())}),Zt=({buttonProps:Ne,buttonText:ke,form:Se,hackIdentifier:nt="",answerKey:Pt,data:Xe})=>{const[Je,yt]=(0,ce.useState)(!1),[wt,ot]=(0,ce.useState)(!1),[It,sn]=(0,ce.useState)(!1),[Xt,Ht]=(0,ce.useState)({}),[xn,Dn]=(0,ce.useState)(""),[cn,Un]=(0,ce.useState)(""),ti=(0,ce.useRef)(nt),Wn=(0,ce.useRef)(""),Zn=(0,ce.useRef)(!1);(0,ce.useEffect)(()=>{It&&zi()},[It]),(0,ce.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const Jn=()=>new Date().getTime(),vi=Xe==null?void 0:Xe.code,pi=()=>{var Gn,oi;let Li=vi?Xe==null?void 0:Xe.code:(Gn=Se.getFieldValue("hack_codes"))==null?void 0:Gn.code,di=vi?Xe==null?void 0:Xe.answer_content:Se.getFieldValue(Pt),gr=vi?Xe==null?void 0:Xe.input:(oi=Se.getFieldValue("hack_sets"))==null?void 0:oi.input;di==null||di.forEach(Ii=>{const Le=Ii.value||Ii.answer_text||"";Li=Li.replace(/(@▁@|@▁▁@)/,Le)}),Un(gr),Dn(Li),Ht({}),sn(!0)},zi=()=>Bt(void 0,null,function*(){var Gn,oi,Li,di;const gr=Jn(),Ii=vi?Xe==null?void 0:Xe.time_limit:(Gn=Se.getFieldsValue())==null?void 0:Gn.hack.time_limit,Le=vi?(oi=Xe==null?void 0:Xe.answer_content)==null?void 0:oi.length:(di=(Li=Se.getFieldsValue())==null?void 0:Li.standard_answers)==null?void 0:di.length;yt(!0),yield(0,de.bM)(Wn.current,{test_hack_code:xn,test_input:cn});function si(){return Bt(this,null,function*(){const{status:ji,data:gn}=yield(0,de.rX)(Wn.current,"submit"),mi=Jn()-gr>(Ii+3)*1e3*Le;if(Zn.current){if(mi){dt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),yt(!1);return}if(ji===0){yt(!1),Ht(bt(et({},gn),{showText:!0}));return}setTimeout(si,1e3)}})}si()}),$i=()=>Bt(void 0,null,function*(){var Gn,oi,Li,di,gr,Ii,Le;if(!Xe){try{yield Se.validateFields()}catch(qn){(Li=(oi=(Gn=qn==null?void 0:qn.errorFields)==null?void 0:Gn[0])==null?void 0:oi.name)!=null&&Li.includes("standard_answers")?dt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):dt.ZP.error(qn.errorFields[0].errors[0]),Se.scrollToField(qn.errorFields[0].name,{behavior:"smooth",block:"center"});return}ot(!0);let ji="";const gn=Se.getFieldsValue();ti.current?ji=yield(0,se.ZP)(`/api/problems/${ti.current}.json`,{method:"put",body:bt(et({},gn),{hack:bt(et({},gn==null?void 0:gn.hack),{sub_discipline_id:(Le=(Ii=gn==null?void 0:gn.hack)==null?void 0:Ii.sub_discipline_id)==null?void 0:Le[1],difficult:gn.difficulty,item_banks_group_id:gn.item_banks_group_id}),hack_codes:bt(et({},gn.hack_codes),{code:ee.Base64.encode(gn.hack_codes.code)}),update_hack_sets:[et({},gn.hack_sets)],is_blank:!0})}):(ji=yield(0,se.ZP)("/api/problems.json",{method:"post",body:bt(et({},gn),{hack:bt(et({},gn==null?void 0:gn.hack),{sub_discipline_id:(gr=(di=gn==null?void 0:gn.hack)==null?void 0:di.sub_discipline_id)==null?void 0:gr[1],difficult:gn.difficulty,item_banks_group_id:gn.item_banks_group_id}),hack_codes:bt(et({},gn.hack_codes),{code:ee.Base64.encode(gn.hack_codes.code)}),hack_sets:[et({},gn.hack_sets)],is_blank:!0})}),ti.current=ji==null?void 0:ji.identifier,sessionStorage.projectFill=ji==null?void 0:ji.identifier)}const si=yield(0,se.ZP)(`/api/problems/${ti.current}/start.json`,{method:"get"});if((si==null?void 0:si.status)===0){Wn.current=si==null?void 0:si.identifier,Zn.current=!0,ot(!1),pi();return}ot(!1)}),Yn=Gn=>{const{status:oi,error_msg:Li,execute_time:di,output:gr,input:Ii,expected_output:Le}=Gn;let si=null;switch(oi){case Me.h.OK:si=be.createElement(be.Fragment,null,be.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",di/1e3,"\u79D2"),be.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Me.h.NOMATCH:si=be.createElement(be.Fragment,null,be.createElement("div",null,"\u8F93\u5165\uFF1A"),be.createElement("pre",{style:{fontFamily:"initial"}},Ii),be.createElement("div",null,"\u8F93\u51FA\uFF1A"),be.createElement("pre",{style:{fontFamily:"initial"}},gr&&ee.Base64.decode(gr)),be.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),be.createElement("pre",{style:{fontFamily:"initial"}},Le&&ee.Base64.decode(Le)));break;case Me.h.EXECUTEFAILURE:si=be.createElement(be.Fragment,null,be.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",be.createElement("pre",null,Ii)),be.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),be.createElement("pre",{className:"error"},ee.Base64.decode(Li)));break;case Me.h.COMPILEFAILURE:si=be.createElement(be.Fragment,null,be.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",be.createElement("pre",null,Ii)),be.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),be.createElement("pre",{className:"error"},ee.Base64.decode(Li)));break;case Me.h.PODFAILURE:si=be.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Me.h.TIMEOUT:si=be.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return be.createElement(be.Fragment,null," ",si," ")};return be.createElement("div",null,be.createElement(Ae.ZP,bt(et({loading:wt},Ne),{onClick:$i}),ke),be.createElement(Ct.default,{open:It,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:Je,cancelButtonProps:{style:{display:"none"}},onOk:()=>zi(),onCancel:()=>{Zn.current=!1,sn(!1)}},be.createElement("div",{className:he.result},be.createElement("div",{className:he.left},be.createElement("div",{className:"mb20"},be.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!Xe&&be.createElement(we.CopyToClipboard,{text:xn,onCopy:()=>dt.ZP.success("\u590D\u5236\u6210\u529F")},be.createElement("span",{style:{float:"right"},className:"current c-light-primary"},be.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),be.createElement(me.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:xn,onChange:Gn=>Dn(Gn)})),be.createElement("div",{className:he.right},be.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),be.createElement("div",{className:he.box},be.createElement("div",{className:he.li},be.createElement(De.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:cn,onChange:Gn=>Un(Gn.target.value),bordered:!1,style:{height:180}}))),be.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),be.createElement("div",{className:he.box},be.createElement(te.Z,{spinning:Je,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},be.createElement("div",{className:he.li,style:{height:196,overflow:"auto",padding:10}},Yn(Xt))))))))},Ut=ve(87169),lt=ve(59301),Ge=Object.defineProperty,kt=Object.defineProperties,un=Object.getOwnPropertyDescriptors,ln=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,Qt=(Ne,ke,Se)=>ke in Ne?Ge(Ne,ke,{enumerable:!0,configurable:!0,writable:!0,value:Se}):Ne[ke]=Se,Bn=(Ne,ke)=>{for(var Se in ke||(ke={}))Ft.call(ke,Se)&&Qt(Ne,Se,ke[Se]);if(ln)for(var Se of ln(ke))$t.call(ke,Se)&&Qt(Ne,Se,ke[Se]);return Ne},on=(Ne,ke)=>kt(Ne,un(ke)),Cn=(Ne,ke)=>{var Se={};for(var nt in Ne)Ft.call(Ne,nt)&&ke.indexOf(nt)<0&&(Se[nt]=Ne[nt]);if(Ne!=null&&ln)for(var nt of ln(Ne))ke.indexOf(nt)<0&&$t.call(Ne,nt)&&(Se[nt]=Ne[nt]);return Se};const{TextArea:gt}=De.default,En=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],Vn=({value:Ne,onChange:ke})=>lt.createElement(Switch,{checked:Ne,onChange:Se=>{ke(Se)}}),He="@\u2581@",Ce="@\u2581\u2581@",Pe=({questionTitlePlaceholder:Ne,form:ke,scoreByBlank:Se=!1,hackidentifier:nt,answerKey:Pt})=>{const[Xe,Je]=(0,ce.useState)(!1),[yt,wt]=(0,ce.useState)(!1),It=(0,Et.useParams)().type==="edit",sn=(Wn,Zn)=>{const Jn=Zn.line;let vi=0;for(let zi=0;zi<Jn;zi++)vi+=Wn.getLine(zi).split(He).length-1;for(let zi=0;zi<Jn;zi++)vi+=Wn.getLine(zi).split(Ce).length-1;const pi=Wn.getLine(Jn).substring(0,Zn.ch);return vi+=pi.split(He).length-1,vi+=pi.split(Ce).length-1,vi},Xt=(Wn,Zn,Jn,vi)=>{const pi=Wn.getRange(Zn.from,Zn.to);let zi=0;if(Zn.text.forEach($i=>{zi+=$i.split(He).length-1}),Zn.text.forEach($i=>{zi+=$i.split(Ce).length-1}),Zn.origin!=="setValue"){if(pi&&(pi.indexOf(He)!==-1||pi.indexOf(Ce)!==-1)){const $i=pi.split(He).length-1+pi.split(Ce).length-1,Yn=sn(Wn,Zn.from);if(console.log(`\u5220\u9664${$i}\u4E2A\uFF0C \u524D\u9762\u6709${Yn}\u4E2A\uFF0C\u65B0\u589E${zi}\u4E2A`),$i>1){const Gn=Array.from({length:$i},(oi,Li)=>Yn+Li);vi(Gn)}else vi(Yn)}else if(zi>0){const $i=sn(Wn,Zn.from);console.log(`\u65B0\u589E${zi}\u4E2A\uFF0C\u4E4B\u524D\u6709${$i}\u4E2A`),Jn(zi,$i)}}},Ht=()=>{const Wn=ke.getFieldValue(Pt);ke.setFieldsValue({[Pt]:Wn==null?void 0:Wn.map((Zn,Jn)=>on(Bn({},Zn),{position:Jn+1}))})},xn=(0,ce.useRef)(),Dn=(Wn,Zn)=>{for(let Jn=0;Jn<Wn;Jn++)xn.current({position:null,answer_text:""},Zn+Jn);Ht()},cn=(0,ce.useRef)(),Un=Wn=>{cn.current(Wn),Ht()},ti=ze.default.useWatch(Pt,ke);return lt.createElement("div",{className:ht.Z.wrap},lt.createElement(ze.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},lt.createElement(Ze.h,{scrollId:"name",watch:!0,height:140})),lt.createElement("div",{className:ht.Z.questionTitleEditorWrap},lt.createElement(ze.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},lt.createElement(Ze.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(Wn,Zn)=>{const Jn=ke.getFieldValue(Pt);console.log("--preAnswerData",Jn,Zn),ke.setFieldsValue({[Pt]:Jn==null?void 0:Jn.map((vi,pi)=>{var zi;return on(Bn({},vi),{position:pi+1,multi_line:(zi=Zn==null?void 0:Zn[pi])==null?void 0:zi.multiLine})})})},placeholder:Ne,onCMBeforeChange:(Wn,Zn)=>{Xt(Wn,Zn,Dn,Un)}}))),lt.createElement(ze.default.List,{name:Pt,rules:[{validator(Wn,Zn){if(!(Zn!=null&&Zn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Jn of Zn){const{answer_text:vi}=Jn||{};if((vi==null?void 0:vi.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Wn,{add:Zn,remove:Jn},{errors:vi})=>(xn.current=Zn,cn.current=Jn,lt.createElement(lt.Fragment,null,lt.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},lt.createElement(ze.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),lt.createElement("div",{onClick:()=>{Ct.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:lt.createElement("div",null,lt.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",lt.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),lt.createElement("div",{style:{marginTop:10}},"2.\u8BD5\u9898\u7B97\u5206\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u5C06\u7A0B\u5E8F\u91CC\u9762\u7684\u6240\u6709\u7A7A\u66FF\u6362\u6210\u5B66\u751F\u7684\u7B54\u6848\u8FDB\u884C\u8BC4\u6D4B\u3002\u8F93\u51FA\u7684\u7ED3\u679C\u4E0E\u6D4B\u8BD5\u96C6\u6BD4\u5BF9\uFF0C\u5B8C\u5168\u6B63\u786E\u5219\u5F97\u6EE1\u5206\uFF1B\u82E5\u4E0D\u5B8C\u5168\u6B63\u786E\uFF0C\u5219\u4F9D\u6B21\u5C06\u6BCF\u4E2A\u7A7A\u6362\u6210\u5B66\u751F\u63D0\u4EA4\u7684\u7B54\u6848\uFF0C\u540C\u65F6\u5C06\u5176\u4ED6\u7A7A\u66FF\u6362\u6210\u6807\u51C6\u7B54\u6848\uFF0C\u8FD0\u884C\u7A0B\u5E8F\u3002\u5982\u679C\u8FD9\u4E2A\u7A7A\u7684\u5B66\u751F\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7ED3\u5408\u80FD\u5F97\u5230\u6B63\u786E\u8F93\u51FA\uFF0C\u5219\u8FD9\u4E2A\u7A7A\u5F97\u5230\u8BE5\u7A7A\u7684\u6EE1\u5206\uFF0C\u5426\u5219\u8BE5\u7A7A\u5F970\u5206\u3002"))})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"}},lt.createElement(Ut.Z,{style:{marginRight:3,color:"#3061D0"}}),lt.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),Wn.map((pi,zi)=>{var $i=pi,{key:Yn,name:Gn}=$i,oi=Cn($i,["key","name"]),Li,di;return lt.createElement(_e.Z,{className:"mb20",key:Yn,align:"middle",wrap:!1},lt.createElement(Ke.Z,{flex:"0 0 auto",className:`${ht.Z.blankIndex}`},"\u586B\u7A7A\u9879",zi+1),lt.createElement(Ke.Z,{flex:1},lt.createElement(_e.Z,{align:"top",justify:"space-between",wrap:!1},lt.createElement(Ke.Z,null,lt.createElement(ze.default.Item,on(Bn({},oi),{name:[Gn,"answer_text"],noStyle:!0}),(Li=ti==null?void 0:ti[Gn])!=null&&Li.multi_line||(di=ti==null?void 0:ti[Gn])!=null&&di.multiLine?lt.createElement(gt,{spellCheck:!1,style:{marginLeft:10,width:550}}):lt.createElement(De.default,{style:{marginLeft:10,width:550},className:ht.Z.blankInput,size:"large",maxLength:1e3,onBlur:gr=>{}}))),Se&&lt.createElement(Ke.Z,{flex:"224px"},lt.createElement(ze.default.Item,on(Bn({},oi),{name:[Gn,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),lt.createElement(Be.Z,{size:"large",className:ht.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),lt.createElement("div",{onClick:()=>Je(!0)},lt.createElement(ze.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},lt.createElement(Ze.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Xe}))),lt.createElement(ze.default.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},lt.createElement(mt.default,{size:"large"},En.map(Wn=>lt.createElement(mt.default.Option,{key:Wn.title,value:Wn.key}," ",Wn.title)))),lt.createElement(ze.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},lt.createElement(ze.default.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],noStyle:!0},lt.createElement(Be.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),lt.createElement("span",{className:"ml10 font14"},"\u79D2")),lt.createElement(ze.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},lt.createElement(ct.ZP.Group,{style:{marginTop:-10}},lt.createElement(ct.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),lt.createElement(ct.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),lt.createElement(ct.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),lt.createElement(ze.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),lt.createElement("div",{style:{background:"#F6F7F9",padding:15}},lt.createElement(ze.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},lt.createElement(gt,{rows:4})),lt.createElement(ze.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},lt.createElement(gt,{rows:4}))),lt.createElement(Zt,{form:ke,answerKey:Pt,hackIdentifier:nt,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:lt.createElement("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}}))}},31674:function(Sn,an,ve){"use strict";ve.d(an,{u:function(){return be}});var ce=ve(59301),De=ve(95237),ze=ve(43604),Ct=ve(6848),_e=ve(78241),Ke=ve(31687),Be=ve(32134),mt=ve(12893),ct=ve(70941),Ze=ve(59301),Et=Object.defineProperty,ht=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,he=(Ie,je,qe)=>je in Ie?Et(Ie,je,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Ie[je]=qe,se=(Ie,je)=>{for(var qe in je||(je={}))te.call(je,qe)&&he(Ie,qe,je[qe]);if(Ae)for(var qe of Ae(je))ee.call(je,qe)&&he(Ie,qe,je[qe]);return Ie},de=(Ie,je)=>ht(Ie,dt(je)),me=(Ie,je)=>{var qe={};for(var $e in Ie)te.call(Ie,$e)&&je.indexOf($e)<0&&(qe[$e]=Ie[$e]);if(Ie!=null&&Ae)for(var $e of Ae(Ie))je.indexOf($e)<0&&ee.call(Ie,$e)&&(qe[$e]=Ie[$e]);return qe};const we=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Me=({value:Ie,onChange:je,choiceTextKey:qe,answerKey:$e,index:ft,isEdit:Re,setInputActive:Tt,form:et,choiceOptionsPath:bt,allowChangeMode:Bt,showAddIcon:Nt,addItem:Zt,deleteItem:Ut})=>{console.log(Ie,"value");const lt=(Ie==null?void 0:Ie[$e])===1,Ge=()=>{const un=et.getFieldValue(bt);et.setFieldValue(bt,un.map(ln=>de(se({},ln),{[$e]:0})))},kt=()=>{lt?je(de(se({},Ie),{[$e]:0})):(Bt||Ge(),je(de(se({},Ie),{[$e]:1})))};return Ze.createElement(De.Z,{className:Ke.Z.choiceWrap,align:"middle",wrap:!1},Ze.createElement(ze.Z,{onClick:kt,className:`${Ke.Z.choiceIndex} ${lt?Ke.Z.activeAnswer:""}`},we[ft]),Ze.createElement(ze.Z,{flex:1,className:`${Ke.Z.editorWrap} ml15`,onClick:Tt},Ze.createElement(ct.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:Re,value:Ie==null?void 0:Ie[qe],onChange:un=>{je(de(se({},Ie),{[qe]:un}))}})),Ze.createElement(ze.Z,{flex:"0 0 auto",className:"ml15"},Ze.createElement("div",{onClick:kt,className:`${Ke.Z.setAnswerBtn} ${lt?Ke.Z.activeAnswer:""}`},lt?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Ze.createElement(ze.Z,{className:Ke.Z.actionWrapper},Ze.createElement(Ct.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Ze.createElement(Be.Z,{className:Ke.Z.addIcon,onClick:Zt,style:{visibility:Nt?"visible":"hidden"}})),Ze.createElement(Ct.Z,{title:"\u5220\u9664"},Ze.createElement(mt.Z,{className:Ke.Z.deleteIcon,onClick:Ut,style:{visibility:ft>1?"visible":"hidden"}}))))},be=({questionTitlePlaceholder:Ie,titleKey:je,choiceKey:qe,analysisKey:$e,choiceTextKey:ft,answerKey:Re,choiceOptionsPath:Tt,allowChangeMode:et=!0,form:bt,showAnalysis:Bt=!0})=>{const[Nt,Zt]=(0,ce.useState)(),[Ut,lt]=(0,ce.useState)(!1);return Ze.createElement("div",{className:Ke.Z.wrap},Ze.createElement("div",{className:Ke.Z.questionTitleEditorWrap},Ze.createElement(_e.default.Item,{label:"\u9898\u5E72",name:je,labelCol:{span:24},rules:[{required:!0}]},Ze.createElement(ct.h,{scrollId:Array.isArray(je)?je.join("_"):`${je}`,watch:!0,height:140,placeholder:Ie}))),Ze.createElement(_e.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Ze.createElement(_e.default.List,{name:qe,rules:[{validator(Ge,kt){const un=kt.some(Ft=>Ft[Re]===1),ln=kt.findIndex(Ft=>{var $t;return(($t=Ft[ft])==null?void 0:$t.length)<=0});return ln!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${we[ln]}\u9009\u9879\u7684\u5185\u5BB9`)):un?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ge,{add:kt,remove:un})=>Ze.createElement("div",{id:Array.isArray(Tt)?Tt.join("_"):`${Tt}`},Ge.map((ln,Ft)=>{var $t=ln,{key:Qt,name:Bn}=$t,on=me($t,["key","name"]);const Cn=Nt===Qt,gt=()=>{Zt(Qt)},En=Ft<7&&Ft===Ge.length-1,Vn=()=>kt({[ft]:"",[Re]:0}),He=()=>un(Bn);return Ze.createElement(_e.default.Item,de(se({},on),{key:Qt,name:Bn,className:Ke.Z.choiceListWrap,rules:[{validator(Ce,Pe){return Pe!=null&&Pe.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${we[Ft]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),Ze.createElement(Me,{choiceTextKey:ft,answerKey:Re,index:Ft,isEdit:Cn,setInputActive:gt,form:bt,choiceOptionsPath:Tt,allowChangeMode:et,showAddIcon:En,addItem:Vn,deleteItem:He}))}),Ge.length<8&&Ze.createElement("div",{className:`${Ke.Z.addBtn} mb30`,onClick:()=>kt({[ft]:"",[Re]:0})},"\u6DFB\u52A0\u9009\u9879"))),Bt&&Ze.createElement("div",{onClick:()=>lt(!0)},Ze.createElement(_e.default.Item,{name:$e,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ze.createElement(ct.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ut}))))}},20386:function(Sn,an,ve){"use strict";ve.d(an,{u:function(){return et}});var ce=ve(59301),De=ve(43418),ze=ve(95237),Ct=ve(43604),_e=ve(92832),Ke=ve(6848),Be=ve(78673),mt=ve(78241),ct=ve(5112),Ze=ve(5871),Et=ve(70941),ht=ve(12893),dt=ve(61485),Ae=ve(31687),te=ve(72714),ee=ve(59301),he=Object.defineProperty,se=Object.defineProperties,de=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,be=(bt,Bt,Nt)=>Bt in bt?he(bt,Bt,{enumerable:!0,configurable:!0,writable:!0,value:Nt}):bt[Bt]=Nt,Ie=(bt,Bt)=>{for(var Nt in Bt||(Bt={}))we.call(Bt,Nt)&&be(bt,Nt,Bt[Nt]);if(me)for(var Nt of me(Bt))Me.call(Bt,Nt)&&be(bt,Nt,Bt[Nt]);return bt},je=(bt,Bt)=>se(bt,de(Bt)),qe=(bt,Bt)=>{var Nt={};for(var Zt in bt)we.call(bt,Zt)&&Bt.indexOf(Zt)<0&&(Nt[Zt]=bt[Zt]);if(bt!=null&&me)for(var Zt of me(bt))Bt.indexOf(Zt)<0&&Me.call(bt,Zt)&&(Nt[Zt]=bt[Zt]);return Nt};const $e=({value:bt,onChange:Bt})=>{const Nt=Ut=>{De.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Ae.Z.modal,onOk:()=>{const lt=[...bt];lt.splice(Ut,1),Bt(lt)}})},Zt=()=>{const Ut=[...bt];Ut.push(""),Bt(Ut)};return ee.createElement(ze.Z,{className:"ml20"},ee.createElement(Ct.Z,{flex:1},bt==null?void 0:bt.map((Ut,lt)=>ee.createElement(ze.Z,{key:`${Ut}_${lt}`,className:"mb20"},ee.createElement(_e.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Ut,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ge=>{const kt=[...bt],un=Ge.target.value.trim();kt[lt]=un,Bt(kt)}}),ee.createElement(Ke.Z,{title:"\u5220\u9664"},ee.createElement(ht.Z,{className:Ae.Z.deleteIcon,style:{marginLeft:15,visibility:lt>0?"visible":"hidden"},onClick:()=>Nt(lt)}))))),ee.createElement(Ct.Z,null,ee.createElement("div",{className:`${Ae.Z.addBtn}`,onClick:()=>{Zt()}},"\u65B0\u589E\u7B54\u6848")))},ft=({value:bt,onChange:Bt})=>{const Nt=Ut=>{De.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Ae.Z.modal,onOk:()=>{const lt=[...bt];lt.splice(Ut,1),Bt(lt)}})},Zt=()=>{const Ut=[...bt];Ut.push(""),Bt(Ut)};return ee.createElement(ze.Z,{className:"ml20"},ee.createElement(Ct.Z,{flex:1},bt==null?void 0:bt.map((Ut,lt)=>ee.createElement(ze.Z,{key:`${Ut}_${lt}`,align:"middle",className:"mb20"},ee.createElement(te.Z,{value:Ut,style:{flex:1},onChange:Ge=>{const kt=[...bt];kt[lt]=Ge,Bt(kt)}}),ee.createElement(Ke.Z,{title:"\u5220\u9664"},ee.createElement(ht.Z,{className:Ae.Z.deleteIcon,style:{marginLeft:15,visibility:lt>0?"visible":"hidden"},onClick:()=>Nt(lt)}))))),ee.createElement(Ct.Z,null,ee.createElement("div",{className:`${Ae.Z.addBtn}`,onClick:()=>{Zt()}},"\u65B0\u589E\u7B54\u6848")))},Re=({value:bt=!0,onChange:Bt})=>ee.createElement(Be.Z,{checked:!bt,onChange:Nt=>{Bt(!Nt)}}),Tt="\u2581",et=({questionTitlePlaceholder:bt,form:Bt,scoreByBlank:Nt=!1,answerKey:Zt})=>{const[Ut,lt]=(0,ce.useState)(!1),Ge=(on,Cn)=>{const gt=Cn.line;let En=0;for(let He=0;He<gt;He++)En+=on.getLine(He).split(Tt).length-1;const Vn=on.getLine(gt).substring(0,Cn.ch);return En+=Vn.split(Tt).length-1,En},kt=(on,Cn,gt,En)=>{const Vn=on.getRange(Cn.from,Cn.to);let He=0;if(Cn.text.forEach(Ce=>{He+=Ce.split(Tt).length-1}),Cn.origin!=="setValue"){if(Vn&&Vn.indexOf(Tt)!==-1){const Ce=Vn.split(Tt).length-1,Pe=Ge(on,Cn.from);if(console.log(`\u5220\u9664${Ce}\u4E2A\uFF0C \u524D\u9762\u6709${Pe}\u4E2A\uFF0C\u65B0\u589E${He}\u4E2A`),Ce>1){const Ne=Array.from({length:Ce},(ke,Se)=>Pe+Se);En(Ne)}else En(Pe)}else if(He>0){const Ce=Ge(on,Cn.from);console.log(`\u65B0\u589E${He}\u4E2A\uFF0C\u4E4B\u524D\u6709${Ce}\u4E2A`),gt(He,Ce)}}},un=()=>{const on=Bt.getFieldValue(Zt);Bt.setFieldsValue({[Zt]:on.map((Cn,gt)=>je(Ie({},Cn),{position:gt+1}))})},ln=(0,ce.useRef)(),Ft=(on,Cn)=>{for(let gt=0;gt<on;gt++)ln.current({position:null,answer_text:[""],model:1},Cn+gt);un()},$t=(0,ce.useRef)(),Qt=on=>{$t.current(on),un()},Bn=mt.default.useWatch(Zt,Bt);return ee.createElement("div",{className:Ae.Z.wrap},ee.createElement("div",{className:Ae.Z.questionTitleEditorWrap},ee.createElement(mt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(Et.h,{scrollId:"name",watch:!0,height:140,placeholder:bt,showNullButton:!0,onCMBeforeChange:(on,Cn)=>{kt(on,Cn,Ft,Qt)}}))),ee.createElement(mt.default.List,{name:Zt,rules:[{validator(on,Cn){if(!(Cn!=null&&Cn.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const gt of Cn){const{answer_text:En}=gt||{};if(En!=null&&En.some(Vn=>(Vn==null?void 0:Vn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(on,{add:Cn,remove:gt},{errors:En})=>(ln.current=Cn,$t.current=gt,ee.createElement(ee.Fragment,null,ee.createElement(mt.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(on!=null&&on.length)&&ee.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),on.map((Vn,He)=>{var Ce=Vn,{key:Pe,name:Ne}=Ce,ke=qe(Ce,["key","name"]),Se,nt;return ee.createElement("div",{style:{marginBottom:10},key:Pe},ee.createElement(ze.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(Ct.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Ae.Z.blankIndex}`},"\u586B\u7A7A\u9879",He+1),ee.createElement(mt.default.Item,je(Ie({},ke),{name:[Ne,"model"],noStyle:!0}),ee.createElement(ct.ZP.Group,{onChange:()=>{const Pt=Bt.getFieldValue(Zt);Bt.setFieldsValue({[Zt]:Pt.map((Xe,Je)=>je(Ie({},Xe),{answer_text:Ne===Je?[""]:Xe.answer_text}))})}},ee.createElement(ct.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(Ke.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(dt.Z,null))),ee.createElement(ct.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(Ke.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(dt.Z,null)))))),ee.createElement(ze.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(Ct.Z,{flex:1},ee.createElement(ze.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(Ct.Z,{flex:1},ee.createElement(mt.default.Item,je(Ie({},ke),{name:[Ne,"answer_text"],noStyle:!0}),((nt=(Se=Bt.getFieldValue(Zt))==null?void 0:Se[Ne])==null?void 0:nt.model)===1?ee.createElement($e,null):ee.createElement(ft,null))),Nt&&ee.createElement(Ct.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(mt.default.Item,je(Ie({},ke),{name:[Ne,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ae.Z.blankInputNumberWrapper}),ee.createElement(Ze.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(mt.default.Item,je(Ie({},ke),{name:[Ne,"position"],noStyle:!0}),ee.createElement(_e.default,{type:"hidden"})))))})))),ee.createElement(ze.Z,{align:"middle"},ee.createElement(mt.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Be.Z,null)),ee.createElement(Ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ee.createElement(ze.Z,{align:"middle"},ee.createElement(mt.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Be.Z,null)),ee.createElement(Ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Bn==null?void 0:Bn.length)>1&&ee.createElement(ze.Z,{align:"middle",className:(Bn==null?void 0:Bn.length)>1?"mb30":`${Ae.Z.hide}`},ee.createElement(mt.default.Item,{name:"is_ordered"},ee.createElement(Re,null)),ee.createElement(Ct.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),ee.createElement("div",{onClick:()=>lt(!0)},ee.createElement(mt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(Et.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ut}))))}},69269:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return me}});var ce=ve(59301),De=ve(95237),ze=ve(43604),Ct=ve(78241),_e=ve(31687),Ke=ve(70941),Be=ve(59301),mt=Object.defineProperty,ct=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Ae=(we,Me,be)=>Me in we?mt(we,Me,{enumerable:!0,configurable:!0,writable:!0,value:be}):we[Me]=be,te=(we,Me)=>{for(var be in Me||(Me={}))ht.call(Me,be)&&Ae(we,be,Me[be]);if(Et)for(var be of Et(Me))dt.call(Me,be)&&Ae(we,be,Me[be]);return we},ee=(we,Me)=>ct(we,Ze(Me)),he=(we,Me)=>{var be={};for(var Ie in we)ht.call(we,Ie)&&Me.indexOf(Ie)<0&&(be[Ie]=we[Ie]);if(we!=null&&Et)for(var Ie of Et(we))Me.indexOf(Ie)<0&&dt.call(we,Ie)&&(be[Ie]=we[Ie]);return be};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},de=({value:we,onChange:Me,form:be})=>{const Ie=(we==null?void 0:we.is_answer)===1,je=we==null?void 0:we.choice_text,qe=()=>{const $e=be.getFieldsValue().choices.map(ft=>({choice_text:ft.choice_text,is_answer:0}));be.setFieldsValue({choices:$e}),Me(ee(te({},we),{is_answer:1}))};return Be.createElement(De.Z,{className:_e.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Be.createElement(ze.Z,{onClick:qe,className:`${_e.Z.choiceIndex} ${_e.Z.judgementIndex} ${Ie?_e.Z.activeAnswer:""}`},se[je]),Be.createElement(ze.Z,{flex:1,className:`${_e.Z.editorWrap} ml15`},Be.createElement("div",{className:`${_e.Z.inputBorder} ${_e.Z.placeholder} ${Ie?_e.Z.activeJudgementAnswer:""}`},je)),Be.createElement(ze.Z,{flex:"0 0 auto",className:"ml15"},Be.createElement("div",{onClick:qe,className:`${_e.Z.setAnswerBtn} ${Ie?_e.Z.activeAnswer:""}`},Ie?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},me=({questionTitlePlaceholder:we,choiceKey:Me,form:be})=>{const[Ie,je]=(0,ce.useState)(!1);return Be.createElement("div",{className:_e.Z.wrap},Be.createElement("div",{className:_e.Z.questionTitleEditorWrap},Be.createElement(Ct.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Be.createElement(Ke.h,{scrollId:"name",watch:!0,height:140,placeholder:we}))),Be.createElement(Ct.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Be.createElement(Ct.default.List,{name:"choices",rules:[{validator(qe,$e){return $e.some(Re=>(Re==null?void 0:Re.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},qe=>Be.createElement("div",{id:"choices"},qe.map($e=>{var ft=$e,{key:Re,name:Tt}=ft,et=he(ft,["key","name"]);return Be.createElement(Ct.default.Item,ee(te({},et),{key:Re,name:Tt,noStyle:!0}),Be.createElement(de,{form:be}))})))),Be.createElement("div",{onClick:()=>je(!0)},Be.createElement(Ct.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Be.createElement(Ke.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ie}))))}},70941:function(Sn,an,ve){"use strict";ve.d(an,{h:function(){return te},x:function(){return ee}});var ce=ve(64726),De=ve(31687),ze=ve(99325),Ct=ve(59301),_e=Object.defineProperty,Ke=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Et=(he,se,de)=>se in he?_e(he,se,{enumerable:!0,configurable:!0,writable:!0,value:de}):he[se]=de,ht=(he,se)=>{for(var de in se||(se={}))ct.call(se,de)&&Et(he,de,se[de]);if(mt)for(var de of mt(se))Ze.call(se,de)&&Et(he,de,se[de]);return he},dt=(he,se)=>Ke(he,Be(se)),Ae=(he,se)=>{var de={};for(var me in he)ct.call(he,me)&&se.indexOf(me)<0&&(de[me]=he[me]);if(he!=null&&mt)for(var me of mt(he))se.indexOf(me)<0&&Ze.call(he,me)&&(de[me]=he[me]);return de};const te=he=>{var se=he,{value:de,onChange:me,scrollId:we}=se,Me=Ae(se,["value","onChange","scrollId"]);return Ct.createElement("div",{id:we||""},Ct.createElement(ce.Z,dt(ht({},Me),{defaultValue:de,onChange:(be,Ie)=>{Ie!=null&&Ie.length?me(be,Ie):me(be)}})))},ee=({value:he,onChange:se,placeholder:de,height:me=140,isEdit:we,miniToolbar:Me,watch:be=!0})=>we?Ct.createElement(ce.Z,{watch:be,isFocus:!0,height:me||void 0,placeholder:de,defaultValue:he,onChange:se,miniToolbar:Me}):Ct.createElement("div",{style:{cursor:"pointer"}},he?Ct.createElement(ze.Z,{className:De.Z.inputBorder,value:he}):Ct.createElement("div",{className:`${De.Z.inputBorder} ${De.Z.placeholder} inputBorderError`},de))},9489:function(Sn,an,ve){"use strict";ve.d(an,{W:function(){return ft}});var ce=ve(59301),De=ve(8591),ze=ve(12563),Ct=ve(78241),_e=ve(78673),Ke=ve(95237),Be=ve(43604),mt=ve(6848),ct=ve(92832),Ze=ve(5871),Et=ve(31687),ht=ve(70941),dt=ve(64726),Ae=ve(61485),te=Object.defineProperty,ee=Object.defineProperties,he=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,we=(Re,Tt,et)=>Tt in Re?te(Re,Tt,{enumerable:!0,configurable:!0,writable:!0,value:et}):Re[Tt]=et,Me=(Re,Tt)=>{for(var et in Tt||(Tt={}))de.call(Tt,et)&&we(Re,et,Tt[et]);if(se)for(var et of se(Tt))me.call(Tt,et)&&we(Re,et,Tt[et]);return Re},be=(Re,Tt)=>ee(Re,he(Tt)),Ie=(Re,Tt)=>{var et={};for(var bt in Re)de.call(Re,bt)&&Tt.indexOf(bt)<0&&(et[bt]=Re[bt]);if(Re!=null&&se)for(var bt of se(Re))Tt.indexOf(bt)<0&&me.call(Re,bt)&&(et[bt]=Re[bt]);return et};const je=Re=>{var Tt=Re,{value:et,onChange:bt}=Tt,Bt=Ie(Tt,["value","onChange"]);const Nt=Zt=>{bt([Zt])};return ce.createElement(dt.Z,be(Me({},Bt),{defaultValue:et==null?void 0:et[0],onChange:Nt}))},qe=Re=>{if(!Re)return!1;if(/^s*$/.test(Re)||Re.trim()===""){De.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Tt=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return Re==="|"?(De.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},$e=({value:Re=[],onClose:Tt})=>ce.createElement(ze.default,{closable:!0,onClose:Tt,className:Et.Z.keywordTag},ce.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Re.join(" \u6216 "))),ft=({questionTitlePlaceholder:Re,form:Tt,showKeywords:et,isMustKeyWords:bt=et})=>{const[Bt,Nt]=(0,ce.useState)(!1),[Zt,Ut]=(0,ce.useState)(""),lt=Ct.default.useWatch("use_keywords",Tt),Ge=Ct.default.useWatch("question_score",Tt);return ce.createElement("div",{className:Et.Z.wrap},ce.createElement("div",{className:Et.Z.questionTitleEditorWrap},ce.createElement(Ct.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ce.createElement(ht.h,{scrollId:"name",watch:!0,height:140,placeholder:Re}))),ce.createElement(Ct.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},ce.createElement(je,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),et&&!bt&&ce.createElement(Ct.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},ce.createElement(_e.Z,{defaultChecked:!0})),et&&bt&&ce.createElement(Ke.Z,{align:"middle",className:"mb30"},ce.createElement(Ct.default.Item,{name:"use_keywords",valuePropName:"checked"},ce.createElement(_e.Z,null)),ce.createElement(Be.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ce.createElement(Be.Z,null,ce.createElement(mt.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},ce.createElement(Ae.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(lt||!bt)&&ce.createElement(Ct.default.List,{name:"keywords",rules:[{validator(kt,un){return bt?un!=null&&un.length?(un==null?void 0:un.reduce((Ft,$t)=>Ft+$t.score,0))>parseFloat(Ge)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(kt,{add:un,remove:ln})=>ce.createElement(ce.Fragment,null,ce.createElement("div",{className:`${Et.Z.title} mb10`},bt?"\u5173\u952E\u8BCD":ce.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ce.createElement(Ke.Z,{align:"middle",className:"font14 mb30"},ce.createElement(Be.Z,{flex:1},ce.createElement(ct.default,{value:Zt,onChange:Ft=>{Ut(Ft.target.value)},maxLength:50,allowClear:!0,onPressEnter:Ft=>{var $t,Qt,Bn,on;const Cn=`${($t=Ft.target)==null?void 0:$t.value}`,gt=(Bn=(Qt=Cn==null?void 0:Cn.split("|"))==null?void 0:Qt.filter(He=>!!He))==null?void 0:Bn.map(He=>He==null?void 0:He.trim()),En=Tt.getFieldValue("keywords"),Vn=((on=En==null?void 0:En.map(He=>He==null?void 0:He.keyword))==null?void 0:on.flat())||[];for(const He of gt)if(Vn.includes(He)){De.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}qe(Cn)&&(un({keyword:gt,score:1}),Ut(""))},className:Et.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),ce.createElement(Be.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),kt.map(Ft=>{var $t=Ft,{key:Qt,name:Bn}=$t,on=Ie($t,["key","name"]);return ce.createElement(Ke.Z,{key:Qt,className:"mb20",style:{marginRight:148}},ce.createElement(Be.Z,{flex:1},ce.createElement(Ke.Z,{align:"middle",justify:"space-between"},ce.createElement(Ct.default.Item,be(Me({},on),{name:[Bn,"keyword"]}),ce.createElement($e,{onClose:()=>ln(Bn)})),bt&&ce.createElement(Ct.default.Item,be(Me({},on),{name:[Bn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Et.Z.blankInputNumberWrapper}),ce.createElement(Ze.Z,{className:Et.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ce.createElement("div",{onClick:()=>Nt(!0)},ce.createElement(Ct.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ce.createElement(ht.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Bt}))))}},37542:function(Sn,an,ve){"use strict";ve.d(an,{tc:function(){return $i.t},uh:function(){return ce.u},rL:function(){return zi},u8:function(){return ze.u},ZZ:function(){return De.Z},Wk:function(){return Ct.W}});var ce=ve(31674),De=ve(69269),ze=ve(20386),Ct=ve(9489),_e=ve(59301),Ke=ve(36381),Be=ve(78241),mt=ve(95237),ct=ve(43604),Ze=ve(5871),Et=ve(6848),ht=ve(38854),dt=ve(31687),Ae=ve(12893),te=ve(70941),ee=ve(43418),he=ve(92832),se=ve(78673),de=ve(59301),me=Object.defineProperty,we=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,qe=(Yn,Gn,oi)=>Gn in Yn?me(Yn,Gn,{enumerable:!0,configurable:!0,writable:!0,value:oi}):Yn[Gn]=oi,$e=(Yn,Gn)=>{for(var oi in Gn||(Gn={}))Ie.call(Gn,oi)&&qe(Yn,oi,Gn[oi]);if(be)for(var oi of be(Gn))je.call(Gn,oi)&&qe(Yn,oi,Gn[oi]);return Yn},ft=(Yn,Gn)=>we(Yn,Me(Gn)),Re=(Yn,Gn)=>{var oi={};for(var Li in Yn)Ie.call(Yn,Li)&&Gn.indexOf(Li)<0&&(oi[Li]=Yn[Li]);if(Yn!=null&&be)for(var Li of be(Yn))Gn.indexOf(Li)<0&&je.call(Yn,Li)&&(oi[Li]=Yn[Li]);return oi};const Tt=({value:Yn,onChange:Gn})=>{const oi=di=>{ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:dt.Z.modal,onOk:()=>{const gr=[...Yn];gr.splice(di,1),Gn(gr)}})},Li=()=>{const di=[...Yn];di.push(""),Gn(di)};return de.createElement(mt.Z,{className:"ml20"},de.createElement(ct.Z,{flex:1},Yn==null?void 0:Yn.map((di,gr)=>de.createElement(mt.Z,{key:`${di}_${gr}`,align:"middle",className:"mb20"},de.createElement(he.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:di,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ii=>{const Le=[...Yn],si=Ii.target.value.trim();Le[gr]=si,Gn(Le)}}),de.createElement(Et.Z,{title:"\u5220\u9664"},de.createElement(Ae.Z,{className:dt.Z.deleteIcon,style:{marginLeft:15,visibility:gr>0?"visible":"hidden"},onClick:()=>oi(gr)}))))),de.createElement(ct.Z,null,de.createElement("div",{className:`${dt.Z.addBtn}`,onClick:()=>{Li()}},"\u65B0\u589E\u7B54\u6848")))},et=({value:Yn=!0,onChange:Gn})=>de.createElement(se.Z,{checked:!Yn,onChange:oi=>{Gn(!oi)}}),bt="\u2581",Bt=({questionTitlePlaceholder:Yn,form:Gn,name:oi,scoreByBlank:Li=!1,answerKey:di,titleKey:gr="name",analysisKey:Ii="analysis",isOrdered:Le="is_ordered"})=>{var si,ji;const[gn,qn]=(0,_e.useState)(!1),mi=(tn,vt)=>{const rt=vt.line;let Vt=0;for(let Pn=0;Pn<rt;Pn++)Vt+=tn.getLine(Pn).split(bt).length-1;const rn=tn.getLine(rt).substring(0,vt.ch);return Vt+=rn.split(bt).length-1,Vt},Fi=(tn,vt,rt,Vt)=>{const rn=tn.getRange(vt.from,vt.to);let Pn=0;if(vt.text.forEach(kn=>{Pn+=kn.split(bt).length-1}),vt.origin!=="setValue"){if(rn&&rn.indexOf(bt)!==-1){const kn=rn.split(bt).length-1,St=mi(tn,vt.from);if(console.log(`\u5220\u9664${kn}\u4E2A\uFF0C \u524D\u9762\u6709${St}\u4E2A\uFF0C\u65B0\u589E${Pn}\u4E2A`),kn>1){const hn=Array.from({length:kn},(In,ii)=>St+ii);Vt(hn)}else Vt(St)}else if(Pn>0){const kn=mi(tn,vt.from);console.log(`\u65B0\u589E${Pn}\u4E2A\uFF0C\u4E4B\u524D\u6709${kn}\u4E2A`),rt(Pn,kn)}}},jn=()=>{const tn=Gn.getFieldValue(["sub_item_banks",...di]);Gn.setFieldValue(["sub_item_banks",...di],tn==null?void 0:tn.map((vt,rt)=>ft($e({},vt),{position:rt+1})))},Tn=(0,_e.useRef)(),At=(tn,vt)=>{for(let rt=0;rt<tn;rt++)Tn.current({position:null,answer_text:[""]},vt+rt);jn()},Dt=(0,_e.useRef)(),Ve=tn=>{Dt.current(tn),jn()},Yt=(ji=(si=Gn.getFieldValue("sub_item_banks"))==null?void 0:si[di==null?void 0:di[0]])==null?void 0:ji[di==null?void 0:di[1]];return(0,_e.useEffect)(()=>{console.log("========",Gn.getFieldsValue())},[Gn]),de.createElement("div",{className:dt.Z.wrap},de.createElement("div",{className:dt.Z.questionTitleEditorWrap},de.createElement(Be.default.Item,{label:"\u9898\u5E72",name:gr,labelCol:{span:24},rules:[{required:!0}]},de.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Yn,showNullButton:!0,onCMBeforeChange:(tn,vt)=>{Fi(tn,vt,At,Ve)}}))),de.createElement(Be.default.List,{name:di,rules:[{validator(tn,vt){if((vt==null?void 0:vt.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const rt of vt){const{answer_text:Vt}=rt||{};if(Vt!=null&&Vt.some(rn=>(rn==null?void 0:rn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(tn,{add:vt,remove:rt},{errors:Vt})=>(Tn.current=vt,Dt.current=rt,de.createElement(de.Fragment,null,de.createElement(Be.default.Item,{label:de.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(tn!=null&&tn.length)&&de.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),tn.map((rn,Pn)=>{var kn=rn,{key:St,name:hn}=kn,In=Re(kn,["key","name"]);return de.createElement(mt.Z,{align:"top",key:St},de.createElement(ct.Z,{className:`${dt.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",Pn+1),de.createElement(ct.Z,{flex:1},de.createElement(mt.Z,{align:"top",justify:"space-between"},de.createElement(ct.Z,{flex:1},de.createElement(Be.default.Item,ft($e({},In),{name:[hn,"answer_text"],noStyle:!0}),de.createElement(Tt,null))),Li&&de.createElement(ct.Z,{flex:"224px"},de.createElement(Be.default.Item,ft($e({},In),{name:[hn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:dt.Z.blankInputNumberWrapper}),de.createElement(Ze.Z,{className:dt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),de.createElement(Be.default.Item,ft($e({},In),{name:[hn,"position"],noStyle:!0}),de.createElement(he.default,{type:"hidden"}))))})))),de.createElement(mt.Z,{align:"middle"},de.createElement(Be.default.Item,{name:[oi,"downcase"],valuePropName:"checked"},de.createElement(se.Z,null)),de.createElement(ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),de.createElement(mt.Z,{align:"middle"},de.createElement(Be.default.Item,{name:[oi,"no_space"],valuePropName:"checked"},de.createElement(se.Z,null)),de.createElement(ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Yt==null?void 0:Yt.length)>1&&de.createElement(mt.Z,{align:"middle",className:(Yt==null?void 0:Yt.length)>1?"mb30":`${dt.Z.hide}`},de.createElement(Be.default.Item,{name:Le},de.createElement(et,null)),de.createElement(ct.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),de.createElement("div",{className:"mt30",onClick:()=>qn(!0)},de.createElement(Be.default.Item,{name:Ii,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},de.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:gn}))))};var Nt=ve(59301),Zt=Object.defineProperty,Ut=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,ln=(Yn,Gn,oi)=>Gn in Yn?Zt(Yn,Gn,{enumerable:!0,configurable:!0,writable:!0,value:oi}):Yn[Gn]=oi,Ft=(Yn,Gn)=>{for(var oi in Gn||(Gn={}))kt.call(Gn,oi)&&ln(Yn,oi,Gn[oi]);if(Ge)for(var oi of Ge(Gn))un.call(Gn,oi)&&ln(Yn,oi,Gn[oi]);return Yn},$t=(Yn,Gn)=>Ut(Yn,lt(Gn)),Qt=(Yn,Gn)=>{var oi={};for(var Li in Yn)kt.call(Yn,Li)&&Gn.indexOf(Li)<0&&(oi[Li]=Yn[Li]);if(Yn!=null&&Ge)for(var Li of Ge(Yn))Gn.indexOf(Li)<0&&un.call(Yn,Li)&&(oi[Li]=Yn[Li]);return oi};const Bn={\u6B63\u786E:"T",\u9519\u8BEF:"F"},on=({value:Yn,onChange:Gn,form:oi,choiceKey:Li})=>{const di=(Yn==null?void 0:Yn.is_answer)===1,gr=Yn==null?void 0:Yn.choice_text,Ii=()=>{var Le;const si=(Le=oi==null?void 0:oi.getFieldValue(["sub_item_banks",...Li]))==null?void 0:Le.map(ji=>({choice_text:ji.choice_text,is_answer:0}));oi==null||oi.setFieldValue(["sub_item_banks",...Li],si),Gn($t(Ft({},Yn),{is_answer:1}))};return Nt.createElement(mt.Z,{className:dt.Z.choiceWrap,align:"middle",wrap:!1},Nt.createElement(ct.Z,{onClick:Ii,className:`${dt.Z.choiceIndex} ${dt.Z.judgementIndex} ${di?dt.Z.activeAnswer:""}`},Bn[gr]),Nt.createElement(ct.Z,{flex:1,className:`${dt.Z.editorWrap} ml15`},Nt.createElement("div",{className:`${dt.Z.inputBorder} ${dt.Z.placeholder} ${di?dt.Z.activeJudgementAnswer:""}`},gr)),Nt.createElement(ct.Z,{flex:"0 0 auto",className:"ml15"},Nt.createElement("div",{onClick:Ii,className:`${dt.Z.setAnswerBtn} ${di?dt.Z.activeAnswer:""}`},di?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},Cn=({questionTitlePlaceholder:Yn,choiceKey:Gn="choices",form:oi,titleKey:Li="name",analysisKey:di="analysis"})=>{const[gr,Ii]=(0,_e.useState)(!1);return Nt.createElement("div",{className:dt.Z.wrap},Nt.createElement("div",{className:dt.Z.questionTitleEditorWrap},Nt.createElement(Be.default.Item,{label:"\u9898\u5E72",name:Li,labelCol:{span:24},rules:[{required:!0}]},Nt.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Yn}))),Nt.createElement(Be.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Nt.createElement(Be.default.List,{name:Gn,rules:[{validator(Le,si){return si.some(gn=>(gn==null?void 0:gn.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Le=>Nt.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},Le.map(si=>{var ji=si,{key:gn,name:qn}=ji,mi=Qt(ji,["key","name"]);return Nt.createElement(Be.default.Item,$t(Ft({},mi),{key:gn,name:qn,noStyle:!0}),Nt.createElement(on,{form:oi,choiceKey:Gn}))})))),Nt.createElement("div",{className:"mt30",onClick:()=>Ii(!0)},Nt.createElement(Be.default.Item,{name:di,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Nt.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:gr}))))};var gt=ve(8591),En=ve(12563),Vn=ve(64726),He=ve(61485),Ce=Object.defineProperty,Pe=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,Pt=(Yn,Gn,oi)=>Gn in Yn?Ce(Yn,Gn,{enumerable:!0,configurable:!0,writable:!0,value:oi}):Yn[Gn]=oi,Xe=(Yn,Gn)=>{for(var oi in Gn||(Gn={}))Se.call(Gn,oi)&&Pt(Yn,oi,Gn[oi]);if(ke)for(var oi of ke(Gn))nt.call(Gn,oi)&&Pt(Yn,oi,Gn[oi]);return Yn},Je=(Yn,Gn)=>Pe(Yn,Ne(Gn)),yt=(Yn,Gn)=>{var oi={};for(var Li in Yn)Se.call(Yn,Li)&&Gn.indexOf(Li)<0&&(oi[Li]=Yn[Li]);if(Yn!=null&&ke)for(var Li of ke(Yn))Gn.indexOf(Li)<0&&nt.call(Yn,Li)&&(oi[Li]=Yn[Li]);return oi};const wt=Yn=>{var Gn=Yn,{value:oi,onChange:Li}=Gn,di=yt(Gn,["value","onChange"]);const gr=Ii=>{Li([Ii])};return _e.createElement(Vn.Z,Je(Xe({},di),{defaultValue:oi==null?void 0:oi[0],onChange:gr}))},ot=Yn=>{if(!Yn)return!1;let Gn=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return Yn==="|"?(gt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},It=({value:Yn=[],onClose:Gn})=>_e.createElement(En.default,{closable:!0,onClose:Gn,className:dt.Z.keywordTag},_e.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Yn.join(" \u6216 "))),sn=({questionTitlePlaceholder:Yn,form:Gn,showKeywords:oi,isMustKeyWords:Li=oi,titleKey:di="name",analysisKey:gr="analysis",answerTexts:Ii="answer_texts",keywords:Le="keywords",useKeywords:si="use_keywords",indexs:ji})=>{const[gn,qn]=(0,_e.useState)(!1),[mi,Fi]=(0,_e.useState)(""),[jn,Tn]=(0,_e.useState)(!1),At=Be.default.useWatch("question_score",Gn);return _e.createElement("div",{className:dt.Z.wrap},_e.createElement("div",{className:dt.Z.questionTitleEditorWrap},_e.createElement(Be.default.Item,{label:"\u9898\u5E72",name:di,labelCol:{span:24},rules:[{required:!0}]},_e.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Yn}))),_e.createElement(Be.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:Ii,labelCol:{span:24}},_e.createElement(wt,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),oi&&!Li&&_e.createElement(Be.default.Item,{hidden:!0,name:si,valuePropName:"checked"},_e.createElement(se.Z,{defaultChecked:!0})),oi&&Li&&_e.createElement(mt.Z,{align:"middle",className:"mb30"},_e.createElement(Be.default.Item,{name:si,valuePropName:"checked"},_e.createElement(se.Z,{onChange:()=>{var Dt,Ve,Yt,tn,vt,rt;console.log(Gn.getFieldsValue()),Tn((Yt=(Ve=(Dt=Gn.getFieldsValue())==null?void 0:Dt.sub_item_banks)==null?void 0:Ve[ji])==null?void 0:Yt.use_keywords),console.log((rt=(vt=(tn=Gn.getFieldsValue())==null?void 0:tn.sub_item_banks)==null?void 0:vt[ji])==null?void 0:rt.use_keywords),console.log(jn)}})),_e.createElement(ct.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),_e.createElement(ct.Z,null,_e.createElement(Et.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},_e.createElement(He.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(jn||!Li)&&_e.createElement(Be.default.List,{name:Le,rules:[{validator(Dt,Ve){return Li?Ve!=null&&Ve.length?(Ve==null?void 0:Ve.reduce((tn,vt)=>tn+vt.score,0))>parseFloat(At)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Dt,{add:Ve,remove:Yt})=>_e.createElement(_e.Fragment,null,_e.createElement("div",{className:`${dt.Z.title} mb10`},Li?"\u5173\u952E\u8BCD":_e.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),_e.createElement(mt.Z,{align:"middle",className:"font14 mb30"},_e.createElement(ct.Z,{flex:1},_e.createElement(he.default,{value:mi,onChange:tn=>{Fi(tn.target.value)},maxLength:50,allowClear:!0,onPressEnter:tn=>{var vt,rt,Vt,rn;const Pn=`${(vt=tn.target)==null?void 0:vt.value}`,kn=(Vt=(rt=Pn==null?void 0:Pn.split("|"))==null?void 0:rt.filter(In=>!!In))==null?void 0:Vt.map(In=>In==null?void 0:In.trim()),St=Gn.getFieldValue(["sub_item_banks",...Le]),hn=((rn=St==null?void 0:St.map(In=>In==null?void 0:In.keyword))==null?void 0:rn.flat())||[];for(const In of kn)if(hn.includes(In)){gt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}ot(Pn)&&(Ve({keyword:kn,score:1}),Fi(""))},className:dt.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),_e.createElement(ct.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Dt.map(tn=>{var vt=tn,{key:rt,name:Vt}=vt,rn=yt(vt,["key","name"]);return _e.createElement(mt.Z,{key:rt,className:"mb20",style:{marginRight:148}},_e.createElement(ct.Z,{flex:1},_e.createElement(mt.Z,{align:"middle",justify:"space-between"},_e.createElement(Be.default.Item,Je(Xe({},rn),{name:[Vt,"keyword"]}),_e.createElement(It,{onClose:()=>Yt(Vt)})),Li&&_e.createElement(Be.default.Item,Je(Xe({},rn),{name:[Vt,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:dt.Z.blankInputNumberWrapper}),_e.createElement(Ze.Z,{className:dt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),_e.createElement("div",{onClick:()=>qn(!0)},_e.createElement(Be.default.Item,{name:gr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},_e.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:gn}))))};var Xt=ve(59301),Ht=Object.defineProperty,xn=Object.defineProperties,Dn=Object.getOwnPropertyDescriptors,cn=Object.getOwnPropertySymbols,Un=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable,Wn=(Yn,Gn,oi)=>Gn in Yn?Ht(Yn,Gn,{enumerable:!0,configurable:!0,writable:!0,value:oi}):Yn[Gn]=oi,Zn=(Yn,Gn)=>{for(var oi in Gn||(Gn={}))Un.call(Gn,oi)&&Wn(Yn,oi,Gn[oi]);if(cn)for(var oi of cn(Gn))ti.call(Gn,oi)&&Wn(Yn,oi,Gn[oi]);return Yn},Jn=(Yn,Gn)=>xn(Yn,Dn(Gn)),vi=(Yn,Gn)=>{var oi={};for(var Li in Yn)Un.call(Yn,Li)&&Gn.indexOf(Li)<0&&(oi[Li]=Yn[Li]);if(Yn!=null&&cn)for(var Li of cn(Yn))Gn.indexOf(Li)<0&&ti.call(Yn,Li)&&(oi[Li]=Yn[Li]);return oi};const{Panel:pi}=Ke.default,zi=({questionTitlePlaceholder:Yn,choiceKey:Gn,form:oi,withScore:Li})=>{const[di,gr]=(0,_e.useState)([]),Ii=Le=>{gr(Le)};return Xt.createElement("div",{className:dt.Z.wrap},Xt.createElement("div",{className:dt.Z.questionTitleEditorWrap},Xt.createElement(Be.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Xt.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:Yn}))),Xt.createElement(Be.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),Xt.createElement(Be.default.List,{name:"sub_item_banks",rules:[{validator(Le,si){return si?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Le,{add:si,remove:ji,move:gn})=>{const qn=oi.getFieldValue("sub_item_banks");return Xt.createElement(Xt.Fragment,null,Xt.createElement(Ke.default,{className:Le.length>0?dt.Z.collapseWrapper:"",bordered:!1,activeKey:di,onChange:Ii,expandIcon:({isActive:mi})=>Xt.createElement("i",{className:`iconfont icon-weizhankai ${mi?dt.Z.open:dt.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},Le.map((mi,Fi)=>{var jn=mi,{key:Tn,name:At}=jn,Dt=vi(jn,["key","name"]),Ve,Yt,tn,vt,rt,Vt,rn,Pn,kn,St;return Xt.createElement(pi,{className:dt.Z.panel,forceRender:!0,header:Xt.createElement("div",{className:dt.Z.panelHeader},"\u7B2C",Fi+1,"\u5C0F\u9898",Xt.createElement("span",null,"\uFF08",((Ve=qn==null?void 0:qn[At])==null?void 0:Ve.item_type)=="SINGLE"?"\u5355\u9009\u9898":((Yt=qn==null?void 0:qn[At])==null?void 0:Yt.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((tn=qn==null?void 0:qn[At])==null?void 0:tn.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((vt=qn==null?void 0:qn[At])==null?void 0:vt.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:At,extra:Xt.createElement(mt.Z,{align:"middle",onClick:hn=>hn.stopPropagation()},Li&&Xt.createElement(ct.Z,null,Xt.createElement(Be.default.Item,Jn(Zn({},Dt),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[At,"question_score"],className:dt.Z.blankInputNumberWrapper}),Xt.createElement(Ze.Z,{className:dt.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),Xt.createElement(ct.Z,null,Xt.createElement(mt.Z,{align:"middle",className:"pl40",justify:"end"},Fi!==0&&Xt.createElement("div",{onClick:()=>{var hn;gn(Fi,Fi-1);const In=(hn=oi.getFieldValue("sub_item_banks"))==null?void 0:hn.map((ii,Gt)=>(Le.map((Jt,hi)=>{Gt===hi&&(ii.q_position=Number(Jt.name)+1)}),ii));oi.setFieldValue("sub_item_banks",In)}},Xt.createElement(Et.Z,{title:"\u4E0A\u79FB"},Xt.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),Fi<Le.length-1&&Xt.createElement("div",{onClick:()=>{var hn;gn(Fi,Fi+1);const In=(hn=oi.getFieldValue("sub_item_banks"))==null?void 0:hn.map((ii,Gt)=>(Le.map((Jt,hi)=>{Gt===hi&&(ii.q_position=Number(Jt.name)+1)}),ii));oi.setFieldValue("sub_item_banks",In)},className:Fi===0?"":"ml15"},Xt.createElement(Et.Z,{title:"\u4E0B\u79FB"},Xt.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),Xt.createElement(ct.Z,null,Xt.createElement(Et.Z,{title:"\u5220\u9664"},Xt.createElement(Ae.Z,{className:`${dt.Z.deleteIcon} ml15`,onClick:()=>ji(At)}))))},Xt.createElement(Be.default.Item,Jn(Zn({},Dt),{name:At}),(((rt=qn==null?void 0:qn[At])==null?void 0:rt.item_type)=="SINGLE"||((Vt=qn==null?void 0:qn[At])==null?void 0:Vt.item_type)=="MULTIPLE")&&Xt.createElement(ce.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((rn=qn==null?void 0:qn[At])==null?void 0:rn.item_type)=="MULTIPLE",form:oi,choiceKey:[At,"choices"],titleKey:[At,"name"],analysisKey:[At,"analysis"],choiceOptionsPath:["sub_item_banks",At,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((Pn=qn==null?void 0:qn[At])==null?void 0:Pn.item_type)=="COMPLETION"&&Xt.createElement(Bt,{form:oi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,name:At,titleKey:[At,"name"],analysisKey:[At,"analysis"],isOrdered:[At,"is_ordered"],answerKey:[At,"standard_answers"]}),((kn=qn==null?void 0:qn[At])==null?void 0:kn.item_type)=="JUDGMENT"&&Xt.createElement(Cn,{form:oi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[At,"name"],analysisKey:[At,"analysis"],choiceKey:[At,"choices"]}),((St=qn==null?void 0:qn[At])==null?void 0:St.item_type)=="SUBJECTIVE"&&Xt.createElement(sn,{showKeywords:!0,isMustKeyWords:!1,form:oi,titleKey:[At,"name"],analysisKey:[At,"analysis"],answerTexts:[At,"answer_texts"],useKeywords:[At,"use_keywords"],keywords:[At,"keywords"],indexs:At,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})),Le.length<20&&Xt.createElement(ht.Z,{menu:{items:[{label:Xt.createElement("div",{onClick:()=>{si({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),gr([Le==null?void 0:Le.length,...di])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:Xt.createElement("div",{onClick:()=>{si({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),gr([Le==null?void 0:Le.length,...di])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:Xt.createElement("div",{onClick:()=>{si({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),gr([Le==null?void 0:Le.length,...di])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:Xt.createElement("div",{onClick:()=>{si({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),gr([Le==null?void 0:Le.length,...di])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:Xt.createElement("div",{onClick:()=>{si({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),gr([Le==null?void 0:Le.length,...di])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter(mi=>mi.show).map(mi=>({label:mi.label,key:mi.key}))}},Xt.createElement("div",{className:`${dt.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var $i=ve(32285)},99325:function(Sn,an,ve){"use strict";ve.d(an,{z:function(){return Ie},Z:function(){return je}});var ce=ve(59301),De=ve(2878),ze=ve(85187),Ct=ve(64018),_e=ve(40846),Ke=ve(38446),Be=ve(88230),mt=ve(15342),ct=ve(1012),Ze=ve(90853),Et=ve(59301),dt=({html:qe})=>{const $e=(0,ce.useRef)(null),ft=(0,ce.useRef)(null),Re=`.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,ce.useEffect)(()=>{const Tt=$e.current.attachShadow({mode:"open"});ft.current=document.createElement("div"),ft.current.className="markdown-body",ft.current.innerHTML=qe,Tt.appendChild(ft.current);const et=document.createElement("style");return et.textContent=Re,Tt.appendChild(et),()=>{Tt.innerHTML=""}},[]),(0,ce.useEffect)(()=>{ft.current&&(ft.current.innerHTML=qe)},[qe]),Et.createElement("div",{ref:$e})},Ae=Object.defineProperty,te=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,se=(qe,$e,ft)=>$e in qe?Ae(qe,$e,{enumerable:!0,configurable:!0,writable:!0,value:ft}):qe[$e]=ft,de=(qe,$e)=>{for(var ft in $e||($e={}))ee.call($e,ft)&&se(qe,ft,$e[ft]);if(te)for(var ft of te($e))he.call($e,ft)&&se(qe,ft,$e[ft]);return qe};const me="@\u2581\u2581@",we="@\u2581@",Me=/<pre[^>]*>/g;function be(qe){let $e=document.createElement("div");return $e.innerHTML=qe,$e.childNodes.length===0?"":$e.childNodes[0].nodeValue}const Ie=(qe,$e)=>{qe=qe||"";const ft=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Re=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Tt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,et=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return $e?qe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ft,(bt,Bt,Nt,Zt,Ut,lt,Ge)=>{const kt=Bt||Zt||lt,un=Nt||Ut||Ge||"?";return Ke.Z.API_SERVER+"/api/attachments/"+kt+un+"&t="+(0,Be.Jn)(kt,Date.now())+(bt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(qe=qe.replace(et,(bt,Bt,Nt,Zt,Ut,lt,Ge)=>{const kt=Bt||Zt||lt,un=Nt||Ut||Ge||"?";return Ke.Z.API_SERVER+"/attachments/download/"+kt+un+"&t="+(0,Be.Jn)(kt,Date.now())+(bt.indexOf(")")>-1?")":"&")}).replace(ft,(bt,Bt,Nt,Zt,Ut,lt,Ge)=>{const kt=Bt||Zt||lt,un=Nt||Ut||Ge||"?";return Ke.Z.API_SERVER+"/api/attachments/"+kt+un+"&t="+(0,Be.Jn)(kt,Date.now())+(bt.indexOf(")")>-1?")":"&")}).replace(Re,(bt,Bt,Nt,Zt,Ut)=>{const lt=Bt||Zt,Ge=Nt||Ut||"";return'"'+Ke.Z.API_SERVER+"/api/attachments/"+lt+Ge+lt+Ge+"&t="+(0,Be.Jn)(lt,Date.now())}).replace(Tt,(bt,Bt,Nt,Zt,Ut)=>{const lt=Bt||Zt,Ge=Nt||Ut||"";return"("+Ke.Z.API_SERVER+"/files/uploads/"+lt+Ge+lt+Ge+"&t="+(0,Be.Jn)(lt,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,`
`),qe)};var je=({value:qe="",className:$e,showTextOnly:ft,showLines:Re,style:Tt={},stylesPrev:et={},highlightKeywords:bt,showProgramFill:Bt,isProgramFill:Nt,disabledFill:Zt=!1,programFillValue:Ut,onFillChange:lt=un=>{},onFillBlur:Ge=()=>{},onFillFocus:kt=()=>{}})=>{let un=String(qe);const[ln,Ft]=(0,ce.useState)(""),[$t,Qt]=(0,ce.useState)("office"),[Bn,on]=(0,ce.useState)([]),Cn=(0,ce.useRef)("a"+(0,ct.Z)()),gt={},En=(yt,wt,ot)=>{const It=document.createElement(yt===we?"input":"textarea");It.style.width="100%",It.style.height=yt===we?"40px":"151px",It.rows=5,It.spellcheck=!1,It.name="edu-program-fill",It.placeholder="\u8BF7\u8F93\u5165",It.dataset.id=wt;const sn=Object.keys(gt).length;return gt[sn]=It,`<span class="edu-program-fill-wrap ${yt===we?"":"show"}" style="width:${yt===we?"400px":"100%"}" title=${ot||""}><span>${It.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Vn(yt){return yt=yt.replace(/!\[.*?\]\(.*?\)/g,""),yt=yt.replace(/\[.*?\]\(.*?\)/g,""),yt=yt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),yt=yt.replace(/<embed.*?>/g,""),yt=yt.replace(/<img.*?>/g,""),yt=yt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),yt=yt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),yt=yt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),yt=yt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),yt}const He=yt=>yt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(wt,ot){let It=ot.replace(/(\n|\r)/g,"").split("}"),sn=[];return It.map(Xt=>{Xt!=""&&sn.push(`.${Cn.current} ${Xt}`)}),`<style>${sn.join("}")}</style>`}),Ce=(0,ce.useMemo)(()=>{try{const It=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,sn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Xt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ht=/\(\/attachments\/download\//g;un=un.replace(Ht,"("+Ke.Z.API_SERVER+"/attachments/download/").replace(It,"("+Ke.Z.API_SERVER+"/api/attachments/").replace(sn,'"'+Ke.Z.API_SERVER+"/api/attachments/").replace(Xt,'"'+Ke.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(It){}if(Bt){let It=-1;return un=un.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(sn,Xt,Ht){var xn;return++It,En(sn,It,(xn=Ut==null?void 0:Ut[It])==null?void 0:xn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${He(un||"")}</pre>`}let yt=He(un);yt=(0,ze.ZP)(yt);const wt=(0,ze.ez)();un.match(/\[TOC\]/)&&(yt=yt.replace("<p>[TOC]</p>",(0,ze.Qv)()),(0,ze.Iy)()),yt=yt.replace(/(__special_katext_id_\d+__)/g,(It,sn)=>{const{type:Xt,expression:Ht}=wt[sn];return(0,mt.renderToString)(be(Ht)||"",{displayMode:Xt==="block",throwOnError:!1,output:"html"})}),yt=yt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ze.AL)();const ot=document.createElement("div");if(ot.innerHTML=yt,ft)return ot.innerText;if(bt){const It=bt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Se(ot,It),ot.innerHTML}return setTimeout(()=>Xe(),500),ot.innerHTML},[un,bt]);(0,ce.useEffect)(()=>{nt.current&&nt.current.querySelectorAll(["input","textarea"]).forEach(wt=>{wt.oninput=Pe,wt.onblur=Ne,wt.onfocus=ke})},[Bn]),(0,ce.useEffect)(()=>{var yt,wt,ot,It,sn;if(Ut!=null&&Ut.length)try{const Xt=nt.current.querySelectorAll(".edu-program-fill-score"),Ht=nt.current.querySelectorAll('[name="edu-program-fill"]');for(const[xn,Dn]of Ht.entries())Dn.value=((yt=Ut==null?void 0:Ut[xn])==null?void 0:yt.value)||"",((wt=Ut==null?void 0:Ut[xn])==null?void 0:wt.type)==="warning"?Dn.className="program-fill-warning":((ot=Ut==null?void 0:Ut[xn])==null?void 0:ot.type)==="success"?Dn.className="program-fill-success":Dn.className="";for(const[xn,Dn]of Xt.entries())Dn.innerHTML=(It=Ut==null?void 0:Ut[xn])!=null&&It.score?`${(sn=Ut==null?void 0:Ut[xn])==null?void 0:sn.score}\u5206`:"";on(Ut)}catch(Xt){console.log(Xt,"error")}},[Ut]);const Pe=yt=>{Bn[yt.target.dataset.id]=Bn[yt.target.dataset.id]||{},Bn[yt.target.dataset.id].value=yt.target.value,on([...Bn]),lt(Bn,yt.target.dataset.id)},Ne=yt=>{Bn[yt.target.dataset.id]=Bn[yt.target.dataset.id]||{},Bn[yt.target.dataset.id].value=yt.target.value,on([...Bn]),Ge(Bn,yt.target.dataset.id)},ke=yt=>{Bn[yt.target.dataset.id]=Bn[yt.target.dataset.id]||{},Bn[yt.target.dataset.id].value=yt.target.value,on([...Bn]),kt(Bn,yt.target.dataset.id)};function Se(yt,wt){return yt.childNodes.forEach(ot=>{var It;if(ot.childNodes.length>0)Se(ot,wt);else if(ot.nodeName!=="IMG")if(ot.innerHTML)ot.innerHTML=(It=ot.innerHTML)==null?void 0:It.replace(new RegExp(wt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const sn=document.createElement("span");sn.innerHTML=ot.textContent.replace(new RegExp(wt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ot.replaceWith(sn)}})}const nt=(0,ce.useRef)();ze.jb.WebkitLineClamp=Re,Re&&(Tt=de(de({},Tt),ze.jb));function Pt(yt){let wt=yt.target;if(wt.tagName.toUpperCase()==="A"){let ot=wt.getAttribute("href");if(ot.indexOf("office")>-1)yt.preventDefault(),Ft(ot),Qt("office");else if(ot.indexOf("application/pdf")>-1)yt.preventDefault(),Ft(ot),Qt("pdf");else if(ot.indexOf("text/html")>-1)yt.preventDefault(),Ft(ot),Qt("html");else if(ot.startsWith("#")){yt.preventDefault();let It=document.getElementById(ot.replace("#",""));It&&It.scrollIntoView(!0)}}}const Xe=()=>{var yt;const wt=(yt=nt.current)==null?void 0:yt.querySelectorAll("video");wt==null||wt.forEach(ot=>{if(ot.oncontextmenu=()=>!1,ot.src.indexOf(".m3u8")>-1&&!ot.canPlayType("application/vnd.apple.mpegurl")){if(_e.ZP.isSupported()){var It=new _e.ZP;It.loadSource(ot.src),It.attachMedia(ot)}}})};(0,ce.useEffect)(()=>{if(nt.current&&Ce&&Ce.match(Me)&&window.PR.prettyPrint(),nt.current)return nt.current.addEventListener("click",Pt),()=>{var yt;(yt=nt.current)==null||yt.removeEventListener("click",Pt),(0,ze.AL)(),(0,ze.Iy)()}},[Ce,nt.current,Pt]),(0,ce.useEffect)(()=>{var yt;const wt=ot=>{ot.preventDefault(),ot.clipboardData.setData("text",window.getSelection().toString())};return(yt=nt.current)==null||yt.addEventListener("copy",wt),()=>{var ot;(ot=nt.current)==null||ot.removeEventListener("copy",wt)}},[nt.current]);const Je=yt=>/<style[\s\S]*?>/i.test(yt||"");return ce.createElement(ce.Fragment,null,ft&&ce.createElement("div",{ref:nt},Ce),!ft&&!Je(Ce)&&ce.createElement("div",{ref:nt,style:de({},Tt),className:`${$e||""} ${Zt?"disabled-fill":""} markdown-body ${Cn.current}`,dangerouslySetInnerHTML:{__html:Ce}}),!ft&&Je(Ce)&&ce.createElement(dt,{html:Ce}),ce.createElement(Ze.Z,{close:!0,data:ln,type:ln!=null&&ln.length?$t:"",style:de({},et),onClose:()=>Ft("")}))}},65532:function(Sn,an,ve){"use strict";ve.d(an,{C:function(){return Bt}});var ce=ve(59301),De={recalculation:"recalculation____i9AE",tips:"tips___GoMu8",filter:"filter___Vx7VO",input:"input___OEMMv",operating:"operating___TS9iA",operatingItem:"operatingItem___AT84q"},ze=ve(92310),Ct=ve.n(ze),_e=ve(24905),Ke=ve(95237),Be=ve(8591),mt=ve(6848),ct=ve(3113),Ze=ve(43418),Et=ve(1710),ht=ve(5871),dt=ve(78241),Ae=ve(71418),te=ve(88230),ee=ve(7660),he=ve(73898),se=ve(95750),de=ve(15965),me=Object.defineProperty,we=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,qe=(Nt,Zt,Ut)=>Zt in Nt?me(Nt,Zt,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Nt[Zt]=Ut,$e=(Nt,Zt)=>{for(var Ut in Zt||(Zt={}))Ie.call(Zt,Ut)&&qe(Nt,Ut,Zt[Ut]);if(be)for(var Ut of be(Zt))je.call(Zt,Ut)&&qe(Nt,Ut,Zt[Ut]);return Nt},ft=(Nt,Zt)=>we(Nt,Me(Zt)),Re=(Nt,Zt,Ut)=>new Promise((lt,Ge)=>{var kt=Ft=>{try{ln(Ut.next(Ft))}catch($t){Ge($t)}},un=Ft=>{try{ln(Ut.throw(Ft))}catch($t){Ge($t)}},ln=Ft=>Ft.done?lt(Ft.value):Promise.resolve(Ft.value).then(kt,un);ln((Ut=Ut.apply(Nt,Zt)).next())});const Tt=_e.default.Group,et=({className:Nt,title:Zt,items:Ut=[],value:lt,onChange:Ge})=>{const kt=(Ut==null?void 0:Ut.length)===(lt==null?void 0:lt.length),un=(lt==null?void 0:lt.length)>0&&(lt==null?void 0:lt.length)<(Ut==null?void 0:Ut.length),ln=Ft=>{const $t=Ut.map(Qt=>Qt.id);Ge(Ft.target.checked?$t:[])};return ce.createElement(Ke.Z,{align:"middle",className:Nt},!!Zt&&ce.createElement("div",{className:"mr20",style:{color:"#5F6368"}},Zt),ce.createElement(_e.default,{indeterminate:un,onChange:ln,checked:kt},"\u5168\u90E8"),ce.createElement(Tt,{value:lt,onChange:Ge},Ut.map(Ft=>ce.createElement(_e.default,{className:"ml30 c-black",key:Ft.id,value:Ft.id},Ft.name,ce.createElement("span",null,`(${Ft.count})`)))))};var Bt=({className:Nt,style:Zt,dataSource:Ut})=>{var lt,Ge,kt,un,ln,Ft,$t;const[Qt,Bn]=(0,ce.useState)({}),[on,Cn]=(0,ce.useState)(!0),[gt,En]=(0,ce.useState)(!1),[Vn,He]=(0,ce.useState)(!1),[Ce,Pe]=(0,ce.useState)(null),[Ne,ke]=(0,ce.useState)(0),[Se,nt]=(0,ce.useState)({}),[Pt,Xe]=(0,ce.useState)(!0),[Je,yt]=(0,ce.useState)(0),[wt,ot]=(0,ce.useState)(0),[It,sn]=(0,ce.useState)(!1),Xt=(0,ce.useRef)(null),[Ht,xn]=(0,ce.useState)(!1),[Dn,cn]=(0,ce.useState)(!0),[Un,ti]=(0,ce.useState)([]),Wn={page:1,per_page:5,keyword:"",review:[],question_status:[],success_status:[],sort_by:null,direction:null},[Zn,Jn]=(0,ce.useState)($e({},Wn));(0,ce.useEffect)(()=>{Ut!=null&&Ut.question_id&&Bn(Ut)},[Ut==null?void 0:Ut.question_id]),(0,ce.useEffect)(()=>{var si;if(((si=Qt==null?void 0:Qt.exercise_question_resubmit)==null?void 0:si.status)==="running"){const ji=setInterval(()=>{zi()},3e3);return()=>clearInterval(ji)}},[(lt=Qt==null?void 0:Qt.exercise_question_resubmit)==null?void 0:lt.status]),(0,ce.useEffect)(()=>{var si;Vn&&(Vn===1&&(Zn.question_status=$i.map(ji=>ji.value),Zn.review=Yn.map(ji=>ji.value)),Vn===2&&(Zn.exercise_question_resubmit_id=(si=Qt==null?void 0:Qt.exercise_question_resubmit)==null?void 0:si.id,Ce===1&&(Zn.success_status=[1]),Ce===2&&(Zn.success_status=[0])),Jn($e({},Zn)),vi(Zn),ot(Qt!=null&&Qt.is_mirror?3:10),yt(Qt!=null&&Qt.is_mirror?1:5))},[Vn]),(0,ce.useEffect)(()=>{Ht&&pi()},[Ht]);const vi=si=>Re(void 0,null,function*(){Cn(!0);const ji=yield(0,ee.ZP)(`/api/exercise_questions/${Qt==null?void 0:Qt.question_id}/resubmit_student_list.json`,{method:"get",params:si});(ji==null?void 0:ji.status)==0&&(nt(ji||[]),ke(ji==null?void 0:ji.count)),Cn(!1)}),pi=()=>Re(void 0,null,function*(){cn(!0);const si=yield(0,ee.ZP)(`/api/exercise_questions/${Qt==null?void 0:Qt.question_id}/resubmit_history.json`,{method:"get"});(si==null?void 0:si.status)==0&&ti((si==null?void 0:si.data)||[]),cn(!1)}),zi=()=>Re(void 0,null,function*(){const si=yield(0,ee.ZP)(`/api/exercise_questions/${Qt==null?void 0:Qt.question_id}/resubmit_status.json`,{method:"get"});(si==null?void 0:si.status)==0&&Bn(ft($e({},Qt),{show_resubmit_history:!0,exercise_question_resubmit:(si==null?void 0:si.data)||{}}))}),$i=[{label:"\u672A\u8BC4\u6D4B",value:2,color:"#9096A3"},{label:"\u672A\u901A\u5173",value:0,color:"#E30000"},{label:"\u5DF2\u901A\u5173",value:1,color:"#00B187"}],Yn=[{label:"\u672A\u8BC4\u9605",value:0,color:"#9096A3"},{label:"\u8BC4\u9605\u4E2D",value:2,color:"#FF9D18"},{label:"\u5DF2\u8BC4\u9605",value:1,color:"#3061D0"}],Gn=[{label:"\u6210\u529F",value:1,color:"#00B187"},{label:"\u5931\u8D25",value:0,color:"#E30000"}],oi=[{title:"\u5E8F\u53F7",dataIndex:"key",render:(si,ji,gn)=>ce.createElement("span",{className:"c-black"},gn+1+(Zn.page-1)*Zn.per_page)},{title:"\u59D3\u540D",dataIndex:"user_name",render:si=>ce.createElement("span",{className:"c-black"},si)},{title:"\u5B66\u53F7",dataIndex:"student_id",sorter:!0,render:si=>ce.createElement("span",{className:"c-grey-666"},si||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",render:si=>ce.createElement("span",{className:"c-black"},si)},{title:"\u9898\u76EE\u72B6\u6001",dataIndex:"question_status",render:si=>{const{label:ji,color:gn}=$i.find(qn=>qn.value===si)||{};return ce.createElement("span",{style:{color:gn}},ji)}},{title:"\u9898\u76EE\u5F97\u5206",dataIndex:"question_score",sorter:!0,render:si=>ce.createElement("span",{className:"c-black"},si)},{title:"\u6700\u7EC8\u6210\u7EE9",dataIndex:"score",sorter:!0,render:si=>ce.createElement("span",{className:"c-black"},si)},{title:"\u8BC4\u9605\u72B6\u6001",dataIndex:"review",render:si=>{const{label:ji,color:gn}=Yn.find(qn=>qn.value===si)||{};return ce.createElement("span",{style:{color:gn}},ji)}},Vn===2&&{title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"success_status",render:si=>{const{label:ji,color:gn}=Gn.find(qn=>qn.value===si)||{};return ce.createElement("span",{style:{color:gn}},ji)}}].filter(Boolean),Li=(si,ji,gn)=>{Zn.page=si==null?void 0:si.current,Zn.per_page=si==null?void 0:si.pageSize,gn!=null&&gn.order?(Zn.sort_by=gn==null?void 0:gn.field,Zn.direction=(gn==null?void 0:gn.order)==="ascend"?"asc":"desc"):(Zn.sort_by=null,Zn.direction=null),Jn($e({},Zn)),vi(Zn)},di=()=>{if(!Je){Be.ZP.warning("\u8BF7\u8F93\u5165\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570");return}sn(!0)},gr=()=>Re(void 0,null,function*(){var si,ji;if((si=Xt.current)!=null&&si.onVerify())return;En(!0);const gn=yield(0,ee.ZP)(`/api/exercise_questions/${Qt==null?void 0:Qt.question_id}/resubmit.json`,{method:"post",body:{keyword:Zn.keyword,question_status:Zn.question_status,review:Zn.review_status,success_status:Zn.success_status,use_max_score:Pt,permits:Je,exercise_question_resubmit_id:Vn===1?null:(ji=Qt==null?void 0:Qt.exercise_question_resubmit)==null?void 0:ji.id}});(gn==null?void 0:gn.status)==0&&(yield zi(),Be.ZP.success("\u64CD\u4F5C\u6210\u529F"),sn(!1),He(!1)),En(!1)}),Ii=(si,ji)=>{Zn.page=1,Zn[ji]=si,Jn($e({},Zn)),vi(Zn)},Le=["","\u5F53\u524D\u9898\u76EE\u7684\u5B9E\u9A8C\u8D44\u6E90\u4E3A\u4E13\u6709\u4E91\uFF0C\u4E0D\u652F\u6301\u91CD\u65B0\u8BC4\u6D4B~","\u8BE5\u529F\u80FD\u4EC5\u8BFE\u5802\u7BA1\u7406\u5458\u548C\u8003\u8BD5\u7684\u521B\u5EFA\u8005\u53EF\u4EE5\u64CD\u4F5C~"];return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:Ct()(De.recalculation,Nt),style:Zt},ce.createElement(mt.Z,{title:Le[(Qt==null?void 0:Qt.disable_resubmit_reason)||0]},ce.createElement(ct.ZP,{disabled:(Qt==null?void 0:Qt.disable_resubmit)||((Ge=Qt==null?void 0:Qt.exercise_question_resubmit)==null?void 0:Ge.status)==="running",onClick:()=>He(1),icon:ce.createElement("i",{className:"iconfont icon-zhongxinpingce font14"}),type:"primary",ghost:!0},"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206")),(Qt==null?void 0:Qt.show_resubmit_history)&&ce.createElement(ce.Fragment,null,((kt=Qt==null?void 0:Qt.exercise_question_resubmit)==null?void 0:kt.status)==="running"?ce.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",ce.createElement("span",{className:"c-light-primary ml3"},(un=Qt==null?void 0:Qt.exercise_question_resubmit)==null?void 0:un.rate)):ce.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",ce.createElement("span",{onClick:()=>{He(2),Pe(1)},className:"current",style:{color:"#3061D0",textDecoration:"underline",margin:"0 3px"}},(ln=Qt==null?void 0:Qt.exercise_question_resubmit)==null?void 0:ln.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",ce.createElement("span",{onClick:()=>{He(2),Pe(2)},className:"current",style:{color:"#E30000",textDecoration:"underline",margin:"0 3px"}},(Ft=Qt==null?void 0:Qt.exercise_question_resubmit)==null?void 0:Ft.fail_count),"\u4EBA"),ce.createElement(mt.Z,{title:"\u64CD\u4F5C\u8BB0\u5F55"},ce.createElement("i",{onClick:()=>xn(!0),className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})))),ce.createElement(Ze.default,{centered:!0,open:!!Vn,title:`\u91CD\u65B0\u8BC4\u6D4B${Vn===1?"\u7B97\u5206":"\u7ED3\u679C"}`,width:870,okText:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",onCancel:()=>He(!1),onOk:di,afterClose:()=>{Xe(!0),Pe(null),Jn($e({},Wn))}},ce.createElement("div",{className:De.filter},Vn===1&&ce.createElement(ce.Fragment,null,ce.createElement("div",{className:De.tips},ce.createElement("div",{className:"mb5",style:{color:"#FF9D18"}},ce.createElement("i",{className:"iconfont icon-tishi9 mr10 font14"}),"\u6E29\u99A8\u63D0\u793A"),ce.createElement("div",null,"1.\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206\u6D41\u7A0B\uFF1A \u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6\u5B66\u751F\u5728\u8003\u8BD5\u9875\u9762\u4FDD\u5B58\u7684\u6700\u65B0\u4EE3\u7801\uFF0C\u5E76\u8FDB\u884C\u91CD\u65B0\u8BC4\u6D4B\uFF0C\u4ECE\u800C\u7CBE\u51C6\u8BA1\u7B97\u51FA\u5B66\u751F\u7684\u6700\u7EC8\u5F97\u5206\uFF1B"),ce.createElement("div",{style:{margin:"2px 0"}},"2.\u91CD\u65B0\u8BC4\u6D4B\u6761\u4EF6\uFF1A \u8003\u8BD5\u7ED3\u675F\u540E\uFF0C\u4EC5\u5BF9\u5DF2\u63D0\u4EA4\u8BD5\u5377\u4E14\u5DF2\u4F5C\u7B54\u8BE5\u9898\u76EE\u7684\u5B66\u751F\u8FDB\u884C\u91CD\u65B0\u8BC4\u6D4B\u4E0E\u7B97\u5206\uFF1B"),ce.createElement("div",null,"3.\u91CD\u65B0\u8BC4\u6D4B\u65F6\uFF0C\u8BF7\u786E\u4FDD\u5B9E\u9A8C\u73AF\u5883\u80FD\u6B63\u5E38\u542F\u52A8\u5E76\u53EF\u8FD0\u884C\u8BC4\u6D4B\u3002")),ce.createElement(et,{className:"mt10",title:"\u9898\u76EE\u72B6\u6001",items:(Se==null?void 0:Se.question_status)||[],value:Zn.question_status,onChange:si=>Ii(si,"question_status")}),ce.createElement(et,{className:"mt10",title:"\u8BC4\u9605\u72B6\u6001",items:(Se==null?void 0:Se.review_status)||[],value:Zn.review,onChange:si=>Ii(si,"review")})),Vn===2&&ce.createElement(ce.Fragment,null,ce.createElement(et,{className:"mt10",title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",items:(Se==null?void 0:Se.success_status)||[],value:Zn.success_status,onChange:si=>Ii(si,"success_status")})),ce.createElement(de.t7,{className:De.input,style:{bottom:Vn===1?10:-5},value:Zn.keyword,onChange:si=>Ii(si,"keyword"),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22"})),ce.createElement(Et.default,{className:"mt20",columns:oi,scroll:(($t=Se==null?void 0:Se.data)==null?void 0:$t.length)>7?{y:300}:{},dataSource:(Se==null?void 0:Se.data)||[],loading:on,onChange:Li,pagination:{total:Ne,pageSize:Zn.per_page,current:Zn.page,hideOnSinglePage:!Ne,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100"],showQuickJumper:!0,size:"default",showTotal:te.rU}}),ce.createElement(Ke.Z,{justify:"space-between",align:"middle",className:"mt10"},ce.createElement(_e.default,{className:"c-black",checked:Pt,onChange:si=>Xe(si.target.checked)},"\u91CD\u65B0\u8BC4\u6D4B\u540E\u7684\u5206\u6570\u5927\u4E8E\u539F\u6765\u7684\u5206\u6570\u624D\u66F4\u65B0\u6210\u7EE9"),(0,he.Ny)()&&ce.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570",ce.createElement(ht.Z,{className:"ml10 mr10",value:Je,max:wt,min:1,precision:0,onChange:si=>yt(si)}),"\u4EBA",ce.createElement(mt.Z,{overlayStyle:{maxWidth:450},title:"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A20\u4EBA\uFF08\u81EA\u5B9A\u4E49\u955C\u50CF\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A3\u4EBA\uFF09\u3002"},ce.createElement("i",{style:{color:"#9096A3"},className:"iconfont icon-tishi5 font13 ml10"}))))),ce.createElement(Ze.default,{centered:!0,title:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",open:It,width:494,zIndex:1001,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:gt,destroyOnClose:!0,onOk:gr,onCancel:()=>sn(!1)},ce.createElement(dt.default.Item,{className:"mb0",colon:!1,label:"\u9A8C\u8BC1\u7801",name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},ce.createElement(se.Z,{ref:si=>Xt.current=si}))),ce.createElement(Ze.default,{centered:!0,title:"\u64CD\u4F5C\u8BB0\u5F55",open:Ht,width:710,onCancel:()=>xn(!1),footer:null},ce.createElement(Ae.Z,{spinning:Dn},ce.createElement("div",{className:De.operating},Un.map((si,ji)=>ce.createElement("div",{key:ji,className:De.operatingItem},ce.createElement("div",{style:{flex:"0 0 180px"},className:"c-grey-666"},si==null?void 0:si.created_at),ce.createElement("div",{className:"c-black"},si==null?void 0:si.user_name,"\u64CD\u4F5C\u4E86\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206"),(si==null?void 0:si.status)==="running"?ce.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",ce.createElement("span",{className:"c-light-primary ml3"},si==null?void 0:si.rate)):ce.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",ce.createElement("span",{style:{color:"#3061D0",margin:"0 3px"}},si==null?void 0:si.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",ce.createElement("span",{style:{color:"#E30000",margin:"0 3px"}},si==null?void 0:si.fail_count),"\u4EBA")))),ce.createElement("div",{style:{height:20}}))))}},20527:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(59301),De={flex_box_center:"flex_box_center___rQJfc",flex_space_between:"flex_space_between___MDW24",flex_box_vertical_center:"flex_box_vertical_center___RZbAv",flex_box_center_end:"flex_box_center_end___ILhJA",flex_box_column:"flex_box_column___Fmij7",orangeColor:"orangeColor___U5vU6",redColor:"redColor___qYa6X",statustitle:"statustitle___pTBLm",statusbody:"statusbody___qUPQx",flex:"flex___VtL45"},ze=ve(43418),Ct="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",Ke=(ct,Ze,Et)=>new Promise((ht,dt)=>{var Ae=he=>{try{ee(Et.next(he))}catch(se){dt(se)}},te=he=>{try{ee(Et.throw(he))}catch(se){dt(se)}},ee=he=>he.done?ht(he.value):Promise.resolve(he.value).then(Ae,te);ee((Et=Et.apply(ct,Ze)).next())}),mt=({type:ct,resdata:Ze,onok:Et,oktext:ht,okloading:dt})=>{const[Ae,te]=(0,ce.useState)(!1),{can_copy_list:ee,can_copy_num:he,challenge_type:se,course_data_list:de,no_copy_list:me,no_copy_num:we,no_use_list:Me,no_use_num:be,repeat_shixun_num:Ie,student_count:je,total_num:qe,use_num:$e}=Ze;let ft=he>0||ct==="exercise";(0,ce.useEffect)(()=>{(Ze==null?void 0:Ze.student_count)>0&&te(!0)},[Ze]),console.log("---11",dt),(0,ce.useEffect)(()=>{dt||te(!1)},[dt]);const Re=()=>{if(ct==="exercise"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u4F5C\u7B54\u5DF2\u6311\u6218\u8FC7\u7684\u5B9E\u8BAD\u9898\u3002"));if(ct==="exercise"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="shixun"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="shixun"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="subject"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="subject"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",ce.createElement("span",{className:De.orangeColor},je)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",ce.createElement("span",{className:De.orangeColor},$e)," \u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="exercisepush")return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE \uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u5728\u5F53\u524D\u8003\u8BD5\u4E2D\u8FDB\u884C\u4F5C\u7B54\u3002"));if(ct==="shixunpush"&&se===1)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ct==="shixunpush"&&se===2)return ce.createElement(ce.Fragment,null,"\u8BFE\u5802\u5185\u6709",ce.createElement("span",{className:De.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",ce.createElement("span",{className:De.orangeColor},$e),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ce.createElement("span",{className:De.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"))},Tt=()=>{if(ct==="exercise"||ct==="subject"||ct==="exercisepush"||ct==="shixunpush")return ce.createElement("div",{style:{marginTop:20}},we>0&&ce.createElement("div",null,ce.createElement("span",{className:De.flex},ce.createElement("img",{src:_e,style:{width:14}}),ce.createElement("span",{className:De.statustitle},"\u4E0D\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),ce.createElement("div",{className:De.statusbody},ct==="exercise"&&ce.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",ce.createElement("span",{className:De.redColor},"\u4EE5\u4E0B\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u53D1\u9001\u81F3\u8BFE\u5802\u4E2D\u3002"),"\u60A8\u4E5F\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),(ct==="subject"||ct==="exercisepush")&&ce.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",ft&&ce.createElement("span",{className:De.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),ct==="shixunpush"&&ce.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",ft&&ce.createElement("span",{className:De.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u5EFA\u8BAE\u60A8\u91CD\u65B0\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE\u518D\u53D1\u5E03\u4F5C\u4E1A\uFF0C\u4E5F\u53EF\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),ce.createElement("div",null,me==null?void 0:me.map((et,bt)=>ce.createElement("a",{href:`/shixuns/${et.identifier}/challenges`,target:"_blank"},"\u300A",et==null?void 0:et.name,"\u300B",bt+1!==we&&"\u3001"))))),he>0&&ce.createElement("div",{style:{marginTop:20}},ce.createElement("span",{className:De.flex},ce.createElement("img",{src:Ct,style:{width:14}}),ce.createElement("span",{className:De.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),ce.createElement("div",{className:De.statusbody},ct==="exercise"&&ce.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u8BD5\u5377\u4E2D\u7684\u539F\u8BD5\u9898\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),(ct==="subject"||ct==="exercisepush")&&ce.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),ct==="shixunpush"&&ce.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u5F53\u524D\u4F5C\u4E1A\u4E2D\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),ce.createElement("div",null,ee==null?void 0:ee.map((et,bt)=>ce.createElement("a",{href:`/shixuns/${et.identifier}/challenges`,target:"_blank"},"\u300A",et==null?void 0:et.name,"\u300B",bt+1!==he&&"\u3001"))))));if(ct==="shixun")return ce.createElement("div",{style:{marginTop:20}},he>0?"\u8BE5\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002":"\u8BE5\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236\uFF0C\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002")};return ce.createElement(ze.default,{open:Ae,onCancel:()=>{te(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!ft&&"none"}},zIndex:1003,confirmLoading:dt,okText:ft?ht:"\u6211\u77E5\u9053\u4E86",onOk:()=>Ke(void 0,null,function*(){ft?yield Et([...ee,...Me]):te(!1)})},ce.createElement("div",{style:{maxHeight:600,overflow:"auto"}},Re(),Tt()))}},85016:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Ke}});var ce=ve(59301),De={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},ze=ve(92310),Ct=ve.n(ze),Ke=({className:Be,style:mt,state:ct,onClick:Ze})=>{var Et,ht;return ce.createElement("div",{onClick:Ze,className:Ct()(ct?(Et=De)==null?void 0:Et.redBtn:(ht=De)==null?void 0:ht.btn,Be),style:mt},ct?ce.createElement(ce.Fragment,null,ce.createElement("i",{className:"iconfont icon-biaoji1"}),ce.createElement("span",null,"\u53D6\u6D88\u6807\u8BB0\u9519\u9898")):ce.createElement(ce.Fragment,null,ce.createElement("i",{className:"iconfont icon-biaojigaiti"}),ce.createElement("span",null,"\u6807\u8BB0\u9519\u9898")))}},73278:function(Sn,an,ve){"use strict";ve.d(an,{h:function(){return we}});var ce=ve(59301),De=ve(57809),ze=ve(78241),Ct=ve(3113),_e=ve(89780),Ke=ve.n(_e),Be=ve(78780),mt=ve(19136),ct=Object.defineProperty,Ze=Object.defineProperties,Et=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,te=(Me,be,Ie)=>be in Me?ct(Me,be,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Me[be]=Ie,ee=(Me,be)=>{for(var Ie in be||(be={}))dt.call(be,Ie)&&te(Me,Ie,be[Ie]);if(ht)for(var Ie of ht(be))Ae.call(be,Ie)&&te(Me,Ie,be[Ie]);return Me},he=(Me,be)=>Ze(Me,Et(be));const se=De.default.Option,de={labelCol:{span:4},wrapperCol:{span:20}},me={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"]};an.Z=({callback:Me,onCancel:be})=>{const[Ie,je]=(0,ce.useState)("python");function qe(ft){je(me[ft][1])}function $e(ft){Me(ft)}return ce.createElement(ze.default,he(ee({},de),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:$e,style:{width:500}}),ce.createElement(ze.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ce.createElement(De.default,{getPopupContainer:ft=>ft.parentNode,onChange:qe},Object.keys(me).map(ft=>ce.createElement(se,{key:ft,value:ft},me[ft][0])))),ce.createElement(ze.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ce.createElement(we,{mode:Ie})),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(Ct.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(Ct.ZP,{type:"ghost",onClick:be},"\u53D6\u6D88")))};function we({value:Me,onChange:be,mode:Ie,options:je={}}){const qe=(0,ce.useRef)(),[$e,ft]=(0,ce.useState)();return(0,ce.useEffect)(()=>{if($e){let Re=function(Tt){const et=Tt.getValue();be&&be(et)};return $e.on("change",Re),()=>{$e.off("change",Re)}}},[$e,be]),(0,ce.useEffect)(()=>{$e&&$e.setOption("mode",Ie)},[$e,Ie]),(0,ce.useEffect)(()=>{$e&&(Me!==$e.getValue()||Me==="")&&setTimeout(()=>{$e.setValue(Me||"")},300)},[$e,Me]),(0,ce.useEffect)(()=>{if(qe.current&&!$e){const Re=Ke().fromTextArea(qe.current,ee({mode:Ie,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},je));ft(Re)}},[qe.current,$e]),ce.createElement("div",{className:"my-codemirror-container"},ce.createElement("textarea",{ref:qe}))}},64726:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Tn}});var ce=ve(59301),De=ve(89780),ze=ve.n(De),Ct=ve(76374),_e=ve(78780),Ke=ve(6313),Be=ve(25717),mt=ve(99498),ct=ve(25419),Ze=ve(67549),Et=ve(99325),ht=({value:At="",className:Dt,showTextOnly:Ve,showLines:Yt,style:tn={}})=>{const vt=(0,ce.useMemo)(()=>"",[At]);return ce.createElement(ce.Fragment,null,ce.createElement("div",{dangerouslySetInnerHTML:{__html:vt}}))},dt=ve(59301),Ae=Object.defineProperty,te=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,me=(At,Dt,Ve)=>Dt in At?Ae(At,Dt,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):At[Dt]=Ve,we=(At,Dt)=>{for(var Ve in Dt||(Dt={}))se.call(Dt,Ve)&&me(At,Ve,Dt[Ve]);if(he)for(var Ve of he(Dt))de.call(Dt,Ve)&&me(At,Ve,Dt[Ve]);return At},Me=(At,Dt)=>te(At,ee(Dt));let be=[{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 Ie({onActionCallback:At,title:Dt,icon:Ve,actionName:Yt,className:tn="",children:vt}){function rt(){At(Yt)}return dt.createElement("a",{title:Dt,className:tn,onClick:rt},dt.createElement("i",{className:`${Ve}`}),vt)}var je=({watch:At,showNullButton:Dt,showNullProgramButton:Ve,onActionCallback:Yt,fullScreen:tn,insertTemp:vt,hidetoolBar:rt,extraUse:Vt})=>{const rn=[...be,{title:`${At?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${At?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return dt.createElement("ul",{className:"markdown-toolbar-container"},!rt&&rn.map((Pn,kn)=>dt.createElement("li",{key:kn},Pn.actionName?dt.createElement(Ie,Me(we({},Pn),{onActionCallback:Yt})):dt.createElement("span",{className:"v-line"}))),Dt?dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Yt},dt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ve?dt.createElement(dt.Fragment,null,dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Yt},dt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Yt},dt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,vt&&dt.createElement("li",null,dt.createElement(Ie,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${vt}`,onActionCallback:Yt},dt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Vt&&dt.createElement("li",null,Vt),dt.createElement("li",{className:"btn-full-screen"},dt.createElement(Ie,{icon:`${tn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:tn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Yt})))},qe=ve(19647),$e=ve(78241),ft=ve(92832),Re=ve(3113),Tt=Object.defineProperty,et=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Zt=Object.prototype.propertyIsEnumerable,Ut=(At,Dt,Ve)=>Dt in At?Tt(At,Dt,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):At[Dt]=Ve,lt=(At,Dt)=>{for(var Ve in Dt||(Dt={}))Nt.call(Dt,Ve)&&Ut(At,Ve,Dt[Ve]);if(Bt)for(var Ve of Bt(Dt))Zt.call(Dt,Ve)&&Ut(At,Ve,Dt[Ve]);return At},Ge=(At,Dt)=>et(At,bt(Dt));const kt={labelCol:{span:4},wrapperCol:{span:20}};var un=({callback:At,onCancel:Dt})=>{function Ve(Yt){At(Yt)}return ce.createElement($e.default,Ge(lt({},kt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ve,style:{width:500}}),ce.createElement($e.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ce.createElement(ft.default,null)),ce.createElement($e.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ce.createElement(ft.default,null)),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(Re.ZP,{type:"ghost",onClick:Dt},"\u53D6\u6D88")))},ln=ve(73278),Ft=ve(56030),$t=ve(43418),Qt=ve(95237),Bn=ve(14573),on=ve(59301),Cn=({callback:At,onCancel:Dt})=>{const Ve=document.createElement("canvas"),Yt=Ve.getContext("2d");Ve.width=1e3,Ve.height=800,Yt.fillStyle="#ffffff",Yt.fillRect(0,0,Ve.width,Ve.height);const tn=Ve.toDataURL("image/png");return on.createElement($t.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},on.createElement(Qt.Z,{style:{height:"100vh"}},on.createElement(Bn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:tn,visible:!0,title:String(Date.now())},onOk:vt=>{At({src:vt.url})},onClose:Dt})))},gt=ve(12378);function En(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(En,go.CommandHandler),En.prototype.canAlignSelection=function(){var At=this.diagram;return!(At===null||At.isReadOnly||At.isModelReadOnly||At.selection.count<2)},En.prototype.alignLeft=function(){var At=this.diagram;At.startTransaction("aligning left");var Dt=1/0;At.selection.each(function(Ve){Ve instanceof go.Link||(Dt=Math.min(Ve.position.x,Dt))}),At.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Dt,Ve.position.y))}),At.commitTransaction("aligning left")},En.prototype.alignRight=function(){var At=this.diagram;At.startTransaction("aligning right");var Dt=-1/0;At.selection.each(function(Ve){if(!(Ve instanceof go.Link)){var Yt=Ve.actualBounds.x+Ve.actualBounds.width;Dt=Math.max(Yt,Dt)}}),At.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Dt-Ve.actualBounds.width,Ve.position.y))}),At.commitTransaction("aligning right")},En.prototype.alignTop=function(){var At=this.diagram;At.startTransaction("alignTop");var Dt=1/0;At.selection.each(function(Ve){Ve instanceof go.Link||(Dt=Math.min(Ve.position.y,Dt))}),At.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ve.position.x,Dt))}),At.commitTransaction("alignTop")},En.prototype.alignBottom=function(){var At=this.diagram;At.startTransaction("aligning bottom");var Dt=-1/0;At.selection.each(function(Ve){if(!(Ve instanceof go.Link)){var Yt=Ve.actualBounds.y+Ve.actualBounds.height;Dt=Math.max(Yt,Dt)}}),At.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ve.actualBounds.x,Dt-Ve.actualBounds.height))}),At.commitTransaction("aligning bottom")},En.prototype.alignCenterX=function(){var At=this.diagram,Dt=At.selection.first();if(Dt){At.startTransaction("aligning Center X");var Ve=Dt.actualBounds.x+Dt.actualBounds.width/2;At.selection.each(function(Yt){Yt instanceof go.Link||Yt.move(new go.Point(Ve-Yt.actualBounds.width/2,Yt.actualBounds.y))}),At.commitTransaction("aligning Center X")}},En.prototype.alignCenterY=function(){var At=this.diagram,Dt=At.selection.first();if(Dt){At.startTransaction("aligning Center Y");var Ve=Dt.actualBounds.y+Dt.actualBounds.height/2;At.selection.each(function(Yt){Yt instanceof go.Link||Yt.move(new go.Point(Yt.actualBounds.x,Ve-Yt.actualBounds.height/2))}),At.commitTransaction("aligning Center Y")}},En.prototype.alignColumn=function(At){var Dt=this.diagram;Dt.startTransaction("align Column"),At===void 0&&(At=0),At=parseFloat(At);var Ve=new Array;Dt.selection.each(function(Vt){Vt instanceof go.Link||Ve.push(Vt)});for(var Yt=0;Yt<Ve.length-1;Yt++){var tn=Ve[Yt],vt=tn.actualBounds.y+tn.actualBounds.height+At,rt=Ve[Yt+1];rt.move(new go.Point(tn.actualBounds.x,vt))}Dt.commitTransaction("align Column")},En.prototype.alignRow=function(At){At===void 0&&(At=0),At=parseFloat(At);var Dt=this.diagram;Dt.startTransaction("align Row");var Ve=new Array;Dt.selection.each(function(Vt){Vt instanceof go.Link||Ve.push(Vt)});for(var Yt=0;Yt<Ve.length-1;Yt++){var tn=Ve[Yt],vt=tn.actualBounds.x+tn.actualBounds.width+At,rt=Ve[Yt+1];rt.move(new go.Point(vt,tn.actualBounds.y))}Dt.commitTransaction("align Row")},En.prototype.canRotate=function(At){var Dt=this.diagram;return!(Dt===null||Dt.isReadOnly||Dt.isModelReadOnly||Dt.selection.count<1)},En.prototype.rotate=function(At){At===void 0&&(At=90);var Dt=this.diagram;Dt.startTransaction("rotate "+At.toString());var Dt=this.diagram;Dt.selection.each(function(Ve){Ve instanceof go.Link||Ve instanceof go.Group||(Ve.angle+=At)}),Dt.commitTransaction("rotate "+At.toString())},En.prototype.pullToFront=function(){var At=this.diagram;At.startTransaction("pullToFront");var Dt=new go.Map;At.selection.each(function(Ve){Dt.set(Ve.layer,0)}),Dt.iteratorKeys.each(function(Ve){var Yt=0;Ve.parts.each(function(tn){if(!tn.isSelected){var vt=tn.zOrder;isNaN(vt)?tn.zOrder=0:Yt=Math.max(Yt,vt)}}),Dt.set(Ve,Yt)}),At.selection.each(function(Ve){En._assignZOrder(Ve,Dt.get(Ve.layer)+1)}),At.commitTransaction("pullToFront")},En.prototype.pushToBack=function(){var At=this.diagram;At.startTransaction("pushToBack");var Dt=new go.Map;At.selection.each(function(Ve){Dt.set(Ve.layer,0)}),Dt.iteratorKeys.each(function(Ve){var Yt=0;Ve.parts.each(function(tn){if(!tn.isSelected){var vt=tn.zOrder;isNaN(vt)?tn.zOrder=0:Yt=Math.min(Yt,vt)}}),Dt.set(Ve,Yt)}),At.selection.each(function(Ve){En._assignZOrder(Ve,Dt.get(Ve.layer)-1-En._findGroupDepth(Ve))}),At.commitTransaction("pushToBack")},En._assignZOrder=function(At,Dt,Ve){Ve===void 0&&(Ve=At),At.layer===Ve.layer&&(At.zOrder=Dt),At instanceof go.Group&&At.memberParts.each(function(Yt){En._assignZOrder(Yt,Dt+1,Ve)})},En._findGroupDepth=function(At){if(At instanceof go.Group){var Dt=0;return At.memberParts.each(function(Ve){Dt=Math.max(Dt,En._findGroupDepth(Ve))}),Dt+1}else return 0},En.prototype.doKeyDown=function(){var At=this.diagram;if(At!==null){var Dt=At.lastInput;if(Dt.key==="Up"||Dt.key==="Down"||Dt.key==="Left"||Dt.key==="Right"){var Ve=this.arrowKeyBehavior;if(Ve==="none")return;if(Ve==="select"){this._arrowKeySelect();return}else if(Ve==="move"){this._arrowKeyMove();return}else if(Ve==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},En.prototype._getAllParts=function(){var At=new Array;return this.diagram.nodes.each(function(Dt){At.push(Dt)}),this.diagram.parts.each(function(Dt){At.push(Dt)}),At},En.prototype._arrowKeyMove=function(){var At=this.diagram,Dt=At.lastInput,Ve=0,Yt=0;if(Dt.control||Dt.meta)Ve=1,Yt=1;else if(At.grid!==null){var tn=At.grid.gridCellSize;Yt=tn.width,Ve=tn.height}At.startTransaction("arrowKeyMove"),At.selection.each(function(vt){Dt.key==="Up"?vt.move(new go.Point(vt.actualBounds.x,vt.actualBounds.y-Ve)):Dt.key==="Down"?vt.move(new go.Point(vt.actualBounds.x,vt.actualBounds.y+Ve)):Dt.key==="Left"?vt.move(new go.Point(vt.actualBounds.x-Yt,vt.actualBounds.y)):Dt.key==="Right"&&vt.move(new go.Point(vt.actualBounds.x+Yt,vt.actualBounds.y))}),At.commitTransaction("arrowKeyMove")},En.prototype._arrowKeySelect=function(){var At=this.diagram,Dt=At.lastInput,Ve=null;Dt.key==="Up"?Ve=this._findNearestPartTowards(270):Dt.key==="Down"?Ve=this._findNearestPartTowards(90):Dt.key==="Left"?Ve=this._findNearestPartTowards(180):Dt.key==="Right"&&(Ve=this._findNearestPartTowards(0)),Ve!==null&&(Dt.shift?Ve.isSelected=!0:Dt.control||Dt.meta?Ve.isSelected=!Ve.isSelected:At.select(Ve))},En.prototype._findNearestPartTowards=function(At){var Dt=this.diagram.selection.first();if(Dt===null)return null;for(var Ve=Dt.actualBounds.center,Yt=this._getAllParts(),tn=1/0,vt=Dt,rt=0;rt<Yt.length;rt++){var Vt=Yt[rt];if(Vt!==Dt&&Vt.canSelect()){var rn=Vt.actualBounds.center,Pn=Ve.directionPoint(rn),kn=this._angleCloseness(Pn,At);if(kn<=45){var St=Ve.distanceSquaredPoint(rn);St*=1+Math.sin(kn*Math.PI/180),St<tn&&(tn=St,vt=Vt)}}}return vt},En.prototype._angleCloseness=function(At,Dt){return Math.min(Math.abs(Dt-At),Math.min(Math.abs(Dt+360-At),Math.abs(Dt-360-At)))},En.prototype._arrowKeyTree=function(){var At=this.diagram,Dt=At.selection.first();if(Dt instanceof go.Node){var Ve=At.lastInput;if(Ve.key==="Right"){if(!Dt.isTreeLeaf)if(!Dt.isTreeExpanded)At.commandHandler.canExpandTree(Dt)&&At.commandHandler.expandTree(Dt);else{var Yt=this._sortTreeChildrenByY(Dt).first();Yt!==null&&At.select(Yt)}}else if(Ve.key==="Left")if(!Dt.isTreeLeaf&&Dt.isTreeExpanded)At.commandHandler.canCollapseTree(Dt)&&At.commandHandler.collapseTree(Dt);else{var tn=Dt.findTreeParentNode();tn!==null&&At.select(tn)}else if(Ve.key==="Up"){var tn=Dt.findTreeParentNode();if(tn!==null){var vt=this._sortTreeChildrenByY(tn),rt=vt.indexOf(Dt);if(rt>0){for(var Vt=vt.elt(rt-1);Vt!==null&&Vt.isTreeExpanded&&!Vt.isTreeLeaf;){var rn=this._sortTreeChildrenByY(Vt);Vt=rn.last()}Vt!==null&&At.select(Vt)}else At.select(tn)}}else if(Ve.key==="Down")if(Dt.isTreeExpanded&&!Dt.isTreeLeaf){var Yt=this._sortTreeChildrenByY(Dt).first();Yt!==null&&At.select(Yt)}else for(;Dt!==null;){var tn=Dt.findTreeParentNode();if(tn===null)break;var vt=this._sortTreeChildrenByY(tn),rt=vt.indexOf(Dt);if(rt<vt.length-1){At.select(vt.elt(rt+1));break}else Dt=tn}var Pn=At.selection.first();Pn!==null&&At.scrollToRect(Pn.actualBounds)}},En.prototype._sortTreeChildrenByY=function(At){var Dt=new go.List().addAll(At.findTreeChildrenNodes());return Dt.sort(function(Ve,Yt){var tn=Ve.location,vt=Yt.location;return tn.y<vt.y?-1:tn.y>vt.y?1:tn.x<vt.x?-1:tn.x>vt.x?1:0}),Dt},En.prototype.copyToClipboard=function(At){go.CommandHandler.prototype.copyToClipboard.call(this,At),this._lastPasteOffset.set(this.pasteOffset)},En.prototype.pasteFromClipboard=function(){var At=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(At,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),At},Object.defineProperty(En.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(At){if(At!=="move"&&At!=="select"&&At!=="scroll"&&At!=="tree"&&At!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+At);this._arrowKeyBehavior=At}}),Object.defineProperty(En.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(At){if(!(At instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+At);this._pasteOffset.set(At)}});var Vn=En,He=ve(29277),Ce=ve(43604),Pe=ve(7660),Ne={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ke=ve(73898),Se=ve(59301),nt=(At,Dt,Ve)=>new Promise((Yt,tn)=>{var vt=rn=>{try{Vt(Ve.next(rn))}catch(Pn){tn(Pn)}},rt=rn=>{try{Vt(Ve.throw(rn))}catch(Pn){tn(Pn)}},Vt=rn=>rn.done?Yt(rn.value):Promise.resolve(rn.value).then(vt,rt);Vt((Ve=Ve.apply(At,Dt)).next())});function Pt({onCancel:At,callback:Dt}){let Ve=(0,ce.useRef)(),Yt=(0,ce.useRef)(),tn=(0,ce.useRef)(),vt=(0,ce.useRef)(!1);const rt=(0,ce.useRef)(!1),[Vt,rn]=(0,ce.useState)(0);function Pn(){const St=gt.bx.make,hn={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"};Ve.current=new gt.S0(Yt.current,{padding:20,grid:St(gt.s_,"Grid",St(gt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),St(gt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Rn=>{var Ci=Rn.diagram.commandHandler.addTopLevelParts(Rn.diagram.selection,!0);Ci||Rn.diagram.currentTool.doCancel()},commandHandler:St(Vn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Rn=>{var Ci=Rn.subject;Ci.location=Ci.location.copy().snapToGridPoint(Rn.diagram.grid.gridOrigin,Rn.diagram.grid.gridCellSize),setTimeout(()=>{Rn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Rn=>{var Ci=Rn.subject;setTimeout(()=>{Rn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Rn=>{var Ci=Rn.parameter.part;Ci.invalidateConnectedLinks();var _i=Rn.subject;Rn.diagram.toolManager.linkingTool.isForwards?_i.toNode.invalidateConnectedLinks():_i.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ve.current.nodeTemplate=St(gt.NB,"Auto",{locationSpot:gt.z6.Center,locationObjectName:"SHAPE",desiredSize:new gt.$u(120,60),minSize:new gt.$u(40,40),resizable:!0,resizeCellSize:new gt.$u(10,10),rotatable:!0},new gt.KX("location","loc",gt.E9.parse).makeTwoWay(gt.E9.stringify),new gt.KX("desiredSize","size",gt.$u.parse).makeTwoWay(gt.$u.stringify),St(gt.bn,{name:"SHAPE",fill:hn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:gt.z6.AllSides,toSpot:gt.z6.AllSides},new gt.KX("figure"),new gt.KX("fill"),new gt.KX("stroke","borderColor"),new gt.KX("strokeWidth","thickness"),new gt.KX("strokeDashArray","dash")),St(gt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),St(gt.al,{margin:1,textAlign:"center",overflow:gt.al.OverflowEllipsis,editable:!0},new gt.KX("text").makeTwoWay(),new gt.KX("stroke","color"))),Ve.current.nodeTemplate.toolTip=St("ToolTip",St(gt.s_,"Vertical",{maxSize:new gt.$u(200,NaN)},St(gt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new gt.KX("text")),St(gt.al,{font:"10pt sans-serif",textAlign:"center"},new gt.KX("text","details"))));function In(Rn,Ci){var _i=(ki,Wi)=>{ki.handled=!0,ki.diagram.model.commit(cr=>{var qi=Wi.part.adornedPart,nr=new gt.E9().setRectSpot(qi.actualBounds,Rn);nr.subtract(qi.location),nr.scale(2,2),nr.x+=Math.sign(nr.x)*130,nr.y+=Math.sign(nr.y)*130,nr.add(qi.location),nr.snapToGridPoint(ki.diagram.grid.gridOrigin,ki.diagram.grid.gridCellSize);var dr=cr.copyNodeData(qi.data);cr.setGroupKeyForNodeData(dr,cr.getGroupKeyForNodeData(qi.data)),cr.addNodeData(dr);var Mn={from:qi.key,to:cr.getKeyForNodeData(dr)};cr.addLinkData(Mn);var to=ki.diagram.findNodeForData(dr);to.location=nr,ki.diagram.select(to),setTimeout(()=>{ki.diagram.commandHandler.editTextBlock()},20)})};return St(gt.bn,{figure:Ci,alignment:Rn,alignmentFocus:Rn.opposite(),width:Rn.equals(gt.z6.Top)||Rn.equals(gt.z6.Bottom)?25:18,height:Rn.equals(gt.z6.Top)||Rn.equals(gt.z6.Bottom)?18:25,fill:"orange",stroke:hn.white,strokeWidth:4,mouseEnter:(ki,Wi)=>Wi.fill="dodgerblue",mouseLeave:(ki,Wi)=>Wi.fill="orange",isActionable:!0,click:_i,contextClick:_i})}function ii(Rn){return St(gt.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(Ci,_i)=>_i.fill="dodgerblue",mouseLeave:(Ci,_i)=>_i.fill="orange",click:(Ci,_i)=>{Ci.diagram.commandHandler.showContextMenu(_i.part.adornedPart)}},Rn||{})}Ve.current.nodeTemplate.selectionAdornmentTemplate=St(gt.uz,"Spot",St(gt.Vm,{padding:10}),In(gt.z6.Top,"TriangleUp"),In(gt.z6.Left,"TriangleLeft"),In(gt.z6.Right,"TriangleRight"),In(gt.z6.Bottom,"TriangleDown"),ii({alignment:new gt.z6(.75,0)}));function Gt(Rn,Ci){return(_i,ki)=>{_i.handled=!0,_i.diagram.model.commit(Wi=>{Wi.set(ki.part.adornedPart.data,Rn,Ci)})}}function Jt(Rn,Ci){return Ci||(Ci="color"),St(gt.bn,{width:16,height:16,stroke:"lightgray",fill:Rn,margin:1,background:"transparent",mouseEnter:(_i,ki)=>ki.stroke="dodgerblue",mouseLeave:(_i,ki)=>ki.stroke="lightgray",click:Gt(Ci,Rn),contextClick:Gt(Ci,Rn)})}function hi(){return[St("ContextMenuButton",St(gt.s_,"Horizontal",Jt(hn.white,"fill"),Jt(hn.beige,"fill"),Jt(hn.extralightblue,"fill"),Jt(hn.extralightred,"fill"))),St("ContextMenuButton",St(gt.s_,"Horizontal",Jt(hn.lightgray,"fill"),Jt(hn.lightgreen,"fill"),Jt(hn.lightblue,"fill"),Jt(hn.lightred,"fill")))]}function fi(){return[St("ContextMenuButton",St(gt.s_,"Horizontal",Jt(hn.black),Jt(hn.green),Jt(hn.blue),Jt(hn.red))),St("ContextMenuButton",St(gt.s_,"Horizontal",Jt(hn.white),Jt(hn.magenta),Jt(hn.purple),Jt(hn.orange)))]}function ui(Rn,Ci){return Ci||(Ci="thickness"),St(gt.bn,"LineH",{width:16,height:16,strokeWidth:Rn,margin:1,background:"transparent",mouseEnter:(_i,ki)=>ki.background="dodgerblue",mouseLeave:(_i,ki)=>ki.background="transparent",click:Gt(Ci,Rn),contextClick:Gt(Ci,Rn)})}function ni(Rn,Ci){return Ci||(Ci="dash"),St(gt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Rn,margin:1,background:"transparent",mouseEnter:(_i,ki)=>ki.background="dodgerblue",mouseLeave:(_i,ki)=>ki.background="transparent",click:Gt(Ci,Rn),contextClick:Gt(Ci,Rn)})}function ci(){return[St("ContextMenuButton",St(gt.s_,"Horizontal",ui(1),ui(2),ui(3),ui(4))),St("ContextMenuButton",St(gt.s_,"Horizontal",ni(null),ni([2,4]),ni([4,4])))]}function li(Rn,Ci){return Ci||(Ci="figure"),St(gt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Rn,margin:1,background:"transparent",mouseEnter:(_i,ki)=>ki.fill="dodgerblue",mouseLeave:(_i,ki)=>ki.fill="lightgray",click:Gt(Ci,Rn),contextClick:Gt(Ci,Rn)})}Ve.current.nodeTemplate.contextMenu=St("ContextMenu",St("ContextMenuButton",St(gt.s_,"Horizontal",li("Rectangle"),li("RoundedRectangle"),li("Ellipse"),li("Diamond"))),St("ContextMenuButton",St(gt.s_,"Horizontal",li("Parallelogram2"),li("ManualOperation"),li("Procedure"),li("Cylinder1"))),St("ContextMenuButton",St(gt.s_,"Horizontal",li("Terminator"),li("CreateRequest"),li("Document"),li("TriangleDown"))),hi(),fi(),ci()),Ve.current.groupTemplate=St(gt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:gt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Rn,Ci)=>{var _i=Ci.addMembers(Ci.diagram.selection,!0);_i||Ci.diagram.currentTool.doCancel()},avoidable:!1},new gt.KX("location","loc",gt.E9.parse).makeTwoWay(gt.E9.stringify),St(gt.s_,"Auto",{name:"BODY"},St(gt.bn,{parameter1:10,fill:hn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:gt.z6.AllSides,toSpot:gt.z6.AllSides},new gt.KX("fill"),new gt.KX("stroke","color"),new gt.KX("strokeWidth","thickness"),new gt.KX("strokeDashArray","dash")),St(gt.Vm,{background:"transparent",margin:20})),St(gt.al,{alignment:gt.z6.Top,alignmentFocus:gt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new gt.KX("text"),new gt.KX("stroke","color"))),Ve.current.groupTemplate.selectionAdornmentTemplate=St(gt.uz,"Spot",St(gt.s_,"Auto",St(gt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),St(gt.Vm,{margin:1.5})),ii({alignment:gt.z6.TopRight,alignmentFocus:gt.z6.BottomRight})),Ve.current.groupTemplate.contextMenu=St("ContextMenu",hi(),fi(),ci()),Ve.current.linkTemplate=St(gt.rU,{layerName:"Foreground",routing:gt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new gt.KX("fromSpot","fromSpot",gt.z6.parse),new gt.KX("toSpot","toSpot",gt.z6.parse),new gt.KX("fromShortLength","dir",Rn=>Rn>=1?10:0),new gt.KX("toShortLength","dir",Rn=>Rn>=1?10:0),new gt.KX("points").makeTwoWay(),St(gt.bn,{strokeWidth:2},new gt.KX("stroke","color"),new gt.KX("strokeWidth","thickness"),new gt.KX("strokeDashArray","dash")),St(gt.bn,{segmentIndex:0,segmentOffset:new gt.E9(15,0),segmentOrientation:gt.rU.OrientAlong,alignmentFocus:gt.z6.Right,figure:"circle",width:10,strokeWidth:0},new gt.KX("fill","color"),new gt.KX("visible","dir",Rn=>Rn===1)),St(gt.bn,{segmentIndex:-1,segmentOffset:new gt.E9(-10,6),segmentOrientation:gt.rU.OrientPlus90,alignmentFocus:gt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new gt.KX("fill","color"),new gt.KX("visible","dir",Rn=>Rn>=1),new gt.KX("width","thickness",Rn=>7+3*Rn),new gt.KX("height","thickness",Rn=>7+3*Rn),new gt.KX("segmentOffset","thickness",Rn=>new gt.E9(-15,4+1.5*Rn))),St(gt.bn,{segmentIndex:0,segmentOffset:new gt.E9(15,-6),segmentOrientation:gt.rU.OrientMinus90,alignmentFocus:gt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new gt.KX("fill","color"),new gt.KX("visible","dir",Rn=>Rn===2),new gt.KX("width","thickness",Rn=>7+3*Rn),new gt.KX("height","thickness",Rn=>7+3*Rn),new gt.KX("segmentOffset","thickness",Rn=>new gt.E9(-15,4+1.5*Rn))),St(gt.al,{alignmentFocus:new gt.z6(0,1,-4,0),editable:!0},new gt.KX("text").makeTwoWay(),new gt.KX("stroke","color"))),Ve.current.linkTemplate.selectionAdornmentTemplate=St(gt.uz,St(gt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Ni(2)},new gt.KX("pathPattern","thickness",Ni)),ii({alignmentFocus:new gt.z6(0,0,-6,-4)}));function Ni(Rn){return St(gt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Rn+4).toString()+" H3"})}function Qi(Rn){var Ci="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Rn===0?Ci="M0 0 M16 16 M0 8 L16 8":Rn===2&&(Ci="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),St(gt.bn,{geometryString:Ci,margin:2,background:"transparent",mouseEnter:(_i,ki)=>ki.background="dodgerblue",mouseLeave:(_i,ki)=>ki.background="transparent",click:Gt("dir",Rn),contextClick:Gt("dir",Rn)})}function lr(Rn){var Ci=(_i,ki)=>{_i.handled=!0,_i.diagram.model.commit(Wi=>{var cr=ki.part.adornedPart;Wi.set(cr.data,Rn?"toSpot":"fromSpot",gt.z6.stringify(gt.z6.AllSides)),(Rn?cr.toNode:cr.fromNode).invalidateConnectedLinks()})};return St(gt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(_i,ki)=>ki.background="dodgerblue",mouseLeave:(_i,ki)=>ki.background="transparent",click:Ci,contextClick:Ci})}function wn(Rn,Ci){var _i=0,ki=gt.z6.RightSide;Rn.equals(gt.z6.Top)?(_i=270,ki=gt.z6.TopSide):Rn.equals(gt.z6.Left)?(_i=180,ki=gt.z6.LeftSide):Rn.equals(gt.z6.Bottom)&&(_i=90,ki=gt.z6.BottomSide),Ci||(_i-=180);var Wi=(cr,qi)=>{cr.handled=!0,cr.diagram.model.commit(nr=>{var dr=qi.part.adornedPart;nr.set(dr.data,Ci?"toSpot":"fromSpot",gt.z6.stringify(ki)),(Ci?dr.toNode:dr.fromNode).invalidateConnectedLinks()})};return St(gt.bn,{alignment:Rn,alignmentFocus:Rn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:_i,background:"transparent",mouseEnter:(cr,qi)=>qi.background="dodgerblue",mouseLeave:(cr,qi)=>qi.background="transparent",click:Wi,contextClick:Wi})}Ve.current.linkTemplate.contextMenu=St("ContextMenu",fi(),ci(),St("ContextMenuButton",St(gt.s_,"Horizontal",Qi(0),Qi(1),Qi(2))),St("ContextMenuButton",St(gt.s_,"Horizontal",St(gt.s_,"Spot",lr(!1),wn(gt.z6.Top,!1),wn(gt.z6.Left,!1),wn(gt.z6.Right,!1),wn(gt.z6.Bottom,!1)),St(gt.s_,"Spot",{margin:new gt.Zt(0,0,0,2)},lr(!0),wn(gt.z6.Top,!0),wn(gt.z6.Left,!0),wn(gt.z6.Right,!0),wn(gt.z6.Bottom,!0)))));const Pr=`{ "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 Or=["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 ar(Rn){return console.log("shapeName:",Rn),Or.indexOf(Rn)>=0}var fn=new gt.YI(tn.current,{maxSelectionCount:1,linkTemplate:St(gt.rU,{locationSpot:gt.z6.Center,selectionAdornmentTemplate:St(gt.uz,"Link",{locationSpot:gt.z6.Center},St(gt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),St(gt.bn,{toArrow:"Standard",stroke:null}))},{routing:gt.rU.AvoidsNodes,curve:gt.rU.JumpOver,corner:5,toShortLength:4},new gt.KX("points"),St(gt.bn,{isPanelMain:!0,strokeWidth:2}),St(gt.bn,{toArrow:"Standard",stroke:null})),model:new gt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...gt.bn.getFigureGenerators().toArray().map(Rn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Rn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ve.current.addDiagramListener("TextEdited",function(Rn){var Ci;const _i=Rn.subject.part;var ki=(Ci=document.activeElement)==null?void 0:Ci.value;typeof ki=="string"&&ki.trim()===""&&Ve.current.model.commit(function(Wi){Wi.set(_i.data,"text","\u672A\u547D\u540D"),Ve.current.commandHandler.stopCommand()},"increment")}),fn.nodeTemplate=St(gt.NB,"Auto",{locationSpot:gt.z6.Center},new gt.KX("location","location",gt.E9.parse).makeTwoWay(gt.E9.stringify),St(gt.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 gt.KX("stroke").makeTwoWay(),new gt.KX("fill").makeTwoWay(),new gt.KX("figure")),St(gt.al,{margin:new gt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new gt.$u(16,16),maxSize:new gt.$u(10,NaN),textAlign:"center",editable:!0},new gt.KX("key").makeTwoWay())),setTimeout(()=>{Ve.current.grid=St(gt.s_,"Grid",St(gt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),St(gt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ve.current.grid.visible=!0,Ve.current.grid.gridCellStroke="darkgray",Ve.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ve.current,Ve.current}const kn=()=>nt(this,null,function*(){var St,hn=Ve.current.makeImage();const In=yield(0,Pe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:hn.src,file_data:JSON.stringify({login:(St=(0,ke.eY)())==null?void 0:St.login,data:JSON.parse(Ve.current.model.toJson())})}});Dt({src:In.url})});return(0,ce.useEffect)(()=>(setTimeout(()=>{Pn()},500),rn(Vt+1),()=>{Ve.current=null}),[]),Se.createElement("div",{ref:rt,className:vt.current?`${Ne.maxH60} body-overflow-initial`:"body-overflow-initial"},Se.createElement($t.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Vt,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Se.createElement(Qt.Z,null,Se.createElement(Ce.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Se.createElement(Ce.Z,{onClick:()=>{var St,hn,In=Ve.current.selection.first();if(vt.current=!vt.current,document.activeElement&&In){let ii=(hn=(St=document.activeElement)==null?void 0:St.value)==null?void 0:hn.trim();typeof ii=="string"&&Ve.current.model.commit(function(Gt){Gt.set(In.data,"text",ii||"\u672A\u547D\u540D"),Ve.current.commandHandler.stopCommand()},"increment")}rn(Vt+1)}},Se.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:At},Se.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Ne.flowChartWrp},Se.createElement("div",{style:{display:"flex",height:"100%"}},Se.createElement("div",{style:{width:"300px",height:"100%"}},Se.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Se.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ne.myPaletteDiv,ref:tn})),Se.createElement("div",{style:{flex:1,position:"relative"}},Se.createElement("div",{ref:Yt,style:{height:"80vh"}}))),Se.createElement("div",{className:"tr"},Se.createElement(Re.ZP,{size:"large",onClick:kn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Xe=Pt,Je=ve(5112),yt=ve(5871);const wt=Je.ZP.Group,ot={margin:"0 8px"};var It=({callback:At,onCancel:Dt})=>{function Ve(Yt){At(Yt)}return ce.createElement($e.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ve},ce.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ce.createElement("span",{style:ot},"\u5355\u5143\u683C\u6570\uFF1A"),ce.createElement("span",{style:ot},"\u884C\u6570"),ce.createElement($e.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ce.createElement(yt.Z,null)),ce.createElement("span",{style:ot},"\u5217\u6570"),ce.createElement($e.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ce.createElement(yt.Z,null))),ce.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ce.createElement("span",{style:ot},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ce.createElement($e.default.Item,{name:"align"},ce.createElement(wt,null,ce.createElement(Je.ZP,{value:"default"},ce.createElement("i",{className:"fa fa-align-justify"})),ce.createElement(Je.ZP,{value:"left"},ce.createElement("i",{className:"fa fa-align-left"})),ce.createElement(Je.ZP,{value:"center"},ce.createElement("i",{className:"fa fa-align-center"})),ce.createElement(Je.ZP,{value:"right"},ce.createElement("i",{className:"fa fa-align-right"}))))),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(Re.ZP,{type:"ghost",onClick:Dt},"\u53D6\u6D88")))},sn=ve(78673),Xt=ve(5559),Ht=ve.n(Xt),Dn=(0,ce.forwardRef)(({use3d:At,width:Dt,height:Ve,callback:Yt,showSaveButton:tn},vt)=>{const rt=(0,ce.useRef)(),Vt=(0,ce.useRef)(),[rn,Pn]=(0,ce.useState)(!1),kn=(0,ce.useRef)({id:rt,appName:"graphing",width:Dt||1e3,height:Ve||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ce.useEffect)(()=>{Vt.current=new(Ht())(kn.current,!0),window.onload=function(){Vt.current.inject("applet_container")}},[]);const St=()=>{var hn=window.ggbApplet.getPNGBase64(1,!0,72);return Yt&&Yt(hn),hn};return(0,ce.useEffect)(()=>{kn.current.appName=rn?"3D":"graphing",Vt.current.inject("applet_container")},[rn]),(0,ce.useEffect)(()=>{Pn(At)},[At]),(0,ce.useImperativeHandle)(vt,()=>({getImgData:St})),ce.createElement(ce.Fragment,null,ce.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:rt}),ce.createElement(Qt.Z,{align:"middle"},ce.createElement(Ce.Z,{flex:1},ce.createElement(sn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:rn,onChange:hn=>Pn(hn)})),ce.createElement(Ce.Z,null,ce.createElement(Re.ZP,{size:"large",onClick:St,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),cn=ve(46531),Un=ve(8591);const ti="link",Wn="upload-image",Zn="add-flowchart",Jn="draw-image",vi="add-flowchart",pi="code-block",zi="add-table",$i="------------",Yn={default:$i,left:`:${$i}`,center:`:${$i}:`,right:`${$i}:`};var Gn=ve(50505);function oi(){}let Li=0;const di=1e4,gr="\u2581",Ii="@\u2581\u2581@",Le="@\u2581@",si=`
**\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`,ji=["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 gn(At){return/^\d+$/.test(At)?`${At}px`:At}const mi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Fi={[mi+"-B"]:"bold",[mi+"-I"]:"italic"},jn={[ti]:"\u6DFB\u52A0\u94FE\u63A5",[pi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Wn]:"\u6DFB\u52A0\u56FE\u7247",[Jn]:"\u6DFB\u52A0\u753B\u56FE",[Zn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[zi]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Tn=({defaultValue:At="",onChange:Dt,width:Ve="100%",height:Yt=400,miniToolbar:tn=!1,isFocus:vt=!1,watch:rt,insertTemp:Vt,mode:rn="markdown",id:Pn="markdown-editor-id",showResizeBar:kn=!1,noStorage:St=!1,showNullButton:hn=!1,showNullProgramButton:In=!1,hidetoolBar:ii=!1,fullScreen:Gt=!1,onBlur:Jt,onCMBeforeChange:hi,onFullScreen:fi,className:ui="",disablePaste:ni=!1,disabled:ci=!1,disabledFill:li=!1,placeholder:Ni="",values:Qi="",extraUse:lr})=>{const[wn,Pr]=(0,ce.useState)(null),[Or,ar]=(0,ce.useState)(At),[fn,Rn]=(0,ce.useState)(rt),[Ci,_i]=(0,ce.useState)(Gt),[ki,Wi]=(0,ce.useState)(""),[cr,qi]=(0,ce.useState)(0),[nr,dr]=(0,ce.useState)(Yt),[Mn,to]=(0,ce.useState)(!1),[Ln,Hr]=(0,ce.useState)(0),[so,Bi]=(0,ce.useState)(0),Mo=(0,ce.useRef)(),oo=(0,ce.useRef)(),Ui=(0,ce.useRef)(),er=(0,ce.useRef)();(0,ce.useEffect)(()=>{const Tr=window.scrollY||window.pageYOffset;ar(Qi),wn==null||wn.setValue(Qi),window.scrollTo(0,Tr)},[Qi]),(0,ce.useEffect)(()=>{fi==null||fi(Ci)},[Ci]),(0,ce.useEffect)(()=>{if(Mo.current){let Tr=function(Xn,wr){var bo;if(ni){wr.preventDefault();return}const ta=wr.clipboardData;if(ta){const No=ta.types.toString(),vo=ta.items;if(No==="Files"||ta.types.indexOf("Files")>-1){if(wr.preventDefault(),rn=="stex")return;try{let na=vo[1];((bo=vo[0])==null?void 0:bo.kind)==="file"&&(na=vo[0]);const ia=na.getAsFile(),Ba=ia.name.split(".").pop();(0,Ft.I)(ia,Na=>{var is,pn,Ia;Na.id?((is=ia==null?void 0:ia.type)==null?void 0:is.indexOf("image"))>-1?ir.replaceSelection(`<img width="100%" src="/api/attachments/${Na.id}?type=${Na.content_type})" alt="" />`):((pn=ia==null?void 0:ia.type)==null?void 0:pn.indexOf("video"))>-1?ir.replaceSelection(`<video width="100%" controls src="/api/attachments/${Na.id}"></video>`):((Ia=ia==null?void 0:ia.type)==null?void 0:Ia.indexOf("pdf"))>-1?ir.replaceSelection(`<a href="/api/attachments/${Na.id}?type=${ia.type}&disposition=inline" target="_blank">${ia.name}</a>`):ji.includes(Ba)?ir.replaceSelection(`<a href="/api/attachments/${Na.id}?type=office&disposition=inline" target="_blank">${ia.name}</a>`):ir.replaceSelection(`[${ia.name}](/api/attachments/${Na.id}?type=${Na.content_type})`):(Na==null?void 0:Na.status)===401&&(document.location.href="/user/login")})}catch(na){Un.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ir=ze().fromTextArea(Mo.current,{mode:rn,lineNumbers:!tn,lineWrapping:!0,value:At,autoCloseTags:!0,autoCloseBrackets:!0});return ir.on("keyup",function(Xn,wr){wr.keyCode===8&&(Xn.getValue()==""?ir.setOption("placeholder",Ni):ir.setOption("placeholder",null))}),ir.on("keydown",function(Xn,wr){if(wr.keyCode===8){var bo=no(Xn);bo&&wr.preventDefault()}}),vt&&ir.focus(),ir.on("paste",Tr),ci&&ir.on("beforeChange",function(Xn,wr){(wr.origin==="paste"||wr.origin==="+input")&&wr.cancel()}),Pr(ir),()=>{ir.off("paste",Tr)}}},[]);const Wr=(0,ce.useCallback)(()=>{if(oo.current)try{}catch(Tr){console.log(Tr,"---- to set md editor body height")}},[nr,oo,Ci]);(0,ce.useEffect)(()=>{function Tr(){let ir=new Ct.Z(Xn=>{for(let wr of Xn)(wr.target.offsetHeight>0||wr.target.offsetWidth>0)&&(Wr(),wn.setSize("100%","100%"),wn.refresh())});return ir.observe(Mo.current.parentElement),ir}if(wn){const ir=Tr();return()=>{var Xn,wr;(Xn=Mo.current)!=null&&Xn.parentElement&&ir.unobserve((wr=Mo.current)==null?void 0:wr.parentElement)}}},[wn,Wr]),(0,ce.useEffect)(()=>{if(wn){let Tr=[];for(const[ir,Xn]of Object.entries(Fi)){let wr={[ir]:()=>{xi(Xn)}};Tr.push(wr),wn.addKeyMap(wr)}return()=>{for(let ir of Tr)wn.removeKeyMap(ir)}}},[wn]),(0,ce.useEffect)(()=>{Gt!==Ci&&_i(Gt)},[Gt]),(0,Gn.Z)(()=>{if(!St&&cr>0){let Tr=new Date().getTime(),ir=window.sessionStorage.getItem(Pn);Tr>=cr+di&&(!ir||ir!==Or)&&(window.sessionStorage.setItem(Pn,Or),to(!0))}},di),(0,ce.useEffect)(()=>{Rn(rt)},[wn,rt]),(0,ce.useEffect)(()=>{wn&&vt&&wn.focus()},[wn,vt]),(0,ce.useEffect)(()=>{if(fn&&wn){let Tr=function(Xn){let wr=Xn.target;if(er.current){let bo=wr.scrollTop/wr.scrollHeight;er.current.scrollTop=er.current.scrollHeight*bo}};const ir=wn.getScrollerElement();return ir.addEventListener("scroll",Tr),()=>{ir.removeEventListener("scroll",Tr)}}},[wn,fn]),(0,ce.useEffect)(()=>{if(wn&&hi){let Tr=function(ir,Xn){hi(ir,Xn)};return wn.on("beforeChange",Tr),()=>{wn.off("beforeChange",Tr)}}},[wn,hi]),(0,ce.useEffect)(()=>{if(wn&&Jt){let Tr=function(){Jt(wn.getValue())};return wn.on("blur",Tr),()=>{wn.off("blur",Tr)}}},[wn,Jt]);function no(Tr,ir){var Xn=Tr.getDoc(),wr=Xn.getCursor(),bo=Xn.getLine(wr.line),ta=bo.charAt(wr.ch-1),No=bo.lastIndexOf("@\u2581@",wr.ch),vo=bo.lastIndexOf("@\u2581\u2581@",wr.ch),na=No>vo?No:vo,ia=No>vo?3:4;if(Ii.indexOf(ta)===-1)return null;if(console.log("change1:",ir,Tr,bo,wr,na,No,vo,ta),na>=0&&wr.ch-na<5){var Ba=na+ia;return Xn.replaceRange("",{line:wr.line,ch:na},{line:wr.line,ch:Ba}),{line:wr.line,ch:Ba}}return null}(0,ce.useEffect)(()=>{if(wn){let Tr=function(ir,Xn){const wr=ir.getValue();ar(wr),qi(new Date().getTime()),ir.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Dt&&(In?Dt(wr,Gr(wr)):Dt(wr))};return wn.on("change",Tr),()=>{wn.off("change",Tr)}}},[wn,Dt]),(0,ce.useEffect)(()=>{if(wn)if(At==null)wn.setValue(""),ar("");else{const Tr=window.scrollY||window.pageYOffset;At!==wn.getValue()&&(wn.setValue(At),ar(At),wn.setCursor(ci?1:wn.lineCount(),0),window.scrollTo(0,Tr))}},[wn,At]);const xi=(0,ce.useCallback)(Tr=>{const ir=wn.getCursor(),Xn=wn.getSelection();let wr=Xn.split(`
`);switch(Tr){case"bold":return wn.replaceSelection("**"+Xn+"**"),Xn===""&&wn.setCursor(ir.line,ir.ch+2),wn.focus();case"italic":return wn.replaceSelection("*"+Xn+"*"),Xn===""&&wn.setCursor(ir.line,ir.ch+1),wn.focus();case"code":return wn.replaceSelection("`"+Xn+"`"),Xn===""&&wn.setCursor(ir.line,ir.ch+1),wn.focus();case"inline-latex":return Wi("inline-latex"),wn.focus();case"latex":return wn.replaceSelection("```latex\n"+Xn+"\n```"),wn.setCursor(ir.line+1,Xn.length+1),wn.focus();case"line-break":return wn.replaceSelection(`<br/>
`),wn.focus();case"list-ul":return Xn===""?wn.replaceSelection("- "+Xn):wn.replaceSelection(wr.map(bo=>bo===""?"":`- ${bo}`).join(`
`)),wn.focus();case"list-ol":return Xn===""?wn.replaceSelection("1. "+Xn):wn.replaceSelection(wr.map((bo,ta)=>bo===""?"":`${ta+1}. ${bo}`).join(`
`)),wn.focus();case"add-null-ch":return Xn===""&&wn.setCursor(ir.line,ir.ch),wn.replaceSelection(gr),wn.focus();case"add-signal":return Xn===""&&wn.setCursor(ir.line,ir.ch),wn.replaceSelection(Le),wn.focus();case"add-multiple":return Xn===""&&wn.setCursor(ir.line,ir.ch),wn.replaceSelection(Ii),wn.focus();case"inster-template-1":return Xn===""&&wn.setCursor(ir.line,ir.ch),wn.replaceSelection(si),wn.focus();case"eraser":return wn.setValue(""),wn.focus();case"trigger-watch":return Rn(!fn),wn.focus();case"trigger-full-screen":return _i(!Ci),wn.focus();case ti:Wi(ti);return;case pi:Wi(pi);return;case Wn:Wi(Wn);return;case Jn:Wi(Jn);return;case"maths-latex":Wi("maths-latex");return;case Zn:Wi(Zn);return;case zi:Wi(zi);return;default:throw new Error}},[wn,fn,Ci]),tt=(0,ce.useCallback)((Tr,ir)=>{var Xn,wr,bo,ta,No,vo;switch(Wi(""),ki){case ti:const{title:is,link:pn}=Tr;return wn.replaceSelection(`[${is}](${pn})`),wn.focus();case pi:const{language:Ia,content:Vl}=Tr;return wn.replaceSelection(["```"+Ia,Vl,"```"].join(`
`)),wn.focus();case"maths-latex":for(var na=atob(Tr),ia=new Uint8Array(na.length),Ba=0;Ba<na.length;Ba++)ia[Ba]=na.charCodeAt(Ba);var Na=new Blob([ia],{type:"image/png"});(0,Ft.I)(Na,$r=>{$r.id?wn.replaceSelection(`![,](/api/attachments/${$r.id}?type=${$r.content_type})`):($r==null?void 0:$r.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":wn.replaceSelection("`$$"+Tr+"$$`");break;case Wn:case Jn:case vi:const{src:Hs,alt:wl}=Tr,ka=ir,yu=(bo=(wr=(Xn=ka==null?void 0:ka.name)==null?void 0:Xn.split("."))==null?void 0:wr.pop)==null?void 0:bo.call(wr);return((ta=ka==null?void 0:ka.type)==null?void 0:ta.indexOf("image"))>-1||!(ka!=null&&ka.type)?ka.align||ka.width?wn.replaceSelection(`<p style="text-align:${ka.align||"initial"}"><img width="${ka.width?ka.width+"%":"initial"}" src="${Hs}" alt="${wl||""}" /></p>`):wn.replaceSelection(`<img width="100%" src="${Hs}" alt="${wl||""}" />`):((No=ka==null?void 0:ka.type)==null?void 0:No.indexOf("video"))>-1?wn.replaceSelection(`<video width="100%" controls src="${Hs}"></video>`):((vo=ka==null?void 0:ka.type)==null?void 0:vo.indexOf("pdf"))>-1?wn.replaceSelection(`<a href="${Hs}?type=${ka.type}&disposition=inline" target="_blank">${ka.name}</a>`):ji.includes(yu)?wn.replaceSelection(`<a href="${Hs}?type=office&disposition=inline" target="_blank">${ka.name}</a>`):wn.replaceSelection(`[${ka.name}](${Hs})`),wn.focus();case zi:const{row:Cl,col:ma,align:Fo}=Tr;let Ul=`
`;for(let $r=0;$r<Cl;$r++){let $o=[],yo=[];for(let Di=0;Di<ma;Di++)$r===1&&yo.push(Yn[Fo]),$o.push(" ");$r===1&&(Ul+=`| ${yo.join(" | ")} |
`),Ul+=`| ${$o.join(ma===1?"":" | ")} |
`}return wn.replaceSelection(Ul+`
`),wn.focus();default:throw new Error}},[wn,ki]),lo=(0,ce.useMemo)(()=>{switch(ki){case ti:return ce.createElement(un,{callback:tt,onCancel:_o});case pi:return ce.createElement(ln.Z,{callback:tt,onCancel:_o});case Wn:return ce.createElement(Ft.Z,{callback:tt,onCancel:_o});case Zn:return ce.createElement(Xe,{callback:tt,onCancel:_o});case zi:return ce.createElement(It,{callback:tt,onCancel:_o});case"maths-latex":return ce.createElement(Dn,{showSaveButton:!0,callback:tt});case"inline-latex":return ce.createElement(cn.Z,{showSaveButton:!0,callback:tt});default:return null}},[ki]);function _o(){Wi("")}(0,ce.useEffect)(()=>{if(Ui.current){let Tr=function(No){bo=!0,ta=No.pageY},ir=function(){bo=!1},Xn=function(No){if(bo){let vo=No.pageY-ta;vo<0&&(vo=0),vo>300&&(vo=300);let na=Yt+vo+"px";dr(na)}},wr=Ui.current,bo=!1,ta=0;return wr.addEventListener("mousedown",Tr),document.addEventListener("mousemove",Xn),document.addEventListener("mouseup",ir),()=>{wr.removeEventListener("mousedown",Tr),document.removeEventListener("mousemove",Xn),document.removeEventListener("mouseup",ir)}}},[wn,Ui]),(0,ce.useEffect)(()=>{dr(Yt)},[Yt]);const ga=gn(Ve),Oa=gn(nr),Xo={width:ga,height:Oa},Fa=(0,ce.useMemo)(()=>{if(cr){let Tr=new Date(cr),ir=Tr.getHours(),Xn=Tr.getMinutes(),wr=Tr.getSeconds();return ir=ir<10?"0"+ir:ir,Xn=Xn<10?"0"+Xn:Xn,wr=wr<10?"0"+wr:wr,`${ir}:${Xn}:${wr}`}return 0},[cr]),Gr=Tr=>{const ir=[];if(In){let Xn=-1;Tr=Tr.replace(/(@▁▁@|@▁@)/g,function(wr,bo,ta){ir.push({multiLine:wr!==Le})})}return ir};function Br(){window.sessionStorage.removeItem(Pn),to(!1),qi(0)}function yr(){to(!1),qi(0),wn.setValue(window.sessionStorage.getItem(Pn))}(0,ce.useEffect)(()=>{jn[ki]&&ki!==Jn&&ki!==Zn&&setTimeout(()=>{const Tr=document.getElementsByClassName("markdown-popup-form")[0],ir=window.innerWidth/2-Tr.offsetWidth/2,Xn=window.innerHeight/2-Tr.offsetHeight/2;Hr(ir),Bi(Xn)},0)},[ki]);const xo=Tr=>{Tr.preventDefault();const ir=Tr.clientX-Ln,Xn=Tr.clientY-so;document.body.onmousemove=wr=>{let bo=wr.clientX-ir,ta=wr.clientY-Xn;const No=document.getElementsByClassName("markdown-popup-form")[0],vo=window.innerWidth-No.offsetWidth,na=window.innerHeight-No.offsetHeight;bo=Math.max(0,Math.min(bo,vo)),ta=Math.max(0,Math.min(ta,na)),ua(wr.clientX,wr.clientY,ir,Xn)&&(Hr(bo),Bi(ta))},document.body.onmouseup=function(){document.body.onmousemove=null}},ua=(Tr,ir,Xn,wr)=>{const bo=document.body.clientHeight,ta=document.body.clientWidth;return Tr<20&&Xn>Tr||Tr>ta-20&&Xn<Tr||ir<20&&wr>ir||ir>bo-20&&wr<ir?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:"markdown-editor-wrapper",ref:oo},ce.createElement("div",{className:`markdown-editor-container ${ui} ${fn?"on-preview":""} ${tn?"mini":""} ${Ci?"full-screen":""}`,style:Xo},ce.createElement(je,{insertTemp:Vt,watch:fn,fullScreen:Ci,showNullButton:hn,showNullProgramButton:In,onActionCallback:xi,hidetoolBar:ii,extraUse:lr}),ce.createElement("div",{className:"markdown-editor-body"},ce.createElement("div",{className:"codemirror-container"},ce.createElement("textarea",{ref:Mo,placeholder:Ni})),fn?ce.createElement("div",{ref:er,className:"preview-container"},rn==="stex"&&ce.createElement(ht,{value:Or}),rn!=="stex"&&ce.createElement(Et.Z,{disabledFill:li,showProgramFill:In,value:Or})):null))),kn?ce.createElement("a",{ref:Ui,className:"editor-resize"}):null,ki===Jn&&ce.createElement(Cn,{callback:tt,onCancel:_o}),ki===Zn&&ce.createElement(Xe,{callback:tt,onCancel:_o}),ce.createElement(qe.Z,null,jn[ki]&&ki!==Jn&&ki!==Zn?ce.createElement($t.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Ln,top:so},title:ce.createElement("div",{style:{cursor:"move"},onMouseDown:xo},jn[ki]),open:!0,onCancel:_o,footer:null,destroyOnClose:!0,width:ki===Zn?"1200px":null,height:ki===Zn?"80vh":null,className:"markdown-popup-form"},lo):null))}},56030:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return be},I:function(){return je}});var ce=ve(78241),De=ve(8591),ze=ve(92832),Ct=ve(81327),_e=ve(5871),Ke=ve(5112),Be=ve(3113),mt=ve(49291),ct=ve(59301),Ze=ve(59301),Et=Object.defineProperty,ht=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,he=(qe,$e,ft)=>$e in qe?Et(qe,$e,{enumerable:!0,configurable:!0,writable:!0,value:ft}):qe[$e]=ft,se=(qe,$e)=>{for(var ft in $e||($e={}))te.call($e,ft)&&he(qe,ft,$e[ft]);if(Ae)for(var ft of Ae($e))ee.call($e,ft)&&he(qe,ft,$e[ft]);return qe},de=(qe,$e)=>ht(qe,dt($e));const{useForm:me}=ce.default,we={width:280,marginRight:10},Me={labelCol:{span:5},wrapperCol:{span:19}};var be=({callback:qe,onCancel:$e})=>{const[ft]=me();let Re=(0,ct.useRef)();function Tt(Bt){Re.current.width=ft.getFieldValue("width"),Re.current.align=ft.getFieldValue("align"),qe(Bt,Re.current)}function et(Bt,Nt){if(Bt.status===-1){De.ZP.error(Bt.message);return}ft.setFieldsValue({src:`/api/attachments/${Bt.id}`,type:Nt.type})}function bt(Bt){let Nt=Bt.target.files[0];Re.current=Nt,je(Nt,et)}return Ze.createElement(ce.default,de(se({form:ft},Me),{className:"upload-image-panel",onFinish:Tt,style:{width:470,overflow:"hidden"}}),Ze.createElement(ce.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Ze.createElement("div",{className:"flex-container"},Ze.createElement(ce.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Ze.createElement(ze.default,{style:we})),Ze.createElement(Ie,{onFileChange:bt}))),Ze.createElement(ce.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Ze.createElement(ze.default,{style:{width:264}})),Ze.createElement(ce.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Ze.createElement(Ct.Z,null,Ze.createElement(ce.default.Item,{name:"width",style:{margin:0}},Ze.createElement(_e.Z,{style:{width:264}})),Ze.createElement("span",{className:"ml8"},"%"))),Ze.createElement(ce.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Ze.createElement(Ke.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"}]})),Ze.createElement("aside",null,Ze.createElement(ce.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Ze.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ze.createElement(Be.ZP,{type:"default",onClick:$e},"\u53D6\u6D88"))))};function Ie({onFileChange:qe}){return Ze.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Ze.createElement("input",{type:"file",onChange:qe}))}function je(qe,$e){if(!qe)throw new String("\u6CA1\u6709\u6587\u4EF6");let ft=new FormData;ft.append("editormd-image-file",qe),ft.append("file_param_name","editormd-image-file"),ft.append("byxhr","true");var Re=new window.XMLHttpRequest;Re.withCredentials=!0,Re.addEventListener("load",function(Tt){$e(JSON.parse(Tt.target.responseText),qe)},!1),Re.addEventListener("error",function(Tt){console.error(Tt)},!1),Re.open("POST",`${mt.KI}/api/attachments.json`),Re.send(ft)}},19647:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return ze}});var ce=ve(59301),De=ve(4676);class ze extends ce.Component{constructor(_e){super(_e);const Ke=window.document;this.node=Ke.createElement("div"),Ke.body.appendChild(this.node)}render(){const{children:_e}=this.props;return(0,De.createPortal)(_e,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},57800:function(Sn,an,ve){"use strict";ve.d(an,{SV:function(){return nt},ZP:function(){return Se}});var ce=ve(59301),De=ve(76374);const ze={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"]},Ct={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"]},_e={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(`
`)}]},Ke={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(`
`)}]},Be={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 mt=ve(7947),ct=ve.n(mt),Ze=Object.defineProperty,Et=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ee=(Pt,Xe,Je)=>Xe in Pt?Ze(Pt,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Pt[Xe]=Je,he=(Pt,Xe)=>{for(var Je in Xe||(Xe={}))Ae.call(Xe,Je)&&ee(Pt,Je,Xe[Je]);if(dt)for(var Je of dt(Xe))te.call(Xe,Je)&&ee(Pt,Je,Xe[Je]);return Pt},se=(Pt,Xe)=>Et(Pt,ht(Xe)),de=(Pt,Xe,Je)=>new Promise((yt,wt)=>{var ot=Xt=>{try{sn(Je.next(Xt))}catch(Ht){wt(Ht)}},It=Xt=>{try{sn(Je.throw(Xt))}catch(Ht){wt(Ht)}},sn=Xt=>Xt.done?yt(Xt.value):Promise.resolve(Xt.value).then(ot,It);sn((Je=Je.apply(Pt,Xe)).next())});const me={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"]}},we=(Pt,Xe)=>Xe.map(Je=>({label:Je,kind:Pt.languages.CompletionItemKind.Keyword,insertText:Je})),Me=Pt=>Object.keys(me.tables).map(Xe=>({label:Xe,kind:Pt.languages.CompletionItemKind.Variable,insertText:Xe})),be=(Pt,Xe)=>{const Je=me.tables[Pt];return Je?Je.map(yt=>({label:yt,kind:Xe.languages.CompletionItemKind.Field,insertText:yt})):[]};function Ie(Pt,Xe,Je,yt,wt){let ot=Xe.getWordUntilPosition(Je),It={startLineNumber:Je.lineNumber,endLineNumber:Je.lineNumber,startColumn:ot.startColumn,endColumn:ot.endColumn},sn=yt.map(Xt=>({label:Xt,kind:Pt.languages.CompletionItemKind.Keyword,insertText:Xt,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:It}));return wt.map(Xt=>{sn.push(se(he({},Xt),{range:It}))}),sn}var je=Pt=>{me.languages.map(wt=>(Pt.languages.registerDocumentFormattingEditProvider(wt,{provideDocumentFormattingEdits(ot,It,sn){return de(this,null,function*(){const Xt=ct()(ot.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:ot.getFullModelRange(),text:Xt}]})}}),wt));const Xe=_e.quickKey.map(wt=>({label:wt.label,kind:Pt.languages.CompletionItemKind.Method,insertText:wt.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Je=Ke.quickKey.map(wt=>({label:wt.label,kind:Pt.languages.CompletionItemKind.Method,insertText:wt.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),yt=Ct.quickKey.map(wt=>({label:wt.label,kind:Pt.languages.CompletionItemKind.Method,insertText:wt.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Pt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(wt,ot){var It=wt.getWordUntilPosition(ot),sn={startLineNumber:ot.lineNumber,endLineNumber:ot.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn},Xt=wt.getLineContent(ot.lineNumber).substring(It.startColumn-2,It.endColumn);return{suggestions:[..._e.keywords.map(Ht=>({label:Ht,kind:Pt.languages.CompletionItemKind.Function,documentation:Ht,insertText:Ht,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:sn})),..._e.quickKey.map(Ht=>({label:Ht.label,kind:Pt.languages.CompletionItemKind.Function,documentation:Ht.content,insertText:Xt.startsWith("#")?Ht.content.replace(/#/,""):Ht.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:sn}))]}}}),Pt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(wt,ot){var It=wt.getWordUntilPosition(ot),sn={startLineNumber:ot.lineNumber,endLineNumber:ot.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn};return{suggestions:[...ze.keywords.map(Xt=>({label:Xt,kind:Pt.languages.CompletionItemKind.Function,documentation:Xt,insertText:Xt,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:sn}))]}}}),Pt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(wt,ot){var It=wt.getWordUntilPosition(ot),sn={startLineNumber:ot.lineNumber,endLineNumber:ot.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn},Xt=wt.getLineContent(ot.lineNumber).substring(It.startColumn-2,It.endColumn);return{suggestions:[...Ct.keywords.map(Ht=>({label:Ht,kind:Pt.languages.CompletionItemKind.Function,documentation:Ht,insertText:Ht,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:sn})),...Ct.quickKey.map(Ht=>({label:Ht.label,kind:Pt.languages.CompletionItemKind.Function,documentation:Ht.content,insertText:Xt.startsWith("#")?Ht.content.replace(/#/,""):Ht.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:sn}))]}}}),Pt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(wt,ot){var It=wt.getWordUntilPosition(ot),sn={startLineNumber:ot.lineNumber,endLineNumber:ot.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn},Xt=wt.getLineContent(ot.lineNumber).substring(It.startColumn-2,It.endColumn);return{suggestions:[...Be.keywords.map(Ht=>({label:Ht,kind:Pt.languages.CompletionItemKind.Function,documentation:Ht,insertText:Ht,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:sn})),...Be.quickKey.map(Ht=>({label:Ht.label,kind:Pt.languages.CompletionItemKind.Function,documentation:Ht.content,insertText:Xt.startsWith("#")?Ht.content.replace(/#/,""):Ht.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:sn}))]}}}),Pt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(wt,ot){var It=wt.getWordUntilPosition(ot),sn={startLineNumber:ot.lineNumber,endLineNumber:ot.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn},Xt=wt.getLineContent(ot.lineNumber).substring(It.startColumn-2,It.endColumn);return{suggestions:[...Ke.keywords.map(Ht=>({label:Ht,kind:Pt.languages.CompletionItemKind.Function,documentation:Ht,insertText:Ht,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:sn})),...Ke.quickKey.map(Ht=>({label:Ht.label,kind:Pt.languages.CompletionItemKind.Function,documentation:Ht.content,insertText:Xt.startsWith("#")?Ht.content.replace(/#/,""):Ht.content,insertTextRules:Pt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:sn}))]}}})};const qe="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var $e=Object.defineProperty,ft=(Pt,Xe,Je)=>Xe in Pt?$e(Pt,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Pt[Xe]=Je,Re=(Pt,Xe,Je)=>ft(Pt,typeof Xe!="symbol"?Xe+"":Xe,Je);const Tt=class px{constructor(Xe,Je,yt){this.placeholder=Xe,this.editor=Je,this.monaco=yt,Je.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return px.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)}};Re(Tt,"ID","editor.widget.placeholderHint");var bt=Tt,Bt=ve(96236),Nt=ve(8591),Zt=ve(6848),Ut=ve(89392),lt=ve(50484),Ge=ve(56102),kt=Object.defineProperty,un=Object.defineProperties,ln=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,Bn=(Pt,Xe,Je)=>Xe in Pt?kt(Pt,Xe,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Pt[Xe]=Je,on=(Pt,Xe)=>{for(var Je in Xe||(Xe={}))$t.call(Xe,Je)&&Bn(Pt,Je,Xe[Je]);if(Ft)for(var Je of Ft(Xe))Qt.call(Xe,Je)&&Bn(Pt,Je,Xe[Je]);return Pt},Cn=(Pt,Xe)=>un(Pt,ln(Xe)),gt=(Pt,Xe)=>{var Je={};for(var yt in Pt)$t.call(Pt,yt)&&Xe.indexOf(yt)<0&&(Je[yt]=Pt[yt]);if(Pt!=null&&Ft)for(var yt of Ft(Pt))Xe.indexOf(yt)<0&&Qt.call(Pt,yt)&&(Je[yt]=Pt[yt]);return Je},En=(Pt,Xe,Je)=>new Promise((yt,wt)=>{var ot=Xt=>{try{sn(Je.next(Xt))}catch(Ht){wt(Ht)}},It=Xt=>{try{sn(Je.throw(Xt))}catch(Ht){wt(Ht)}},sn=Xt=>Xt.done?yt(Xt.value):Promise.resolve(Xt.value).then(ot,It);sn((Je=Je.apply(Pt,Xe)).next())});function Vn(Pt){return/^\d+$/.test(Pt)?`${Pt}px`:Pt}function He(){}let Ce=!1;const Pe={"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 Ne(Pt=[]){let Xe=Pt;if(Array.isArray(Pt)){for(let Je=0;Je<Pt.length;Je++){let yt=Pe[Pt[Je]];if(yt)return yt}return Xe[0]}return Pe[Xe]||Xe}let ke=null;var Se=Pt=>{var Xe=Pt,{width:Je="100%",height:yt="100%",value:wt,language:ot="javascript",style:It={},options:sn={},overrideServices:Xt={},theme:Ht="vs-dark",onEditBlur:xn,isCopy:Dn=!1,onSave:cn,autoHeight:Un=!1,forbidCopy:ti=!1,onChange:Wn=He,editorDidMount:Zn=He,onFocus:Jn=He,onBreakPoint:vi=He,breakPointValue:pi=[],filename:zi="educoder.txt",errorLine:$i,errorContent:Yn="",highlightLine:Gn,openBreakPoint:oi=!1,placeholder:Li=""}=Xe,di=gt(Xe,["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 gr=(0,ce.useRef)(),Ii=(0,ce.useRef)({}),Le=(0,ce.useRef)(),si=(0,ce.useRef)(),ji=(0,ce.useRef)([]),gn=(0,ce.useRef)(!1),qn=(0,ce.useRef)(),mi=(0,ce.useRef)(),Fi=(0,ce.useRef)(!1),[jn,Tn]=(0,ce.useState)(!1);function At(){let Gt;return gr.current&&(Gt=new De.Z(Jt=>{for(let hi of Jt)(hi.target.offsetHeight>0||hi.target.offsetWidth>0)&&Ii.current.instance.layout()}),Gt.observe(gr.current)),Gt}function Dt(){Nt.ZP.warning({content:decodeURIComponent(qe),key:"monaco-editor-tip"})}const Ve=()=>{let Gt=Ii.current.instance;if(wt!=null&&Gt&&jn){const Jt=Gt.getModel();Jt&&wt!==Jt.getValue()&&(Ce=!0,Jt.setValue(wt),Gt.layout(),Ce=!1)}};(0,ce.useEffect)(()=>{const Gt=lt.Z.subscribe("formatDocument",Jt=>{var hi;let fi=Ii.current.instance;(hi=fi==null?void 0:fi.getAction)==null||hi.call(fi,"editor.action.formatDocument").run()});return window.updateMonacoValue=Jt=>{Wn(Jt)},Gt},[]),(0,ce.useEffect)(()=>{var Gt;let Jt=Ii.current.instance;si.current&&clearTimeout(si.current),si.current=setTimeout(()=>{Ve()},500),wt&&(wt!=null&&wt.length)&&((Gt=Jt==null?void 0:Jt.updateOptions)==null||Gt.call(Jt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(wt.split(/\r\n|\r|\n/g).length))+3,5)}))},[wt,jn,Ii.current]),(0,ce.useEffect)(()=>{if($i&&Ii.current&&Ii.current.instance){let Jt=Ii.current.instance;Jt.changeViewZones(function(hi){var fi=document.createElement("div");fi.style.padding="10px 20px",fi.style.width="calc(100% - 20px)",fi.className="my-error-line-wrp",fi.innerHTML=Yn,hi.addZone({afterLineNumber:$i||11,heightInLines:3,domNode:fi})});var Gt={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}};Jt.addOverlayWidget(Gt),Jt.revealPositionInCenter({lineNumber:20,column:1})}},[$i,Ii.current,jn]);const Yt=(Gt="",Jt)=>{if(!Gt||Gt.trim()==="")return!0;const fi=Ii.current.instance.getModel().getLineTokens(Jt);let ui=!1;for(let ni=0;ni<2;ni++)fi.getStandardTokenType(ni)===1&&(ui=!0);return ui};(0,ce.useEffect)(()=>{var Gt;const Jt=(Gt=Ii.current)==null?void 0:Gt.instance;if(Jt&&jn&&ti){const hi=Jt.onDidBlurEditorWidget(()=>{Fi.current=!1}),fi=Jt.onDidFocusEditorText(()=>{Fi.current=!0});return()=>{hi.dispose(),fi.dispose()}}},[Ii.current,jn,ti]),(0,ce.useEffect)(()=>{var Gt;if((Gt=Ii.current)!=null&&Gt.instance&&jn&&oi){let Jt=Ii.current.instance,hi=Jt.getModel();if(!hi)return;(()=>{var ar;let fn=[],Rn=[];const Ci=hi.getAllDecorations();for(let ki of Ci)ki.options.className==="highlighted-line"&&(fn.push((ar=ki==null?void 0:ki.range)==null?void 0:ar.startLineNumber),Rn.push(ki==null?void 0:ki.id));if(Gn===fn[0])return;hi.deltaDecorations(Rn,[]);const _i=hi.getLineCount();Gn&&Gn<=_i&&(Jt.deltaDecorations([],[{range:new ke.Range(Gn,1,Gn,hi.getLineMaxColumn(Gn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Jt.revealLineInCenter(Gn))})();const ui=(ar=!1)=>{var fn;let Rn=[],Ci=[];const _i=hi.getAllDecorations();for(let ki of _i)ki.options.linesDecorationsClassName==="breakpoints-select"&&(Rn.push((fn=ki==null?void 0:ki.range)==null?void 0:fn.startLineNumber),Ci.push(ki==null?void 0:ki.id));if(ar)return{lines:Rn,ids:Ci};vi(Rn)},ni=ar=>En(void 0,null,function*(){let fn={range:new ke.Range(ar,1,ar,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield hi.deltaDecorations([],[fn]),ui()}),ci=ar=>En(void 0,null,function*(){let fn=[];const Rn=Jt.getLineDecorations(ar);for(let Ci of Rn)Ci.options.linesDecorationsClassName==="breakpoints-select"&&fn.push(Ci.id);yield hi.deltaDecorations(fn,[]),ui()}),li=ar=>{let fn=Jt.getLineDecorations(ar);for(let Rn of fn)if(Rn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ut.isEqual)(pi,ui(!0).lines)){hi.deltaDecorations(ui(!0).ids,[]);const ar=pi.map(fn=>({range:new ke.Range(fn,1,fn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));hi.deltaDecorations([],ar)}const Ni=Jt.onDidChangeModelContent(ar=>{let fn=Jt.getPosition();if(fn){let Rn=fn.lineNumber;clearTimeout(mi.current),mi.current=setTimeout(()=>{Yt(hi.getLineContent(Rn),Rn)?ci(Rn):li(Rn)?(ci(Rn),ni(Rn)):ui()},100)}}),Qi=Jt.onMouseDown(ar=>{var fn,Rn,Ci;if(ar.target.detail&&((Ci=(Rn=(fn=ar.target)==null?void 0:fn.element)==null?void 0:Rn.className)!=null&&Ci.includes("line-numbers"))){let _i=ar.target.position.lineNumber;if(Yt(hi.getLineContent(_i),_i))return;li(_i)?ci(_i):ni(_i)}}),lr=ar=>{let fn={range:new ke.Range(ar,1,ar,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ji.current=Jt.deltaDecorations(ji.current,[fn])},wn=()=>{ji.current=Jt.deltaDecorations(ji.current,[])},Pr=Jt.onMouseMove(ar=>{var fn,Rn,Ci;if(wn(),ar.target.detail&&((Ci=(Rn=(fn=ar.target)==null?void 0:fn.element)==null?void 0:Rn.className)!=null&&Ci.includes("line-numbers"))){let _i=ar.target.position.lineNumber;if(Yt(hi.getLineContent(_i),_i))return;lr(_i)}}),Or=Jt.onMouseLeave(()=>{wn()});return()=>{Ni.dispose(),Qi.dispose(),Pr.dispose(),Or.dispose()}}},[Ii.current,jn,pi,Gn,oi,ot]),(0,ce.useEffect)(()=>{var Gt;(Gt=Ii.current)!=null&&Gt.instance&&oi&&Ii.current.instance.setPosition({lineNumber:0,column:0})},[Gn]);function tn(){let Gt=Ii.current.instance;if(Gt){const Jt=Gt.getSelection(),hi=Ii.current.pastePos||{},fi=new ke.Range(hi.startLineNumber||Jt.endLineNumber,hi.startColumn||Jt.endColumn,hi.endLineNumber||Jt.endLineNumber,hi.endColumn||Jt.endColumn);setTimeout(()=>{Gt.executeEdits("",[{range:fi,text:""}])},300)}}function vt(Gt){(window.navigator.platform.match("Mac")?Gt.metaKey:Gt.ctrlKey)&&Gt.keyCode==83&&(Gt.preventDefault(),cn())}const rt=()=>{if(Un&&Ii.current.instance){const Gt=Ii.current.instance.getContentHeight();In(Gt<yt?yt:Gt)}else In(yt)};function Vt(Gt){var Jt=document.createEvent("MouseEvents");Jt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Gt.dispatchEvent(Jt)}const rn=Gt=>{if(!Fi.current)return;const{keyCode:Jt,ctrlKey:hi,metaKey:fi,target:ui,type:ni}=Gt;return(ni==="paste"||(Jt===67||Jt===86)&&(fi||hi))&&ui.nodeName==="TEXTAREA"&&(Dt(),Gt.preventDefault()),!1};function Pn(Gt,Jt){var hi=window.URL||window.webkitURL||window,fi=new Blob([Jt]),ui=document.createElementNS("http://www.w3.org/1999/xhtml","a");ui.href=hi.createObjectURL(fi),ui.download=Gt,Vt(ui)}(0,ce.useEffect)(()=>{rt()},[rt]),(0,ce.useEffect)(()=>{gr.current&&!jn&&Promise.all([ve.e(8909),ve.e(6894)]).then(ve.bind(ve,71448)).then(Gt=>{try{ke=Gt,Ii.current.instance=ke.editor.create(gr.current,{value:wt,language:Ne(ot),theme:Ht,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Xt);const Jt=Ii.current.instance;let ui=[...Bt.BH._menuItems].find(Ni=>Ni[0]._debugName=="EditorContext")[1],ni=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ci=(Ni,Qi)=>{var lr,wn;let Pr=Ni._first;do Qi.includes((wn=(lr=Pr.element)==null?void 0:lr.command)==null?void 0:wn.id)&&Ni._remove(Pr);while(Pr=Pr.next)};if(Zn(Jt,ke),setTimeout(()=>{rt(),Ii.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Pn(zi||"educoder.txt",Jt.getValue())}})},500),Ii.current.subscription=Jt.onDidChangeModelContent(Ni=>{gn.current?clearTimeout(qn.current):(rt(),Wn(Jt.getValue(),Ni)),qn.current=setTimeout(()=>{gn.current=!1},500)}),window.Monaco||je(ke,Ne(ot)),ti&&(ci(ui,ni),gr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",rn),window.removeEventListener("paste",rn),window.addEventListener("keydown",rn),window.addEventListener("paste",rn)),window.Monaco=ke,xn&&Jt.onDidBlurEditorWidget(()=>{xn(Jt.getValue())}),Jn&&Jt.onDidFocusEditorText(()=>{Jn(Jt.getValue())}),ti)try{Jt.onDidPaste(Ni=>{const Qi=Jt.getSelection(),lr=Ii.current.pastePos||{},wn=new ke.Range(lr.startLineNumber||Qi.endLineNumber,lr.startColumn||Qi.endColumn,lr.endLineNumber||Qi.endLineNumber,lr.endColumn||Qi.endColumn);Jt.executeEdits("",[{range:Ni.range,text:""}])})}catch(Ni){}let li=At();return Li&&typeof Li=="string"&&new bt(Li,Jt,ke),Tn(!0),()=>{const Ni=Ii.current.instance;Ni.dispose();const Qi=Ni.getModel();Qi&&Qi.dispose(),Ii.current.subscription&&Ii.current.subscription.dispose(),li.unobserve(gr.current)}}catch(Jt){}})},[]),(0,ce.useEffect)(()=>{if(Ii.current.instance&&jn)return document.addEventListener("keydown",vt,!1),()=>{document.removeEventListener("keydown",vt)}},[cn,jn]),(0,ce.useEffect)(()=>{let Gt=Ii.current.instance;if(Gt&&jn){let Jt=Ne(ot);ke.editor.setModelLanguage(Gt.getModel(),Jt)}},[ot,jn]),(0,ce.useEffect)(()=>{Ii.current.instance&&jn&&ke.editor.setTheme(Ht)},[Ht,jn]),(0,ce.useEffect)(()=>{let Gt=Ii.current.instance;Le.current=sn,Gt&&jn&&(Gt.updateOptions(on({},sn)),setTimeout(()=>{Gt.getModel().updateOptions(on({},sn))},200))},[JSON.stringify(sn),jn]),(0,ce.useEffect)(()=>{let Gt=Ii.current.instance;Gt&&jn&&Gt.layout()},[Je,yt,jn]);const[kn,St]=(0,ce.useState)(Vn(Je)),[hn,In]=(0,ce.useState)(Vn(yt)),ii=Cn(on({},It),{width:kn,height:hn,position:"relative"});return ce.createElement("div",{className:"my-monaco-editor",ref:gr,style:ii},Dn&&ce.createElement(Ge.CopyToClipboard,{text:wt,onCopy:()=>Nt.ZP.success("\u590D\u5236\u6210\u529F")},ce.createElement(Zt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ce.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ce.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function nt({width:Pt="100%",height:Xe="100%",original:Je,modified:yt,language:wt,options:ot={}}){const It=(0,ce.useRef)(),[sn,Xt]=(0,ce.useState)(null);function Ht(Un){let ti;return It.current&&(ti=new De.Z(Wn=>{for(let Zn of Wn)(Zn.target.offsetHeight>0||Zn.target.offsetWidth>0)&&Un.layout()}),ti.observe(It.current)),ti}(0,ce.useEffect)(()=>(It.current&&Promise.all([ve.e(8909),ve.e(9404)]).then(ve.bind(ve,2550)).then(Un=>{ke=Un;const ti=ke.editor.createDiffEditor(It.current,Cn(on({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},ot),{wordWrap:!0}));Xt(ti);let Wn=Ht(ti);return()=>{ti.dispose();const Zn=ti.getModel();Zn&&Zn.dispose(),Wn.unobserve(It.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ce.useEffect)(()=>{sn&&sn.setModel({original:ke.editor.createModel(Je,wt),modified:ke.editor.createModel(yt,wt)})},[Je,yt,wt,sn]);const xn=Vn(Pt),Dn=Vn(Xe),cn={width:xn,height:Dn};return ce.createElement("div",{className:"my-diff-editor",ref:It,style:cn})}},15965:function(Sn,an,ve){"use strict";ve.d(an,{jL:function(){return _e},w9:function(){return $t},QD:function(){return Wn},cQ:function(){return Ge},op:function(){return Ht},O5:function(){return Fi},_b:function(){return $i},t7:function(){return se},Gi:function(){return En},YG:function(){return Cn},qp:function(){return Et},vr:function(){return vi},qE:function(){return cn},Je:function(){return we},wb:function(){return Bt},cq:function(){return ke},tp:function(){return Ae}});var ce=ve(59301),De={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"},ze="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==",_e=({dataSource:jn=[],img:Tn,imgWidth:At=346,title:Dt,sunTitle:Ve,bannerExtraContent:Yt})=>ce.createElement("div",{className:De.banner},ce.createElement("div",{className:De.content},ce.createElement("aside",null,ce.createElement("p",null,ce.createElement("b",null,Dt),ce.createElement("span",null,Ve)),jn.length>0&&ce.createElement("div",{className:De.btns},jn.map((tn,vt)=>ce.createElement("div",{key:vt,onClick:tn.click},tn.name,tn.sign?ce.createElement("img",{src:ze,width:39}):null))),Yt),Tn&&ce.createElement("img",{style:{marginTop:33,marginRight:38},src:Tn,width:At}))),Ke={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"},Be=ve(92310),mt=ve.n(Be),ct=ve(89392),Et=({dataSource:jn=[],value:Tn,onChange:At,onTitleChange:Dt,className:Ve,title:Yt,titleWidth:tn=41,style:vt={},fontColor:rt="#6A7283",showCount:Vt})=>{const[rn,Pn]=(0,ce.useState)(0),[kn,St]=(0,ce.useState)(!1),hn=(0,ce.useRef)(null),In=(0,ce.useRef)(null);return(0,ce.useEffect)(()=>{var ii;jn.length!==0&&(((ii=hn==null?void 0:hn.current)==null?void 0:ii.clientHeight)>97?Pn(1):Pn(0)),jn.length===0&&Pn(0),St(!1)},[jn]),ce.createElement("div",{className:mt()(Ke.row,Ve),style:vt},ce.createElement("div",{onClick:(0,ct.throttle)(()=>Dt==null?void 0:Dt(),2e3),style:{width:tn,marginTop:kn?12:4},className:`${Ke.title} ${Dt?"current":""}`},Yt),ce.createElement("div",{className:kn?`${Ke.tagsWrap} ${Ke.tagsBorderWrap}`:Ke.tagsWrap},ce.createElement("div",{className:Ke.bar,ref:In,style:rn>0?{height:rn===1?97:"auto",overflow:rn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ce.createElement("div",{className:Ke.tag,ref:hn},jn==null?void 0:jn.map(ii=>ce.createElement("span",{onClick:()=>At(ii.id),key:ii.id,style:{color:rt},className:Tn===ii.id?Ke.active:""},ce.createElement("span",{title:ii.name,className:Ke.name},ii.name),!!Vt&&ce.createElement("span",{className:Ke.num},ii.count))))),!!rn&&ce.createElement(ce.Fragment,null,rn===1?ce.createElement("div",{onClick:()=>{var ii;Pn(2),((ii=hn==null?void 0:hn.current)==null?void 0:ii.clientHeight)>245?St(!0):St(!1)},className:Ke.action},"\u5C55\u5F00",ce.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ce.createElement("div",{onClick:()=>{In.current.scrollTop=0,Pn(1),St(!1)},className:Ke.action},"\u6536\u8D77",ce.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},ht={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"},Ae=({dataSource:jn=[],value:Tn,onChange:At,className:Dt,style:Ve={}})=>ce.createElement("div",{style:Ve,className:mt()(ht.tabs,Dt)},jn.map(Yt=>ce.createElement("span",{onClick:()=>At(Yt.id),className:Tn===Yt.id?ht.active:"",key:Yt.id},Yt.name))),te={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"},ee=ve(92832),se=({dataSource:jn=[],value:Tn="",onChange:At,onInputChange:Dt=()=>{},className:Ve,style:Yt={},placeholder:tn,allowClear:vt=!1})=>{var rt;const[Vt,rn]=(0,ce.useState)(""),[Pn,kn]=(0,ce.useState)("");(0,ce.useEffect)(()=>{var In;let ii=Tn;(In=JSON.stringify(Tn))!=null&&In.includes("{")&&(rn(Tn.id),ii=Tn.value||"");try{kn(decodeURIComponent(ii||""))}catch(Gt){kn(decodeURIComponent(ii||""))}},[Tn]);const St=()=>{At(encodeURIComponent(Pn),Vt||null)},hn=In=>{In!==Vt&&(rn(In),At(encodeURIComponent(Pn),In))};return ce.createElement("div",{className:mt()(te.input,Ve),style:Yt},!!jn.length&&ce.createElement("div",{className:te.dropdown},ce.createElement("div",{className:te.text},(rt=jn.find(In=>In.id===Vt))==null?void 0:rt.name,ce.createElement("i",{className:"iconfont icon-zhankai4"}),ce.createElement("b",{className:te.b1}),ce.createElement("b",{className:te.b2})),ce.createElement("div",{className:te.menu},jn.map((In,ii)=>ce.createElement("div",{key:ii,onClick:()=>hn(In.id)},In.name)))),ce.createElement(ee.default,{onPressEnter:St,value:Pn,onChange:In=>{kn(In.target.value),Dt(encodeURIComponent(In.target.value),Vt||null)},bordered:!1,placeholder:tn}),ce.createElement("i",{onClick:St,className:"iconfont icon-sousuo9 font14 pl10 current"}))},de={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"},we=({value:jn,onChange:Tn,className:At,total:Dt,pageSize:Ve,style:Yt={}})=>{const tn=jn<2,vt=jn>=Math.ceil(Dt/Ve);return Dt<=Ve?ce.createElement(ce.Fragment,null):ce.createElement("div",{className:mt()(de.quickPager,At),style:Yt},ce.createElement("div",{onClick:()=>{tn||Tn(jn-1,"prev")},className:tn?de.disabled:""},"\u4E0A\u4E00\u9875"),ce.createElement("div",{onClick:()=>{vt||Tn(jn+1,"next")},className:vt?de.disabled:""},"\u4E0B\u4E00\u9875"))},Me={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"},be=ve(71418),Ie=ve(6848),je=ve(13570),qe=ve(38446),$e=ve(88230),ft=ve(96908),Re=ve(57177),Tt=ve(81378),et=ve(57816),Bt=({className:jn,dataSource:Tn=[],col:At=4,right:Dt,bottom:Ve=23,precision:Yt=0,wrapWidth:tn=1200,trackEventItems:vt,loading:rt})=>{const Vt=Math.floor((tn-(At-1)*Dt)/At);return ce.createElement(be.Z,{spinning:rt},ce.createElement("div",{className:mt()(Me.list,jn)},!!Tn.length&&Tn.map((rn,Pn)=>{const{name:kn,id:St,identifier:hn,power:In,cover_image_id:ii,pic:Gt}=rn;return ce.createElement("div",{className:Me.wrap,key:St,style:{width:Vt,marginRight:(1+Pn)%At===0?0:Dt+Yt,marginBottom:Ve}},ce.createElement("a",{target:"_blank",href:`/shixuns/${hn}/challenges`,className:Me.li,onClick:Jt=>{Jt.preventDefault(),vt&&(0,$e.L9)([vt]),In&&(0,$e.xg)(`/shixuns/${hn}/challenges`)}},ce.createElement("div",{className:Me.img},ce.createElement("img",{className:Me.cover,src:`${Gt}`}),rn.is_jupyter&&ce.createElement("img",{className:Me.sign,src:ft}),rn.is_jupyter_lab&&ce.createElement("img",{className:Me.sign,src:Re}),rn.is_unity_3d&&ce.createElement("img",{className:Me.sign,src:Tt})),ce.createElement("div",{className:Me.name},ce.createElement(Ie.Z,{title:kn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ce.createElement("span",{className:Me.e},kn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ce.createElement("div",{className:Me.tags},ce.createElement(Ie.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ce.createElement("span",null,ce.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ce.createElement("span",null,rn.challenges_count))),!!rn.myshixuns_count&&ce.createElement(Ie.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ce.createElement("span",null,ce.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ce.createElement("span",null,rn.myshixuns_count))),ce.createElement(Ie.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ce.createElement("span",null,ce.createElement("span",null,rn.level))),ce.createElement("div",{className:Me.rate},ce.createElement(je.Z,{allowHalf:!0,disabled:!0,defaultValue:rn.score_info}),ce.createElement("span",null,"\xA0",rn.score_info?`${rn.score_info}\u5206`:"5\u5206")))),!In&&ce.createElement("div",{className:Me.lockWrap},ce.createElement("img",{src:`${qe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ce.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Tn.length&&ce.createElement(et.Z,null)))},Nt={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"},Zt=ve(73898),Ut=ve(59301),Ge=({className:jn,dataSource:Tn=[],col:At=4,right:Dt,bottom:Ve=23,precision:Yt=0,wrapWidth:tn=1200,trackEventItems:vt,loading:rt,onRemove:Vt=()=>{},isCurrent:rn=!0,showAlias:Pn=!1})=>{const kn=Math.floor((tn-(At-1)*Dt)/At),St=[{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 Ut.createElement(be.Z,{spinning:rt},Ut.createElement("div",{className:mt()(Nt.list,jn)},!!(Tn!=null&&Tn.length)&&(Tn==null?void 0:Tn.map((hn,In)=>{var ii;const{name:Gt,id:Jt,identifier:hi,featured:fi,school_name:ui,image_url:ni,excellent:ci,is_plan:li}=hn;return Ut.createElement("div",{key:Jt,className:Nt.wrap,style:{width:kn,marginRight:(1+In)%At===0?0:Dt+Yt,marginBottom:Ve}},Ut.createElement("a",{className:Nt.li,onClick:Ni=>{Ni.preventDefault(),Ni.stopPropagation(),vt&&(0,$e.L9)([vt]),(0,$e.xg)(`/paths/${hi}`)}},Ut.createElement("div",{className:Nt.img},Ut.createElement("img",{className:Nt.cover,src:`${ni}`}),rn&&(0,Zt.bg)()&&(hn==null?void 0:hn.studying)&&Ut.createElement("div",{className:`${Nt.movebq} user-path-items`,onClick:Ni=>{Ni.stopPropagation(),Vt(hn)}},Ut.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Ut.createElement("span",{className:"c-red"},"\u79FB\u9664")),(ii=hn==null?void 0:hn.subject_tags)==null?void 0:ii.map((Ni,Qi)=>{var lr,wn;if(Qi===0){const Or=(lr=St.find(ar=>ar.name==Ni))==null?void 0:lr.swimg;return Ut.createElement("img",{className:Nt.sign,src:Or,style:{left:"-4px"}})}const Pr=(wn=St.find(Or=>Or.name==Ni))==null?void 0:wn.ptimg;return Ut.createElement("img",{className:Nt.sign,src:Pr,style:{left:`${48+52*(Qi-1)+2*Qi}px`}})}),Ut.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(hn==null?void 0:hn.excellent)&&Ut.createElement("div",{className:Nt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Ut.createElement("div",{className:Nt.name},Ut.createElement(Ie.Z,{title:Pn&&(hn!=null&&hn.excellent_alias_name)?Ut.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Gt}`,Ut.createElement("br",null),Ut.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${hn==null?void 0:hn.excellent_alias_name}`)):Gt},Ut.createElement("span",{className:Nt.e},Pn&&(hn==null?void 0:hn.excellent_alias_name)||Gt))),Ut.createElement(Ie.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${ui}`},Ut.createElement("div",{className:Nt.unit},Ut.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ui)),Ut.createElement("div",{className:Nt.tags},Ut.createElement("div",null,Ut.createElement(Ie.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Ut.createElement("span",null,Ut.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Ut.createElement("span",null,hn.stages_count))),Ut.createElement(Ie.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Ut.createElement("span",null,Ut.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Ut.createElement("span",null,hn.members_count)))))))})),!Tn.length&&Ut.createElement(et.Z,null)))},kt={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"},un="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=ve(59301),$t=({className:jn,dataSource:Tn=[],col:At=4,right:Dt,bottom:Ve=23,precision:Yt=0,wrapWidth:tn=1200,trackEventItems:vt,loading:rt,handleVery:Vt=()=>{}})=>{const rn=Math.floor((tn-(At-1)*Dt)/At);return ln.createElement(be.Z,{spinning:rt},ln.createElement("div",{className:mt()(kt.list,jn)},!!Tn.length&&Tn.map((Pn,kn)=>{const{subject_identifier:St,id:hn,identifier:In,power:ii}=Pn,Gt=Pn.is_public!=0&&Pn.is_public;return ln.createElement("div",{className:kt.wrap,key:hn,style:{width:rn,marginRight:(1+kn)%At===0?0:Dt+Yt,marginBottom:Ve}},ln.createElement("a",{className:kt.li,onClick:Jt=>{Jt.preventDefault(),Vt(Pn==null?void 0:Pn.first_category_url)}},ln.createElement("div",{className:kt.top},ln.createElement(Ie.Z,{title:Pn.name},ln.createElement("div",{className:kt.name},Pn.name)),ln.createElement("img",{className:kt.img,src:qe.Z.IMG_SERVER+"/images/"+Pn.avatar_url}),ln.createElement("div",{className:kt.text,title:Pn.creator},Pn.creator),St&&ln.createElement("div",{className:kt.btns},ln.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),ln.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Gt&&ln.createElement("div",{className:kt.sign},"\u516C\u5F00")),ln.createElement("div",{className:kt.bottom},Pn.visits>0&&ln.createElement(Ie.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},ln.createElement("span",null,ln.createElement("i",{className:"iconfont icon-liulanyan"}),ln.createElement("span",null,Pn.visits))),Pn.course_members_count>0&&ln.createElement(Ie.Z,{title:"\u6210\u5458",placement:"bottom"},ln.createElement("span",null,ln.createElement("i",{className:"iconfont icon-chengyuan"}),Pn.course_members_count)),Pn.tasks_count>0&&ln.createElement(Ie.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},ln.createElement("span",null,ln.createElement("i",{className:"iconfont icon-zuoye"}),Pn.tasks_count)),Pn.is_end?ln.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):ln.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Pn.is_accessible&&ln.createElement("div",{className:kt.lockWrap},ln.createElement("img",{src:`${qe.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")))}),!Tn.length&&ln.createElement(et.Z,null)))},Qt={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=ve(24459),Cn=({dataSource:jn=[],value:Tn,onChange:At,className:Dt,style:Ve={},tabBarExtraContent:Yt})=>ce.createElement("div",{className:mt()(Qt.tabs,Dt),style:Ve},ce.createElement("div",{className:Qt.tabsWrap},jn.map((tn,vt)=>!(tn!=null&&tn.hide)&&ce.createElement("aside",{className:Qt.tab,onClick:()=>{At(tn.id),tn.link&&Bn.history.push(tn.link)},key:vt},ce.createElement("div",{className:Tn===tn.id?Qt.active:""},tn.name),(tn==null?void 0:tn.resetCount)==null&&(tn==null?void 0:tn.total)!==void 0&&ce.createElement("span",null,"\uFF08",tn==null?void 0:tn.total,"\uFF09"),(tn==null?void 0:tn.resetCount)!==void 0&&(tn==null?void 0:tn.total)!==void 0&&ce.createElement(Ie.Z,{title:(tn==null?void 0:tn.tip)!=null?tn==null?void 0:tn.tip:""},ce.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ce.createElement("span",{style:{color:"#000"}},tn==null?void 0:tn.resetCount),"/",ce.createElement("span",null,tn==null?void 0:tn.total),"\uFF09"))))),ce.createElement("div",{className:Qt.tabBar},Yt)),En=({className:jn,style:Tn={},children:At})=>ce.createElement("div",{className:mt()(jn),style:Tn},At),Vn={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"},He=ve(38854),Ce=ve(20834);const Pe=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var ke=({sortValue:jn,dropValue:Tn,className:At,onSort:Dt,onDrop:Ve,dataSource:Yt=Pe})=>{var tn;return ce.createElement("div",{className:mt()(Vn.orderWrap,At)},ce.createElement(He.Z,{dropdownRender:()=>ce.createElement(Ce.default,null,Yt.map((vt,rt)=>ce.createElement(Ce.default.Item,{key:rt,onClick:()=>Ve(vt.id)},vt.name)))},ce.createElement("span",{className:Vn.orderTextWrap},(tn=Yt.find(vt=>Tn===vt.id))==null?void 0:tn.name)),ce.createElement("span",{className:Vn.orderIconWrap},ce.createElement("span",{className:Vn.orderAsc},ce.createElement("i",{className:jn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Vn.cursorPointer} ${Vn.active}`:`iconfont icon-sanjiaoxing-up font12 ${Vn.cursorPointer}`,onClick:()=>Dt(jn==="asc"?"desc":"asc")})),ce.createElement("span",{className:Vn.orderDesc},ce.createElement("i",{className:jn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Vn.cursorPointer} ${Vn.active}`:`iconfont icon-sanjiaoxing-down font12 ${Vn.cursorPointer}`,onClick:()=>Dt(jn==="asc"?"desc":"asc")}))))},Se={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"},nt=ve(3113),Pt=Object.defineProperty,Xe=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,wt=(jn,Tn,At)=>Tn in jn?Pt(jn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:At}):jn[Tn]=At,ot=(jn,Tn)=>{for(var At in Tn||(Tn={}))Je.call(Tn,At)&&wt(jn,At,Tn[At]);if(Xe)for(var At of Xe(Tn))yt.call(Tn,At)&&wt(jn,At,Tn[At]);return jn},It=(jn,Tn)=>{var At={};for(var Dt in jn)Je.call(jn,Dt)&&Tn.indexOf(Dt)<0&&(At[Dt]=jn[Dt]);if(jn!=null&&Xe)for(var Dt of Xe(jn))Tn.indexOf(Dt)<0&&yt.call(jn,Dt)&&(At[Dt]=jn[Dt]);return At},sn=(jn,Tn,At)=>new Promise((Dt,Ve)=>{var Yt=rt=>{try{vt(At.next(rt))}catch(Vt){Ve(Vt)}},tn=rt=>{try{vt(At.throw(rt))}catch(Vt){Ve(Vt)}},vt=rt=>rt.done?Dt(rt.value):Promise.resolve(rt.value).then(Yt,tn);vt((At=At.apply(jn,Tn)).next())}),Ht=jn=>{var Tn=jn,{className:At,style:Dt,children:Ve,loading:Yt=!1,openLoading:tn,onClick:vt=()=>{},size:rt="middle",shape:Vt="round"}=Tn,rn=It(Tn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Pn,kn]=(0,ce.useState)(!1);return ce.createElement(nt.ZP,ot({onClick:(0,ct.throttle)(St=>sn(void 0,null,function*(){tn&&kn(!0);try{yield vt(St)}catch(hn){console.log("error",hn)}tn&&kn(!1)}),2e3,{leading:!0,trailing:!1}),className:mt()(Se.btn,Se[`${rt}-${Vt}`],At),style:Dt,size:rt,shape:Vt,loading:Pn||Yt},rn),Ve)},xn={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"},cn=({className:jn,style:Tn,children:At=null,onClick:Dt,title:Ve})=>ce.createElement("div",{className:mt()(xn.head,jn),style:Tn},ce.createElement("span",{className:"primary-hover",onClick:Dt},ce.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ce.createElement("b",{title:Ve},Ve),ce.createElement("div",{className:xn.node},At)),Un={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"},Wn=({confirmShow:jn=!0,confirmTitle:Tn,confirmClick:At,cancelShow:Dt=!0,cancelTitle:Ve,cancelClick:Yt,className:tn,style:vt,confirmLoading:rt=!1})=>ce.createElement("div",{className:mt()(Un.btns,tn),style:vt},jn&&ce.createElement(nt.ZP,{loading:rt,onClick:At,type:"primary",className:Un.confirm},Tn),Dt&&ce.createElement(nt.ZP,{onClick:Yt,className:Un.cancel},Ve)),Zn={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"},vi=({className:jn,style:Tn={},LeftContent:At,children:Dt,RightContent:Ve})=>ce.createElement("div",{className:mt()(Zn.fixedBottom,jn),style:Tn},ce.createElement("div",{className:Zn.wrap},ce.createElement("div",{className:Zn.left},At),ce.createElement("div",{className:Zn.center},Dt),ce.createElement("div",{className:Zn.right},Ve))),pi={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"},$i=({className:jn,style:Tn={},dataSource:At=[]})=>ce.createElement("div",{className:mt()(pi.crumbs,jn),style:Tn},At.map((Dt,Ve)=>Ve<At.length-1?ce.createElement(ce.Fragment,{key:Ve},Dt.path||Dt.onClick?ce.createElement("span",{className:pi.hover,onClick:Dt!=null&&Dt.onClick?Dt.onClick:()=>Bn.history.push(Dt.path)},Dt.name):ce.createElement("span",null,Dt.name),ce.createElement("span",null,"\xA0",">","\xA0")):ce.createElement("span",{key:Ve,style:{color:"#5F6368"}},Dt.name))),Yn=ve(31797),Gn=Object.defineProperty,oi=Object.defineProperties,Li=Object.getOwnPropertyDescriptors,di=Object.getOwnPropertySymbols,gr=Object.prototype.hasOwnProperty,Ii=Object.prototype.propertyIsEnumerable,Le=(jn,Tn,At)=>Tn in jn?Gn(jn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:At}):jn[Tn]=At,si=(jn,Tn)=>{for(var At in Tn||(Tn={}))gr.call(Tn,At)&&Le(jn,At,Tn[At]);if(di)for(var At of di(Tn))Ii.call(Tn,At)&&Le(jn,At,Tn[At]);return jn},ji=(jn,Tn)=>oi(jn,Li(Tn)),gn=(jn,Tn)=>{var At={};for(var Dt in jn)gr.call(jn,Dt)&&Tn.indexOf(Dt)<0&&(At[Dt]=jn[Dt]);if(jn!=null&&di)for(var Dt of di(jn))Tn.indexOf(Dt)<0&&Ii.call(jn,Dt)&&(At[Dt]=jn[Dt]);return At};const{Countdown:qn}=Yn.default;var Fi=jn=>{var Tn=jn,{onChange:At}=Tn,Dt=gn(Tn,["onChange"]);const[Ve,Yt]=(0,ce.useState)(null);(0,ce.useEffect)(()=>{typeof Ve=="number"&&Ve>=0&&At(Ve)},[Ve]);const tn=vt=>{const rt=Math.floor(vt/1e3);Yt(rt)};return ce.createElement(qn,ji(si({},Dt),{onChange:tn}))}},50505:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return De}});var ce=ve(59301);function De(ze,Ct){const _e=(0,ce.useRef)();(0,ce.useEffect)(()=>{_e.current=ze}),(0,ce.useEffect)(()=>{function Ke(){_e.current()}if(Ct!==null){let Be=setInterval(Ke,Ct);return()=>clearInterval(Be)}},[Ct])}},76826:function(Sn,an,ve){"use strict";ve.d(an,{h:function(){return ce}});var ce=(De=>(De[De.NOMATCH=-1]="NOMATCH",De[De.OK=0]="OK",De[De.TIMEOUT=2]="TIMEOUT",De[De.PODFAILURE=3]="PODFAILURE",De[De.COMPILEFAILURE=4]="COMPILEFAILURE",De[De.EXECUTEFAILURE=5]="EXECUTEFAILURE",De[De.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",De))(ce||{})},5247:function(Sn,an,ve){"use strict";ve.d(an,{H7:function(){return te},MK:function(){return Ae},MU:function(){return Ze},X6:function(){return ht},bM:function(){return ct},fi:function(){return ee},fu:function(){return mt},n4:function(){return he},rX:function(){return dt},vl:function(){return se},zO:function(){return Et}});var ce=ve(7660),De=Object.defineProperty,ze=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ke=(de,me,we)=>me in de?De(de,me,{enumerable:!0,configurable:!0,writable:!0,value:we}):de[me]=we,Be=(de,me)=>{for(var we in me||(me={}))Ct.call(me,we)&&Ke(de,we,me[we]);if(ze)for(var we of ze(me))_e.call(me,we)&&Ke(de,we,me[we]);return de};function mt(de,me){return(0,ce.U2)(`myproblems/${de}.json`,Be({hidePopLogin:!0},me||{}))}function ct(de,me){return(0,ce.v_)(`myproblems/${de}/code_submit.json`,me)}function Ze(de,me){return(0,ce.v_)(`myproblems/${de}/code_debug.json`,me)}function Et(de,me){return me.language&&(me.language=encodeURIComponent(me.language)),(0,ce.U2)(`myproblems/${de}/submit_records.json`,me)}function ht(de){return(0,ce.U2)("myproblems/record_detail.json",{id:de})}function dt(de,me){return(0,ce.U2)(`myproblems/${de}/result.json`,{mode:me})}function Ae(de,me){return(0,ce.v_)(`myproblems/${de}/add_notes.json`,me)}function te(de,me){return(0,ce.v_)(`myproblems/${de}/restore_initial_code.json`,me)}function ee(de){return(0,ce.v_)(`myproblems/${de}/sync_code.json`)}function he(de,me){return(0,ce.v_)(`myproblems/${de}/update_code.json`,me)}function se(de,me){return(0,ce.v_)(`discusses/${de}/plus.json`,me)}},78978:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Mc}});var ce=ve(59301),De={flex_box_center:"flex_box_center___bZaL5",flex_space_between:"flex_space_between___oaJSq",flex_box_vertical_center:"flex_box_vertical_center____hsuP",flex_box_center_end:"flex_box_center_end___ZYbPQ",flex_box_column:"flex_box_column___nE_62",wrap:"wrap___ulhwR",left:"left___kyWln",title:"title___jsO1D",total:"total___GEhiU",list:"list___u9dBZ",name:"name___Wxggs",b:"b___Y15YO",r:"r___mKQoe",l:"l___uelFD",tag:"tag___Mpkbg",right:"right___mQ3dU",examName:"examName___Na1r8",t:"t___IgCWK",num:"num___CXI8j",topWarp:"topWarp___Kicpu",head:"head___jx3W8",so:"so___qYW7F",btn:"btn___EMJDz",content:"content___sHGsV",titleWrap:"titleWrap___I__GR",single:"single___K5iv9",analysis:"analysis___NoAuR",text:"text___xESW2",modalColumn:"modalColumn___I_tK_",modalRow:"modalRow___lyw_U",sup:"sup___HSz3Z",popover:"popover___kE8aI"},ze=ve(78241),Ct=ve(6848),_e=ve(3113),Ke=ve(43418),Be=ve(5871),mt=ve(8591),ct=ve(92832),Ze=ve(28103),Et=ve(24905),ht=ve(95237),dt=ve(43604),Ae=ve(58421),te=ve(60324),ee=Object.defineProperty,he=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,me=(Kt,_t,mn)=>_t in Kt?ee(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,we=(Kt,_t)=>{for(var mn in _t||(_t={}))se.call(_t,mn)&&me(Kt,mn,_t[mn]);if(he)for(var mn of he(_t))de.call(_t,mn)&&me(Kt,mn,_t[mn]);return Kt};const Me=Kt=>React.createElement("svg",we({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Kt),React.createElement("title",null,"\u7F16\u7EC4 6"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E4E6FD",width:34,height:34,rx:10}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M13.808 11.448a.558.558 0 0 1 0 .788l-1.564 1.565a.558.558 0 1 1-.789-.79l1.564-1.563a.558.558 0 0 1 .79 0Zm9.882 2.462a.558.558 0 0 1-.789 0l-1.564-1.563a.558.558 0 1 1 .789-.789l1.564 1.564a.556.556 0 0 1 0 .788Z",fill:"#6678EB"}),React.createElement("path",{d:"M21.753 21.707a5.937 5.937 0 1 0-8.58.015l-.937.936a.558.558 0 1 0 .789.788l.995-.994a5.91 5.91 0 0 0 3.436 1.095c1.287 0 2.48-.41 3.452-1.106l.992.992a.558.558 0 1 0 .789-.789l-.936-.937Z",fill:"#6678EB"}),React.createElement("path",{d:"m20.858 18.95-3.024-1.745v-2.054a.558.558 0 1 0-1.117 0v2.351c0 .064.011.126.031.184a.551.551 0 0 0 .258.33l3.293 1.9a.557.557 0 0 0 .559-.966Z",fill:"#FFF"}))));var be="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",Ie=ve(99325),je=ve(24459),qe=ve(88230),$e=ve(7660),ft=Object.defineProperty,Re=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,bt=(Kt,_t,mn)=>_t in Kt?ft(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,Bt=(Kt,_t)=>{for(var mn in _t||(_t={}))Tt.call(_t,mn)&&bt(Kt,mn,_t[mn]);if(Re)for(var mn of Re(_t))et.call(_t,mn)&&bt(Kt,mn,_t[mn]);return Kt};const Nt=Kt=>React.createElement("svg",Bt({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Kt),React.createElement("title",null,"\u7F16\u7EC4 12"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{width:34,height:34,rx:10,fill:"#EAF3F4"}),React.createElement("path",{d:"M25.905 15.37a.775.775 0 0 0-.626-.529l-4.814-.7-2.152-4.362a.776.776 0 0 0-1.392 0l-2.153 4.363-4.814.699a.775.775 0 0 0-.43 1.323l3.484 3.396-.823 4.794a.777.777 0 0 0 1.126.818l4.306-2.264 4.305 2.264a.778.778 0 0 0 .817-.059.777.777 0 0 0 .31-.759l-.823-4.794 3.483-3.396a.777.777 0 0 0 .196-.795Z",fill:"#21C0A6",fillRule:"nonzero"})));var Zt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=",Ut=Object.defineProperty,lt=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,un=(Kt,_t,mn)=>_t in Kt?Ut(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,ln=(Kt,_t)=>{for(var mn in _t||(_t={}))Ge.call(_t,mn)&&un(Kt,mn,_t[mn]);if(lt)for(var mn of lt(_t))kt.call(_t,mn)&&un(Kt,mn,_t[mn]);return Kt};const Ft=Kt=>React.createElement("svg",ln({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Kt),React.createElement("title",null,"\u9898\u76EE"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E7F3FF",width:34,height:34,rx:10}),React.createElement("g",{fill:"#4C6FFF",fillRule:"nonzero"},React.createElement("path",{d:"m23.719 13.325-4.098-3.94c-.097-.13-.225-.162-.355-.162-.129 0-.258.064-.387.161l-7.55 7.753c-.065.065-.098.162-.13.227l-1.032 5.427c-.033.194.032.323.16.484.13.13.227.162.389.162h.096l4.776-1.099c.097-.032.194-.064.258-.161l7.841-8.108c.194-.162.194-.517.033-.744h-.001Zm-8.1 8.044a.534.534 0 0 1-.386.162.56.56 0 0 1-.388-.162l-3-2.81c-.226-.194-.226-.517-.033-.743.194-.227.517-.227.743-.033l3 2.811c.259.226.291.55.065.776ZM17 22.92h6.844v1.055H17z"}))));var $t="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",Qt=ve(64686),Bn=ve(64726),on=ve(60355),Cn=ve(40928),gt={wrap:"wrap___OIoOI",modal:"modal___Z3hfU",titleWrap:"titleWrap___aK3oG",required:"required___NHoO7",title:"title___uxb1R",colorGray:"colorGray___O8YPg",choiceWrap:"choiceWrap___t51sb",answer:"answer___vsBnh",activeAnswer:"activeAnswer___AJN4p",deleteIcon:"deleteIcon___WvOJZ",addIcon:"addIcon___UyeIs",editorWrap:"editorWrap___uqcFU",htmlWrap:"htmlWrap___GcBNL",radio:"radio___e8qQ5",color333:"color333___PLzVK",color999:"color999___v3EY0",fold:"fold___OfvPe",head:"head___EejYX",collapseWrapper:"collapseWrapper___sQyVD",panelHeader:"panelHeader___Ivicf",open:"open___aEOQE",close:"close___z4P5H",inputBorder:"inputBorder___ix67O",keywordTag:"keywordTag___iGx08",scoreByBlankRadio:"scoreByBlankRadio___Kwu7q"},En=ve(59301),Vn=Object.defineProperty,He=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Se=(Kt,_t,mn)=>_t in Kt?Vn(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,nt=(Kt,_t)=>{for(var mn in _t||(_t={}))Ne.call(_t,mn)&&Se(Kt,mn,_t[mn]);if(Pe)for(var mn of Pe(_t))ke.call(_t,mn)&&Se(Kt,mn,_t[mn]);return Kt},Pt=(Kt,_t)=>He(Kt,Ce(_t)),Xe=(Kt,_t)=>{var mn={};for(var it in Kt)Ne.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Pe)for(var it of Pe(Kt))_t.indexOf(it)<0&&ke.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const Je=null,yt=(Kt,_t)=>{var mn=Kt,{globalSetting:it,loading:vn,dispatch:jr,isEdit:Bo,editData:Ir}=mn,zr=Xe(mn,["globalSetting","loading","dispatch","isEdit","editData"]);const[Ro,fo]=(0,ce.useState)(""),[Wo,co]=(0,ce.useState)(""),[Zi,Ki]=(0,ce.useState)([]),[Dr,Ar]=(0,ce.useState)(""),[rr,br]=(0,ce.useState)(),[Lo,Rr]=(0,ce.useState)(!1),[tr,ur]=(0,ce.useState)({}),[sr,Ri]=(0,ce.useState)([]);(0,ce.useEffect)(()=>{!Ir||!Bo||(fo(Ir==null?void 0:Ir.name),co(Ir==null?void 0:Ir.analysis),br(Ir==null?void 0:Ir.is_ordered),ur(Ir),Rr(!0))},[Ir]),(0,ce.useEffect)(()=>{if(!Lo)return;const Gi=Ir==null?void 0:Ir.standard_answer.map(Vr=>Vr==null?void 0:Vr.answer_text);Ki(Gi);const Ra=Ir==null?void 0:Ir.standard_answer.map(Vr=>Vr==null?void 0:Vr.score);Ri(Ra),Rr(!1)},[Lo]),(0,ce.useImperativeHandle)(_t,()=>({onSave:To,Clear:Yr}));const To=()=>{let Gi=[],Ra=!1;return Ro?(Zi.forEach((Vr,Za)=>{Gi.push({position:Za+1,answer_text:[],score:sr[Za]}),Vr==null||Vr.forEach((Is,ju)=>{Gi[Za].answer_text.push(Is),(!Is||!(0,qe.eR)(Is,1e4))&&(Ar(`${Za}-${ju}`),mt.ZP.info(Is?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Ra=!0)})}),Ra?!1:(Gi==null?void 0:Gi.length)>20?(mt.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Ro,analysis:Wo,standard_answers:Gi,is_ordered:rr,downcase:tr==null?void 0:tr.downcase,no_space:tr==null?void 0:tr.no_space,use_blank_score:tr==null?void 0:tr.use_blank_score}):(mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},Yr=()=>{fo(""),co(""),Ki([]),br(!1)},ko=(Gi,Ra,Vr)=>{const Za=Zi.slice();if(Ra&&Za.splice(Gi,Ra),Vr)for(let Is=0;Is<Vr;Is++)Za.splice(Gi+Is,0,[""]);Ki(Za)},Uo=(Gi,Ra,Vr)=>{Ar("");let Za=Zi.slice();Za[Gi][Ra]=Vr,Ki(Za)},Lr=Gi=>{let Ra=Zi.slice();Ra[Gi]=[...Ra[Gi],""],Ki(Ra)},Do=(Gi,Ra)=>{let Vr=Zi.slice();if(!Vr[Gi][Ra]){Vr[Gi]=Vr[Gi].filter((Za,Is)=>Is!==Ra),Ki(Vr);return}Ke.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:gt.modal,onOk:()=>{Vr[Gi]=Vr[Gi].filter((Za,Is)=>Is!==Ra),Ki(Vr)}})},Bs=Gi=>{Ke.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:gt.modal,onOk:()=>{let Ra=Zi.slice();Ra=Zi.filter((Vr,Za)=>Gi!==Za),Ki(Ra)}})};return En.createElement("section",{className:gt.wrap},En.createElement("p",{className:gt.titleWrap},En.createElement("span",{className:gt.required},"*"),En.createElement("span",{className:gt.title},"\u9898\u5E72\uFF1A")),En.createElement("div",null,En.createElement(on.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Ro,onChange:Gi=>fo(Gi),showNullButton:!0,onPlaceholderChange:ko})),En.createElement("div",{className:"mt20"},Zi.map((Gi,Ra)=>En.createElement("div",{style:{display:"flex"}},En.createElement("div",{style:{flex:1}},En.createElement(Cn.Z,{key:Ra,answers:Gi,index:Ra,flex:1,is_md:!0,activeOptionErrorIndex:Dr,onAnswerChange:Uo,addChildAnswer:Lr,deleteChildAnswer:Do,deleteChildAnswermain:Bs})),tr.use_blank_score&&En.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},En.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",En.createElement(Be.Z,{style:{width:"100px"},size:"large",defaultValue:sr[Ra],onBlur:Vr=>{sr[Ra]=Vr.target.value,Ri([...sr])}}))))),En.createElement("div",null,En.createElement(Et.default,{className:`${gt.color333} font14 mt20`,checked:tr.use_blank_score,onChange:Gi=>ur(Pt(nt({},tr),{use_blank_score:Gi.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),En.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\uFF08\u9009\u4E2D\uFF0C\u5219\u9700\u8981\u8BBE\u7F6E\u6BCF\u7A7A\u5206\u503C\uFF0C\u5B66\u751F\u7B54\u6848\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206\uFF09")),En.createElement("div",null,En.createElement(Et.default,{className:`${gt.color333} font14 mt20`,checked:tr.downcase,onChange:Gi=>ur(Pt(nt({},tr),{downcase:Gi.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),En.createElement("div",null,En.createElement(Et.default,{className:`${gt.color333} font14 mt20`,checked:tr.no_space,onChange:Gi=>ur(Pt(nt({},tr),{no_space:Gi.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),En.createElement("div",{className:"mt20"},(Zi==null?void 0:Zi.length)>1&&En.createElement("span",null,En.createElement(Et.default,{checked:rr,onChange:Gi=>br(Gi.target.checked),className:`${gt.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),En.createElement("span",{className:`${gt.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),En.createElement("p",{className:gt.titleWrap},En.createElement("span",{className:gt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),En.createElement(Bn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Wo,onChange:Gi=>co(Gi)}))};var wt=(0,je.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(yt)),ot=ve(5112),It=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Ht=(Kt,_t)=>{var mn={};for(var it in Kt)sn.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&It)for(var it of It(Kt))_t.indexOf(it)<0&&Xt.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const xn=null,Dn=(Kt,_t)=>{var mn=Kt,{globalSetting:it,loading:vn,editData:jr,dispatch:Bo,onRef:Ir=()=>{},isEdit:zr}=mn,Ro=Ht(mn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[fo,Wo]=(0,ce.useState)(),[co,Zi]=(0,ce.useState)(""),[Ki,Dr]=(0,ce.useState)("");(0,ce.useEffect)(()=>{if(!jr||!zr)return;Zi(jr==null?void 0:jr.name),Dr(jr==null?void 0:jr.analysis);const br=jr==null?void 0:jr.choices.find(Lo=>Lo.is_answer);Wo(br.choice_text==="\u6B63\u786E"?"0":"1")},[jr]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Ar,Clear:rr}));const Ar=()=>co?fo?{name:co,choices:[{choice_text:"\u6B63\u786E",is_answer:fo==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:fo==="1"?1:0}],analysis:Ki}:(mt.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),rr=()=>{Zi(""),Dr(""),Wo("")};return ce.createElement("section",{className:gt.wrap},ce.createElement("p",{className:gt.titleWrap},ce.createElement("span",{className:gt.required},"*"),ce.createElement("span",{className:gt.title},"\u9898\u5E72\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:co,onChange:br=>Zi(br)}),ce.createElement("p",{className:gt.titleWrap},ce.createElement("span",{className:gt.required},"*"),ce.createElement("span",{className:gt.title},"\u7B54\u6848\u9009\u9879\uFF1A",ce.createElement("span",{className:gt.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),ce.createElement(ot.ZP.Group,{buttonStyle:"solid",value:fo,onChange:br=>Wo(br.target.value)},ce.createElement(ot.ZP.Button,{value:"0",className:`${gt.radio} mr40`},"\u6B63\u786E"),ce.createElement(ot.ZP.Button,{value:"1",className:gt.radio},"\u9519\u8BEF")),ce.createElement("p",{className:gt.titleWrap},ce.createElement("span",{className:gt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Ki,onChange:br=>Dr(br)}))};var cn=(0,je.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(Dn)),Un=Object.getOwnPropertySymbols,ti=Object.prototype.hasOwnProperty,Wn=Object.prototype.propertyIsEnumerable,Zn=(Kt,_t)=>{var mn={};for(var it in Kt)ti.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Un)for(var it of Un(Kt))_t.indexOf(it)<0&&Wn.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const Jn=null,vi=(Kt,_t)=>{var mn=Kt,{globalSetting:it,loading:vn,editData:jr,dispatch:Bo,onRef:Ir=()=>{},isEdit:zr}=mn,Ro=Zn(mn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[fo,Wo]=(0,ce.useState)([]);(0,ce.useEffect)(()=>{var Dr;if(!jr||!zr)return;const Ar=(Dr=jr==null?void 0:jr.shixun)==null?void 0:Dr.challenges.map(rr=>({id:rr==null?void 0:rr.id,score:rr.score}));Wo(Ar)},[jr]),(0,ce.useImperativeHandle)(_t,()=>({onSave:co,Clear:Zi}));const co=()=>({challenges:[...fo]}),Zi=()=>{Wo([])};console.log("editData--",jr);const Ki=Dr=>{var Ar,rr;return ce.createElement("div",null,(rr=(Ar=Dr==null?void 0:Dr.shixun)==null?void 0:Ar.challenges)==null?void 0:rr.map((br,Lo)=>{var Rr;return ce.createElement("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"}},ce.createElement("div",null,ce.createElement("span",{className:"mr5"},"\u7B2C",Lo+1,"\u5173"),ce.createElement(Ct.Z,{key:Lo,title:br==null?void 0:br.challenge_name},ce.createElement("span",null,(0,qe.Pq)(br==null?void 0:br.challenge_name,44)))),ce.createElement("p",{style:{marginBottom:0}},ce.createElement("span",{className:gt.required},"*"),ce.createElement("span",{className:gt.title},"\u5206\u503C\uFF1A"),ce.createElement(Be.Z,{precision:1,min:1,max:100,className:gt.baseFormItem,style:{width:176},value:(Rr=fo.find(tr=>tr.id===br.id))==null?void 0:Rr.score,onChange:tr=>{fo.find(ur=>ur.id===br.id).score=tr,Wo([...fo])}})))}),ce.createElement("div",{style:{clear:"both"}}))};return ce.createElement("section",{className:gt.wrap},ce.createElement(Ie.Z,{style:{paddingRight:10},className:gt.titleHtml,value:`${jr==null?void 0:jr.position}\u3001${jr==null?void 0:jr.name}`}),ce.createElement("p",{style:{marginBottom:"10px",marginTop:"25px"}},ce.createElement("span",{className:gt.required},"*"),ce.createElement("span",{className:gt.title},"\u5173\u5361")),Ki(jr))};var pi=(0,je.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(vi)),zi=Object.getOwnPropertySymbols,$i=Object.prototype.hasOwnProperty,Yn=Object.prototype.propertyIsEnumerable,Gn=(Kt,_t)=>{var mn={};for(var it in Kt)$i.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&zi)for(var it of zi(Kt))_t.indexOf(it)<0&&Yn.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const oi=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Li=(Kt,_t)=>{var mn=Kt,{editData:it,globalSetting:vn,loading:jr,dispatch:Bo,onRef:Ir=()=>{},isEdit:zr}=mn,Ro=Gn(mn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[fo,Wo]=(0,ce.useState)([]),[co,Zi]=(0,ce.useState)(),[Ki,Dr]=(0,ce.useState)([]),[Ar,rr]=(0,ce.useState)(""),[br,Lo]=(0,ce.useState)("");(0,ce.useEffect)(()=>{Wo(["","","",""])},[]),(0,ce.useEffect)(()=>{if(!it||!zr)return;rr(it==null?void 0:it.name),Lo(it==null?void 0:it.analysis),Wo(it==null?void 0:it.choices.map(sr=>sr.choice_text));const ur=[];it==null||it.choices.map((sr,Ri)=>{sr.is_answer&&ur.push(Ri)}),Dr(ur)},[it]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Rr,Clear:tr}));const Rr=()=>{if(!Ar)return mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const ur=fo.findIndex(Ri=>!Ri);if(ur>-1)return mt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${oi[ur]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Ki.length)return mt.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(Ki.length<2)return mt.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const sr=fo.map((Ri,To)=>({choice_text:Ri,is_answer:Ki.includes(To)?1:0}));return{name:Ar,choices:sr,analysis:br}},tr=()=>{Wo(["","","",""]),rr(""),Lo(""),Dr("")};return ce.createElement("section",{className:gt.wrap},ce.createElement("p",{className:gt.titleWrap},ce.createElement("span",{className:gt.required},"*"),ce.createElement("span",{className:gt.title},"\u9898\u5E72\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ar,onChange:ur=>rr(ur)}),ce.createElement("p",{className:gt.titleWrap},ce.createElement("span",{className:gt.required},"*"),ce.createElement("span",{className:gt.title},"\u7B54\u6848\u9009\u9879\uFF1A",ce.createElement("span",{className:gt.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),fo.map((ur,sr)=>ce.createElement("div",{className:gt.choiceWrap,key:sr},ce.createElement(Ct.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},ce.createElement("div",{className:`${gt.answer} ${Ki.includes(sr)?gt.activeAnswer:""}`,onClick:()=>{Ki.includes(sr)?Dr(Ki.filter(Ri=>Ri!==sr)):Dr([...Ki,sr])}},oi[sr])),ce.createElement("div",{className:gt.editorWrap},co===sr?ce.createElement(Bn.Z,{id:`single-question-option-${sr}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:ur,onChange:Ri=>{fo[sr]=Ri,Wo(fo)}}):ce.createElement("div",{className:gt.htmlWrap,onClick:()=>Zi(sr)},ce.createElement(Ie.Z,{value:ur}))),sr>1&&ce.createElement(Ct.Z,{title:"\u5220\u9664"},ce.createElement("i",{className:`${gt.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Wo(fo.filter((Ri,To)=>To!==sr)),Ki.includes(sr)?Dr(Ki.filter(Ri=>Ri!==sr)):Dr([...Ki,sr])}})),sr<7&&sr===fo.length-1&&ce.createElement(Ct.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ce.createElement("i",{className:`${gt.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Wo([...fo,""])})))),ce.createElement("p",{className:gt.titleWrap},ce.createElement("span",{className:gt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:br,onChange:ur=>Lo(ur)}))};var di=(0,je.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(Li)),gr=Object.getOwnPropertySymbols,Ii=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,si=(Kt,_t)=>{var mn={};for(var it in Kt)Ii.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&gr)for(var it of gr(Kt))_t.indexOf(it)<0&&Le.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const ji=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],gn=(Kt,_t)=>{var mn=Kt,{editData:it,globalSetting:vn,loading:jr,dispatch:Bo,onRef:Ir=()=>{},isEdit:zr}=mn,Ro=si(mn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[fo,Wo]=(0,ce.useState)([]),[co,Zi]=(0,ce.useState)(),[Ki,Dr]=(0,ce.useState)(),[Ar,rr]=(0,ce.useState)(""),[br,Lo]=(0,ce.useState)("");(0,ce.useEffect)(()=>{Wo(["","","",""])},[]),(0,ce.useEffect)(()=>{if(!it||!zr)return;const ur=[],sr=[];it==null||it.choices.forEach((Ri,To)=>{ur.push(Ri.choice_text),Ri.is_answer&&sr.push(To)}),rr(it==null?void 0:it.name),Lo(it==null?void 0:it.analysis),Wo(ur),Dr(sr)},[it]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Rr,Clear:tr}));const Rr=()=>{if(!Ar)return mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const ur=fo.findIndex(Ri=>!Ri);if(ur>-1)return mt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${ji[ur]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Array.isArray(Ki))return mt.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;const sr=fo.map((Ri,To)=>({choice_text:Ri,is_answer:Ki.includes(To)?1:0}));return{name:Ar,choices:sr,analysis:br}},tr=()=>{Wo(["","","",""]),rr(""),Lo(""),Dr("")};return ce.createElement("section",{className:gt.wrap},ce.createElement("p",{className:gt.titleWrap},ce.createElement("span",{className:gt.required},"*"),ce.createElement("span",{className:gt.title},"\u9898\u5E72\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ar,onChange:ur=>rr(ur)}),ce.createElement("p",{className:gt.titleWrap},ce.createElement("span",{className:gt.required},"*"),ce.createElement("span",{className:gt.title},"\u7B54\u6848\u9009\u9879\uFF1A",ce.createElement("span",{className:gt.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),fo.map((ur,sr)=>ce.createElement("div",{className:gt.choiceWrap,key:sr},ce.createElement(Ct.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},ce.createElement("div",{className:`${gt.answer} ${Ki!=null&&Ki.includes(sr)?gt.activeAnswer:""}`,onClick:()=>Dr([sr])},ji[sr])),ce.createElement("div",{className:gt.editorWrap},co===sr?ce.createElement(Bn.Z,{id:`single-question-option-${sr}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:ur,onChange:Ri=>{fo[sr]=Ri,Wo(fo)}}):ce.createElement("div",{className:gt.htmlWrap,onClick:()=>Zi(sr)},ce.createElement(Ie.Z,{value:ur}))),sr>1&&ce.createElement(Ct.Z,{title:"\u5220\u9664"},ce.createElement("i",{className:`${gt.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Wo(fo.filter((Ri,To)=>To!==sr)),sr===Ki&&Dr(null)}})),sr<7&&sr===fo.length-1&&ce.createElement(Ct.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ce.createElement("i",{className:`${gt.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Wo([...fo,""])})))),ce.createElement("p",{className:gt.titleWrap},ce.createElement("span",{className:gt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ce.createElement(Bn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:br,onChange:ur=>Lo(ur)}))};var qn=(0,je.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(gn)),mi=ve(12563),Fi=ve(78673),jn=ve(61485),Tn=ve(59301),At=Object.defineProperty,Dt=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,Yt=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,rt=(Kt,_t,mn)=>_t in Kt?At(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,Vt=(Kt,_t)=>{for(var mn in _t||(_t={}))tn.call(_t,mn)&&rt(Kt,mn,_t[mn]);if(Yt)for(var mn of Yt(_t))vt.call(_t,mn)&&rt(Kt,mn,_t[mn]);return Kt},rn=(Kt,_t)=>Dt(Kt,Ve(_t)),Pn=(Kt,_t)=>{var mn={};for(var it in Kt)tn.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Yt)for(var it of Yt(Kt))_t.indexOf(it)<0&&vt.call(Kt,it)&&(mn[it]=Kt[it]);return mn},kn=(Kt,_t,mn)=>new Promise((it,vn)=>{var jr=zr=>{try{Ir(mn.next(zr))}catch(Ro){vn(Ro)}},Bo=zr=>{try{Ir(mn.throw(zr))}catch(Ro){vn(Ro)}},Ir=zr=>zr.done?it(zr.value):Promise.resolve(zr.value).then(jr,Bo);Ir((mn=mn.apply(Kt,_t)).next())});const St=Kt=>{if(!Kt)return!1;if(/^s*$/.test(Kt)||Kt.trim()===""){mt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let _t=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return Kt==="|"?(mt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},hn=({value:Kt=[],onClose:_t})=>Tn.createElement(mi.default,{closable:!0,onClose:_t,className:gt.keywordTag},Tn.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Kt.join(" \u6216 "))),In=(Kt,_t)=>{var mn=Kt,{editData:it,globalSetting:vn,loading:jr,dispatch:Bo,onRef:Ir=()=>{},isEdit:zr}=mn,Ro=Pn(mn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[fo,Wo]=(0,ce.useState)(""),[co,Zi]=(0,ce.useState)(""),[Ki,Dr]=(0,ce.useState)(""),[Ar,rr]=(0,ce.useState)(""),[br]=ze.default.useForm(),Lo=ze.default.useWatch("use_keywords",br);(0,ce.useEffect)(()=>{var sr;!it||!zr||(Wo(it==null?void 0:it.name),Zi(it==null?void 0:it.analysis),Dr((sr=it==null?void 0:it.answer_texts)==null?void 0:sr[0]),br.setFieldsValue(Vt({},it)))},[it]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Rr,Clear:tr}));const Rr=()=>kn(void 0,null,function*(){if(!fo)return mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield br.validateFields()}catch(Ri){mt.ZP.error(Ri.errorFields[0].errors[0]);return}const sr=br.getFieldsValue();return console.log(sr,"values"),Vt({name:fo,answer_texts:[Ki],analysis:co},sr)}),tr=()=>{Wo(""),Zi(""),Dr(""),br.resetFields()},ur=it==null?void 0:it.score;return Tn.createElement("section",{className:gt.wrap},Tn.createElement("p",{className:gt.titleWrap},Tn.createElement("span",{className:gt.required},"*"),Tn.createElement("span",{className:gt.title},"\u9898\u5E72\uFF1A")),Tn.createElement(Bn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:fo,onChange:sr=>Wo(sr)}),Tn.createElement("p",{className:gt.titleWrap},Tn.createElement("span",{className:gt.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),Tn.createElement(Bn.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:Ki,onChange:sr=>Dr(sr)}),Tn.createElement("p",{className:gt.titleWrap},Tn.createElement("span",{className:gt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),Tn.createElement(Bn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:co,onChange:sr=>Zi(sr)}),Tn.createElement(ze.default,{form:br,size:"large",onFinishFailed:sr=>kn(void 0,null,function*(){var Ri,To;mt.ZP.error(sr.errorFields[0].errors[0]),br.scrollToField((To=(Ri=sr==null?void 0:sr.errorFields)==null?void 0:Ri[0])==null?void 0:To.name,{behavior:"smooth",block:"center"})})},Tn.createElement(ht.Z,{align:"middle",className:"mb30 mt20"},Tn.createElement(ze.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},Tn.createElement(Fi.Z,null)),Tn.createElement(dt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),Tn.createElement(dt.Z,null,Tn.createElement(Ct.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},Tn.createElement(jn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),Lo&&Tn.createElement(ze.default.List,{name:"keywords",rules:[{validator(sr,Ri){return Ri!=null&&Ri.length?(Ri==null?void 0:Ri.reduce((Yr,ko)=>Yr+ko.score,0))>parseFloat(ur)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD"))}}]},(sr,{add:Ri,remove:To})=>Tn.createElement(Tn.Fragment,null,Tn.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),Tn.createElement(ht.Z,{align:"middle",className:"font14 mb30"},Tn.createElement(dt.Z,{flex:1},Tn.createElement(ct.default,{value:Ar,onChange:Yr=>{rr(Yr.target.value)},maxLength:50,allowClear:!0,onPressEnter:Yr=>{var ko,Uo,Lr,Do;const Bs=`${(ko=Yr.target)==null?void 0:ko.value}`,Gi=(Lr=(Uo=Bs==null?void 0:Bs.split("|"))==null?void 0:Uo.filter(Za=>!!Za))==null?void 0:Lr.map(Za=>Za==null?void 0:Za.trim()),Ra=br.getFieldValue("keywords"),Vr=((Do=Ra==null?void 0:Ra.map(Za=>Za==null?void 0:Za.keyword))==null?void 0:Do.flat())||[];for(const Za of Gi)if(Vr.includes(Za)){mt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}St(Bs)&&(Ri({keyword:Gi,score:1}),rr(""))},className:gt.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),Tn.createElement(dt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),sr.map(Yr=>{var ko=Yr,{key:Uo,name:Lr}=ko,Do=Pn(ko,["key","name"]);return Tn.createElement(ht.Z,{key:Uo,style:{marginRight:148}},Tn.createElement(dt.Z,{flex:1},Tn.createElement(ht.Z,{align:"middle",justify:"space-between"},Tn.createElement(ze.default.Item,rn(Vt({},Do),{name:[Lr,"keyword"]}),Tn.createElement(hn,{onClose:()=>To(Lr)})),Tn.createElement(ze.default.Item,rn(Vt({},Do),{name:[Lr,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),Tn.createElement(Be.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var ii=(0,je.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(In)),Gt=ve(36381),Jt={wrap:"wrap___Cc0gS",deleteIcon:"deleteIcon___ebwMv",keywordTag:"keywordTag___lUfL5",questionTitleEditorWrap:"questionTitleEditorWrap___u9UgK",choiceWrap:"choiceWrap___VHsr3",choiceIndex:"choiceIndex___rsj9r",judgementIndex:"judgementIndex___fMm6E",setAnswerBtn:"setAnswerBtn___krVC9",activeAnswer:"activeAnswer___WiYo2",activeJudgementAnswer:"activeJudgementAnswer___M6iww",actionWrapper:"actionWrapper___oKI8_",addIcon:"addIcon___eMbGP",inputBorder:"inputBorder___ob_6x",placeholder:"placeholder___Vkwr4",blankWrapper:"blankWrapper____MZQ5",blankInput:"blankInput___ephwY",blankInputNumberWrapper:"blankInputNumberWrapper___C1UJS",addBtn:"addBtn___qRBpJ",blankIndex:"blankIndex___QsKgf",baseInputWrapper:"baseInputWrapper___juqCB",collapseWrapper:"collapseWrapper___kAXJ0",panelHeader:"panelHeader___hLTSe",open:"open___wWDjf",close:"close___XPTJ0",hide:"hide___VytUy"},hi=ve(32134),fi=ve(12893),ui=Object.defineProperty,ni=Object.defineProperties,ci=Object.getOwnPropertyDescriptors,li=Object.getOwnPropertySymbols,Ni=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,lr=(Kt,_t,mn)=>_t in Kt?ui(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,wn=(Kt,_t)=>{for(var mn in _t||(_t={}))Ni.call(_t,mn)&&lr(Kt,mn,_t[mn]);if(li)for(var mn of li(_t))Qi.call(_t,mn)&&lr(Kt,mn,_t[mn]);return Kt},Pr=(Kt,_t)=>ni(Kt,ci(_t)),Or=(Kt,_t)=>{var mn={};for(var it in Kt)Ni.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&li)for(var it of li(Kt))_t.indexOf(it)<0&&Qi.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const ar=Kt=>{var _t=Kt,{value:mn,onChange:it,scrollId:vn}=_t,jr=Or(_t,["value","onChange","scrollId"]);return ce.createElement("div",{id:vn||""},ce.createElement(Bn.Z,Pr(wn({},jr),{defaultValue:mn,onChange:(Bo,Ir)=>{Ir!=null&&Ir.length?it(Bo,Ir):it(Bo)}})))},fn=({value:Kt,onChange:_t,placeholder:mn,height:it=140,isEdit:vn})=>vn?ce.createElement(Bn.Z,{watch:!0,isFocus:!0,height:it,placeholder:mn,defaultValue:Kt,onChange:_t}):ce.createElement("div",{style:{cursor:"pointer"}},Kt?ce.createElement(Ie.Z,{className:Jt.inputBorder,value:Kt}):ce.createElement("div",{className:`${Jt.inputBorder} ${Jt.placeholder}`},mn));var Rn=ve(59301),Ci=Object.defineProperty,_i=Object.defineProperties,ki=Object.getOwnPropertyDescriptors,Wi=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,qi=Object.prototype.propertyIsEnumerable,nr=(Kt,_t,mn)=>_t in Kt?Ci(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,dr=(Kt,_t)=>{for(var mn in _t||(_t={}))cr.call(_t,mn)&&nr(Kt,mn,_t[mn]);if(Wi)for(var mn of Wi(_t))qi.call(_t,mn)&&nr(Kt,mn,_t[mn]);return Kt},Mn=(Kt,_t)=>_i(Kt,ki(_t)),to=(Kt,_t)=>{var mn={};for(var it in Kt)cr.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Wi)for(var it of Wi(Kt))_t.indexOf(it)<0&&qi.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const Ln=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Hr=({value:Kt,onChange:_t,choiceTextKey:mn,answerKey:it,index:vn,isEdit:jr,setInputActive:Bo,form:Ir,choiceOptionsPath:zr,allowChangeMode:Ro,showAddIcon:fo,addItem:Wo,deleteItem:co})=>{const Zi=(Kt==null?void 0:Kt[it])===!0,Ki=()=>{const Ar=Ir.getFieldValue(zr);Ir.setFieldValue(zr,Ar.map(rr=>Mn(dr({},rr),{[it]:!1})))},Dr=()=>{Zi?_t(Mn(dr({},Kt),{[it]:!1})):(Ro||Ki(),_t(Mn(dr({},Kt),{[it]:!0})))};return Rn.createElement(ht.Z,{className:Jt.choiceWrap,align:"middle",wrap:!1},Rn.createElement(dt.Z,{onClick:Dr,className:`${Jt.choiceIndex} ${Zi?Jt.activeAnswer:""}`},Ln[vn]),Rn.createElement(dt.Z,{flex:1,className:`${Jt.editorWrap} ml15`,onClick:Bo},Rn.createElement(fn,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:jr,value:Kt==null?void 0:Kt[mn],onChange:Ar=>{_t(Mn(dr({},Kt),{[mn]:Ar}))}})),Rn.createElement(dt.Z,{flex:"0 0 auto",className:"ml15"},Rn.createElement("div",{onClick:Dr,className:`${Jt.setAnswerBtn} ${Zi?Jt.activeAnswer:""}`},Zi?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Rn.createElement(dt.Z,{className:Jt.actionWrapper},Rn.createElement(Ct.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Rn.createElement(hi.Z,{className:Jt.addIcon,onClick:Wo,style:{visibility:fo?"visible":"hidden"}})),Rn.createElement(Ct.Z,{title:"\u5220\u9664"},Rn.createElement(fi.Z,{className:Jt.deleteIcon,onClick:co,style:{visibility:vn>1?"visible":"hidden"}}))))},so=({questionTitlePlaceholder:Kt,titleKey:_t,choiceKey:mn,analysisKey:it,choiceTextKey:vn,answerKey:jr,choiceOptionsPath:Bo,allowChangeMode:Ir=!0,form:zr,showAnalysis:Ro=!0})=>{const[fo,Wo]=(0,ce.useState)(),[co,Zi]=(0,ce.useState)(!1);return Rn.createElement("div",{className:Jt.wrap},Rn.createElement("div",{className:Jt.questionTitleEditorWrap},Rn.createElement(ze.default.Item,{label:"\u9898\u5E72",name:_t,labelCol:{span:24},rules:[{required:!0}]},Rn.createElement(ar,{scrollId:Array.isArray(_t)?_t.join("_"):`${_t}`,watch:!0,height:140,placeholder:Kt}))),Rn.createElement(ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Rn.createElement(ze.default.List,{name:mn,rules:[{validator(Ki,Dr){const Ar=Dr.some(br=>br[jr]),rr=Dr.findIndex(br=>{var Lo;return((Lo=br[vn])==null?void 0:Lo.length)<=0});return rr!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ln[rr]}\u9009\u9879\u7684\u5185\u5BB9`)):Ar?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ki,{add:Dr,remove:Ar})=>Rn.createElement("div",{id:Array.isArray(Bo)?Bo.join("_"):`${Bo}`},Ki.map((rr,br)=>{var Lo=rr,{key:Rr,name:tr}=Lo,ur=to(Lo,["key","name"]);const sr=fo===Rr,Ri=()=>{Wo(Rr)},To=br<7&&br===Ki.length-1,Yr=()=>Dr({[vn]:"",[jr]:0}),ko=()=>Ar(tr);return Rn.createElement(ze.default.Item,Mn(dr({},ur),{key:Rr,name:tr,noStyle:!0}),Rn.createElement(Hr,{choiceTextKey:vn,answerKey:jr,index:br,isEdit:sr,setInputActive:Ri,form:zr,choiceOptionsPath:Bo,allowChangeMode:Ir,showAddIcon:To,addItem:Yr,deleteItem:ko}))}),Ki.length<8&&Rn.createElement("div",{className:`${Jt.addBtn} mb30`,onClick:()=>Dr({[vn]:"",[jr]:0})},"\u6DFB\u52A0\u9009\u9879"))),Ro&&Rn.createElement("div",{onClick:()=>Zi(!0)},Rn.createElement(ze.default.Item,{name:it,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Rn.createElement(fn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:co}))))};var Bi=ve(59301),Mo=Object.defineProperty,oo=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertySymbols,Wr=Object.prototype.hasOwnProperty,no=Object.prototype.propertyIsEnumerable,xi=(Kt,_t,mn)=>_t in Kt?Mo(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,tt=(Kt,_t)=>{for(var mn in _t||(_t={}))Wr.call(_t,mn)&&xi(Kt,mn,_t[mn]);if(er)for(var mn of er(_t))no.call(_t,mn)&&xi(Kt,mn,_t[mn]);return Kt},lo=(Kt,_t)=>oo(Kt,Ui(_t)),_o=(Kt,_t)=>{var mn={};for(var it in Kt)Wr.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&er)for(var it of er(Kt))_t.indexOf(it)<0&&no.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const ga=({value:Kt,onChange:_t})=>{const mn=vn=>{Ke.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Jt.modal,onOk:()=>{const jr=[...Kt];jr.splice(vn,1),_t(jr)}})},it=()=>{const vn=[...Kt];vn.push(""),_t(vn)};return Bi.createElement(ht.Z,{align:"middle",className:"ml20",gutter:[40,20]},Kt==null?void 0:Kt.map((vn,jr)=>Bi.createElement(dt.Z,{key:`${vn}_${jr}`,className:Jt.blankWrapper},Bi.createElement(ct.default,{className:Jt.blankInput,defaultValue:vn,maxLength:1e3,onBlur:Bo=>{const Ir=[...Kt],zr=Bo.target.value.trim();Ir[jr]=zr,_t(Ir)}}),Bi.createElement(Ct.Z,{title:"\u5220\u9664"},Bi.createElement(fi.Z,{className:Jt.deleteIcon,style:{marginLeft:15,visibility:jr>0?"visible":"hidden"},onClick:()=>mn(jr)})))),Bi.createElement(dt.Z,null,Bi.createElement("div",{className:`${Jt.addBtn}`,onClick:()=>{it()}},"\u65B0\u589E\u7B54\u6848")))},Oa=({value:Kt=!0,onChange:_t})=>Bi.createElement(Fi.Z,{checked:!Kt,onChange:mn=>{_t(!mn)}}),Xo="\u2581",Fa=({questionTitlePlaceholder:Kt,form:_t,name:mn,scoreByBlank:it="use_blank_score",answerKey:vn,titleKey:jr="name",analysisKey:Bo="analysis",isOrdered:Ir="is_ordered"})=>{var zr,Ro;const[fo,Wo]=(0,ce.useState)(!1),co=(Rr,tr)=>{const ur=tr.line;let sr=0;for(let To=0;To<ur;To++)sr+=Rr.getLine(To).split(Xo).length-1;const Ri=Rr.getLine(ur).substring(0,tr.ch);return sr+=Ri.split(Xo).length-1,sr},Zi=(Rr,tr,ur,sr)=>{const Ri=Rr.getRange(tr.from,tr.to);let To=0;if(tr.text.forEach(Yr=>{To+=Yr.split(Xo).length-1}),tr.origin!=="setValue"){if(Ri&&Ri.indexOf(Xo)!==-1){const Yr=Ri.split(Xo).length-1,ko=co(Rr,tr.from);if(console.log(`\u5220\u9664${Yr}\u4E2A\uFF0C \u524D\u9762\u6709${ko}\u4E2A\uFF0C\u65B0\u589E${To}\u4E2A`),Yr>1){const Uo=Array.from({length:Yr},(Lr,Do)=>ko+Do);sr(Uo)}else sr(ko)}else if(To>0){const Yr=co(Rr,tr.from);console.log(`\u65B0\u589E${To}\u4E2A\uFF0C\u4E4B\u524D\u6709${Yr}\u4E2A`),ur(To,Yr)}}},Ki=()=>{const Rr=_t.getFieldValue(["sub_item_banks",...vn]);_t.setFieldValue(["sub_item_banks",...vn],Rr==null?void 0:Rr.map((tr,ur)=>lo(tt({},tr),{position:ur+1})))},Dr=(0,ce.useRef)(),Ar=(Rr,tr)=>{for(let ur=0;ur<Rr;ur++)Dr.current({position:null,answer_text:[""]},tr+ur);Ki()},rr=(0,ce.useRef)(),br=Rr=>{rr.current(Rr),Ki()},Lo=(Ro=(zr=_t.getFieldValue("sub_item_banks"))==null?void 0:zr[vn==null?void 0:vn[0]])==null?void 0:Ro[vn==null?void 0:vn[1]];return Bi.createElement("div",{className:Jt.wrap},Bi.createElement("div",{className:Jt.questionTitleEditorWrap},Bi.createElement(ze.default.Item,{label:"\u9898\u5E72",name:jr,labelCol:{span:24},rules:[{required:!0}]},Bi.createElement(ar,{scrollId:"name",watch:!0,height:140,placeholder:Kt,showNullButton:!0,onCMBeforeChange:(Rr,tr)=>{Zi(Rr,tr,Ar,br)}}))),Bi.createElement(ze.default.List,{name:vn,rules:[{validator(Rr,tr){if((tr==null?void 0:tr.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const ur of tr){const{answer_text:sr}=ur||{};if(sr!=null&&sr.some(Ri=>(Ri==null?void 0:Ri.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Rr,{add:tr,remove:ur},{errors:sr})=>(Dr.current=tr,rr.current=ur,Bi.createElement(Bi.Fragment,null,Bi.createElement(ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Rr.map((Ri,To)=>{var Yr=Ri,{key:ko,name:Uo}=Yr,Lr=_o(Yr,["key","name"]);return Bi.createElement(ht.Z,{className:"mb20",key:ko,align:"middle",wrap:!1},Bi.createElement(dt.Z,{flex:"0 0 auto",className:`${Jt.blankIndex}`},"\u586B\u7A7A\u9879",To+1),Bi.createElement(dt.Z,{flex:1},Bi.createElement(ht.Z,{align:"top",justify:"space-between",wrap:!1},Bi.createElement(dt.Z,null,Bi.createElement(ze.default.Item,lo(tt({},Lr),{name:[Uo,"answer_text"],noStyle:!0}),Bi.createElement(ga,null))),(_t==null?void 0:_t.getFieldValue(["sub_item_banks",...it]))&&Bi.createElement(dt.Z,{flex:"224px"},Bi.createElement(ze.default.Item,lo(tt({},Lr),{name:[Uo,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Jt.blankInputNumberWrapper}),Bi.createElement(Be.Z,{className:Jt.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),Bi.createElement(ze.default.Item,lo(tt({},Lr),{name:[Uo,"position"],noStyle:!0}),Bi.createElement(ct.default,{type:"hidden"}))))})))),Bi.createElement(ht.Z,{align:"middle"},Bi.createElement(ze.default.Item,{name:[mn,"downcase"],valuePropName:"checked"},Bi.createElement(Fi.Z,null)),Bi.createElement(dt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Bi.createElement(ht.Z,{align:"middle"},Bi.createElement(ze.default.Item,{name:[mn,"no_space"],valuePropName:"checked"},Bi.createElement(Fi.Z,null)),Bi.createElement(dt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Lo==null?void 0:Lo.length)>1&&Bi.createElement(ht.Z,{align:"middle",className:(Lo==null?void 0:Lo.length)>1?"mb30":`${Jt.hide}`},Bi.createElement(ze.default.Item,{name:Ir},Bi.createElement(Oa,null)),Bi.createElement(dt.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),Bi.createElement("div",{onClick:()=>Wo(!0)},Bi.createElement(ze.default.Item,{name:Bo,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Bi.createElement(fn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:fo}))))};var Gr=Object.defineProperty,Br=Object.defineProperties,yr=Object.getOwnPropertyDescriptors,xo=Object.getOwnPropertySymbols,ua=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable,ir=(Kt,_t,mn)=>_t in Kt?Gr(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,Xn=(Kt,_t)=>{for(var mn in _t||(_t={}))ua.call(_t,mn)&&ir(Kt,mn,_t[mn]);if(xo)for(var mn of xo(_t))Tr.call(_t,mn)&&ir(Kt,mn,_t[mn]);return Kt},wr=(Kt,_t)=>Br(Kt,yr(_t)),bo=(Kt,_t)=>{var mn={};for(var it in Kt)ua.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&xo)for(var it of xo(Kt))_t.indexOf(it)<0&&Tr.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const ta={\u6B63\u786E:"T",\u9519\u8BEF:"F"},No=({value:Kt,onChange:_t,form:mn,choiceKey:it})=>{const vn=(Kt==null?void 0:Kt.is_answer)===!0,jr=Kt==null?void 0:Kt.choice_text,Bo=()=>{var Ir;const zr=(Ir=mn==null?void 0:mn.getFieldValue(["sub_item_banks",...it]))==null?void 0:Ir.map(Ro=>({choice_text:Ro==null?void 0:Ro.choice_text,is_answer:!1}));mn==null||mn.setFieldValue(["sub_item_banks",...it],zr),_t(wr(Xn({},Kt),{is_answer:!0}))};return ce.createElement(ht.Z,{className:Jt.choiceWrap,align:"middle",wrap:!1},ce.createElement(dt.Z,{onClick:Bo,className:`${Jt.choiceIndex} ${Jt.judgementIndex} ${vn?Jt.activeAnswer:""}`},ta[jr]),ce.createElement(dt.Z,{flex:1,className:`${Jt.editorWrap} ml15`},ce.createElement("div",{className:`${Jt.inputBorder} ${Jt.placeholder} ${vn?Jt.activeJudgementAnswer:""}`},jr)),ce.createElement(dt.Z,{flex:"0 0 auto",className:"ml15"},ce.createElement("div",{onClick:Bo,className:`${Jt.setAnswerBtn} ${vn?Jt.activeAnswer:""}`},vn?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},vo=({questionTitlePlaceholder:Kt,choiceKey:_t="choices",form:mn,titleKey:it="name",analysisKey:vn="analysis"})=>{const[jr,Bo]=(0,ce.useState)(!1);return ce.createElement("div",{className:Jt.wrap},ce.createElement("div",{className:Jt.questionTitleEditorWrap},ce.createElement(ze.default.Item,{label:"\u9898\u5E72",name:it,labelCol:{span:24},rules:[{required:!0}]},ce.createElement(ar,{scrollId:"name",watch:!0,height:140,placeholder:Kt}))),ce.createElement(ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},ce.createElement(ze.default.List,{name:_t,rules:[{validator(Ir,zr){return zr.some(fo=>(fo==null?void 0:fo.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Ir=>ce.createElement("div",{id:"choices"},Ir.map(zr=>{var Ro=zr,{key:fo,name:Wo}=Ro,co=bo(Ro,["key","name"]);return ce.createElement(ze.default.Item,wr(Xn({},co),{key:fo,name:Wo,noStyle:!0}),ce.createElement(No,{form:mn,choiceKey:_t}))})))),ce.createElement("div",{onClick:()=>Bo(!0)},ce.createElement(ze.default.Item,{name:vn,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ce.createElement(fn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:jr}))))};var na=Object.defineProperty,ia=Object.defineProperties,Ba=Object.getOwnPropertyDescriptors,Na=Object.getOwnPropertySymbols,is=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,Ia=(Kt,_t,mn)=>_t in Kt?na(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,Vl=(Kt,_t)=>{for(var mn in _t||(_t={}))is.call(_t,mn)&&Ia(Kt,mn,_t[mn]);if(Na)for(var mn of Na(_t))pn.call(_t,mn)&&Ia(Kt,mn,_t[mn]);return Kt},Hs=(Kt,_t)=>ia(Kt,Ba(_t)),wl=(Kt,_t)=>{var mn={};for(var it in Kt)is.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&Na)for(var it of Na(Kt))_t.indexOf(it)<0&&pn.call(Kt,it)&&(mn[it]=Kt[it]);return mn};const ka=Kt=>{var _t=Kt,{value:mn,onChange:it}=_t,vn=wl(_t,["value","onChange"]);const jr=Bo=>{it([Bo])};return ce.createElement(Bn.Z,Hs(Vl({},vn),{defaultValue:mn==null?void 0:mn[0],onChange:jr}))},yu=Kt=>{if(!Kt)return!1;let _t=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return Kt==="|"?(mt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Cl=({value:Kt=[],onClose:_t})=>ce.createElement(mi.default,{closable:!0,onClose:_t,className:Jt.keywordTag},Kt==null?void 0:Kt.join(" \u6216 ")),ma=({questionTitlePlaceholder:Kt,form:_t,showKeywords:mn,isMustKeyWords:it=mn,titleKey:vn="name",analysisKey:jr="analysis",answerTexts:Bo="answer_texts",keywords:Ir="keywords",useKeywords:zr="use_keywords",indexs:Ro})=>{const[fo,Wo]=(0,ce.useState)(!1),[co,Zi]=(0,ce.useState)(""),Ki=ze.default.useWatch("sub_item_banks",_t),{use_keywords:Dr,score:Ar}=(Ki==null?void 0:Ki[Ro])||{};return console.log(Dr,Ar,"itemValues"),ce.createElement("div",{className:Jt.wrap},ce.createElement("div",{className:Jt.questionTitleEditorWrap},ce.createElement(ze.default.Item,{label:"\u9898\u5E72",name:vn,labelCol:{span:24},rules:[{required:!0}]},ce.createElement(ar,{scrollId:"name",watch:!0,height:140,placeholder:Kt}))),ce.createElement(ze.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:Bo,labelCol:{span:24}},ce.createElement(ka,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),mn&&!it&&ce.createElement(ze.default.Item,{hidden:!0,name:zr,valuePropName:"checked"},ce.createElement(Fi.Z,{defaultChecked:!0})),mn&&it&&ce.createElement(ht.Z,{align:"middle",className:"mb30"},ce.createElement(ze.default.Item,{name:zr,valuePropName:"checked"},ce.createElement(Fi.Z,null)),ce.createElement(dt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ce.createElement(dt.Z,null,ce.createElement(Ct.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},ce.createElement(jn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Dr||!it)&&ce.createElement(ze.default.List,{name:Ir,rules:[{validator(rr,br){return it?br!=null&&br.length?(br==null?void 0:br.reduce((Rr,tr)=>Rr+tr.score,0))>parseFloat(Ar)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(rr,{add:br,remove:Lo})=>ce.createElement(ce.Fragment,null,ce.createElement("div",{className:`${Jt.title} mb10`},it?"\u5173\u952E\u8BCD":ce.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ce.createElement(ht.Z,{align:"middle",className:"font14 mb30"},ce.createElement(dt.Z,{flex:1},ce.createElement(ct.default,{value:co,onChange:Rr=>{Zi(Rr.target.value)},maxLength:50,allowClear:!0,onPressEnter:Rr=>{var tr,ur,sr,Ri;const To=`${(tr=Rr.target)==null?void 0:tr.value}`,Yr=(sr=(ur=To==null?void 0:To.split("|"))==null?void 0:ur.filter(Lr=>!!Lr))==null?void 0:sr.map(Lr=>Lr==null?void 0:Lr.trim()),ko=_t.getFieldValue(["sub_item_banks",...Ir]),Uo=((Ri=ko==null?void 0:ko.map(Lr=>Lr==null?void 0:Lr.keyword))==null?void 0:Ri.flat())||[];for(const Lr of Yr)if(Uo.includes(Lr)){mt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}yu(To)&&(br({keyword:Yr,score:1}),Zi(""))},className:Jt.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),ce.createElement(dt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),rr.map(Rr=>{var tr=Rr,{key:ur,name:sr}=tr,Ri=wl(tr,["key","name"]);return ce.createElement(ht.Z,{key:ur,className:"mb20",style:{marginRight:148}},ce.createElement(dt.Z,{flex:1},ce.createElement(ht.Z,{align:"middle",justify:"space-between"},ce.createElement(ze.default.Item,Hs(Vl({},Ri),{name:[sr,"keyword"]}),ce.createElement(Cl,{onClose:()=>Lo(sr)})),it&&ce.createElement(ze.default.Item,Hs(Vl({},Ri),{name:[sr,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Jt.blankInputNumberWrapper}),ce.createElement(Be.Z,{className:Jt.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ce.createElement("div",{onClick:()=>Wo(!0)},ce.createElement(ze.default.Item,{name:jr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ce.createElement(fn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:fo}))))};var Fo=ve(59301),Ul=Object.defineProperty,$r=Object.defineProperties,$o=Object.getOwnPropertyDescriptors,yo=Object.getOwnPropertySymbols,Di=Object.prototype.hasOwnProperty,$a=Object.prototype.propertyIsEnumerable,Ka=(Kt,_t,mn)=>_t in Kt?Ul(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,bs=(Kt,_t)=>{for(var mn in _t||(_t={}))Di.call(_t,mn)&&Ka(Kt,mn,_t[mn]);if(yo)for(var mn of yo(_t))$a.call(_t,mn)&&Ka(Kt,mn,_t[mn]);return Kt},El=(Kt,_t)=>$r(Kt,$o(_t)),Dl=(Kt,_t)=>{var mn={};for(var it in Kt)Di.call(Kt,it)&&_t.indexOf(it)<0&&(mn[it]=Kt[it]);if(Kt!=null&&yo)for(var it of yo(Kt))_t.indexOf(it)<0&&$a.call(Kt,it)&&(mn[it]=Kt[it]);return mn},Ei=(Kt,_t,mn)=>new Promise((it,vn)=>{var jr=zr=>{try{Ir(mn.next(zr))}catch(Ro){vn(Ro)}},Bo=zr=>{try{Ir(mn.throw(zr))}catch(Ro){vn(Ro)}},Ir=zr=>zr.done?it(zr.value):Promise.resolve(zr.value).then(jr,Bo);Ir((mn=mn.apply(Kt,_t)).next())});const{Panel:Ma}=Gt.default,cs=null,bl=(Kt,_t)=>{var mn=Kt,{globalSetting:it,loading:vn,dispatch:jr,editData:Bo,onRef:Ir=()=>{},isEdit:zr}=mn,Ro=Dl(mn,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[fo,Wo]=(0,ce.useState)(""),[co,Zi]=(0,ce.useState)([]),[Ki]=ze.default.useForm();(0,ce.useEffect)(()=>{!Bo||!zr||(Wo(Bo==null?void 0:Bo.name),Zi(Bo==null?void 0:Bo.sub_item_banks),Ki.setFieldsValue(bs({},Bo)))},[Bo]),(0,ce.useEffect)(()=>{Zi(Ki.getFieldValue("sub_item_banks"))},[ze.default.useWatch("sub_item_banks",Ki)]),(0,ce.useImperativeHandle)(_t,()=>({onSave:Dr,Clear:Ar}));const Dr=()=>Ei(void 0,null,function*(){if(!fo)return mt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Ki.validateFields()}catch(ur){return console.log(ur,"errInfo"),mt.ZP.error(ur.errorFields[0].errors[0]),!1}const tr=co.map(ur=>bs({id:ur.id>1?ur.id:null},ur));return{name:fo,sub_item_banks:tr}}),Ar=()=>{Wo(""),Zi([])},rr={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},br=({value:tr})=>Fo.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},tr),[Lo,Rr]=(0,ce.useState)();return Fo.createElement("section",{className:gt.wrap},Fo.createElement("p",{className:gt.titleWrap},Fo.createElement("span",{className:gt.required},"*"),Fo.createElement("span",{className:gt.title},"\u9898\u5E72\uFF1A")),Fo.createElement(Bn.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:fo,onChange:tr=>Wo(tr)}),Fo.createElement(ze.default,{form:Ki,autoComplete:"off"},Fo.createElement(ze.default.List,{name:"sub_item_banks",rules:[{validator(tr,ur){return ur?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(tr,{add:ur,remove:sr})=>{const Ri=Ki.getFieldValue("sub_item_banks");return Fo.createElement(Fo.Fragment,null,Fo.createElement(Gt.default,{className:tr.length>0?gt.collapseWrapper:"",bordered:!1,expandIcon:({isActive:To})=>Fo.createElement("i",{className:`iconfont icon-weizhankai ${To?gt.open:gt.close}`,style:{fontSize:14,transition:"all .2s"}})},tr.map((To,Yr)=>{var ko=To,{key:Uo,name:Lr}=ko,Do=Dl(ko,["key","name"]),Bs,Gi,Ra,Vr,Za,Is,ju,Wh,Bh,ru,zu,aa;return Fo.createElement(Ma,{className:gt.panel,forceRender:!0,header:Fo.createElement("div",{className:gt.panelHeader},"\u7B2C",Yr+1,"\u5C0F\u9898",Fo.createElement("span",null,"\uFF08",rr[(Bs=Ri==null?void 0:Ri[Lr])==null?void 0:Bs.item_type],"\uFF09")),extra:Fo.createElement(ht.Z,{align:"middle",onClick:Ml=>Ml.stopPropagation(),style:{display:"flex",alignItems:"center"}},((Gi=Ri==null?void 0:Ri[Lr])==null?void 0:Gi.item_type)=="completion"&&Fo.createElement(ze.default.Item,El(bs({},Do),{name:[Lr,"score"],className:gt.blankInputNumberWrapper,style:{marginBottom:0}}),((Ra=Ri==null?void 0:Ri[Lr])==null?void 0:Ra.item_type)=="completion"&&Fo.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",Fo.createElement(br,{value:(Vr=Ri==null?void 0:Ri[Lr])==null?void 0:Vr.score}),"\u5206")),((Za=Ri==null?void 0:Ri[Lr])==null?void 0:Za.item_type)=="completion"&&Fo.createElement(Fo.Fragment,null,Fo.createElement(ot.ZP.Group,{defaultValue:(Is=Ri==null?void 0:Ri[Lr])==null?void 0:Is.use_blank_score,className:gt.scoreByBlankRadio,style:{marginRight:10},optionType:"button",options:[{label:"\u6309\u7A7A\u7ED9\u5206",value:!0},{label:"\u6309\u9898\u7ED9\u5206",value:!1}],onChange:Ml=>{var Gh;console.log(Ki.getFieldsValue()),Ki==null||Ki.setFieldValue(["sub_item_banks",Lr,"use_blank_score"],(Gh=Ml==null?void 0:Ml.target)==null?void 0:Gh.value),Rr(new Date)}}),Fo.createElement(Ct.Z,{overlayInnerStyle:{width:460},title:Fo.createElement("div",null,"\u6309\u7A7A\u7ED9\u5206\uFF1A\u9700\u8981\u5206\u522B\u8BBE\u7F6E\u6BCF\u4E2A\u586B\u7A7A\u9879\u7684\u5206\u503C\uFF0C\u586B\u7A7A\u9879\u7B54\u5BF9\u4E4B\u540E\u5219\u83B7\u5F97\u5BF9\u5E94\u7684\u5206\u503C\u3002",Fo.createElement("br",null),"\u6309\u9898\u7ED9\u5206\uFF1A\u7B54\u5BF9\u5168\u90E8\u586B\u7A7A\u9879\u4E4B\u540E\u624D\u80FD\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\u3002")},Fo.createElement("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})))),key:Uo},Fo.createElement(ze.default.Item,El(bs({},Do),{name:Lr}),(((ju=Ri==null?void 0:Ri[Lr])==null?void 0:ju.item_type)=="single"||((Wh=Ri==null?void 0:Ri[Lr])==null?void 0:Wh.item_type)=="multiple")&&Fo.createElement(so,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Bh=Ri==null?void 0:Ri[Lr])==null?void 0:Bh.item_type)!="single",form:Ki,choiceKey:[Lr,"choices"],titleKey:[Lr,"name"],analysisKey:[Lr,"analysis"],choiceOptionsPath:["sub_item_banks",Lr,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((ru=Ri==null?void 0:Ri[Lr])==null?void 0:ru.item_type)=="completion"&&Fo.createElement(Fa,{form:Ki,name:Lr,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[Lr,"use_blank_score"],titleKey:[Lr,"name"],analysisKey:[Lr,"analysis"],isOrdered:[Lr,"is_ordered"],answerKey:[Lr,"standard_answer"],key:Lo}),((zu=Ri==null?void 0:Ri[Lr])==null?void 0:zu.item_type)=="judgement"&&Fo.createElement(vo,{form:Ki,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Lr,"name"],analysisKey:[Lr,"analysis"],choiceKey:[Lr,"choices"]}),((aa=Ri==null?void 0:Ri[Lr])==null?void 0:aa.item_type)=="subjective"&&Fo.createElement(ma,{showKeywords:!0,form:Ki,titleKey:[Lr,"name"],analysisKey:[Lr,"analysis"],answerTexts:[Lr,"answer_texts"],useKeywords:[Lr,"use_keywords"],keywords:[Lr,"keywords"],indexs:Lr,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var Ol=(0,je.connect)(({loading:Kt,globalSetting:_t})=>({globalSetting:_t,loading:Kt.effects}),null,null,{forwardRef:!0})((0,ce.forwardRef)(bl)),Il=ve(75872),Jr=ve(19842),Ju=ve(57809),nl=ve(1710),vs={flex_box_center:"flex_box_center___xDdtW",flex_space_between:"flex_space_between___J4mFI",flex_box_vertical_center:"flex_box_vertical_center___hDYn6",flex_box_center_end:"flex_box_center_end___H7l1j",flex_box_column:"flex_box_column___TPd2T",questionInfo:"questionInfo___ABq66",label:"label___VQOr7",content:"content____HZ6z",leftPart:"leftPart___YB0y5",rightPart:"rightPart___UVMmS",dragItem:"dragItem___Hbx8k",blackText:"blackText___U4u33",greyText:"greyText___rWIL_",iconWrapper:"iconWrapper___I0kek",contentArea:"contentArea___hGC13",dragging:"dragging___z7VVY",hidden:"hidden___nWAxb",dragIcon:"dragIcon___j91TC",deleteIcon:"deleteIcon___cmCqc",disabled:"disabled___ZlKMj",challengeNameWrapper:"challengeNameWrapper___SpiRb",challengeName:"challengeName___lmQe2",shixunPreviewFooter:"shixunPreviewFooter___u0CzD",shixunInfoWrapper:"shixunInfoWrapper___HzLHD",shixunInfo:"shixunInfo___qaQlF",btnToDetail:"btnToDetail___scXqr",fixedBottom:"fixedBottom___wTBAR",cancelBtn:"cancelBtn___Km4Gi",confirmBtn:"confirmBtn___WrECz",previewBtn:"previewBtn____oGPS",setScoreModalTable:"setScoreModalTable___CjDlp",title:"title___cQWdZ",tipcontent:"tipcontent___A8tZ5",name:"name___CvfT9",tip:"tip___EvoCF",info:"info___y_ayi",img:"img___X9CNn"},ys=ve(15965),Su=ve(38389),Iu=ve(94811),Ys=ve(59579),ul=ve(57816),Mh=ve(72559),Lh=({open:Kt,onCancel:_t,onOk:mn})=>{const it=(0,Su.g)(),[vn,jr,Bo,Ir]=(0,Ys.U)(Iu.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[zr,Ro]=(0,ce.useState)(!1);(0,ce.useEffect)(()=>{Kt&&Bo({page:1,limit:10,type:0},!0).then(Ki=>{(Ki==null?void 0:Ki.shixuns_count)===0&&Ro(!0)})},[Kt]);const[fo,Wo]=(0,ce.useState)([]),[co,Zi]=(0,ce.useState)([]);return ce.createElement(Ke.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:Kt,width:948,centered:!0,closable:!0,onCancel:_t,onOk:()=>mn(co),destroyOnClose:!0},ce.createElement(ht.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},ce.createElement(dt.Z,null,ce.createElement(Jr.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:it,onChange:Ki=>{Bo({page:1,discipline_id:Ki==null?void 0:Ki[0],sub_discipline_id:Ki==null?void 0:Ki[1]})}}),ce.createElement(Ju.default,{className:"ml20",style:{width:118},size:"large",placeholder:"\u96BE\u5EA6",allowClear:!0,options:[{label:"\u521D\u7EA7",value:1},{label:"\u4E2D\u7EA7",value:2},{label:"\u4E2D\u9AD8\u7EA7",value:3},{label:"\u9AD8\u7EA7",value:4}],onChange:Ki=>Bo({page:1,diff:Ki})}),ce.createElement(Ju.default,{className:"ml20",placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"large",allowClear:!0,options:[{label:"\u672A\u53D1\u5E03",value:"unpublish"},{label:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{label:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],onChange:Ki=>Bo({page:1,shixun_publish_status:Ki})})),ce.createElement(ys.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:Ki=>{Bo({keyword:Ki,page:1})}})),zr?ce.createElement("div",null,ce.createElement(ul.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,qe.xg)("/shixuns")})):ce.createElement(nl.default,{loading:jr,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(Ki,Dr)=>ce.createElement("div",{style:{display:"flex",alignItems:"center"}},ce.createElement("div",{className:Dr!=null&&Dr.high_resources_consume?vs.title:"",title:Ki||"--"},ce.createElement(Ie.Z,{key:1,showLines:1,showTextOnly:!0,value:Ki||"--"})),(Dr==null?void 0:Dr.high_resources_consume)&&ce.createElement(Mh.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(Ki,Dr,Ar)=>ce.createElement("span",null,Ki||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:ce.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",ce.createElement(Ct.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},ce.createElement(jn.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(Ki,Dr,Ar)=>ce.createElement("span",null,Ki||"- -")},{title:"\u64CD\u4F5C",render(Ki,Dr){const{title:Ar,challenge_names:rr,author_name:br,identifier:Lo,author_school_name:Rr,study_count:tr}=Dr||{};return ce.createElement("div",null,ce.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{Ke.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:ce.createElement("div",null,ce.createElement(Ie.Z,{value:Ar,style:{marginBottom:18}}),ce.createElement("div",{className:vs.challengeNameWrapper},rr.map((ur,sr)=>ce.createElement("div",{className:vs.challengeName,key:sr},"\u7B2C",(0,qe.EM)(sr+1),"\u9898\xA0",ur))),ce.createElement(ht.Z,{className:vs.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},ce.createElement(dt.Z,{className:vs.shixunInfoWrapper},ce.createElement("span",null,"\u521B\u5EFA\u8005"),ce.createElement("span",{className:vs.shixunInfo},br.split("\u3001")[0]),ce.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),ce.createElement("span",{className:vs.shixunInfo},Rr),ce.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),ce.createElement("span",{className:vs.shixunInfo},tr)),ce.createElement(_e.ZP,{type:"primary",className:vs.btnToDetail,onClick:()=>(0,qe.xg)(`/shixuns/${Lo}/challenges?exercise=true`)},ce.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(Dr==null?void 0:Dr.shixun_tag_num)===1&&ce.createElement("a",{target:"_blank",href:`/shixuns/${Dr==null?void 0:Dr.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:Ir==null?void 0:Ir.items,rowSelection:{type:"radio",selectedRowKeys:fo,preserveSelectedRowKeys:!0,getCheckboxProps:Ki=>({disabled:Ki.shixun_tag_num===1}),onChange(Ki,Dr){var Ar,rr,br;console.log(Ki),Wo(Ki);const Lo=[];for(const tr of co)Ki.includes(tr.id)&&Lo.push(tr);const Rr=Lo.map(tr=>tr.id);for(const tr of Dr)tr&&Ki.includes(tr.id)&&!Rr.includes(tr.id)&&Lo.push({id:tr.id,difficulty:tr.level,identifier:tr.identifier,name:tr.name,real_name:(Ar=tr==null?void 0:tr.author_name)==null?void 0:Ar.split("\u3001")[0],school_name:tr.author_school_name,challenge_names:tr.challenge_names,challenges:(rr=tr.challenge_names)==null?void 0:rr.map((ur,sr)=>({subject:ur,id:sr,score:5})),score:((br=tr.challenge_names)==null?void 0:br.length)*5,study_count:tr.study_count,challenges_count:tr.challenges_count});Zi(Lo)}},pagination:{current:vn.page,pageSize:vn.limit,total:Ir==null?void 0:Ir.items_count,showTotal:Ki=>ce.createElement("span",null,"\u5171\xA0",ce.createElement("span",{style:{color:"#165DFF"}},Ki),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(Ki,Dr){Bo({page:Ki,limit:Dr})},size:"default"},scroll:{y:400}}))},hc=ve(20527),Fh=ve(49898),Ru=(Kt,_t,mn)=>new Promise((it,vn)=>{var jr=zr=>{try{Ir(mn.next(zr))}catch(Ro){vn(Ro)}},Bo=zr=>{try{Ir(mn.throw(zr))}catch(Ro){vn(Ro)}},Ir=zr=>zr.done?it(zr.value):Promise.resolve(zr.value).then(jr,Bo);Ir((mn=mn.apply(Kt,_t)).next())}),Rl=({visible:Kt,getdata:_t,onCancel:mn,onRandomExchange:it,selectFromProblemSet:vn,questionParams:jr})=>{const[Bo,Ir]=(0,ce.useState)(!1),[zr,Ro]=(0,ce.useState)(!1),[fo,Wo]=(0,ce.useState)({}),co=(0,je.useParams)(),[Zi,Ki]=(0,ce.useState)(),Dr=(Ar,rr)=>Ru(void 0,null,function*(){Ro(!0);const br=yield(0,$e.ZP)(`/api/exercises/${co.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:jr.id,item_bank_id:Ar,shixuns_info:[{id:Ar,is_copy:rr!=1,is_use:rr!=1}]}});Ro(!1),br!=null&&br.status||(mt.ZP.info("\u6362\u9898\u6210\u529F"),mn(),_t())});return ce.createElement(Ke.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:Kt,onCancel:mn,centered:!0,maskClosable:!0,footer:null},ce.createElement(ht.Z,{justify:"center",className:"pb20"},ce.createElement(Il.Z,{onClick:it},"\u968F\u673A\u66F4\u6362"),(jr==null?void 0:jr.type)!=="PRACTICAL"&&ce.createElement(_e.ZP,{style:{marginLeft:24},onClick:vn},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9"),(jr==null?void 0:jr.type)==="PRACTICAL"&&ce.createElement(_e.ZP,{style:{marginLeft:24},onClick:()=>{Ir(!0)}},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9")),ce.createElement(Lh,{open:Bo,onCancel:()=>Ir(!1),onOk:Ar=>Ru(void 0,null,function*(){if(console.log("----selectedRows",Ar,co),(Ar==null?void 0:Ar.length)<=0){mt.ZP.info("\u8BF7\u9009\u62E9\u5B9E\u8BAD");return}let rr=Ar==null?void 0:Ar.map(Lo=>Lo==null?void 0:Lo.id),br=yield(0,Fh.Tr)({id:[...rr],course_id:co.coursesId,type:"shixun"});(br==null?void 0:br.student_count)===0?Dr(rr==null?void 0:rr[0],1):(Ki(rr),Wo(br)),Ir(!1)})}),ce.createElement(hc.Z,{resdata:fo,type:"shixun",okloading:zr,oktext:(fo==null?void 0:fo.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:Ar=>Ru(void 0,null,function*(){Dr(Zi==null?void 0:Zi[0],2)})}))},Hh=ve(37542),qu=ve(24334),eh=ve(85016),Po=ve(65532),Vo=ve(149),Ws=Object.defineProperty,ds=Object.defineProperties,es=Object.getOwnPropertyDescriptors,Aa=Object.getOwnPropertySymbols,_a=Object.prototype.hasOwnProperty,rs=Object.prototype.propertyIsEnumerable,Va=(Kt,_t,mn)=>_t in Kt?Ws(Kt,_t,{enumerable:!0,configurable:!0,writable:!0,value:mn}):Kt[_t]=mn,Gs=(Kt,_t)=>{for(var mn in _t||(_t={}))_a.call(_t,mn)&&Va(Kt,mn,_t[mn]);if(Aa)for(var mn of Aa(_t))rs.call(_t,mn)&&Va(Kt,mn,_t[mn]);return Kt},$s=(Kt,_t)=>ds(Kt,es(_t)),va=(Kt,_t,mn)=>new Promise((it,vn)=>{var jr=zr=>{try{Ir(mn.next(zr))}catch(Ro){vn(Ro)}},Bo=zr=>{try{Ir(mn.throw(zr))}catch(Ro){vn(Ro)}},Ir=zr=>zr.done?it(zr.value):Promise.resolve(zr.value).then(jr,Bo);Ir((mn=mn.apply(Kt,_t)).next())}),Mc=({data:Kt,submit:_t,goBack:mn,loading:it,onTypeScore:vn,editPreview:jr=!1,onSkipExamination:Bo,selectValue:Ir,onExchange:zr,getdata:Ro,handleMarkWrongQuestion:fo})=>{var Wo,co,Zi,Ki,Dr,Ar,rr,br,Lo,Rr,tr;const ur=(0,ce.useRef)(),[sr,Ri]=(0,ce.useState)(null),[To,Yr]=(0,ce.useState)(!1),[ko,Uo]=(0,ce.useState)(!1),Lr=(0,ce.useRef)(),[Do]=ze.default.useForm(),Bs=(0,je.useParams)(),[Gi,Ra]=(0,ce.useState)(!1);(0,ce.useEffect)(()=>{Yr(!0)},[]),(0,ce.useEffect)(()=>{jr||(0,qe.Dk)("\u8BD5\u5377\u9884\u89C8")},[jr]);const Vr=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],Za={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898",COMPLETION:"\u586B\u7A7A\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898"},Is={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},ju=_n=>{var Sr;const Jo=[];return ce.createElement(ce.Fragment,null,ce.createElement("aside",{className:De.single},(Sr=_n==null?void 0:_n.choices)==null?void 0:Sr.map((Qe,Ue)=>(Qe.is_answer&&Jo.push(Vo.k4[Ue]),ce.createElement("ul",{key:Ue},ce.createElement("li",null,Vo.k4[Ue],"\u3001"),ce.createElement("li",null,ce.createElement(Ie.Z,{value:Qe.choice_text})))))),ce.createElement("div",{className:De.analysis},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Jo.join(""),ce.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Vr[_n.difficulty])),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:_n.analysis?_n.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(_n==null?void 0:_n.discipline_name)||"--"}/${_n==null?void 0:_n.sub_discipline_name}`),ce.createElement(Ct.Z,{title:_n==null?void 0:_n.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),_n==null?void 0:_n.tag_discipline_name)))))},Wh=(_n,Sr)=>{var Jo;const Qe=(Jo=_n==null?void 0:_n.standard_answer)==null?void 0:Jo.map((Ue,jt)=>{var zt;return ce.createElement("div",{key:jt},`\u7B54\u6848\uFF08\u586B\u7A7A${Ue==null?void 0:Ue.position}\uFF09\uFF1A${(zt=Ue==null?void 0:Ue.answer_text)==null?void 0:zt.join("\u3001")}`)});return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:De.analysis},ce.createElement("div",{style:{display:"flex"}},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),ce.createElement("div",null,Qe)),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:_n.analysis?_n.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),Sr?`${(Sr==null?void 0:Sr.discipline_name)||"--"}/${Sr==null?void 0:Sr.sub_discipline_name}`:`${(_n==null?void 0:_n.discipline_name)||"--"}/${_n==null?void 0:_n.sub_discipline_name}`),ce.createElement(Ct.Z,{title:Sr?Sr==null?void 0:Sr.tag_discipline_name:_n==null?void 0:_n.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Sr?Sr==null?void 0:Sr.tag_discipline_name:_n==null?void 0:_n.tag_discipline_name)))))},Bh=_n=>{var Sr;const Jo=(Sr=_n==null?void 0:_n.standard_answer)==null?void 0:Sr.map((Qe,Ue)=>ce.createElement("div",{key:Ue},`\u7B54\u6848\uFF08\u586B\u7A7A${(Qe==null?void 0:Qe.position)||(Qe==null?void 0:Qe.exercise_choice_id)}\uFF09\uFF1A${Qe==null?void 0:Qe.answer_text}`));return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:De.analysis},ce.createElement("div",{style:{display:"flex"}},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),ce.createElement("div",null,Jo)),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:_n.analysis?_n.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(_n==null?void 0:_n.discipline_name)||"--"}/${_n==null?void 0:_n.sub_discipline_name}`),ce.createElement(Ct.Z,{title:_n==null?void 0:_n.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),_n==null?void 0:_n.tag_discipline_name)))))},ru=(_n,Sr)=>{var Jo;return ce.createElement("div",{className:De.analysis},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(Jo=_n==null?void 0:_n.answer_texts)==null?void 0:Jo[0]),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:_n.analysis?_n.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),Sr?`${(Sr==null?void 0:Sr.discipline_name)||"--"}/${Sr==null?void 0:Sr.sub_discipline_name}`:`${(_n==null?void 0:_n.discipline_name)||"--"}/${_n==null?void 0:_n.sub_discipline_name}`),ce.createElement(Ct.Z,{title:Sr?Sr==null?void 0:Sr.tag_discipline_name:_n==null?void 0:_n.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Sr?Sr==null?void 0:Sr.tag_discipline_name:_n==null?void 0:_n.tag_discipline_name))))},zu=_n=>{var Sr,Jo;return ce.createElement("div",{className:De.analysis},ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u9884\u671F\u8F93\u51FA:"),ce.createElement(Ie.Z,{value:(Sr=_n==null?void 0:_n.program_attr)==null?void 0:Sr.description})),ce.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((Jo=_n==null?void 0:_n.program_attr)==null?void 0:Jo.answer_text)||"--"),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:_n.analysis?_n.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(_n==null?void 0:_n.discipline_name)||"--"}/${_n==null?void 0:_n.sub_discipline_name}`),ce.createElement(Ct.Z,{title:_n==null?void 0:_n.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),_n==null?void 0:_n.tag_discipline_name))))},aa=(_n,Sr)=>{var Jo;return ce.createElement("div",null,(Jo=_n==null?void 0:_n.sub_item_banks)==null?void 0:Jo.map((Qe,Ue)=>{var jt,zt;const nn=[];return ce.createElement(ce.Fragment,null,ce.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},Sr+1+"."+(Ue+1),"\uFF08",Za[Qe.item_type]||Is[Qe.item_type],"\uFF09",Qe.name),(Qe.item_type=="SINGLE"||Qe.item_type=="MULTIPLE"||Qe.item_type=="JUDGMENT"||Qe.item_type=="single"||Qe.item_type=="multiple"||Qe.item_type=="judgement")&&ce.createElement(ce.Fragment,null,ce.createElement("aside",{className:De.single},(jt=Qe==null?void 0:Qe.choices)==null?void 0:jt.map((Wt,bn)=>(Wt.is_answer&&nn.push(Vo.k4[bn]),ce.createElement("ul",{key:bn},ce.createElement("li",null,Vo.k4[bn],"\u3001"),ce.createElement("li",null,ce.createElement(Ie.Z,{value:Wt.choice_text})))))),ce.createElement("div",{className:De.analysis},ce.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",nn.join(""),ce.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Vr[Qe.difficulty])),ce.createElement("aside",null,ce.createElement("span",{className:De.text},"\u89E3\u6790:"),ce.createElement(Ie.Z,{value:Qe.analysis?Qe.analysis:"\u6682\u65E0\u89E3\u6790"})),ce.createElement("ul",null,ce.createElement("li",null,ce.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(_n==null?void 0:_n.discipline_name)||"--"}/${_n==null?void 0:_n.sub_discipline_name}`),ce.createElement(Ct.Z,{title:_n==null?void 0:_n.tag_discipline_name},ce.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),_n==null?void 0:_n.tag_discipline_name))))),(Qe.item_type=="COMPLETION"||Qe.item_type=="completion")&&Wh(Qe,_n),(Qe.item_type=="SUBJECTIVE"||Qe.item_type=="subjective")&&ru(Qe,_n),((zt=Kt==null?void 0:Kt.exam)==null?void 0:zt.exercise_status)===3&&ce.createElement("div",{className:"flex gap-20px mt20"},ce.createElement(eh.Z,{state:Qe==null?void 0:Qe.is_wrong,onClick:()=>{fo==null||fo({value:$s(Gs({},Qe),{question_id:Qe==null?void 0:Qe.id,question_score:Qe==null?void 0:Qe.score})})}}),Qe.item_type=="single"&&ce.createElement(_e.ZP,{style:{color:"#3061D0"},onClick:()=>{Fc({value:Qe})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848")))}))},Ml=_n=>{var Sr,Jo,Qe;return ce.createElement("div",{style:{marginTop:"12px"}},(Jo=(Sr=_n==null?void 0:_n.shixun)==null?void 0:Sr.challenges)==null?void 0:Jo.map((Ue,jt)=>ce.createElement("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},ce.createElement("div",null,ce.createElement("span",{className:"mr5"},"\u7B2C",jt+1,"\u5173"),ce.createElement(Ct.Z,{key:jt,title:Ue==null?void 0:Ue.challenge_name},ce.createElement("span",null,(0,qe.Pq)(Ue==null?void 0:Ue.challenge_name,44)))),jr&&ce.createElement("div",null,"\u5206\u503C\uFF1A",Ue.score,"\u5206"))),ce.createElement(je.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(Qe=_n==null?void 0:_n.shixun)==null?void 0:Qe.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),ce.createElement("div",{style:{clear:"both"}}))},Gh=_n=>{let Sr=_n.questions_score/_n.questions_count;Ke.default.confirm({icon:null,centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:ce.createElement("div",{className:De.modalColumn},ce.createElement("div",{className:De.modalRow,style:{justifyContent:"flex-start"}},ce.createElement("sup",{className:De.sup},"*"),ce.createElement("span",null,_n==null?void 0:_n.name,"\uFF1A"),ce.createElement(Be.Z,{min:0,precision:1,defaultValue:Sr,onChange:Jo=>{Sr=Jo}}),ce.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){var Jo;if(!Sr)return mt.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const Qe={type:_n==null?void 0:_n.type,score:Sr,scoreTotal:Number((Jo=Sr*_n.questions_count)==null?void 0:Jo.toFixed(1))};vn(Qe)})})},Nh=()=>{let _n="";Ke.default.confirm({icon:null,centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:ce.createElement("div",{className:De.modalColumn},ce.createElement("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20"},ce.createElement("img",{style:{marginRight:5},src:Qt.Z}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),ce.createElement("div",{className:De.modalRow,style:{marginTop:20}},ce.createElement("sup",{className:De.sup},"*"),ce.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),ce.createElement(ct.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:_n,onChange:Sr=>{_n=Sr.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){var Sr;if(!_n)return mt.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Jo=[],Qe=[],Ue=[],jt=[];(Sr=Kt==null?void 0:Kt.questionList)==null||Sr.forEach(nn=>{var Wt;(Wt=nn.questions)==null||Wt.forEach(bn=>{let yn=nn.questions_score/nn.questions_count;yn=yn&&yn.toFixed(1),nn.type==="COMBINATION"&&Ue.push({id:bn.id,sub_item_bank_ids:bn.sub_item_banks.map(Fn=>Fn.id)}),nn.type==="PRACTICAL"?jt.push(bn.id):(Jo.push(bn.id),Qe.push(yn))})}),console.log("-----",Ue),yield _t({item_bank_ids:Jo,item_bank_scores:Qe,name:_n,combination_item_banks:Ue,shixun_ids:jt})})})},Od=(_n,Sr,Jo,Qe)=>{var Ue;const jt=`${location.pathname}${location.search}`,zt=(Ue=Qe.questions)==null?void 0:Ue.map(nn=>nn==null?void 0:nn.id);if(jt.includes("exercise"))Lr.current={id:_n,ids:zt,type:Sr,index:Jo},Uo(!0);else{let nn=Ke.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u8981\u66F4\u6362\u8BE5\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!0,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){nn.update({cancelButtonProps:{disabled:!0}}),yield zr({single_question_id:_n,seleted_item_bank_ids:zt},{type:Sr,index:Jo}),nn.update({cancelButtonProps:{disabled:!1}}),mt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},_u=_n=>{var Sr;const Jo=(Sr=_n.questions)==null?void 0:Sr.map(jt=>jt==null?void 0:jt.id),Qe=_n.name;let Ue=Ke.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${Qe}\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F`,cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){Ue.update({cancelButtonProps:{disabled:!0}}),yield zr({seleted_item_bank_ids:Jo},{type:_n.type}),Ue.update({cancelButtonProps:{disabled:!1}}),mt.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${Qe}\u8BD5\u9898`)})})},ou=()=>{let _n=Ke.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362\u9884\u89C8\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>va(void 0,null,function*(){_n.update({cancelButtonProps:{disabled:!0}}),yield zr(),_n.update({cancelButtonProps:{disabled:!1}}),mt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},xu=_n=>{console.log(_n,"key"),Bo(_n-1)},Pu=(_n,Sr)=>{var Jo,Qe;if(Sr==="SINGLE")return ce.createElement(ce.Fragment,null,ce.createElement(qn,{ref:ur,editData:_n,isEdit:!0}),ce.createElement(Ze.Z,null));if(Sr==="MULTIPLE")return ce.createElement(ce.Fragment,null,ce.createElement(di,{ref:ur,editData:_n,isEdit:!0}),ce.createElement(Ze.Z,null));if(Sr==="JUDGMENT")return ce.createElement(ce.Fragment,null,ce.createElement(cn,{ref:ur,editData:_n,isEdit:!0}),ce.createElement(Ze.Z,null));if(Sr==="COMPLETION")return ce.createElement(ce.Fragment,null,ce.createElement(wt,{ref:ur,editData:_n,isEdit:!0}),ce.createElement(Ze.Z,null));if(Sr==="SUBJECTIVE")return ce.createElement(ce.Fragment,null,ce.createElement(ii,{ref:ur,editData:_n,isEdit:!0}),ce.createElement(Ze.Z,null));if(Sr==="COMBINATION")return ce.createElement(ce.Fragment,null,ce.createElement(Ol,{ref:ur,editData:_n,isEdit:!0}),ce.createElement(Ze.Z,null));if(Sr==="BPROGRAM")return ce.createElement(ce.Fragment,null,ce.createElement(ze.default,{form:Do,style:{marginTop:20},onFinishFailed:Ue=>{var jt,zt;Ue.errorFields[0].name.includes("standard_answers")?mt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):mt.ZP.error(Ue.errorFields[0].errors[0]),Do.scrollToField((zt=(jt=Ue==null?void 0:Ue.errorFields)==null?void 0:jt[0])==null?void 0:zt.name,{behavior:"smooth",block:"center"})},onFinish:Ue=>va(void 0,null,function*(){var jt;let zt=$s(Gs({question_score:_n.score},Ue),{question_type:8,hack:$s(Gs({},Ue.hack),{difficult:_n.program_attr.difficult}),hack_codes:$s(Gs({},Ue.hack_codes),{code:qu.Base64.encode((jt=Ue.hack_codes)==null?void 0:jt.code)})});Gi&&(zt.is_cover=1);const nn=yield(0,$e.ZP)(`/api/exercise_questions/${_n.id}.json`,{method:"put",body:zt});(nn==null?void 0:nn.status)===0&&(mt.ZP.success("\u7F16\u8F91\u6210\u529F"),xu(Ir+1)),Ri(null)})},ce.createElement(Hh.tc,{form:Do,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(Jo=_n==null?void 0:_n.program_attr)==null?void 0:Jo.identifier,answerKey:"standard_answers"}),ce.createElement(Ze.Z,null)));if(Sr==="PROGRAM"&&je.history.push(`/problems/${(Qe=_n==null?void 0:_n.program_attr)==null?void 0:Qe.identifier}/edit?type=exercises&express_id=${Bs.categoryId}&question_id=${_n==null?void 0:_n.id}&score=${_n==null?void 0:_n.score}&callback_url=${location.pathname}&select=${Ir}&exercise=true`),Sr==="PRACTICAL")return ce.createElement(ce.Fragment,null,ce.createElement(pi,{ref:ur,editData:_n,isEdit:!0}),ce.createElement(Ze.Z,null))},dh=(_n,Sr)=>va(void 0,null,function*(){var Jo,Qe,Ue,jt,zt,nn;const Wt=yield(Jo=ur.current)==null?void 0:Jo.onSave();if(!Wt)return;const bn=Nn=>{const Qn=Nn.map(Pi=>Pi.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(Qn).size!==Qn.length},yn={question_score:Sr.score,analysis:Wt.analysis};if(_n==="SINGLE"||_n==="MULTIPLE"||_n==="JUDGMENT"){if(_n!=="JUDGMENT"&&bn(Wt==null?void 0:Wt.choices)){mt.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const Nn=[],Qn=[];yn.question_type=_n==="JUDGMENT"?2:1,yn.question_title=Wt==null?void 0:Wt.name,(Qe=Wt==null?void 0:Wt.choices)==null||Qe.forEach((Ai,Pi)=>{Nn.push(Ai.choice_text),Ai!=null&&Ai.is_answer&&Qn.push(Pi+1)}),yn.question_choices=Nn,yn.standard_answers=Qn}if(_n==="COMPLETION"){let Nn=(Ue=Wt==null?void 0:Wt.standard_answers)==null?void 0:Ue.map((Pi,yi)=>(Pi==null?void 0:Pi.score)<=0?yi+1:null).filter(Pi=>Pi!==null);if((Nn==null?void 0:Nn.length)>0)return mt.ZP.warning(`\u7B2C${Nn.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let Qn=(jt=Wt==null?void 0:Wt.standard_answers)==null?void 0:jt.reduce((Pi,yi)=>Pi+(Number(yi==null?void 0:yi.score)||0),0);if(parseFloat(Qn.toFixed(2))!=(yn==null?void 0:yn.question_score))return mt.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;yn.is_ordered=Wt.is_ordered,yn.question_title=Wt==null?void 0:Wt.name,yn.use_blank_score=Wt==null?void 0:Wt.use_blank_score,yn.question_type=3;const Ai=[];(zt=Wt==null?void 0:Wt.standard_answers)==null||zt.forEach((Pi,yi)=>{Ai.push({choice_id:Pi.position,answer_text:Pi.answer_text,score:Pi.score})}),yn.standard_answers=Ai,yn.downcase=Wt==null?void 0:Wt.downcase,yn.no_space=Wt==null?void 0:Wt.no_space}if(_n==="SUBJECTIVE"&&(console.log("editorData"),console.log(Wt),yn.question_title=Wt==null?void 0:Wt.name,yn.question_type=4,yn.answer_texts=Wt==null?void 0:Wt.answer_texts,yn.use_keywords=Wt==null?void 0:Wt.use_keywords,yn.keywords=Wt==null?void 0:Wt.keywords),_n==="COMBINATION"){yn.question_title=Wt==null?void 0:Wt.name,yn.question_type=7;try{yn.sub_questions=(nn=Wt==null?void 0:Wt.sub_item_banks)==null?void 0:nn.map((Nn,Qn)=>{var Ai,Pi,yi;if((Nn==null?void 0:Nn.item_type)=="single"||(Nn==null?void 0:Nn.item_type)=="multiple"){if(bn(Nn==null?void 0:Nn.choices))throw new Error(`\u7B2C${Qn+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const or=[],bi=[];return(Ai=Nn==null?void 0:Nn.choices)==null||Ai.forEach((Yi,Xi)=>{or.push(Yi.choice_text),Yi!=null&&Yi.is_answer&&bi.push(Xi+1)}),{id:Nn.id,question_id:Nn.id,question_title:Nn.name,difficulty:Nn.difficulty,question_type:(Nn==null?void 0:Nn.item_type)=="single"?0:(Nn==null?void 0:Nn.item_type)=="multiple"?1:2,question_choices:or,standard_answers:bi,analysis:Nn.analysis,question_score:Nn==null?void 0:Nn.score}}else if((Nn==null?void 0:Nn.item_type)=="completion"){let or=(Pi=Nn==null?void 0:Nn.standard_answer)==null?void 0:Pi.reduce((Yi,Xi)=>Yi+(Number(Xi==null?void 0:Xi.score)||0),0);if(parseFloat(or.toFixed(2))!=(Nn==null?void 0:Nn.score))throw new Error("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01");const bi=[];return(yi=Nn==null?void 0:Nn.standard_answer)==null||yi.forEach((Yi,Xi)=>{bi.push({choice_id:Yi.position,answer_text:Yi.answer_text,score:Yi.score})}),{id:Nn.id,question_id:Nn.id,is_ordered:Nn.is_ordered,question_title:Nn.name,difficulty:Nn.difficulty,question_type:3,standard_answers:bi,use_blank_score:Nn.use_blank_score,analysis:Nn.analysis,downcase:Nn==null?void 0:Nn.downcase,no_space:Nn==null?void 0:Nn.no_space,question_score:Nn==null?void 0:Nn.score}}else if((Nn==null?void 0:Nn.item_type)=="subjective")return{id:Nn.id,question_id:Nn.id,question_title:Nn.name,question_type:4,difficulty:Nn.difficulty,answer_texts:Nn==null?void 0:Nn.answer_texts,analysis:Nn.analysis,question_score:Nn==null?void 0:Nn.score,use_keywords:Nn.use_keywords,keywords:Nn==null?void 0:Nn.keywords}})}catch(Nn){mt.ZP.warning(Nn.message);return}delete yn.analysis}let Fn=!1;(Sr==null?void 0:Sr.is_my)===1&&(Fn=yield new Promise((Qn,Ai)=>{Ke.default.confirm({title:"\u63D0\u793A",content:"\u6B64\u9898\u76EE\u5DF2\u5B58\u5728\u4E8E\u8BD5\u9898\u5E93\uFF0C\u662F\u5426\u5C06\u4FEE\u6539\u540E\u7684\u9898\u76EE\u8986\u76D6\u8BD5\u9898\u5E93\u7684\u539F\u9898\uFF1F",okText:"\u8986\u76D6\u539F\u9898",cancelText:"\u4E0D\u8986\u76D6",keyboard:!1,onOk:()=>{Qn(!0)},onCancel:()=>{Qn(!1)}})})),Fn&&(yn.is_cover=1);const ei=_n!=="PRACTICAL"?yield(0,$e.ZP)(`/api/exercise_questions/${Sr.id}.json`,{method:"put",body:yn}):yield(0,$e.ZP)(`/api/exercise_questions/${Sr.id}/update_shixun_score.json`,{method:"post",body:Gs({},Wt)});(ei==null?void 0:ei.status)===0&&(mt.ZP.success("\u7F16\u8F91\u6210\u529F"),xu(Ir+1),Ri(null))}),Lc=()=>va(void 0,null,function*(){(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,$e.ZP)(`/api/exercises/${Bs.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield Bo(Ir),mt.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),Fc=({value:_n}={})=>{var Sr;const Jo=[];let Qe=[];const Ue=(Sr=_n==null?void 0:_n.choices)==null?void 0:Sr.map((zt,nn)=>{var Wt;const bn=nn+1;return zt!=null&&zt.is_answer&&(Jo.push(bn),Qe.push(bn)),{value:bn,label:ce.createElement(Ie.Z,{className:"c-black font14",value:`${(Wt=Vo.k4)==null?void 0:Wt[nn]}. ${zt==null?void 0:zt.choice_text}`}),disabled:zt==null?void 0:zt.origin_standard_answer}}),jt=Ke.default.confirm({centered:!0,icon:null,title:"\u589E\u8BBE\u6B63\u786E\u7B54\u6848",width:800,content:ce.createElement(ce.Fragment,null,"\u5F53\u524D\u8BD5\u9898\u7684\u6B63\u786E\u7B54\u6848\u4E3A ",Jo==null?void 0:Jo.map(zt=>{var nn;return(nn=Vo.k4)==null?void 0:nn[zt-1]}),"\uFF0C\u8BF7\u9009\u62E9\u9700\u8981\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u7684\u9009\u9879\u3002",ce.createElement("br",null),"\u52FE\u9009\u63D0\u4EA4\u4E4B\u540E\uFF0C\u9009\u4E2D\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u4EFB\u4E00\u9009\u9879\u7684\u5B66\u751F\u4E5F\u4F1A\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\uFF0C\u4F46\u4E0D\u4F1A\u4FEE\u6539\u5F53\u524D\u8BD5\u9898\u7684\u9898\u578B\u3002\u53D6\u6D88\u52FE\u9009\u63D0\u4EA4\u4E4B\u540E\uFF0C\u4E5F\u4F1A\u91CD\u65B0\u8BA1\u7B97\u5BF9\u5E94\u5B66\u751F\u7684\u5F97\u5206\u3002",ce.createElement("br",null),ce.createElement(Et.default.Group,{className:"flex-col mt20",options:Ue,defaultValue:Qe,onChange:zt=>{Qe=zt}})),onOk:()=>va(void 0,null,function*(){const zt=yield(0,$e.ZP)(`/api/exercises/${Bs.categoryId}/questions/${_n==null?void 0:_n.id}/add_standard_answers.json`,{method:"put",body:{standard_answer:Qe}});(zt==null?void 0:zt.status)===0&&(mt.ZP.success("\u4FEE\u6539\u6210\u529F"),xu(Ir+1))})})},Bc=(Wo=Kt==null?void 0:Kt.questionList)==null?void 0:Wo.reduce((_n,Sr)=>_n+Number(Sr.questions_score),0),od=jr&&((co=Kt==null?void 0:Kt.exam)==null?void 0:co.exercise_status)!==1;return ce.createElement("section",{className:De.wrap},ce.createElement("div",{id:"id_left_preview",className:De.left,onMouseEnter:_n=>{const Sr=document.getElementById("id_left_preview");Sr.style.overflowY="auto"},onMouseLeave:_n=>{const Sr=document.getElementById("id_left_preview");Sr.style.overflowY="hidden"}},ce.createElement("div",{className:De.title},ce.createElement("div",{className:"body-overflow-initial"},ce.createElement("b",null),ce.createElement("span",null,"\u7B54\u9898\u5361"))),ce.createElement("div",{className:De.total},ce.createElement("div",null,ce.createElement("img",{src:Zt}),ce.createElement("span",null,"\u9898\u6570(\u9053)"),ce.createElement("aside",null,Kt==null?void 0:Kt.all_questions_count)),ce.createElement("div",{className:"mr30 ml30"},ce.createElement("img",{src:$t}),ce.createElement("span",null,"\u603B\u5206(\u5206)"),ce.createElement("aside",null,Bc&&Bc.toFixed(1))),ce.createElement("div",null,ce.createElement("img",{src:be}),ce.createElement("span",null,"\u65F6\u957F(\u5206)"),ce.createElement("aside",null,((Zi=Kt==null?void 0:Kt.exam)==null?void 0:Zi.time)===-1||((Ki=Kt==null?void 0:Kt.exam)==null?void 0:Ki.time)===null?"\u4E0D\u9650":(Dr=Kt==null?void 0:Kt.exam)==null?void 0:Dr.time))),(Ar=Kt==null?void 0:Kt.questionList)==null?void 0:Ar.map((_n,Sr)=>{var Jo;return ce.createElement("div",{className:De.list,key:Sr},ce.createElement("div",{className:De.name},ce.createElement("b",null),ce.createElement("span",null,_n.name)),ce.createElement("aside",null,ce.createElement("div",null,"\u5171",ce.createElement("span",{className:De.b},_n.questions_count),"\u9898 ",ce.createElement("span",{className:De.l},"|"),"\u5171",ce.createElement("span",{className:De.r},_n.questions_score),"\u5206"),ce.createElement("div",{className:De.answerSheet},(Jo=_n==null?void 0:_n.questions)==null?void 0:Jo.map((Qe,Ue)=>ce.createElement("div",{onClick:()=>{const jt=`Anchor_${Qe==null?void 0:Qe.id}`;let zt=document.getElementById(jt);zt&&setTimeout(()=>zt.scrollIntoView({block:"center",behavior:"smooth"}))},key:Qe==null?void 0:Qe.id,className:De.tag},Ue+1)))))})),ce.createElement("div",{className:De.right},ce.createElement("div",{className:De.examName,id:"examName"},ce.createElement("div",{className:De.name},ce.createElement(Ct.Z,{title:(rr=Kt==null?void 0:Kt.exam)==null?void 0:rr.name,getPopupContainer:_n=>_n.parentNode},ce.createElement("span",{className:De.t},(br=Kt==null?void 0:Kt.exam)==null?void 0:br.name))),jr&&((Lo=Kt==null?void 0:Kt.exam)==null?void 0:Lo.exercise_status)===1&&ce.createElement(ys.op,{openLoading:!0,shape:"default",onClick:()=>{Ke.default.confirm({title:"\u63D0\u793A",content:"\u786E\u8BA4\u6839\u636E\u6700\u65B0\u7684\u968F\u673A\u7EC4\u5377\u62BD\u9898\u89C4\u5219\u91CD\u65B0\u751F\u6210\u8BD5\u5377\u5417\uFF1F",onOk:()=>{Lc()}})},type:"primary"},"\u66F4\u65B0\u8BD5\u5377"),!jr&&ce.createElement(_e.ZP,{onClick:ou,type:"primary"},"\u968F\u673A\u66F4\u6362")),ce.createElement("div",{className:De.topWarp},(Rr=Kt==null?void 0:Kt.questionList)==null?void 0:Rr.map((_n,Sr)=>{var Jo,Qe;return ce.createElement(ce.Fragment,{key:Sr},ce.createElement("div",{className:De.head,style:Sr===0?{border:0,marginTop:-16}:{}},ce.createElement("div",{className:De.name},ce.createElement("b",null),ce.createElement("span",null,_n.name)),ce.createElement("div",{className:De.so},"\u5171",ce.createElement("span",{className:De.b},_n.questions_count," "),"\u9898 ",_n.type==="COMBINATION"&&`\uFF08\u5305\u542B${(Jo=_n==null?void 0:_n.questions)==null?void 0:Jo.map(Ue=>{var jt;return(jt=Ue==null?void 0:Ue.sub_item_banks)==null?void 0:jt.length}).reduce((Ue,jt)=>Ue+jt)}\u5C0F\u9898\uFF09`,ce.createElement("span",{className:De.l},"|"),"\u5171",ce.createElement("span",{className:De.r},_n.questions_score),"\u5206"),!jr&&ce.createElement("div",{className:De.btn},ce.createElement(_e.ZP,{onClick:()=>{Gh(_n)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),ce.createElement(_e.ZP,{onClick:()=>_u(_n),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(Qe=_n==null?void 0:_n.questions)==null?void 0:Qe.map((Ue,jt)=>{var zt,nn,Wt,bn;return sr===(Ue==null?void 0:Ue.id)?ce.createElement("div",{id:`Anchor_${Ue==null?void 0:Ue.id}`,className:De.content,style:{padding:0,marginTop:24},key:Ue==null?void 0:Ue.id},ce.createElement("div",{style:{float:"right",marginTop:`${(_n==null?void 0:_n.type)==="PRACTICAL"?"-2px":"-6px"}`}},ce.createElement(_e.ZP,{onClick:()=>Ri(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),ce.createElement(_e.ZP,{onClick:()=>{dh(_n==null?void 0:_n.type,Ue)},type:"primary"},"\u4FDD\u5B58")),Pu(Ue,_n.type)):ce.createElement("div",{id:`Anchor_${Ue==null?void 0:Ue.id}`,className:De.content,key:Ue==null?void 0:Ue.id},ce.createElement("div",{className:De.titleWrap},(Ue==null?void 0:Ue.item_type)==="bprogram"?ce.createElement(Ie.Z,{style:{paddingRight:10},value:jt+1+"\u3001"+((zt=Ue==null?void 0:Ue.program_attr)==null?void 0:zt.description)}):ce.createElement(Ie.Z,{style:{paddingRight:10},className:De.titleHtml,value:jt+1+`\u3001${(Ue==null?void 0:Ue.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(Ue==null?void 0:Ue.name)}),jr&&ce.createElement(_e.ZP,{onClick:()=>{var yn,Fn,ei;if(sr){mt.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}Do.setFieldsValue({standard_answers:Ue==null?void 0:Ue.standard_answer,hack:Gs(Gs({},Ue),Ue==null?void 0:Ue.program_attr),hack_codes:$s(Gs({},Ue==null?void 0:Ue.program_attr),{code:qu.Base64.decode(((yn=Ue==null?void 0:Ue.program_attr)==null?void 0:yn.code)||"")}),hack_sets:Gs({},(Fn=Ue==null?void 0:Ue.hack_sets)==null?void 0:Fn[0])}),(Ue==null?void 0:Ue.item_type)=="program"?je.history.push(`/problems/newedit/${(ei=Ue==null?void 0:Ue.program_attr)==null?void 0:ei.identifier}?type=exercises&express_id=${Bs.categoryId}&question_id=${Ue==null?void 0:Ue.id}&score=${Ue==null?void 0:Ue.score}&exercise=true&callback_url=/classrooms/${Bs.coursesId}/exercise/${Bs.categoryId}/detail?random=true`):Ri(Ue==null?void 0:Ue.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!od&&ce.createElement(_e.ZP,{disabled:od,className:"ml20",onClick:()=>Od(Ue==null?void 0:Ue.id,_n.type,jt,_n),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(Ue==null?void 0:Ue.item_type)==="bprogram"&&ce.createElement(Ie.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:De.titleHtml,value:qu.Base64.decode(((nn=Ue==null?void 0:Ue.program_attr)==null?void 0:nn.code)||"")}),(_n.type==="SINGLE"||_n.type==="JUDGMENT"||_n.type==="MULTIPLE")&&ju(Ue),_n.type==="COMPLETION"&&Wh(Ue),_n.type==="SUBJECTIVE"&&ru(Ue),_n.type==="PROGRAM"&&zu(Ue),_n.type==="BPROGRAM"&&Bh(Ue),_n.type==="COMBINATION"&&aa(Ue,jt),_n.type==="PRACTICAL"&&Ml(Ue),ce.createElement(ht.Z,{className:"mt20",wrap:!1,align:"middle",gutter:20},((Wt=Kt==null?void 0:Kt.exam)==null?void 0:Wt.exercise_status)===3&&!["PROGRAM","BPROGRAM","PRACTICAL","COMBINATION"].includes(_n.type)&&ce.createElement(dt.Z,null,ce.createElement(eh.Z,{state:Ue==null?void 0:Ue.is_wrong,onClick:()=>{fo==null||fo({value:$s(Gs({},Ue),{question_id:Ue==null?void 0:Ue.id,question_score:Ue==null?void 0:Ue.score})})}})),["PROGRAM","BPROGRAM","PRACTICAL"].includes(_n.type)&&(Ue==null?void 0:Ue.show_resubmit)&&ce.createElement(dt.Z,null,ce.createElement(Po.C,{dataSource:$s(Gs({},Ue),{question_id:Ue==null?void 0:Ue.id})})),((bn=Kt==null?void 0:Kt.exam)==null?void 0:bn.exercise_status)===3&&["SINGLE"].includes(_n.type)&&ce.createElement(dt.Z,null,ce.createElement(_e.ZP,{style:{color:"#3061D0"},onClick:()=>{Fc({value:Ue})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848"))))}))}))),jr?ce.createElement(ys.vr,null,ce.createElement(Ae.Z,{showTotal:qe.rU,total:(tr=Kt==null?void 0:Kt.exam)==null?void 0:tr.total_num,pageSize:1,current:Ir+1,showSizeChanger:!1,onChange:xu,showQuickJumper:!1,hideOnSinglePage:!1})):ce.createElement(ys.vr,{LeftContent:ce.createElement(ys.op,{onClick:mn,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:ce.createElement(ht.Z,{align:"middle"},ce.createElement(te.Z,{color:"#55575D",overlayClassName:De.popover,open:To,getPopupContainer:_n=>_n==null?void 0:_n.parentNode,content:"\u5982\u60A8\u5BF9\u6B64\u4EFD\u8BD5\u9898\u6EE1\u610F\uFF0C\u53EF\u5C06\u6B64\u4EFD\u8BD5\u9898\u4FDD\u5B58\u4E3A\u56FA\u5B9A\u8BD5\u5377"},ce.createElement(ys.op,{onMouseEnter:()=>Yr(!0),onMouseLeave:()=>Yr(!1),onClick:()=>Nh(),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),ce.createElement(ys.op,{shape:"default",type:"primary",onClick:()=>_t(),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),ce.createElement(Rl,{visible:ko,questionParams:Lr.current,getdata:Ro,onRandomExchange:()=>va(void 0,null,function*(){const _n=Lr.current;yield zr({single_question_id:_n.id,seleted_item_bank_ids:_n.ids},{type:_n.type,index:_n.index}),Uo(!1)}),selectFromProblemSet:()=>{const _n=Lr.current,Sr=`${location.pathname}${location.search}`;Sr.includes("exercise")&&je.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${_n.id}&qtype=${_n.type}&exerciseid=${Bs.categoryId}&from=${Sr}`)},onCancel:()=>{Uo(!1)}}))}},13693:function(Sn,an,ve){"use strict";ve.r(an),ve.d(an,{default:function(){return se}});var ce=ve(59301),De=ve(24459),ze={flex_box_center:"flex_box_center___kQBcj",flex_space_between:"flex_space_between___Znlbo",flex_box_vertical_center:"flex_box_vertical_center___CPD50",flex_box_center_end:"flex_box_center_end___jzPvK",flex_box_column:"flex_box_column___cvIBS",wrap:"wrap___lab8O",crumbs:"crumbs___qvTza"},Ct=ve(78978),_e=ve(8591),Ke=ve(61621),Be=ve(7660),mt=ve(88230),ct=ve(59301),Ze=Object.defineProperty,Et=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,Ae=(de,me,we)=>me in de?Ze(de,me,{enumerable:!0,configurable:!0,writable:!0,value:we}):de[me]=we,te=(de,me)=>{for(var we in me||(me={}))ht.call(me,we)&&Ae(de,we,me[we]);if(Et)for(var we of Et(me))dt.call(me,we)&&Ae(de,we,me[we]);return de},ee=(de,me,we)=>new Promise((Me,be)=>{var Ie=$e=>{try{qe(we.next($e))}catch(ft){be(ft)}},je=$e=>{try{qe(we.throw($e))}catch(ft){be(ft)}},qe=$e=>$e.done?Me($e.value):Promise.resolve($e.value).then(Ie,je);qe((we=we.apply(de,me)).next())});const he=({paperlibrary:de,user:me,globalSetting:we,dispatch:Me,location:be})=>{var Ie,je,qe,$e;const[ft]=(0,De.useSearchParams)(),Re=ft.get("select")||0,[Tt,et]=(0,ce.useState)(!1),[bt,Bt]=(0,ce.useState)(!0),[Nt,Zt]=(0,ce.useState)(Number(Re)),[Ut,lt]=(0,ce.useState)({}),Ge=(0,De.useParams)(),{userInfo:kt}=me,{actionTabs:un}=de;(0,ce.useEffect)(()=>(Me({type:"globalSetting/footerToggle",payload:!1}),()=>{Me({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,ce.useEffect)(()=>(Me({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),Me({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),Me({type:"exercise/getWorkSetting",payload:te({},Ge)}),()=>{Me({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),Me({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}),[]),(0,ce.useEffect)(()=>{ln(Nt)},[]),(0,ce.useEffect)(()=>{var Cn;(Cn=un==null?void 0:un.params)!=null&&Cn.isUpdateData&&ln(Nt)},[(Ie=un==null?void 0:un.params)==null?void 0:Ie.isUpdateData]);const ln=(Cn=0)=>ee(void 0,null,function*(){console.log(Ge),Bt(!0);const gt=yield(0,Be.ZP)(`/api/exercises/${Ge.categoryId}/preview_random_exercise.json`,{method:"get",params:{num:Cn}});Me({type:"paperlibrary/setActionTabs",payload:{params:{isUpdateData:!1}}}),Bt(!1),lt((0,mt.PF)(gt))}),Ft=()=>{De.history.push(`/classrooms/${Ge.coursesId}/exercise`)},$t=()=>{alert("\u4FDD\u5B58")},Qt=(Cn,gt)=>ee(void 0,null,function*(){const En=yield(0,Be.ZP)(`/api/exercises/${Ge.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:Cn==null?void 0:Cn.single_question_id}});En!=null&&En.question&&(_e.ZP.info("\u6362\u9898\u6210\u529F"),ln(Nt))}),Bn=Cn=>ee(void 0,null,function*(){document.body.scrollIntoView(),Zt(Cn),yield ln(Cn)}),on=Cn=>{Me({type:"exercise/setActionTabs",payload:{key:"\u6807\u8BB0\u9519\u9898",params:Cn}})};return console.log((0,De.useLocation)(),"location333"),ct.createElement("section",{className:ze.wrap},ct.createElement(Ke.Z,{loading:bt,active:!0,paragraph:{rows:5}},((qe=(je=(0,De.useLocation)())==null?void 0:je.pathname)==null?void 0:qe.includes("preview"))&&ct.createElement("div",{className:ze.crumbs},ct.createElement("b",null),ct.createElement("span",{className:"current",onClick:()=>De.history.push(`/classrooms/${Ge.coursesId}/exercise`)},`${($e=kt==null?void 0:kt.course)==null?void 0:$e.course_name}>`),ct.createElement("span",{className:"current",onClick:()=>De.history.push(`/classrooms/${Ge.coursesId}/exercise`)},"\u8BD5\u5377\u5217\u8868>"),ct.createElement("span",{style:{color:"#bebebe"}},"\u9884\u89C8")),ct.createElement(Ct.Z,{loading:Tt,submit:$t,goBack:Ft,data:Ut,getdata:()=>{ln(Nt)},selectValue:Nt,editPreview:!0,onExchange:Qt,onSkipExamination:Bn,handleMarkWrongQuestion:on})))};var se=(0,De.connect)(({paperlibrary:de,user:me,globalSetting:we})=>({paperlibrary:de,user:me,globalSetting:we}))(he)},38389:function(Sn,an,ve){"use strict";ve.d(an,{g:function(){return _e}});var ce=ve(59301),De=ve(83609),ze=ve(73802),Ct=(Ke,Be,mt)=>new Promise((ct,Ze)=>{var Et=Ae=>{try{dt(mt.next(Ae))}catch(te){Ze(te)}},ht=Ae=>{try{dt(mt.throw(Ae))}catch(te){Ze(te)}},dt=Ae=>Ae.done?ct(Ae.value):Promise.resolve(Ae.value).then(Et,ht);dt((mt=mt.apply(Ke,Be)).next())});const _e=()=>{const[Ke,Be]=(0,ce.useState)([]);return(0,ce.useEffect)(()=>{Ct(void 0,null,function*(){const ct=yield(0,De.d1)({source:"question"});ct!=null&&ct.disciplines&&Be((0,ze.L)(ct==null?void 0:ct.disciplines))})},[]),Ke}},59579:function(Sn,an,ve){"use strict";ve.d(an,{U:function(){return ct}});var ce=ve(59301),De=Object.defineProperty,ze=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Ke=(Ze,Et,ht)=>Et in Ze?De(Ze,Et,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Ze[Et]=ht,Be=(Ze,Et)=>{for(var ht in Et||(Et={}))Ct.call(Et,ht)&&Ke(Ze,ht,Et[ht]);if(ze)for(var ht of ze(Et))_e.call(Et,ht)&&Ke(Ze,ht,Et[ht]);return Ze},mt=(Ze,Et,ht)=>new Promise((dt,Ae)=>{var te=se=>{try{he(ht.next(se))}catch(de){Ae(de)}},ee=se=>{try{he(ht.throw(se))}catch(de){Ae(de)}},he=se=>se.done?dt(se.value):Promise.resolve(se.value).then(te,ee);he((ht=ht.apply(Ze,Et)).next())});function ct(Ze,Et){const[ht,dt]=(0,ce.useState)(Et),[Ae,te]=(0,ce.useState)(!1),[ee,he]=(0,ce.useState)();return[ht,Ae,(de,me=!1)=>mt(this,null,function*(){const we=me?Et:Be(Be({},ht),de);te(!0),dt(we);const Me=yield Ze(we);return te(!1),he(Me),Me}),ee,he]}},85187:function(Sn,an,ve){"use strict";ve.d(an,{AL:function(){return we},Iy:function(){return Et},Qv:function(){return Ae},ez:function(){return me},jb:function(){return ht}});var ce=ve(32834),De=ve.n(ce),ze=ve(11690),Ct=ve.n(ze);let _e=1;function Ke(qe,$e){const ft=qe.match(/^(\s+)(?:```)/);if(ft===null)return $e;const Re=ft[1];return $e.split(`
`).map(Tt=>{const et=Tt.match(/^\s+/);if(et===null)return Tt;const[bt]=et;return bt.length>=Re.length?Tt.slice(Re.length):Tt}).join(`
`)}let Be=[],mt=["<ul>"];const ct=new(De()).Renderer,Ze=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Et(){Be.length=0,mt=["<ul>"]}const ht={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function dt(qe,$e,ft,Re){if($e>=qe.length||qe[$e].level<=ft)return $e;var Tt=qe[$e];Re.push("<li><a href='#"+_e+Tt.anchor+"'>"+Tt.text+"</a>"),$e++;var et=[];return $e=dt(qe,$e,Tt.level,et),et.length>0&&(Re.push("<ul>"),et.forEach(function(bt){Re.push(bt)}),Re.push("</ul>")),Re.push("</li>"),$e=dt(qe,$e,ft,Re),$e}function Ae(){return dt(Be,0,0,mt),mt.push("</ul>"),mt.join("")}const te={heading(qe){const $e=Ze.exec(qe);if(_e+=1,$e)return{type:"heading",raw:$e[0],depth:$e[1].length,text:$e[2]}},fences(qe){const $e=this.rules.block.fences.exec(qe);if($e){const ft=$e[0];let Re=Ke(ft,$e[3]||"");const Tt=$e[2]?$e[2].trim():$e[2];if(["latex","katex","math"].indexOf(Tt)>=0){const et=se(),bt=Re;Re=et,de[et]={type:"block",expression:bt}}return{type:"code",raw:ft,lang:Tt,text:Re}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let he=0;const se=()=>`__special_katext_id_${he++}__`;let de={};function me(){return de}function we(){he=0,de={}}function Me(qe){return qe=qe.replace(ee,($e,ft)=>{const Re=se();return de[Re]={type:"inline",expression:ft},Re}),qe}const be=ct.listitem;ct.listitem=function(qe){return be(Me(qe))};const Ie=ct.paragraph;ct.paragraph=function(qe){return Ie(Me(qe))};const je=ct.tablecell;ct.tablecell=function(qe,$e){return je(Me(qe),$e)},ct.code=function(qe,$e,ft){const Re=($e||"").match(/\S*/)[0];return Re?["latex","katex","math"].indexOf(Re)>=0?`<p class='editormd-tex'>${qe}</p>`:`<pre class="prettyprint linenums"><code class="language-${$e}">${ft?qe:(0,ze.escape)(qe,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(ft?qe:(0,ze.escape)(qe,!0))+"</code></pre>"},ct.heading=function(qe,$e,ft){let Re=this.options.headerPrefix+ft.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Be.push({anchor:Re,level:$e,text:qe}),"<h"+$e+' id="'+_e+Re+'">'+qe+"</h"+$e+">"},De().setOptions({silent:!0,gfm:!0,pedantic:!1}),De().use({tokenizer:te,renderer:ct}),an.ZP=De()},50371:function(Sn,an){"use strict";function ve(){const ce=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let De=1;De<arguments.length;De++){const ze=De<0||arguments.length<=De?void 0:arguments[De];ze&&Object.keys(ze).forEach(Ct=>{const _e=ze[Ct];_e!==void 0&&(ce[Ct]=_e)})}return ce}an.Z=ve},77578:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return ce}});const ce=De=>De?typeof De=="function"?De():De:null},13845:function(Sn,an,ve){"use strict";ve.d(an,{F:function(){return ce},Z:function(){return De}});function ce(ze){return ze!=null&&ze===ze.window}function De(ze,Ct){var _e,Ke;if(typeof window=="undefined")return 0;const Be=Ct?"scrollTop":"scrollLeft";let mt=0;return ce(ze)?mt=ze[Ct?"pageYOffset":"pageXOffset"]:ze instanceof Document?mt=ze.documentElement[Be]:(ze instanceof HTMLElement||ze)&&(mt=ze[Be]),ze&&!ce(ze)&&typeof mt!="number"&&(mt=(Ke=((_e=ze.ownerDocument)!==null&&_e!==void 0?_e:ze).documentElement)===null||Ke===void 0?void 0:Ke[Be]),mt}},56762:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return De}});var ce=ve(59301);function De(){const[,ze]=ce.useReducer(Ct=>Ct+1,0);return ze}},68031:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Ct}});var ce=ve(16089);function De(_e,Ke,Be,mt){const ct=Be-Ke;return _e/=mt/2,_e<1?ct/2*_e*_e*_e+Ke:ct/2*((_e-=2)*_e*_e+2)+Ke}var ze=ve(13845);function Ct(_e){let Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Be=()=>window,callback:mt,duration:ct=450}=Ke,Ze=Be(),Et=(0,ze.Z)(Ze,!0),ht=Date.now(),dt=()=>{const te=Date.now()-ht,ee=De(te>ct?ct:te,Et,_e,ct);(0,ze.F)(Ze)?Ze.scrollTo(window.pageXOffset,ee):Ze instanceof Document||Ze.constructor.name==="HTMLDocument"?Ze.documentElement.scrollTop=ee:Ze.scrollTop=ee,te<ct?(0,ce.Z)(dt):typeof mt=="function"&&mt()};(0,ce.Z)(dt)}},19842:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return ji}});var ce=ve(26407),De=ve(59301),ze=ve(33853),Ct=ve(58617),_e=ve(38819),Ke=ve(92310),Be=ve.n(Ke),mt=ve(92413),ct=ve(33606),Ze=ve(37061),Et=ve(77861),ht=ve(17115),dt=ve(90782),Ae=ve(6089),te=ve(18929),ee=De.createContext(null),he=ee,se=ve(39559),de=ve(400),me=ve(33708),we="__rc_cascader_search_mark__",Me=function(qn,mi,Fi){var jn=Fi.label;return mi.some(function(Tn){return String(Tn[jn]).toLowerCase().includes(qn.toLowerCase())})},be=function(qn,mi,Fi,jn){return mi.map(function(Tn){return Tn[jn.label]}).join(" / ")},Ie=function(gn,qn,mi,Fi,jn,Tn){var At=jn.filter,Dt=At===void 0?Me:At,Ve=jn.render,Yt=Ve===void 0?be:Ve,tn=jn.limit,vt=tn===void 0?50:tn,rt=jn.sort;return De.useMemo(function(){var Vt=[];if(!gn)return[];function rn(Pn,kn){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Pn.forEach(function(hn){if(!(!rt&&vt!==!1&&vt>0&&Vt.length>=vt)){var In=[].concat((0,ce.Z)(kn),[hn]),ii=hn[mi.children],Gt=St||hn.disabled;if((!ii||ii.length===0||Tn)&&Dt(gn,In,{label:mi.label})){var Jt;Vt.push((0,me.Z)((0,me.Z)({},hn),{},(Jt={disabled:Gt},(0,de.Z)(Jt,mi.label,Yt(gn,In,Fi,mi)),(0,de.Z)(Jt,we,In),(0,de.Z)(Jt,mi.children,void 0),Jt)))}ii&&rn(hn[mi.children],In,Gt)}})}return rn(qn,[]),rt&&Vt.sort(function(Pn,kn){return rt(Pn[we],kn[we],gn,mi)}),vt!==!1&&vt>0?Vt.slice(0,vt):Vt},[gn,qn,mi,Fi,Yt,Tn,Dt,rt,vt])},je="__RC_CASCADER_SPLIT__",qe="SHOW_PARENT",$e="SHOW_CHILD";function ft(gn){return gn.join(je)}function Re(gn){return gn.map(ft)}function Tt(gn){return gn.split(je)}function et(gn){var qn=gn||{},mi=qn.label,Fi=qn.value,jn=qn.children,Tn=Fi||"value";return{label:mi||"label",value:Tn,key:Tn,children:jn||"children"}}function bt(gn,qn){var mi,Fi;return(mi=gn.isLeaf)!==null&&mi!==void 0?mi:!((Fi=gn[qn.children])!==null&&Fi!==void 0&&Fi.length)}function Bt(gn){var qn=gn.parentElement;if(qn){var mi=gn.offsetTop-qn.offsetTop;mi-qn.scrollTop<0?qn.scrollTo({top:mi}):mi+gn.offsetHeight-qn.scrollTop>qn.offsetHeight&&qn.scrollTo({top:mi+gn.offsetHeight-qn.offsetHeight})}}function Nt(gn,qn){return gn.map(function(mi){var Fi;return(Fi=mi[we])===null||Fi===void 0?void 0:Fi.map(function(jn){return jn[qn.value]})})}function Zt(gn,qn,mi){var Fi=new Set(gn),jn=qn();return gn.filter(function(Tn){var At=jn[Tn],Dt=At?At.parent:null,Ve=At?At.children:null;return At&&At.node.disabled?!0:mi===$e?!(Ve&&Ve.some(function(Yt){return Yt.key&&Fi.has(Yt.key)})):!(Dt&&!Dt.node.disabled&&Fi.has(Dt.key))})}function Ut(gn,qn,mi){for(var Fi=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,jn=qn,Tn=[],At=function(){var Yt,tn,vt,rt=gn[Dt],Vt=(Yt=jn)===null||Yt===void 0?void 0:Yt.findIndex(function(Pn){var kn=Pn[mi.value];return Fi?String(kn)===String(rt):kn===rt}),rn=Vt!==-1?(tn=jn)===null||tn===void 0?void 0:tn[Vt]:null;Tn.push({value:(vt=rn==null?void 0:rn[mi.value])!==null&&vt!==void 0?vt:rt,index:Vt,option:rn}),jn=rn==null?void 0:rn[mi.children]},Dt=0;Dt<gn.length;Dt+=1)At();return Tn}var lt=function(gn,qn,mi,Fi,jn){return De.useMemo(function(){var Tn=jn||function(At){var Dt=Fi?At.slice(-1):At,Ve=" / ";return Dt.every(function(Yt){return["string","number"].includes((0,se.Z)(Yt))})?Dt.join(Ve):Dt.reduce(function(Yt,tn,vt){var rt=De.isValidElement(tn)?De.cloneElement(tn,{key:vt}):tn;return vt===0?[rt]:[].concat((0,ce.Z)(Yt),[Ve,rt])},[])};return gn.map(function(At){var Dt,Ve,Yt=Ut(At,qn,mi),tn=Tn(Yt.map(function(rt){var Vt,rn=rt.option,Pn=rt.value;return(Vt=rn==null?void 0:rn[mi.label])!==null&&Vt!==void 0?Vt:Pn}),Yt.map(function(rt){var Vt=rt.option;return Vt})),vt=ft(At);return{label:tn,value:vt,key:vt,valueCells:At,disabled:(Dt=Yt[Yt.length-1])===null||Dt===void 0||(Ve=Dt.option)===null||Ve===void 0?void 0:Ve.disabled}})},[gn,qn,mi,jn,Fi])},Ge=ve(71430),kt=function(gn,qn){var mi=De.useRef({options:null,info:null}),Fi=De.useCallback(function(){return mi.current.options!==gn&&(mi.current.options=gn,mi.current.info=(0,Ge.I8)(gn,{fieldNames:qn,initWrapper:function(Tn){return(0,me.Z)((0,me.Z)({},Tn),{},{pathKeyEntities:{}})},processEntity:function(Tn,At){var Dt=Tn.nodes.map(function(Ve){return Ve[qn.value]}).join(je);At.pathKeyEntities[Dt]=Tn,Tn.key=Dt}})),mi.current.info.pathKeyEntities},[qn,gn]);return Fi},un=function(gn,qn){return De.useCallback(function(mi){var Fi=[],jn=[];return mi.forEach(function(Tn){var At=Ut(Tn,gn,qn);At.every(function(Dt){return Dt.option})?jn.push(Tn):Fi.push(Tn)}),[jn,Fi]},[gn,qn])},ln=ve(48736);function Ft(gn){return De.useMemo(function(){if(!gn)return[!1,{}];var qn={matchInputWidth:!0,limit:50};return gn&&(0,se.Z)(gn)==="object"&&(qn=(0,me.Z)((0,me.Z)({},qn),gn)),qn.limit<=0&&delete qn.limit,[!0,qn]},[gn])}var $t=De.memo(function(gn){var qn=gn.children;return qn},function(gn,qn){return!qn.open}),Qt=$t;function Bn(gn){var qn,mi=gn.prefixCls,Fi=gn.checked,jn=gn.halfChecked,Tn=gn.disabled,At=gn.onClick,Dt=gn.disableCheckbox,Ve=De.useContext(he),Yt=Ve.checkable,tn=typeof Yt!="boolean"?Yt:null;return De.createElement("span",{className:Be()("".concat(mi),(qn={},(0,de.Z)(qn,"".concat(mi,"-checked"),Fi),(0,de.Z)(qn,"".concat(mi,"-indeterminate"),!Fi&&jn),(0,de.Z)(qn,"".concat(mi,"-disabled"),Tn||Dt),qn)),onClick:At},tn)}var on="__cascader_fix_label__";function Cn(gn){var qn=gn.prefixCls,mi=gn.multiple,Fi=gn.options,jn=gn.activeValue,Tn=gn.prevValuePath,At=gn.onToggleOpen,Dt=gn.onSelect,Ve=gn.onActive,Yt=gn.checkedSet,tn=gn.halfCheckedSet,vt=gn.loadingKeys,rt=gn.isSelectable,Vt=gn.searchValue,rn="".concat(qn,"-menu"),Pn="".concat(qn,"-menu-item"),kn=De.useContext(he),St=kn.fieldNames,hn=kn.changeOnSelect,In=kn.expandTrigger,ii=kn.expandIcon,Gt=kn.loadingIcon,Jt=kn.dropdownMenuColumnStyle,hi=In==="hover",fi=De.useMemo(function(){return Fi.map(function(ui){var ni,ci=ui.disabled,li=ui.disableCheckbox,Ni=ui[we],Qi=(ni=ui[on])!==null&&ni!==void 0?ni:ui[St.label],lr=ui[St.value],wn=bt(ui,St),Pr=Ni?Ni.map(function(Ci){return Ci[St.value]}):[].concat((0,ce.Z)(Tn),[lr]),Or=ft(Pr),ar=vt.includes(Or),fn=Yt.has(Or),Rn=tn.has(Or);return{disabled:ci,label:Qi,value:lr,isLeaf:wn,isLoading:ar,checked:fn,halfChecked:Rn,option:ui,disableCheckbox:li,fullPath:Pr,fullPathKey:Or}})},[Fi,Yt,St,tn,vt,Tn]);return De.createElement("ul",{className:rn,role:"menu"},fi.map(function(ui){var ni,ci=ui.disabled,li=ui.label,Ni=ui.value,Qi=ui.isLeaf,lr=ui.isLoading,wn=ui.checked,Pr=ui.halfChecked,Or=ui.option,ar=ui.fullPath,fn=ui.fullPathKey,Rn=ui.disableCheckbox,Ci=function(){if(!(ci||Vt)){var cr=(0,ce.Z)(ar);hi&&Qi&&cr.pop(),Ve(cr)}},_i=function(){rt(Or)&&Dt(ar,Qi)},ki;return typeof Or.title=="string"?ki=Or.title:typeof li=="string"&&(ki=li),De.createElement("li",{key:fn,className:Be()(Pn,(ni={},(0,de.Z)(ni,"".concat(Pn,"-expand"),!Qi),(0,de.Z)(ni,"".concat(Pn,"-active"),jn===Ni||jn===fn),(0,de.Z)(ni,"".concat(Pn,"-disabled"),ci),(0,de.Z)(ni,"".concat(Pn,"-loading"),lr),ni)),style:Jt,role:"menuitemcheckbox",title:ki,"aria-checked":wn,"data-path-key":fn,onClick:function(){Ci(),!Rn&&(!mi||Qi)&&_i()},onDoubleClick:function(){hn&&At(!1)},onMouseEnter:function(){hi&&Ci()},onMouseDown:function(cr){cr.preventDefault()}},mi&&De.createElement(Bn,{prefixCls:"".concat(qn,"-checkbox"),checked:wn,halfChecked:Pr,disabled:ci||Rn,disableCheckbox:Rn,onClick:function(cr){Rn||(cr.stopPropagation(),_i())}}),De.createElement("div",{className:"".concat(Pn,"-content")},li),!lr&&ii&&!Qi&&De.createElement("div",{className:"".concat(Pn,"-expand-icon")},ii),lr&&Gt&&De.createElement("div",{className:"".concat(Pn,"-loading-icon")},Gt))}))}var gt=function(){var gn=(0,Et.lk)(),qn=gn.multiple,mi=gn.open,Fi=De.useContext(he),jn=Fi.values,Tn=De.useState([]),At=(0,ct.Z)(Tn,2),Dt=At[0],Ve=At[1];return De.useEffect(function(){if(mi&&!qn){var Yt=jn[0];Ve(Yt||[])}},[mi]),[Dt,Ve]},En=ve(10228),Vn=function(gn,qn,mi,Fi,jn,Tn){var At=(0,Et.lk)(),Dt=At.direction,Ve=At.searchValue,Yt=At.toggleOpen,tn=At.open,vt=Dt==="rtl",rt=De.useMemo(function(){for(var Jt=-1,hi=qn,fi=[],ui=[],ni=Fi.length,ci=Nt(qn,mi),li=function(Or){var ar=hi.findIndex(function(fn,Rn){return(ci[Rn]?ft(ci[Rn]):fn[mi.value])===Fi[Or]});if(ar===-1)return"break";Jt=ar,fi.push(Jt),ui.push(Fi[Or]),hi=hi[Jt][mi.children]},Ni=0;Ni<ni&&hi;Ni+=1){var Qi=li(Ni);if(Qi==="break")break}for(var lr=qn,wn=0;wn<fi.length-1;wn+=1)lr=lr[fi[wn]][mi.children];return[ui,Jt,lr,ci]},[Fi,mi,qn]),Vt=(0,ct.Z)(rt,4),rn=Vt[0],Pn=Vt[1],kn=Vt[2],St=Vt[3],hn=function(hi){jn(hi)},In=function(hi){var fi=kn.length,ui=Pn;ui===-1&&hi<0&&(ui=fi);for(var ni=0;ni<fi;ni+=1){ui=(ui+hi+fi)%fi;var ci=kn[ui];if(ci&&!ci.disabled){var li=rn.slice(0,-1).concat(St[ui]?ft(St[ui]):ci[mi.value]);hn(li);return}}},ii=function(){if(rn.length>1){var hi=rn.slice(0,-1);hn(hi)}else Yt(!1)},Gt=function(){var hi,fi=((hi=kn[Pn])===null||hi===void 0?void 0:hi[mi.children])||[],ui=fi.find(function(ci){return!ci.disabled});if(ui){var ni=[].concat((0,ce.Z)(rn),[ui[mi.value]]);hn(ni)}};De.useImperativeHandle(gn,function(){return{onKeyDown:function(hi){var fi=hi.which;switch(fi){case En.Z.UP:case En.Z.DOWN:{var ui=0;fi===En.Z.UP?ui=-1:fi===En.Z.DOWN&&(ui=1),ui!==0&&In(ui);break}case En.Z.LEFT:{if(Ve)break;vt?Gt():ii();break}case En.Z.RIGHT:{if(Ve)break;vt?ii():Gt();break}case En.Z.BACKSPACE:{Ve||ii();break}case En.Z.ENTER:{if(rn.length){var ni=kn[Pn],ci=(ni==null?void 0:ni[we])||[];ci.length?Tn(ci.map(function(li){return li[mi.value]}),ci[ci.length-1]):Tn(rn,kn[Pn])}break}case En.Z.ESC:Yt(!1),tn&&hi.stopPropagation()}},onKeyUp:function(){}}})},He=De.forwardRef(function(gn,qn){var mi,Fi,jn,Tn,At=(0,Et.lk)(),Dt=At.prefixCls,Ve=At.multiple,Yt=At.searchValue,tn=At.toggleOpen,vt=At.notFoundContent,rt=At.direction,Vt=At.open,rn=De.useRef(),Pn=rt==="rtl",kn=De.useContext(he),St=kn.options,hn=kn.values,In=kn.halfValues,ii=kn.fieldNames,Gt=kn.changeOnSelect,Jt=kn.onSelect,hi=kn.searchOptions,fi=kn.dropdownPrefixCls,ui=kn.loadData,ni=kn.expandTrigger,ci=fi||Dt,li=De.useState([]),Ni=(0,ct.Z)(li,2),Qi=Ni[0],lr=Ni[1],wn=function(Bi){if(!(!ui||Yt)){var Mo=Ut(Bi,St,ii),oo=Mo.map(function(Wr){var no=Wr.option;return no}),Ui=oo[oo.length-1];if(Ui&&!bt(Ui,ii)){var er=ft(Bi);lr(function(Wr){return[].concat((0,ce.Z)(Wr),[er])}),ui(oo)}}};De.useEffect(function(){Qi.length&&Qi.forEach(function(so){var Bi=Tt(so),Mo=Ut(Bi,St,ii,!0).map(function(Ui){var er=Ui.option;return er}),oo=Mo[Mo.length-1];(!oo||oo[ii.children]||bt(oo,ii))&&lr(function(Ui){return Ui.filter(function(er){return er!==so})})})},[St,Qi,ii]);var Pr=De.useMemo(function(){return new Set(Re(hn))},[hn]),Or=De.useMemo(function(){return new Set(Re(In))},[In]),ar=gt(),fn=(0,ct.Z)(ar,2),Rn=fn[0],Ci=fn[1],_i=function(Bi){Ci(Bi),wn(Bi)},ki=function(Bi){var Mo=Bi.disabled,oo=bt(Bi,ii);return!Mo&&(oo||Gt||Ve)},Wi=function(Bi,Mo){var oo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Jt(Bi),!Ve&&(Mo||Gt&&(ni==="hover"||oo))&&tn(!1)},cr=De.useMemo(function(){return Yt?hi:St},[Yt,hi,St]),qi=De.useMemo(function(){for(var so=[{options:cr}],Bi=cr,Mo=Nt(Bi,ii),oo=function(){var no=Rn[Ui],xi=Bi.find(function(lo,_o){return(Mo[_o]?ft(Mo[_o]):lo[ii.value])===no}),tt=xi==null?void 0:xi[ii.children];if(!(tt!=null&&tt.length))return"break";Bi=tt,so.push({options:tt})},Ui=0;Ui<Rn.length;Ui+=1){var er=oo();if(er==="break")break}return so},[cr,Rn,ii]),nr=function(Bi,Mo){ki(Mo)&&Wi(Bi,bt(Mo,ii),!0)};Vn(qn,cr,ii,Rn,_i,nr),De.useEffect(function(){for(var so=0;so<Rn.length;so+=1){var Bi,Mo=Rn.slice(0,so+1),oo=ft(Mo),Ui=(Bi=rn.current)===null||Bi===void 0?void 0:Bi.querySelector('li[data-path-key="'.concat(oo.replace(/\\{0,2}"/g,'\\"'),'"]'));Ui&&Bt(Ui)}},[Rn]);var dr=!((mi=qi[0])!==null&&mi!==void 0&&(Fi=mi.options)!==null&&Fi!==void 0&&Fi.length),Mn=[(jn={},(0,de.Z)(jn,ii.value,"__EMPTY__"),(0,de.Z)(jn,on,vt),(0,de.Z)(jn,"disabled",!0),jn)],to=(0,me.Z)((0,me.Z)({},gn),{},{multiple:!dr&&Ve,onSelect:Wi,onActive:_i,onToggleOpen:tn,checkedSet:Pr,halfCheckedSet:Or,loadingKeys:Qi,isSelectable:ki}),Ln=dr?[{options:Mn}]:qi,Hr=Ln.map(function(so,Bi){var Mo=Rn.slice(0,Bi),oo=Rn[Bi];return De.createElement(Cn,(0,mt.Z)({key:Bi},to,{searchValue:Yt,prefixCls:ci,options:so.options,prevValuePath:Mo,activeValue:oo}))});return De.createElement(Qt,{open:Vt},De.createElement("div",{className:Be()("".concat(ci,"-menus"),(Tn={},(0,de.Z)(Tn,"".concat(ci,"-menu-empty"),dr),(0,de.Z)(Tn,"".concat(ci,"-rtl"),Pn),Tn)),ref:rn},Hr))}),Ce=He;function Pe(gn){var qn=gn.onPopupVisibleChange,mi=gn.popupVisible,Fi=gn.popupClassName,jn=gn.popupPlacement;warning(!qn,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(mi===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(Fi===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(jn===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Ne(gn,qn){if(gn){var mi=function Fi(jn){for(var Tn=0;Tn<jn.length;Tn++){var At=jn[Tn];if(At[qn==null?void 0:qn.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(At[qn==null?void 0:qn.children])&&Fi(At[qn==null?void 0:qn.children]))return!0}};mi(gn)}}var ke=null,Se=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy"];function nt(gn){return Array.isArray(gn)&&Array.isArray(gn[0])}function Pt(gn){return gn?nt(gn)?gn:(gn.length===0?[]:[gn]).map(function(qn){return Array.isArray(qn)?qn:[qn]}):[]}var Xe=De.forwardRef(function(gn,qn){var mi=gn.id,Fi=gn.prefixCls,jn=Fi===void 0?"rc-cascader":Fi,Tn=gn.fieldNames,At=gn.defaultValue,Dt=gn.value,Ve=gn.changeOnSelect,Yt=gn.onChange,tn=gn.displayRender,vt=gn.checkable,rt=gn.autoClearSearchValue,Vt=rt===void 0?!0:rt,rn=gn.searchValue,Pn=gn.onSearch,kn=gn.showSearch,St=gn.expandTrigger,hn=gn.options,In=gn.dropdownPrefixCls,ii=gn.loadData,Gt=gn.popupVisible,Jt=gn.open,hi=gn.popupClassName,fi=gn.dropdownClassName,ui=gn.dropdownMenuColumnStyle,ni=gn.popupPlacement,ci=gn.placement,li=gn.onDropdownVisibleChange,Ni=gn.onPopupVisibleChange,Qi=gn.expandIcon,lr=Qi===void 0?">":Qi,wn=gn.loadingIcon,Pr=gn.children,Or=gn.dropdownMatchSelectWidth,ar=Or===void 0?!1:Or,fn=gn.showCheckedStrategy,Rn=fn===void 0?qe:fn,Ci=(0,Ze.Z)(gn,Se),_i=(0,ht.ZP)(mi),ki=!!vt,Wi=(0,te.Z)(At,{value:Dt,postState:Pt}),cr=(0,ct.Z)(Wi,2),qi=cr[0],nr=cr[1],dr=De.useMemo(function(){return et(Tn)},[JSON.stringify(Tn)]),Mn=De.useMemo(function(){return hn||[]},[hn]),to=kt(Mn,dr),Ln=De.useCallback(function(No){var vo=to();return No.map(function(na){var ia=vo[na].nodes;return ia.map(function(Ba){return Ba[dr.value]})})},[to,dr]),Hr=(0,te.Z)("",{value:rn,postState:function(vo){return vo||""}}),so=(0,ct.Z)(Hr,2),Bi=so[0],Mo=so[1],oo=function(vo,na){Mo(vo),na.source!=="blur"&&Pn&&Pn(vo)},Ui=Ft(kn),er=(0,ct.Z)(Ui,2),Wr=er[0],no=er[1],xi=Ie(Bi,Mn,dr,In||jn,no,Ve),tt=un(Mn,dr),lo=De.useMemo(function(){var No=tt(qi),vo=(0,ct.Z)(No,2),na=vo[0],ia=vo[1];if(!ki||!qi.length)return[na,[],ia];var Ba=Re(na),Na=to(),is=(0,dt.S)(Ba,!0,Na),pn=is.checkedKeys,Ia=is.halfCheckedKeys;return[Ln(pn),Ln(Ia),ia]},[ki,qi,to,Ln,tt]),_o=(0,ct.Z)(lo,3),ga=_o[0],Oa=_o[1],Xo=_o[2],Fa=De.useMemo(function(){var No=Re(ga),vo=Zt(No,to,Rn);return[].concat((0,ce.Z)(Xo),(0,ce.Z)(Ln(vo)))},[ga,to,Ln,Xo,Rn]),Gr=lt(Fa,Mn,dr,ki,tn),Br=(0,Ae.Z)(function(No){if(nr(No),Yt){var vo=Pt(No),na=vo.map(function(Na){return Ut(Na,Mn,dr).map(function(is){return is.option})}),ia=ki?vo:vo[0],Ba=ki?na:na[0];Yt(ia,Ba)}}),yr=(0,Ae.Z)(function(No){if((!ki||Vt)&&Mo(""),!ki)Br(No);else{var vo=ft(No),na=Re(ga),ia=Re(Oa),Ba=na.includes(vo),Na=Xo.some(function(Cl){return ft(Cl)===vo}),is=ga,pn=Xo;if(Na&&!Ba)pn=Xo.filter(function(Cl){return ft(Cl)!==vo});else{var Ia=Ba?na.filter(function(Cl){return Cl!==vo}):[].concat((0,ce.Z)(na),[vo]),Vl=to(),Hs;if(Ba){var wl=(0,dt.S)(Ia,{checked:!1,halfCheckedKeys:ia},Vl);Hs=wl.checkedKeys}else{var ka=(0,dt.S)(Ia,!0,Vl);Hs=ka.checkedKeys}var yu=Zt(Hs,to,Rn);is=Ln(yu)}Br([].concat((0,ce.Z)(pn),(0,ce.Z)(is)))}}),xo=function(vo,na){if(na.type==="clear"){Br([]);return}var ia=na.values[0],Ba=ia.valueCells;yr(Ba)},ua=Jt!==void 0?Jt:Gt,Tr=fi||hi,ir=ci||ni,Xn=function(vo){li==null||li(vo),Ni==null||Ni(vo)},wr=De.useMemo(function(){return{options:Mn,fieldNames:dr,values:ga,halfValues:Oa,changeOnSelect:Ve,onSelect:yr,checkable:vt,searchOptions:xi,dropdownPrefixCls:In,loadData:ii,expandTrigger:St,expandIcon:lr,loadingIcon:wn,dropdownMenuColumnStyle:ui}},[Mn,dr,ga,Oa,Ve,yr,vt,xi,In,ii,St,lr,wn,ui]),bo=!(Bi?xi:Mn).length,ta=Bi&&no.matchInputWidth||bo?{}:{minWidth:"auto"};return De.createElement(he.Provider,{value:wr},De.createElement(Et.Ac,(0,mt.Z)({},Ci,{ref:qn,id:_i,prefixCls:jn,autoClearSearchValue:Vt,dropdownMatchSelectWidth:ar,dropdownStyle:ta,displayValues:Gr,onDisplayValuesChange:xo,mode:ki?"multiple":void 0,searchValue:Bi,onSearch:oo,showSearch:Wr,OptionList:Ce,emptyOptions:bo,open:ua,dropdownClassName:Tr,placement:ir,onDropdownVisibleChange:Xn,getRawInputElement:function(){return Pr}})))});Xe.SHOW_PARENT=qe,Xe.SHOW_CHILD=$e;var Je=Xe,yt=Je,wt=ve(2738),ot=ve(62892),It=ve(53487),sn=ve(19080),Xt=ve(36355),Ht=ve(93891),xn=ve(1684),Dn=ve(19716),cn=ve(32441),Un=ve(14154),ti=ve(58582),Wn=ve(84443),Zn=ve(66339),Jn=ve(33234),vi=ve(98447),pi=ve(17313),zi=ve(74207),$i=ve(83116);const Yn=gn=>{const{prefixCls:qn,componentCls:mi,antCls:Fi}=gn,jn=`${mi}-menu-item`,Tn=`
&${jn}-expand ${jn}-expand-icon,
${jn}-loading-icon
`;return[{[mi]:{width:gn.controlWidth}},{[`${mi}-dropdown`]:[(0,vi.C2)(`${qn}-checkbox`,gn),{[`&${Fi}-select-dropdown`]:{padding:0}},{[mi]:{"&-checkbox":{top:0,marginInlineEnd:gn.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${mi}-menu-empty`]:{[`${mi}-menu`]:{width:"100%",height:"auto",[jn]:{color:gn.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:gn.controlItemWidth,height:gn.dropdownHeight,margin:0,padding:gn.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${gn.lineWidth}px ${gn.lineType} ${gn.colorSplit}`},"&-item":Object.assign(Object.assign({},pi.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:gn.optionPadding,lineHeight:gn.lineHeight,cursor:"pointer",transition:`all ${gn.motionDurationMid}`,borderRadius:gn.borderRadiusSM,"&:hover":{background:gn.controlItemBgHover},"&-disabled":{color:gn.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[Tn]:{color:gn.colorTextDisabled}},[`&-active:not(${jn}-disabled)`]:{"&, &:hover":{fontWeight:gn.optionSelectedFontWeight,backgroundColor:gn.optionSelectedBg}},"&-content":{flex:"auto"},[Tn]:{marginInlineStart:gn.paddingXXS,color:gn.colorTextDescription,fontSize:gn.fontSizeIcon},"&-keyword":{color:gn.colorHighlight}})}}}]},{[`${mi}-dropdown-rtl`]:{direction:"rtl"}},(0,zi.c)(gn)]};var Gn=(0,$i.Z)("Cascader",gn=>[Yn(gn)],gn=>{const qn=Math.round((gn.controlHeight-gn.fontSize*gn.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:gn.controlItemBgActive,optionSelectedFontWeight:gn.fontWeightStrong,optionPadding:`${qn}px ${gn.paddingSM}px`,menuPadding:gn.paddingXXS}}),oi=function(gn,qn){var mi={};for(var Fi in gn)Object.prototype.hasOwnProperty.call(gn,Fi)&&qn.indexOf(Fi)<0&&(mi[Fi]=gn[Fi]);if(gn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var jn=0,Fi=Object.getOwnPropertySymbols(gn);jn<Fi.length;jn++)qn.indexOf(Fi[jn])<0&&Object.prototype.propertyIsEnumerable.call(gn,Fi[jn])&&(mi[Fi[jn]]=gn[Fi[jn]]);return mi};const{SHOW_CHILD:Li,SHOW_PARENT:di}=yt;function gr(gn,qn,mi){const Fi=gn.toLowerCase().split(qn).reduce((At,Dt,Ve)=>Ve===0?[Dt]:[].concat((0,ce.Z)(At),[qn,Dt]),[]),jn=[];let Tn=0;return Fi.forEach((At,Dt)=>{const Ve=Tn+At.length;let Yt=gn.slice(Tn,Ve);Tn=Ve,Dt%2===1&&(Yt=De.createElement("span",{className:`${mi}-menu-item-keyword`,key:`separator-${Dt}`},Yt)),jn.push(Yt)}),jn}const Ii=(gn,qn,mi,Fi)=>{const jn=[],Tn=gn.toLowerCase();return qn.forEach((At,Dt)=>{Dt!==0&&jn.push(" / ");let Ve=At[Fi.label];const Yt=typeof Ve;(Yt==="string"||Yt==="number")&&(Ve=gr(String(Ve),Tn,mi)),jn.push(Ve)}),jn},Le=De.forwardRef((gn,qn)=>{const{prefixCls:mi,size:Fi,disabled:jn,className:Tn,rootClassName:At,multiple:Dt,bordered:Ve=!0,transitionName:Yt,choiceTransitionName:tn="",popupClassName:vt,dropdownClassName:rt,expandIcon:Vt,placement:rn,showSearch:Pn,allowClear:kn=!0,notFoundContent:St,direction:hn,getPopupContainer:In,status:ii,showArrow:Gt,builtinPlacements:Jt,style:hi}=gn,fi=oi(gn,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),ui=(0,wt.Z)(fi,["suffixIcon"]),{getPopupContainer:ni,getPrefixCls:ci,renderEmpty:li,direction:Ni,popupOverflow:Qi,cascader:lr}=De.useContext(Xt.E_),wn=hn||Ni,Pr=wn==="rtl",{status:Or,hasFeedback:ar,isFormItemInput:fn,feedbackIcon:Rn}=De.useContext(cn.aM),Ci=(0,sn.F)(Or,ii),_i=St||(li==null?void 0:li("Cascader"))||De.createElement(Ht.Z,{componentName:"Cascader"}),ki=ci(),Wi=ci("select",mi),cr=ci("cascader",mi),[qi,nr]=(0,Un.Z)(Wi),[dr]=Gn(cr),{compactSize:Mn,compactItemClassnames:to}=(0,Jn.ri)(Wi,hn),Ln=Be()(vt||rt,`${cr}-dropdown`,{[`${cr}-dropdown-rtl`]:wn==="rtl"},At,nr),Hr=De.useMemo(()=>{if(!Pn)return Pn;let Xo={render:Ii};return typeof Pn=="object"&&(Xo=Object.assign(Object.assign({},Xo),Pn)),Xo},[Pn]),so=(0,Dn.Z)(Xo=>{var Fa;return(Fa=Fi!=null?Fi:Mn)!==null&&Fa!==void 0?Fa:Xo}),Bi=De.useContext(xn.Z),Mo=jn!=null?jn:Bi;let oo=Vt;Vt||(oo=Pr?De.createElement(ze.Z,null):De.createElement(_e.Z,null));const Ui=De.createElement("span",{className:`${Wi}-menu-item-loading-icon`},De.createElement(Ct.Z,{spin:!0})),er=De.useMemo(()=>Dt?De.createElement("span",{className:`${cr}-checkbox-inner`}):!1,[Dt]),Wr=(0,Wn.Z)(gn.suffixIcon,Gt),{suffixIcon:no,removeIcon:xi,clearIcon:tt}=(0,Zn.Z)(Object.assign(Object.assign({},gn),{hasFeedback:ar,feedbackIcon:Rn,showSuffixIcon:Wr,multiple:Dt,prefixCls:Wi,componentName:"Cascader"})),lo=De.useMemo(()=>rn!==void 0?rn:Pr?"bottomRight":"bottomLeft",[rn,Pr]),_o=(0,ti.Z)(Jt,Qi),ga=kn===!0?{clearIcon:tt}:kn,Oa=De.createElement(yt,Object.assign({prefixCls:Wi,className:Be()(!mi&&cr,{[`${Wi}-lg`]:so==="large",[`${Wi}-sm`]:so==="small",[`${Wi}-rtl`]:Pr,[`${Wi}-borderless`]:!Ve,[`${Wi}-in-form-item`]:fn},(0,sn.Z)(Wi,Ci,ar),to,lr==null?void 0:lr.className,Tn,At,nr),disabled:Mo,style:Object.assign(Object.assign({},lr==null?void 0:lr.style),hi)},ui,{builtinPlacements:_o,direction:wn,placement:lo,notFoundContent:_i,allowClear:ga,showSearch:Hr,expandIcon:oo,suffixIcon:no,removeIcon:xi,loadingIcon:Ui,checkable:er,dropdownClassName:Ln,dropdownPrefixCls:mi||cr,choiceTransitionName:(0,ot.m)(ki,"",tn),transitionName:(0,ot.m)(ki,"slide-up",Yt),getPopupContainer:In||ni,ref:qn}));return dr(qi(Oa))}),si=(0,It.Z)(Le);Le.SHOW_PARENT=di,Le.SHOW_CHILD=Li,Le._InternalPanelDoNotUseOrYouWillBeFired=si;var ji=Le},24905:function(Sn,an,ve){"use strict";ve.d(an,{default:function(){return Ie}});var ce=ve(92310),De=ve.n(ce),ze=ve(5630),Ct=ve(59301),_e=ve(36355),Ke=ve(1684),Be=ve(32441),ct=Ct.createContext(null),Ze=ve(98447),Et=ve(14088),ht=ve(4572),dt=function(je,qe){var $e={};for(var ft in je)Object.prototype.hasOwnProperty.call(je,ft)&&qe.indexOf(ft)<0&&($e[ft]=je[ft]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,ft=Object.getOwnPropertySymbols(je);Re<ft.length;Re++)qe.indexOf(ft[Re])<0&&Object.prototype.propertyIsEnumerable.call(je,ft[Re])&&($e[ft[Re]]=je[ft[Re]]);return $e};const Ae=(je,qe)=>{var $e;const{prefixCls:ft,className:Re,rootClassName:Tt,children:et,indeterminate:bt=!1,style:Bt,onMouseEnter:Nt,onMouseLeave:Zt,skipGroup:Ut=!1,disabled:lt}=je,Ge=dt(je,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:kt,direction:un,checkbox:ln}=Ct.useContext(_e.E_),Ft=Ct.useContext(ct),{isFormItemInput:$t}=Ct.useContext(Be.aM),Qt=Ct.useContext(Ke.Z),Bn=($e=(Ft==null?void 0:Ft.disabled)||lt)!==null&&$e!==void 0?$e:Qt,on=Ct.useRef(Ge.value);Ct.useEffect(()=>{Ft==null||Ft.registerValue(Ge.value)},[]),Ct.useEffect(()=>{if(!Ut)return Ge.value!==on.current&&(Ft==null||Ft.cancelValue(on.current),Ft==null||Ft.registerValue(Ge.value),on.current=Ge.value),()=>Ft==null?void 0:Ft.cancelValue(Ge.value)},[Ge.value]);const Cn=kt("checkbox",ft),[gt,En]=(0,Ze.ZP)(Cn),Vn=Object.assign({},Ge);Ft&&!Ut&&(Vn.onChange=function(){Ge.onChange&&Ge.onChange.apply(Ge,arguments),Ft.toggleOption&&Ft.toggleOption({label:et,value:Ge.value})},Vn.name=Ft.name,Vn.checked=Ft.value.includes(Ge.value));const He=De()(`${Cn}-wrapper`,{[`${Cn}-rtl`]:un==="rtl",[`${Cn}-wrapper-checked`]:Vn.checked,[`${Cn}-wrapper-disabled`]:Bn,[`${Cn}-wrapper-in-form-item`]:$t},ln==null?void 0:ln.className,Re,Tt,En),Ce=De()({[`${Cn}-indeterminate`]:bt},ht.A,En),Pe=bt?"mixed":void 0;return gt(Ct.createElement(Et.Z,{component:"Checkbox",disabled:Bn},Ct.createElement("label",{className:He,style:Object.assign(Object.assign({},ln==null?void 0:ln.style),Bt),onMouseEnter:Nt,onMouseLeave:Zt},Ct.createElement(ze.Z,Object.assign({"aria-checked":Pe},Vn,{prefixCls:Cn,className:Ce,disabled:Bn,ref:qe})),et!==void 0&&Ct.createElement("span",null,et))))};var ee=Ct.forwardRef(Ae),he=ve(26407),se=ve(2738),de=function(je,qe){var $e={};for(var ft in je)Object.prototype.hasOwnProperty.call(je,ft)&&qe.indexOf(ft)<0&&($e[ft]=je[ft]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,ft=Object.getOwnPropertySymbols(je);Re<ft.length;Re++)qe.indexOf(ft[Re])<0&&Object.prototype.propertyIsEnumerable.call(je,ft[Re])&&($e[ft[Re]]=je[ft[Re]]);return $e};const me=(je,qe)=>{const{defaultValue:$e,children:ft,options:Re=[],prefixCls:Tt,className:et,rootClassName:bt,style:Bt,onChange:Nt}=je,Zt=de(je,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Ut,direction:lt}=Ct.useContext(_e.E_),[Ge,kt]=Ct.useState(Zt.value||$e||[]),[un,ln]=Ct.useState([]);Ct.useEffect(()=>{"value"in Zt&&kt(Zt.value||[])},[Zt.value]);const Ft=Ct.useMemo(()=>Re.map(Ne=>typeof Ne=="string"||typeof Ne=="number"?{label:Ne,value:Ne}:Ne),[Re]),$t=Ne=>{ln(ke=>ke.filter(Se=>Se!==Ne))},Qt=Ne=>{ln(ke=>[].concat((0,he.Z)(ke),[Ne]))},Bn=Ne=>{const ke=Ge.indexOf(Ne.value),Se=(0,he.Z)(Ge);ke===-1?Se.push(Ne.value):Se.splice(ke,1),"value"in Zt||kt(Se),Nt==null||Nt(Se.filter(nt=>un.includes(nt)).sort((nt,Pt)=>{const Xe=Ft.findIndex(yt=>yt.value===nt),Je=Ft.findIndex(yt=>yt.value===Pt);return Xe-Je}))},on=Ut("checkbox",Tt),Cn=`${on}-group`,[gt,En]=(0,Ze.ZP)(on),Vn=(0,se.Z)(Zt,["value","disabled"]),He=Re.length?Ft.map(Ne=>Ct.createElement(ee,{prefixCls:on,key:Ne.value.toString(),disabled:"disabled"in Ne?Ne.disabled:Zt.disabled,value:Ne.value,checked:Ge.includes(Ne.value),onChange:Ne.onChange,className:`${Cn}-item`,style:Ne.style,title:Ne.title},Ne.label)):ft,Ce={toggleOption:Bn,value:Ge,disabled:Zt.disabled,name:Zt.name,registerValue:Qt,cancelValue:$t},Pe=De()(Cn,{[`${Cn}-rtl`]:lt==="rtl"},et,bt,En);return gt(Ct.createElement("div",Object.assign({className:Pe,style:Bt},Vn,{ref:qe}),Ct.createElement(ct.Provider,{value:Ce},He)))},we=Ct.forwardRef(me);var Me=Ct.memo(we);const be=ee;be.Group=Me,be.__ANT_CHECKBOX=!0;var Ie=be},98447:function(Sn,an,ve){"use strict";ve.d(an,{C2:function(){return _e}});var ce=ve(17313),De=ve(37613),ze=ve(83116);const Ct=Ke=>{const{checkboxCls:Be}=Ke,mt=`${Be}-wrapper`;return[{[`${Be}-group`]:Object.assign(Object.assign({},(0,ce.Wf)(Ke)),{display:"inline-flex",flexWrap:"wrap",columnGap:Ke.marginXS,[`> ${Ke.antCls}-row`]:{flex:1}}),[mt]:Object.assign(Object.assign({},(0,ce.Wf)(Ke)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${mt}`]:{marginInlineStart:0},[`&${mt}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Be]:Object.assign(Object.assign({},(0,ce.Wf)(Ke)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Ke.borderRadiusSM,alignSelf:"center",[`${Be}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Be}-inner`]:Object.assign({},(0,ce.oN)(Ke))},[`${Be}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Ke.checkboxSize,height:Ke.checkboxSize,direction:"ltr",backgroundColor:Ke.colorBgContainer,border:`${Ke.lineWidth}px ${Ke.lineType} ${Ke.colorBorder}`,borderRadius:Ke.borderRadiusSM,borderCollapse:"separate",transition:`all ${Ke.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Ke.checkboxSize/14*5,height:Ke.checkboxSize/14*8,border:`${Ke.lineWidthBold}px solid ${Ke.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Ke.motionDurationFast} ${Ke.motionEaseInBack}, opacity ${Ke.motionDurationFast}`}},"& + span":{paddingInlineStart:Ke.paddingXS,paddingInlineEnd:Ke.paddingXS}})},{[`
${mt}:not(${mt}-disabled),
${Be}:not(${Be}-disabled)
`]:{[`&:hover ${Be}-inner`]:{borderColor:Ke.colorPrimary}},[`${mt}:not(${mt}-disabled)`]:{[`&:hover ${Be}-checked:not(${Be}-disabled) ${Be}-inner`]:{backgroundColor:Ke.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Be}-checked:not(${Be}-disabled):after`]:{borderColor:Ke.colorPrimaryHover}}},{[`${Be}-checked`]:{[`${Be}-inner`]:{backgroundColor:Ke.colorPrimary,borderColor:Ke.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Ke.motionDurationMid} ${Ke.motionEaseOutBack} ${Ke.motionDurationFast}`}}},[`
${mt}-checked:not(${mt}-disabled),
${Be}-checked:not(${Be}-disabled)
`]:{[`&:hover ${Be}-inner`]:{backgroundColor:Ke.colorPrimaryHover,borderColor:"transparent"}}},{[Be]:{"&-indeterminate":{[`${Be}-inner`]:{backgroundColor:Ke.colorBgContainer,borderColor:Ke.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Ke.fontSizeLG/2,height:Ke.fontSizeLG/2,backgroundColor:Ke.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${mt}-disabled`]:{cursor:"not-allowed"},[`${Be}-disabled`]:{[`&, ${Be}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Be}-inner`]:{background:Ke.colorBgContainerDisabled,borderColor:Ke.colorBorder,"&:after":{borderColor:Ke.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Ke.colorTextDisabled},[`&${Be}-indeterminate ${Be}-inner::after`]:{background:Ke.colorTextDisabled}}}]};function _e(Ke,Be){const mt=(0,De.TS)(Be,{checkboxCls:`.${Ke}`,checkboxSize:Be.controlInteractiveSize});return[Ct(mt)]}an.ZP=(0,ze.Z)("Checkbox",(Ke,Be)=>{let{prefixCls:mt}=Be;return[_e(mt,Ke)]})},36381:function(Sn,an,ve){"use strict";ve.d(an,{default:function(){return Vn}});var ce=ve(38819),De=ve(92310),ze=ve.n(De),Ct=ve(92413),_e=ve(26407),Ke=ve(33606),Be=ve(39559),mt=ve(18929),ct=ve(48736),Ze=ve(59301),Et=ve(37061),ht=ve(11592),dt=ve(400),Ae=ve(77900),te=ve(10228),ee=Ze.forwardRef(function(He,Ce){var Pe=He.prefixCls,Ne=He.forceRender,ke=He.className,Se=He.style,nt=He.children,Pt=He.isActive,Xe=He.role,Je=Ze.useState(Pt||Ne),yt=(0,Ke.Z)(Je,2),wt=yt[0],ot=yt[1];return Ze.useEffect(function(){(Ne||Pt)&&ot(!0)},[Ne,Pt]),wt?Ze.createElement("div",{ref:Ce,className:ze()("".concat(Pe,"-content"),(0,dt.Z)((0,dt.Z)({},"".concat(Pe,"-content-active"),Pt),"".concat(Pe,"-content-inactive"),!Pt),ke),style:Se,role:Xe},Ze.createElement("div",{className:"".concat(Pe,"-content-box")},nt)):null});ee.displayName="PanelContent";var he=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],de=Ze.forwardRef(function(He,Ce){var Pe=He.showArrow,Ne=Pe===void 0?!0:Pe,ke=He.headerClass,Se=He.isActive,nt=He.onItemClick,Pt=He.forceRender,Xe=He.className,Je=He.prefixCls,yt=He.collapsible,wt=He.accordion,ot=He.panelKey,It=He.extra,sn=He.header,Xt=He.expandIcon,Ht=He.openMotion,xn=He.destroyInactivePanel,Dn=He.children,cn=(0,Et.Z)(He,se),Un=yt==="disabled",ti=yt==="header",Wn=yt==="icon",Zn=It!=null&&typeof It!="boolean",Jn=function(){nt==null||nt(ot)},vi=function(oi){(oi.key==="Enter"||oi.keyCode===te.Z.ENTER||oi.which===te.Z.ENTER)&&Jn()},pi=typeof Xt=="function"?Xt(He):Ze.createElement("i",{className:"arrow"});pi&&(pi=Ze.createElement("div",{className:"".concat(Je,"-expand-icon"),onClick:["header","icon"].includes(yt)?Jn:void 0},pi));var zi=ze()((0,dt.Z)((0,dt.Z)((0,dt.Z)({},"".concat(Je,"-item"),!0),"".concat(Je,"-item-active"),Se),"".concat(Je,"-item-disabled"),Un),Xe),$i=ze()(ke,(0,dt.Z)((0,dt.Z)((0,dt.Z)({},"".concat(Je,"-header"),!0),"".concat(Je,"-header-collapsible-only"),ti),"".concat(Je,"-icon-collapsible-only"),Wn)),Yn={className:$i,"aria-expanded":Se,"aria-disabled":Un,onKeyDown:vi};return!ti&&!Wn&&(Yn.onClick=Jn,Yn.role=wt?"tab":"button",Yn.tabIndex=Un?-1:0),Ze.createElement("div",(0,Ct.Z)({},cn,{ref:Ce,className:zi}),Ze.createElement("div",Yn,Ne&&pi,Ze.createElement("span",{className:"".concat(Je,"-header-text"),onClick:yt==="header"?Jn:void 0},sn),Zn&&Ze.createElement("div",{className:"".concat(Je,"-extra")},It)),Ze.createElement(Ae.default,(0,Ct.Z)({visible:Se,leavedClassName:"".concat(Je,"-content-hidden")},Ht,{forceRender:Pt,removeOnLeave:xn}),function(Gn,oi){var Li=Gn.className,di=Gn.style;return Ze.createElement(he,{ref:oi,prefixCls:Je,className:Li,style:di,isActive:Se,forceRender:Pt,role:wt?"tabpanel":void 0},Dn)}))}),me=de,we=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Me=function(Ce,Pe){var Ne=Pe.prefixCls,ke=Pe.accordion,Se=Pe.collapsible,nt=Pe.destroyInactivePanel,Pt=Pe.onItemClick,Xe=Pe.activeKey,Je=Pe.openMotion,yt=Pe.expandIcon;return Ce.map(function(wt,ot){var It=wt.children,sn=wt.label,Xt=wt.key,Ht=wt.collapsible,xn=wt.onItemClick,Dn=wt.destroyInactivePanel,cn=(0,Et.Z)(wt,we),Un=String(Xt!=null?Xt:ot),ti=Ht!=null?Ht:Se,Wn=Dn!=null?Dn:nt,Zn=function(pi){ti!=="disabled"&&(Pt(pi),xn==null||xn(pi))},Jn=!1;return ke?Jn=Xe[0]===Un:Jn=Xe.indexOf(Un)>-1,Ze.createElement(me,(0,Ct.Z)({},cn,{prefixCls:Ne,key:Un,panelKey:Un,isActive:Jn,accordion:ke,openMotion:Je,expandIcon:yt,header:sn,collapsible:ti,onItemClick:Zn,destroyInactivePanel:Wn}),It)})},be=function(Ce,Pe,Ne){if(!Ce)return null;var ke=Ne.prefixCls,Se=Ne.accordion,nt=Ne.collapsible,Pt=Ne.destroyInactivePanel,Xe=Ne.onItemClick,Je=Ne.activeKey,yt=Ne.openMotion,wt=Ne.expandIcon,ot=Ce.key||String(Pe),It=Ce.props,sn=It.header,Xt=It.headerClass,Ht=It.destroyInactivePanel,xn=It.collapsible,Dn=It.onItemClick,cn=!1;Se?cn=Je[0]===ot:cn=Je.indexOf(ot)>-1;var Un=xn!=null?xn:nt,ti=function(Jn){Un!=="disabled"&&(Xe(Jn),Dn==null||Dn(Jn))},Wn={key:ot,panelKey:ot,header:sn,headerClass:Xt,isActive:cn,prefixCls:ke,destroyInactivePanel:Ht!=null?Ht:Pt,openMotion:yt,accordion:Se,children:Ce.props.children,onItemClick:ti,expandIcon:wt,collapsible:Un};return typeof Ce.type=="string"?Ce:(Object.keys(Wn).forEach(function(Zn){typeof Wn[Zn]=="undefined"&&delete Wn[Zn]}),Ze.cloneElement(Ce,Wn))};function Ie(He,Ce,Pe){return Array.isArray(He)?Me(He,Pe):(0,ht.Z)(Ce).map(function(Ne,ke){return be(Ne,ke,Pe)})}var je=Ie,qe=ve(26112);function $e(He){var Ce=He;if(!Array.isArray(Ce)){var Pe=(0,Be.Z)(Ce);Ce=Pe==="number"||Pe==="string"?[Ce]:[]}return Ce.map(function(Ne){return String(Ne)})}var ft=Ze.forwardRef(function(He,Ce){var Pe=He.prefixCls,Ne=Pe===void 0?"rc-collapse":Pe,ke=He.destroyInactivePanel,Se=ke===void 0?!1:ke,nt=He.style,Pt=He.accordion,Xe=He.className,Je=He.children,yt=He.collapsible,wt=He.openMotion,ot=He.expandIcon,It=He.activeKey,sn=He.defaultActiveKey,Xt=He.onChange,Ht=He.items,xn=ze()(Ne,Xe),Dn=(0,mt.Z)([],{value:It,onChange:function(vi){return Xt==null?void 0:Xt(vi)},defaultValue:sn,postState:$e}),cn=(0,Ke.Z)(Dn,2),Un=cn[0],ti=cn[1],Wn=function(vi){return ti(function(){if(Pt)return Un[0]===vi?[]:[vi];var pi=Un.indexOf(vi),zi=pi>-1;return zi?Un.filter(function($i){return $i!==vi}):[].concat((0,_e.Z)(Un),[vi])})};(0,ct.ZP)(!Je,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Zn=je(Ht,Je,{prefixCls:Ne,accordion:Pt,openMotion:wt,expandIcon:ot,collapsible:yt,destroyInactivePanel:Se,onItemClick:Wn,activeKey:Un});return Ze.createElement("div",(0,Ct.Z)({ref:Ce,className:xn,style:nt,role:Pt?"tablist":void 0},(0,qe.Z)(He,{aria:!0,data:!0})),Zn)}),Re=Object.assign(ft,{Panel:me}),Tt=Re,et=Re.Panel,bt=ve(2738),Bt=ve(62892),Nt=ve(92343),Zt=ve(36355),Ut=ve(19716),Ge=Ze.forwardRef((He,Ce)=>{const{getPrefixCls:Pe}=Ze.useContext(Zt.E_),{prefixCls:Ne,className:ke,showArrow:Se=!0}=He,nt=Pe("collapse",Ne),Pt=ze()({[`${nt}-no-arrow`]:!Se},ke);return Ze.createElement(Tt.Panel,Object.assign({ref:Ce},He,{prefixCls:nt,className:Pt}))}),kt=ve(17313),un=ve(8378),ln=ve(83116),Ft=ve(37613);const $t=He=>{const{componentCls:Ce,contentBg:Pe,padding:Ne,headerBg:ke,headerPadding:Se,collapseHeaderPaddingSM:nt,collapseHeaderPaddingLG:Pt,collapsePanelBorderRadius:Xe,lineWidth:Je,lineType:yt,colorBorder:wt,colorText:ot,colorTextHeading:It,colorTextDisabled:sn,fontSize:Xt,fontSizeLG:Ht,lineHeight:xn,marginSM:Dn,paddingSM:cn,paddingLG:Un,paddingXS:ti,motionDurationSlow:Wn,fontSizeIcon:Zn,contentPadding:Jn}=He,vi=`${Je}px ${yt} ${wt}`;return{[Ce]:Object.assign(Object.assign({},(0,kt.Wf)(He)),{backgroundColor:ke,border:vi,borderBottom:0,borderRadius:`${Xe}px`,"&-rtl":{direction:"rtl"},[`& > ${Ce}-item`]:{borderBottom:vi,"&:last-child":{[`
&,
& > ${Ce}-header`]:{borderRadius:`0 0 ${Xe}px ${Xe}px`}},[`> ${Ce}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:Se,color:It,lineHeight:xn,cursor:"pointer",transition:`all ${Wn}, visibility 0s`,[`> ${Ce}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${Ce}-expand-icon`]:{height:Xt*xn,display:"flex",alignItems:"center",paddingInlineEnd:Dn},[`${Ce}-arrow`]:Object.assign(Object.assign({},(0,kt.Ro)()),{fontSize:Zn,svg:{transition:`transform ${Wn}`}}),[`${Ce}-header-text`]:{marginInlineEnd:"auto"}},[`${Ce}-header-collapsible-only`]:{cursor:"default",[`${Ce}-header-text`]:{flex:"none",cursor:"pointer"}},[`${Ce}-icon-collapsible-only`]:{cursor:"default",[`${Ce}-expand-icon`]:{cursor:"pointer"}}},[`${Ce}-content`]:{color:ot,backgroundColor:Pe,borderTop:vi,[`& > ${Ce}-content-box`]:{padding:Jn},"&-hidden":{display:"none"}},"&-small":{[`> ${Ce}-item`]:{[`> ${Ce}-header`]:{padding:nt,paddingInlineStart:ti,[`> ${Ce}-expand-icon`]:{marginInlineStart:cn-ti}},[`> ${Ce}-content > ${Ce}-content-box`]:{padding:cn}}},"&-large":{[`> ${Ce}-item`]:{fontSize:Ht,[`> ${Ce}-header`]:{padding:Pt,paddingInlineStart:Ne,[`> ${Ce}-expand-icon`]:{height:Ht*xn,marginInlineStart:Un-Ne}},[`> ${Ce}-content > ${Ce}-content-box`]:{padding:Un}}},[`${Ce}-item:last-child`]:{[`> ${Ce}-content`]:{borderRadius:`0 0 ${Xe}px ${Xe}px`}},[`& ${Ce}-item-disabled > ${Ce}-header`]:{"\n &,\n & > .arrow\n ":{color:sn,cursor:"not-allowed"}},[`&${Ce}-icon-position-end`]:{[`& > ${Ce}-item`]:{[`> ${Ce}-header`]:{[`${Ce}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:Dn}}}}})}},Qt=He=>{const{componentCls:Ce}=He,Pe=`> ${Ce}-item > ${Ce}-header ${Ce}-arrow svg`;return{[`${Ce}-rtl`]:{[Pe]:{transform:"rotate(180deg)"}}}},Bn=He=>{const{componentCls:Ce,headerBg:Pe,paddingXXS:Ne,colorBorder:ke}=He;return{[`${Ce}-borderless`]:{backgroundColor:Pe,border:0,[`> ${Ce}-item`]:{borderBottom:`1px solid ${ke}`},[`
> ${Ce}-item:last-child,
> ${Ce}-item:last-child ${Ce}-header
`]:{borderRadius:0},[`> ${Ce}-item:last-child`]:{borderBottom:0},[`> ${Ce}-item > ${Ce}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${Ce}-item > ${Ce}-content > ${Ce}-content-box`]:{paddingTop:Ne}}}},on=He=>{const{componentCls:Ce,paddingSM:Pe}=He;return{[`${Ce}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${Ce}-item`]:{borderBottom:0,[`> ${Ce}-content`]:{backgroundColor:"transparent",border:0,[`> ${Ce}-content-box`]:{paddingBlock:Pe}}}}}};var Cn=(0,ln.Z)("Collapse",He=>{const Ce=(0,Ft.TS)(He,{collapseHeaderPaddingSM:`${He.paddingXS}px ${He.paddingSM}px`,collapseHeaderPaddingLG:`${He.padding}px ${He.paddingLG}px`,collapsePanelBorderRadius:He.borderRadiusLG});return[$t(Ce),Bn(Ce),on(Ce),Qt(Ce),(0,un.Z)(Ce)]},He=>({headerPadding:`${He.paddingSM}px ${He.padding}px`,headerBg:He.colorFillAlter,contentPadding:`${He.padding}px 16px`,contentBg:He.colorBgContainer})),En=Object.assign(Ze.forwardRef((He,Ce)=>{const{getPrefixCls:Pe,direction:Ne,collapse:ke}=Ze.useContext(Zt.E_),{prefixCls:Se,className:nt,rootClassName:Pt,style:Xe,bordered:Je=!0,ghost:yt,size:wt,expandIconPosition:ot="start",children:It,expandIcon:sn}=He,Xt=(0,Ut.Z)(vi=>{var pi;return(pi=wt!=null?wt:vi)!==null&&pi!==void 0?pi:"middle"}),Ht=Pe("collapse",Se),xn=Pe(),[Dn,cn]=Cn(Ht),Un=Ze.useMemo(()=>ot==="left"?"start":ot==="right"?"end":ot,[ot]),ti=function(){let vi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const pi=sn?sn(vi):Ze.createElement(ce.Z,{rotate:vi.isActive?90:void 0});return(0,Nt.Tm)(pi,()=>({className:ze()(pi.props.className,`${Ht}-arrow`)}))},Wn=ze()(`${Ht}-icon-position-${Un}`,{[`${Ht}-borderless`]:!Je,[`${Ht}-rtl`]:Ne==="rtl",[`${Ht}-ghost`]:!!yt,[`${Ht}-${Xt}`]:Xt!=="middle"},ke==null?void 0:ke.className,nt,Pt,cn),Zn=Object.assign(Object.assign({},(0,Bt.Z)(xn)),{motionAppear:!1,leavedClassName:`${Ht}-content-hidden`}),Jn=Ze.useMemo(()=>It?(0,ht.Z)(It).map((vi,pi)=>{var zi,$i;if(!((zi=vi.props)===null||zi===void 0)&&zi.disabled){const Yn=($i=vi.key)!==null&&$i!==void 0?$i:String(pi),{disabled:Gn,collapsible:oi}=vi.props,Li=Object.assign(Object.assign({},(0,bt.Z)(vi.props,["disabled"])),{key:Yn,collapsible:oi!=null?oi:Gn?"disabled":void 0});return(0,Nt.Tm)(vi,Li)}return vi}):null,[It]);return Dn(Ze.createElement(Tt,Object.assign({ref:Ce,openMotion:Zn},(0,bt.Z)(He,["rootClassName"]),{expandIcon:ti,prefixCls:Ht,className:Wn,style:Object.assign(Object.assign({},ke==null?void 0:ke.style),Xe)}),Jn))}),{Panel:Ge}),Vn=En},93891:function(Sn,an,ve){"use strict";var ce=ve(59301),De=ve(36355),ze=ve(64165);const Ct=_e=>{const{componentName:Ke}=_e,{getPrefixCls:Be}=(0,ce.useContext)(De.E_),mt=Be("empty");switch(Ke){case"Table":case"List":return ce.createElement(ze.Z,{image:ze.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ce.createElement(ze.Z,{image:ze.Z.PRESENTED_IMAGE_SIMPLE,className:`${mt}-small`});default:return ce.createElement(ze.Z,null)}};an.Z=Ct},28103:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return ht}});var ce=ve(92310),De=ve.n(ce),ze=ve(59301),Ct=ve(36355),_e=ve(17313),Ke=ve(83116),Be=ve(37613);const mt=dt=>{const{componentCls:Ae,sizePaddingEdgeHorizontal:te,colorSplit:ee,lineWidth:he,textPaddingInline:se,orientationMargin:de,verticalMarginInline:me}=dt;return{[Ae]:Object.assign(Object.assign({},(0,_e.Wf)(dt)),{borderBlockStart:`${he}px solid ${ee}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:me,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${he}px solid ${ee}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${dt.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${Ae}-with-text`]:{display:"flex",alignItems:"center",margin:`${dt.dividerHorizontalWithTextGutterMargin}px 0`,color:dt.colorTextHeading,fontWeight:500,fontSize:dt.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${ee}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${he}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${Ae}-with-text-left`]:{"&::before":{width:`${de*100}%`},"&::after":{width:`${100-de*100}%`}},[`&-horizontal${Ae}-with-text-right`]:{"&::before":{width:`${100-de*100}%`},"&::after":{width:`${de*100}%`}},[`${Ae}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:se},"&-dashed":{background:"none",borderColor:ee,borderStyle:"dashed",borderWidth:`${he}px 0 0`},[`&-horizontal${Ae}-with-text${Ae}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${Ae}-dashed`]:{borderInlineStartWidth:he,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${Ae}-with-text`]:{color:dt.colorText,fontWeight:"normal",fontSize:dt.fontSize},[`&-horizontal${Ae}-with-text-left${Ae}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${Ae}-inner-text`]:{paddingInlineStart:te}},[`&-horizontal${Ae}-with-text-right${Ae}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${Ae}-inner-text`]:{paddingInlineEnd:te}}})}};var ct=(0,Ke.Z)("Divider",dt=>{const Ae=(0,Be.TS)(dt,{dividerHorizontalWithTextGutterMargin:dt.margin,dividerHorizontalGutterMargin:dt.marginLG,sizePaddingEdgeHorizontal:0});return[mt(Ae)]},dt=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:dt.marginXS})),Ze=function(dt,Ae){var te={};for(var ee in dt)Object.prototype.hasOwnProperty.call(dt,ee)&&Ae.indexOf(ee)<0&&(te[ee]=dt[ee]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,ee=Object.getOwnPropertySymbols(dt);he<ee.length;he++)Ae.indexOf(ee[he])<0&&Object.prototype.propertyIsEnumerable.call(dt,ee[he])&&(te[ee[he]]=dt[ee[he]]);return te},ht=dt=>{const{getPrefixCls:Ae,direction:te,divider:ee}=ze.useContext(Ct.E_),{prefixCls:he,type:se="horizontal",orientation:de="center",orientationMargin:me,className:we,rootClassName:Me,children:be,dashed:Ie,plain:je,style:qe}=dt,$e=Ze(dt,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),ft=Ae("divider",he),[Re,Tt]=ct(ft),et=de.length>0?`-${de}`:de,bt=!!be,Bt=de==="left"&&me!=null,Nt=de==="right"&&me!=null,Zt=De()(ft,ee==null?void 0:ee.className,Tt,`${ft}-${se}`,{[`${ft}-with-text`]:bt,[`${ft}-with-text${et}`]:bt,[`${ft}-dashed`]:!!Ie,[`${ft}-plain`]:!!je,[`${ft}-rtl`]:te==="rtl",[`${ft}-no-default-orientation-margin-left`]:Bt,[`${ft}-no-default-orientation-margin-right`]:Nt},we,Me),Ut=ze.useMemo(()=>typeof me=="number"?me:/^\d+$/.test(me)?Number(me):me,[me]),lt=Object.assign(Object.assign({},Bt&&{marginLeft:Ut}),Nt&&{marginRight:Ut});return Re(ze.createElement("div",Object.assign({className:Zt,style:Object.assign(Object.assign({},ee==null?void 0:ee.style),qe)},$e,{role:"separator"}),be&&se!=="vertical"&&ze.createElement("span",{className:`${ft}-inner-text`,style:lt},be)))}},91857:function(Sn,an,ve){"use strict";var ce=ve(59301),De=ve(38819),ze=ve(92310),Ct=ve.n(ze),_e=ve(31561),Ke=ve(70425),Be=ve(18929),mt=ve(2738),ct=ve(79676),Ze=ve(53487),Et=ve(92343),ht=ve(36355),dt=ve(20834),Ae=ve(40875),te=ve(88088),ee=ve(47211);const he=null,se=Me=>{const{menu:be,arrow:Ie,prefixCls:je,children:qe,trigger:$e,disabled:ft,dropdownRender:Re,getPopupContainer:Tt,overlayClassName:et,rootClassName:bt,open:Bt,onOpenChange:Nt,visible:Zt,onVisibleChange:Ut,mouseEnterDelay:lt=.15,mouseLeaveDelay:Ge=.1,autoAdjustOverflow:kt=!0,placement:un="",overlay:ln,transitionName:Ft}=Me,{getPopupContainer:$t,getPrefixCls:Qt,direction:Bn}=ce.useContext(ht.E_),on=ce.useMemo(()=>{const ot=Qt();return Ft!==void 0?Ft:un.includes("top")?`${ot}-slide-down`:`${ot}-slide-up`},[Qt,un,Ft]),Cn=ce.useMemo(()=>un?un.includes("Center")?un.slice(0,un.indexOf("Center")):un:Bn==="rtl"?"bottomRight":"bottomLeft",[un,Bn]),gt=Qt("dropdown",je),[En,Vn]=(0,ee.Z)(gt),[,He]=(0,te.Z)(),Ce=ce.Children.only(qe),Pe=(0,Et.Tm)(Ce,{className:Ct()(`${gt}-trigger`,{[`${gt}-rtl`]:Bn==="rtl"},Ce.props.className),disabled:ft}),Ne=ft?[]:$e;let ke;Ne&&Ne.includes("contextMenu")&&(ke=!0);const[Se,nt]=(0,Be.Z)(!1,{value:Bt!=null?Bt:Zt}),Pt=(0,Ke.useEvent)(ot=>{Nt==null||Nt(ot),Ut==null||Ut(ot),nt(ot)}),Xe=Ct()(et,bt,Vn,{[`${gt}-rtl`]:Bn==="rtl"}),Je=(0,ct.Z)({arrowPointAtCenter:typeof Ie=="object"&&Ie.pointAtCenter,autoAdjustOverflow:kt,offset:He.marginXXS,arrowWidth:Ie?He.sizePopupArrow:0,borderRadius:He.borderRadius}),yt=ce.useCallback(()=>{nt(!1)},[]),wt=()=>{let ot;return be!=null&&be.items?ot=ce.createElement(dt.default,Object.assign({},be)):typeof ln=="function"?ot=ln():ot=ln,Re&&(ot=Re(ot)),ot=ce.Children.only(typeof ot=="string"?ce.createElement("span",null,ot):ot),ce.createElement(Ae.J,{prefixCls:`${gt}-menu`,expandIcon:ce.createElement("span",{className:`${gt}-menu-submenu-arrow`},ce.createElement(De.Z,{className:`${gt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:yt,validator:It=>{let{mode:sn}=It}},ot)};return En(ce.createElement(_e.Z,Object.assign({alignPoint:ke},(0,mt.Z)(Me,["rootClassName"]),{mouseEnterDelay:lt,mouseLeaveDelay:Ge,visible:Se,builtinPlacements:Je,arrow:!!Ie,overlayClassName:Xe,prefixCls:gt,getPopupContainer:Tt||$t,transitionName:on,trigger:Ne,overlay:wt,placement:Cn,onVisibleChange:Pt}),Pe))};function de(Me){return Object.assign(Object.assign({},Me),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const me=(0,Ze.Z)(se,"dropdown",Me=>Me,de),we=Me=>ce.createElement(me,Object.assign({},Me),ce.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=we,an.Z=se},38854:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return te}});var ce=ve(91857),De=ve(92310),ze=ve.n(De),Ct=ve(59301),_e=ve(18785),Ke=ve(3113),Be=ve(36355),mt=ve(81327),ct=ve(33234),Ze=ve(47211),Et=function(ee,he){var se={};for(var de in ee)Object.prototype.hasOwnProperty.call(ee,de)&&he.indexOf(de)<0&&(se[de]=ee[de]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,de=Object.getOwnPropertySymbols(ee);me<de.length;me++)he.indexOf(de[me])<0&&Object.prototype.propertyIsEnumerable.call(ee,de[me])&&(se[de[me]]=ee[de[me]]);return se};const ht=ee=>{const{getPopupContainer:he,getPrefixCls:se,direction:de}=Ct.useContext(Be.E_),{prefixCls:me,type:we="default",danger:Me,disabled:be,loading:Ie,onClick:je,htmlType:qe,children:$e,className:ft,menu:Re,arrow:Tt,autoFocus:et,overlay:bt,trigger:Bt,align:Nt,open:Zt,onOpenChange:Ut,placement:lt,getPopupContainer:Ge,href:kt,icon:un=Ct.createElement(_e.Z,null),title:ln,buttonsRender:Ft=wt=>wt,mouseEnterDelay:$t,mouseLeaveDelay:Qt,overlayClassName:Bn,overlayStyle:on,destroyPopupOnHide:Cn,dropdownRender:gt}=ee,En=Et(ee,["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"]),Vn=se("dropdown",me),He=`${Vn}-button`,[Ce,Pe]=(0,Ze.Z)(Vn),Ne={menu:Re,arrow:Tt,autoFocus:et,align:Nt,disabled:be,trigger:be?[]:Bt,onOpenChange:Ut,getPopupContainer:Ge||he,mouseEnterDelay:$t,mouseLeaveDelay:Qt,overlayClassName:Bn,overlayStyle:on,destroyPopupOnHide:Cn,dropdownRender:gt},{compactSize:ke,compactItemClassnames:Se}=(0,ct.ri)(Vn,de),nt=ze()(He,Se,ft,Pe);"overlay"in ee&&(Ne.overlay=bt),"open"in ee&&(Ne.open=Zt),"placement"in ee?Ne.placement=lt:Ne.placement=de==="rtl"?"bottomLeft":"bottomRight";const Pt=Ct.createElement(Ke.ZP,{type:we,danger:Me,disabled:be,loading:Ie,onClick:je,htmlType:qe,href:kt,title:ln},$e),Xe=Ct.createElement(Ke.ZP,{type:we,danger:Me,icon:un}),[Je,yt]=Ft([Pt,Xe]);return Ce(Ct.createElement(mt.Z.Compact,Object.assign({className:nt,size:ke,block:!0},En),Je,Ct.createElement(ce.Z,Object.assign({},Ne),yt)))};ht.__ANT_BUTTON=!0;var dt=ht;const Ae=ce.Z;Ae.Button=dt;var te=Ae},47211:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Et}});var ce=ve(17313),De=ve(13826),ze=ve(92899),Ct=ve(29878),_e=ve(19447),Ke=ve(83116),Be=ve(37613),ct=ht=>{const{componentCls:dt,menuCls:Ae,colorError:te,colorTextLightSolid:ee}=ht,he=`${Ae}-item`;return{[`${dt}, ${dt}-menu-submenu`]:{[`${Ae} ${he}`]:{[`&${he}-danger:not(${he}-disabled)`]:{color:te,"&:hover":{color:ee,backgroundColor:te}}}}}};const Ze=ht=>{const{componentCls:dt,menuCls:Ae,zIndexPopup:te,dropdownArrowDistance:ee,sizePopupArrow:he,antCls:se,iconCls:de,motionDurationMid:me,dropdownPaddingVertical:we,fontSize:Me,dropdownEdgeChildPadding:be,colorTextDisabled:Ie,fontSizeIcon:je,controlPaddingHorizontal:qe,colorBgElevated:$e}=ht;return[{[dt]:Object.assign(Object.assign({},(0,ce.Wf)(ht)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:te,display:"block","&::before":{position:"absolute",insetBlock:-ee+he/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${se}-btn`]:{[`& > ${de}-down, & > ${se}-btn-icon > ${de}-down`]:{fontSize:je}},[`${dt}-wrap`]:{position:"relative",[`${se}-btn > ${de}-down`]:{fontSize:je},[`${de}-down::before`]:{transition:`transform ${me}`}},[`${dt}-wrap-open`]:{[`${de}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${se}-slide-down-enter${se}-slide-down-enter-active${dt}-placement-bottomLeft,
&${se}-slide-down-appear${se}-slide-down-appear-active${dt}-placement-bottomLeft,
&${se}-slide-down-enter${se}-slide-down-enter-active${dt}-placement-bottom,
&${se}-slide-down-appear${se}-slide-down-appear-active${dt}-placement-bottom,
&${se}-slide-down-enter${se}-slide-down-enter-active${dt}-placement-bottomRight,
&${se}-slide-down-appear${se}-slide-down-appear-active${dt}-placement-bottomRight`]:{animationName:De.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${dt}-placement-topLeft,
&${se}-slide-up-appear${se}-slide-up-appear-active${dt}-placement-topLeft,
&${se}-slide-up-enter${se}-slide-up-enter-active${dt}-placement-top,
&${se}-slide-up-appear${se}-slide-up-appear-active${dt}-placement-top,
&${se}-slide-up-enter${se}-slide-up-enter-active${dt}-placement-topRight,
&${se}-slide-up-appear${se}-slide-up-appear-active${dt}-placement-topRight`]:{animationName:De.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${dt}-placement-bottomLeft,
&${se}-slide-down-leave${se}-slide-down-leave-active${dt}-placement-bottom,
&${se}-slide-down-leave${se}-slide-down-leave-active${dt}-placement-bottomRight`]:{animationName:De.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${dt}-placement-topLeft,
&${se}-slide-up-leave${se}-slide-up-leave-active${dt}-placement-top,
&${se}-slide-up-leave${se}-slide-up-leave-active${dt}-placement-topRight`]:{animationName:De.ly}})},(0,_e.ZP)(ht,{colorBg:$e,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${dt} ${Ae}`]:{position:"relative",margin:0},[`${Ae}-submenu-popup`]:{position:"absolute",zIndex:te,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${dt}, ${dt}-menu-submenu`]:{[Ae]:Object.assign(Object.assign({padding:be,listStyleType:"none",backgroundColor:$e,backgroundClip:"padding-box",borderRadius:ht.borderRadiusLG,outline:"none",boxShadow:ht.boxShadowSecondary},(0,ce.Qy)(ht)),{[`${Ae}-item-group-title`]:{padding:`${we}px ${qe}px`,color:ht.colorTextDescription,transition:`all ${me}`},[`${Ae}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ae}-item-icon`]:{minWidth:Me,marginInlineEnd:ht.marginXS,fontSize:ht.fontSizeSM},[`${Ae}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${me}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Ae}-item, ${Ae}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${we}px ${qe}px`,color:ht.colorText,fontWeight:"normal",fontSize:Me,lineHeight:ht.lineHeight,cursor:"pointer",transition:`all ${me}`,borderRadius:ht.borderRadiusSM,"&:hover, &-active":{backgroundColor:ht.controlItemBgHover}},(0,ce.Qy)(ht)),{"&-selected":{color:ht.colorPrimary,backgroundColor:ht.controlItemBgActive,"&:hover, &-active":{backgroundColor:ht.controlItemBgActiveHover}},"&-disabled":{color:Ie,cursor:"not-allowed","&:hover":{color:Ie,backgroundColor:$e,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ht.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:ht.colorSplit},[`${dt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:ht.paddingXS,[`${dt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:ht.colorTextDescription,fontSize:je,fontStyle:"normal"}}}),[`${Ae}-item-group-list`]:{margin:`0 ${ht.marginXS}px`,padding:0,listStyle:"none"},[`${Ae}-submenu-title`]:{paddingInlineEnd:qe+ht.fontSizeSM},[`${Ae}-submenu-vertical`]:{position:"relative"},[`${Ae}-submenu${Ae}-submenu-disabled ${dt}-menu-submenu-title`]:{[`&, ${dt}-menu-submenu-arrow-icon`]:{color:Ie,backgroundColor:$e,cursor:"not-allowed"}},[`${Ae}-submenu-selected ${dt}-menu-submenu-title`]:{color:ht.colorPrimary}})}},[(0,De.oN)(ht,"slide-up"),(0,De.oN)(ht,"slide-down"),(0,ze.Fm)(ht,"move-up"),(0,ze.Fm)(ht,"move-down"),(0,Ct._y)(ht,"zoom-big")]]};var Et=(0,Ke.Z)("Dropdown",(ht,dt)=>{let{rootPrefixCls:Ae}=dt;const{marginXXS:te,sizePopupArrow:ee,controlHeight:he,fontSize:se,lineHeight:de,paddingXXS:me,componentCls:we,borderRadiusLG:Me}=ht,be=(he-se*de)/2,{dropdownArrowOffset:Ie}=(0,_e.fS)({contentRadius:Me}),je=(0,Be.TS)(ht,{menuCls:`${we}-menu`,rootPrefixCls:Ae,dropdownArrowDistance:ee/2+te,dropdownArrowOffset:Ie,dropdownPaddingVertical:be,dropdownEdgeChildPadding:me});return[Ze(je),ct(je)]},ht=>({zIndexPopup:ht.zIndexPopupBase+50}))},64165:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return me}});var ce=ve(92310),De=ve.n(ce),ze=ve(59301),Ct=ve(36355),_e=ve(9763),Ke=ve(64993),Be=ve(88088),ct=()=>{const[,we]=(0,Be.Z)(),be=new Ke.C(we.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return ze.createElement("svg",{style:be,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},ze.createElement("g",{fill:"none",fillRule:"evenodd"},ze.createElement("g",{transform:"translate(24 31.67)"},ze.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),ze.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"}),ze.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)"}),ze.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"}),ze.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"})),ze.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"}),ze.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},ze.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),ze.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Et=()=>{const[,we]=(0,Be.Z)(),{colorFill:Me,colorFillTertiary:be,colorFillQuaternary:Ie,colorBgContainer:je}=we,{borderColor:qe,shadowColor:$e,contentColor:ft}=(0,ze.useMemo)(()=>({borderColor:new Ke.C(Me).onBackground(je).toHexShortString(),shadowColor:new Ke.C(be).onBackground(je).toHexShortString(),contentColor:new Ke.C(Ie).onBackground(je).toHexShortString()}),[Me,be,Ie,je]);return ze.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},ze.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},ze.createElement("ellipse",{fill:$e,cx:"32",cy:"33",rx:"32",ry:"7"}),ze.createElement("g",{fillRule:"nonzero",stroke:qe},ze.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"}),ze.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:ft}))))},ht=ve(83116),dt=ve(37613);const Ae=we=>{const{componentCls:Me,margin:be,marginXS:Ie,marginXL:je,fontSize:qe,lineHeight:$e}=we;return{[Me]:{marginInline:Ie,fontSize:qe,lineHeight:$e,textAlign:"center",[`${Me}-image`]:{height:we.emptyImgHeight,marginBottom:Ie,opacity:we.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Me}-description`]:{color:we.colorText},[`${Me}-footer`]:{marginTop:be},"&-normal":{marginBlock:je,color:we.colorTextDisabled,[`${Me}-description`]:{color:we.colorTextDisabled},[`${Me}-image`]:{height:we.emptyImgHeightMD}},"&-small":{marginBlock:Ie,color:we.colorTextDisabled,[`${Me}-image`]:{height:we.emptyImgHeightSM}}}}};var te=(0,ht.Z)("Empty",we=>{const{componentCls:Me,controlHeightLG:be}=we,Ie=(0,dt.TS)(we,{emptyImgCls:`${Me}-img`,emptyImgHeight:be*2.5,emptyImgHeightMD:be,emptyImgHeightSM:be*.875});return[Ae(Ie)]}),ee=function(we,Me){var be={};for(var Ie in we)Object.prototype.hasOwnProperty.call(we,Ie)&&Me.indexOf(Ie)<0&&(be[Ie]=we[Ie]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ie=Object.getOwnPropertySymbols(we);je<Ie.length;je++)Me.indexOf(Ie[je])<0&&Object.prototype.propertyIsEnumerable.call(we,Ie[je])&&(be[Ie[je]]=we[Ie[je]]);return be};const he=ze.createElement(ct,null),se=ze.createElement(Et,null),de=we=>{var{className:Me,rootClassName:be,prefixCls:Ie,image:je=he,description:qe,children:$e,imageStyle:ft,style:Re}=we,Tt=ee(we,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:et,direction:bt,empty:Bt}=ze.useContext(Ct.E_),Nt=et("empty",Ie),[Zt,Ut]=te(Nt),[lt]=(0,_e.Z)("Empty"),Ge=typeof qe!="undefined"?qe:lt==null?void 0:lt.description,kt=typeof Ge=="string"?Ge:"empty";let un=null;return typeof je=="string"?un=ze.createElement("img",{alt:kt,src:je}):un=je,Zt(ze.createElement("div",Object.assign({className:De()(Ut,Nt,Bt==null?void 0:Bt.className,{[`${Nt}-normal`]:je===se,[`${Nt}-rtl`]:bt==="rtl"},Me,be),style:Object.assign(Object.assign({},Bt==null?void 0:Bt.style),Re)},Tt),ze.createElement("div",{className:`${Nt}-image`,style:ft},un),Ge&&ze.createElement("div",{className:`${Nt}-description`},Ge),$e&&ze.createElement("div",{className:`${Nt}-footer`},$e)))};de.PRESENTED_IMAGE_DEFAULT=he,de.PRESENTED_IMAGE_SIMPLE=se;var me=de},78241:function(Sn,an,ve){"use strict";ve.d(an,{default:function(){return Dt}});var ce=ve(26407),De=ve(92310),ze=ve.n(De),Ct=ve(77900),_e=ve(59301),Ke=ve(62892),Be=ve(32441);function mt(Ve){const[Yt,tn]=_e.useState(Ve);return _e.useEffect(()=>{const vt=setTimeout(()=>{tn(Ve)},Ve.length?0:10);return()=>{clearTimeout(vt)}},[Ve]),Yt}var ct=ve(17313),Ze=ve(29878),Et=ve(8378),ht=ve(37613),dt=ve(83116),te=Ve=>{const{componentCls:Yt}=Ve,tn=`${Yt}-show-help`,vt=`${Yt}-show-help-item`;return{[tn]:{transition:`opacity ${Ve.motionDurationSlow} ${Ve.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[vt]:{overflow:"hidden",transition:`height ${Ve.motionDurationSlow} ${Ve.motionEaseInOut},
opacity ${Ve.motionDurationSlow} ${Ve.motionEaseInOut},
transform ${Ve.motionDurationSlow} ${Ve.motionEaseInOut} !important`,[`&${vt}-appear, &${vt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${vt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Ve=>({legend:{display:"block",width:"100%",marginBottom:Ve.marginLG,padding:0,color:Ve.colorTextDescription,fontSize:Ve.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Ve.lineWidth}px ${Ve.lineType} ${Ve.colorBorder}`},label:{fontSize:Ve.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 ${Ve.controlOutlineWidth}px ${Ve.controlOutline}`},output:{display:"block",paddingTop:15,color:Ve.colorText,fontSize:Ve.fontSize,lineHeight:Ve.lineHeight}}),he=(Ve,Yt)=>{const{formItemCls:tn}=Ve;return{[tn]:{[`${tn}-label > label`]:{height:Yt},[`${tn}-control-input`]:{minHeight:Yt}}}},se=Ve=>{const{componentCls:Yt}=Ve;return{[Ve.componentCls]:Object.assign(Object.assign(Object.assign({},(0,ct.Wf)(Ve)),ee(Ve)),{[`${Yt}-text`]:{display:"inline-block",paddingInlineEnd:Ve.paddingSM},"&-small":Object.assign({},he(Ve,Ve.controlHeightSM)),"&-large":Object.assign({},he(Ve,Ve.controlHeightLG))})}},de=Ve=>{const{formItemCls:Yt,iconCls:tn,componentCls:vt,rootPrefixCls:rt,labelRequiredMarkColor:Vt,labelColor:rn,labelFontSize:Pn,labelHeight:kn,labelColonMarginInlineStart:St,labelColonMarginInlineEnd:hn,itemMarginBottom:In}=Ve;return{[Yt]:Object.assign(Object.assign({},(0,ct.Wf)(Ve)),{marginBottom:In,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${rt}-row`]:{display:"none"},"&-has-warning":{[`${Yt}-split`]:{color:Ve.colorError}},"&-has-error":{[`${Yt}-split`]:{color:Ve.colorWarning}},[`${Yt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Ve.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:kn,color:rn,fontSize:Pn,[`> ${tn}`]:{fontSize:Ve.fontSize,verticalAlign:"top"},[`&${Yt}-required:not(${Yt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Ve.marginXXS,color:Vt,fontSize:Ve.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${vt}-hide-required-mark &`]:{display:"none"}},[`${Yt}-optional`]:{display:"inline-block",marginInlineStart:Ve.marginXXS,color:Ve.colorTextDescription,[`${vt}-hide-required-mark &`]:{display:"none"}},[`${Yt}-tooltip`]:{color:Ve.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ve.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:St,marginInlineEnd:hn},[`&${Yt}-no-colon::after`]:{content:'"\\a0"'}}},[`${Yt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${rt}-col-'"]):not([class*="' ${rt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ve.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Yt]:{"&-explain, &-extra":{clear:"both",color:Ve.colorTextDescription,fontSize:Ve.fontSize,lineHeight:Ve.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ve.controlHeightSM,transition:`color ${Ve.motionDurationMid} ${Ve.motionEaseOut}`},"&-explain":{"&-error":{color:Ve.colorError},"&-warning":{color:Ve.colorWarning}}},[`&-with-help ${Yt}-explain`]:{height:"auto",opacity:1},[`${Yt}-feedback-icon`]:{fontSize:Ve.fontSize,textAlign:"center",visibility:"visible",animationName:Ze.kr,animationDuration:Ve.motionDurationMid,animationTimingFunction:Ve.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ve.colorSuccess},"&-error":{color:Ve.colorError},"&-warning":{color:Ve.colorWarning},"&-validating":{color:Ve.colorPrimary}}})}},me=Ve=>{const{componentCls:Yt,formItemCls:tn}=Ve;return{[`${Yt}-horizontal`]:{[`${tn}-label`]:{flexGrow:0},[`${tn}-control`]:{flex:"1 1 0",minWidth:0},[`${tn}-label[class$='-24'], ${tn}-label[class*='-24 ']`]:{[`& + ${tn}-control`]:{minWidth:"unset"}}}}},we=Ve=>{const{componentCls:Yt,formItemCls:tn}=Ve;return{[`${Yt}-inline`]:{display:"flex",flexWrap:"wrap",[tn]:{flex:"none",marginInlineEnd:Ve.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${tn}-label,
> ${tn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${tn}-label`]:{flex:"none"},[`${Yt}-text`]:{display:"inline-block"},[`${tn}-has-feedback`]:{display:"inline-block"}}}}},Me=Ve=>({padding:Ve.verticalLabelPadding,margin:Ve.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),be=Ve=>{const{componentCls:Yt,formItemCls:tn,rootPrefixCls:vt}=Ve;return{[`${tn} ${tn}-label`]:Me(Ve),[Yt]:{[tn]:{flexWrap:"wrap",[`${tn}-label, ${tn}-control`]:{[`&:not([class*=" ${vt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Ie=Ve=>{const{componentCls:Yt,formItemCls:tn,rootPrefixCls:vt}=Ve;return{[`${Yt}-vertical`]:{[tn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${Yt}-item-control`]:{width:"100%"}}},[`${Yt}-vertical ${tn}-label,
.${vt}-col-24${tn}-label,
.${vt}-col-xl-24${tn}-label`]:Me(Ve),[`@media (max-width: ${Ve.screenXSMax}px)`]:[be(Ve),{[Yt]:{[`.${vt}-col-xs-24${tn}-label`]:Me(Ve)}}],[`@media (max-width: ${Ve.screenSMMax}px)`]:{[Yt]:{[`.${vt}-col-sm-24${tn}-label`]:Me(Ve)}},[`@media (max-width: ${Ve.screenMDMax}px)`]:{[Yt]:{[`.${vt}-col-md-24${tn}-label`]:Me(Ve)}},[`@media (max-width: ${Ve.screenLGMax}px)`]:{[Yt]:{[`.${vt}-col-lg-24${tn}-label`]:Me(Ve)}}}},je=(Ve,Yt)=>(0,ht.TS)(Ve,{formItemCls:`${Ve.componentCls}-item`,rootPrefixCls:Yt});var qe=(0,dt.Z)("Form",(Ve,Yt)=>{let{rootPrefixCls:tn}=Yt;const vt=je(Ve,tn);return[se(vt),de(vt),te(vt),me(vt),we(vt),Ie(vt),(0,Et.Z)(vt),Ze.kr]},Ve=>({labelRequiredMarkColor:Ve.colorError,labelColor:Ve.colorTextHeading,labelFontSize:Ve.fontSize,labelHeight:Ve.controlHeight,labelColonMarginInlineStart:Ve.marginXXS/2,labelColonMarginInlineEnd:Ve.marginXS,itemMarginBottom:Ve.marginLG,verticalLabelPadding:`0 0 ${Ve.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const $e=[];function ft(Ve,Yt,tn){let vt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ve=="string"?Ve:`${Yt}-${vt}`,error:Ve,errorStatus:tn}}var Tt=Ve=>{let{help:Yt,helpStatus:tn,errors:vt=$e,warnings:rt=$e,className:Vt,fieldId:rn,onVisibleChanged:Pn}=Ve;const{prefixCls:kn}=_e.useContext(Be.Rk),St=`${kn}-item-explain`,[,hn]=qe(kn),In=(0,_e.useMemo)(()=>(0,Ke.Z)(kn),[kn]),ii=mt(vt),Gt=mt(rt),Jt=_e.useMemo(()=>Yt!=null?[ft(Yt,"help",tn)]:[].concat((0,ce.Z)(ii.map((fi,ui)=>ft(fi,"error","error",ui))),(0,ce.Z)(Gt.map((fi,ui)=>ft(fi,"warning","warning",ui)))),[Yt,tn,ii,Gt]),hi={};return rn&&(hi.id=`${rn}_help`),_e.createElement(Ct.default,{motionDeadline:In.motionDeadline,motionName:`${kn}-show-help`,visible:!!Jt.length,onVisibleChanged:Pn},fi=>{const{className:ui,style:ni}=fi;return _e.createElement("div",Object.assign({},hi,{className:ze()(St,ui,Vt,hn),style:ni,role:"alert"}),_e.createElement(Ct.CSSMotionList,Object.assign({keys:Jt},(0,Ke.Z)(kn),{motionName:`${kn}-show-help-item`,component:!1}),ci=>{const{key:li,error:Ni,errorStatus:Qi,className:lr,style:wn}=ci;return _e.createElement("div",{key:li,className:ze()(lr,{[`${St}-${Qi}`]:Qi}),style:wn},Ni)}))})},et=ve(95013),bt=ve(36355),Bt=ve(1684),Nt=ve(52946),Zt=ve(19716),Ut=ve(16722);const lt=["parentNode"],Ge="form_item";function kt(Ve){return Ve===void 0||Ve===!1?[]:Array.isArray(Ve)?Ve:[Ve]}function un(Ve,Yt){if(!Ve.length)return;const tn=Ve.join("_");return Yt?`${Yt}_${tn}`:lt.includes(tn)?`${Ge}_${tn}`:tn}function ln(Ve,Yt,tn,vt,rt,Vt){let rn=vt;return Vt!==void 0?rn=Vt:tn.validating?rn="validating":Ve.length?rn="error":Yt.length?rn="warning":(tn.touched||rt&&tn.validated)&&(rn="success"),rn}function Ft(Ve){return kt(Ve).join("_")}function $t(Ve){const[Yt]=(0,et.useForm)(),tn=_e.useRef({}),vt=_e.useMemo(()=>Ve!=null?Ve:Object.assign(Object.assign({},Yt),{__INTERNAL__:{itemRef:rt=>Vt=>{const rn=Ft(rt);Vt?tn.current[rn]=Vt:delete tn.current[rn]}},scrollToField:function(rt){let Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const rn=kt(rt),Pn=un(rn,vt.__INTERNAL__.name),kn=Pn?document.getElementById(Pn):null;kn&&(0,Ut.Z)(kn,Object.assign({scrollMode:"if-needed",block:"nearest"},Vt))},getFieldInstance:rt=>{const Vt=Ft(rt);return tn.current[Vt]}}),[Ve,Yt]);return[vt]}var Qt=ve(28726),Bn=function(Ve,Yt){var tn={};for(var vt in Ve)Object.prototype.hasOwnProperty.call(Ve,vt)&&Yt.indexOf(vt)<0&&(tn[vt]=Ve[vt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,vt=Object.getOwnPropertySymbols(Ve);rt<vt.length;rt++)Yt.indexOf(vt[rt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,vt[rt])&&(tn[vt[rt]]=Ve[vt[rt]]);return tn};const on=(Ve,Yt)=>{const tn=_e.useContext(Bt.Z),{getPrefixCls:vt,direction:rt,form:Vt}=_e.useContext(bt.E_),{prefixCls:rn,className:Pn,rootClassName:kn,size:St,disabled:hn=tn,form:In,colon:ii,labelAlign:Gt,labelWrap:Jt,labelCol:hi,wrapperCol:fi,hideRequiredMark:ui,layout:ni="horizontal",scrollToFirstError:ci,requiredMark:li,onFinishFailed:Ni,name:Qi,style:lr,feedbackIcons:wn}=Ve,Pr=Bn(Ve,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Or=(0,Zt.Z)(St),ar=_e.useContext(Qt.Z),fn=(0,_e.useMemo)(()=>li!==void 0?li:Vt&&Vt.requiredMark!==void 0?Vt.requiredMark:!ui,[ui,li,Vt]),Rn=ii!=null?ii:Vt==null?void 0:Vt.colon,Ci=vt("form",rn),[_i,ki]=qe(Ci),Wi=ze()(Ci,`${Ci}-${ni}`,{[`${Ci}-hide-required-mark`]:fn===!1,[`${Ci}-rtl`]:rt==="rtl",[`${Ci}-${Or}`]:Or},ki,Vt==null?void 0:Vt.className,Pn,kn),[cr]=$t(In),{__INTERNAL__:qi}=cr;qi.name=Qi;const nr=(0,_e.useMemo)(()=>({name:Qi,labelAlign:Gt,labelCol:hi,labelWrap:Jt,wrapperCol:fi,vertical:ni==="vertical",colon:Rn,requiredMark:fn,itemRef:qi.itemRef,form:cr,feedbackIcons:wn}),[Qi,Gt,hi,fi,ni,Rn,fn,cr,wn]);_e.useImperativeHandle(Yt,()=>cr);const dr=(to,Ln)=>{if(to){let Hr={block:"nearest"};typeof to=="object"&&(Hr=to),cr.scrollToField(Ln,Hr)}},Mn=to=>{if(Ni==null||Ni(to),to.errorFields.length){const Ln=to.errorFields[0].name;if(ci!==void 0){dr(ci,Ln);return}Vt&&Vt.scrollToFirstError!==void 0&&dr(Vt.scrollToFirstError,Ln)}};return _i(_e.createElement(Bt.n,{disabled:hn},_e.createElement(Nt.q,{size:Or},_e.createElement(Be.RV,Object.assign({},{validateMessages:ar}),_e.createElement(Be.q3.Provider,{value:nr},_e.createElement(et.default,Object.assign({id:Qi},Pr,{name:Qi,onFinishFailed:Mn,form:cr,style:Object.assign(Object.assign({},Vt==null?void 0:Vt.style),lr),className:Wi})))))))};var gt=_e.forwardRef(on),En=ve(41799),Vn=ve(8654),He=ve(92343),Ce=ve(11592);function Pe(Ve){if(typeof Ve=="function")return Ve;const Yt=(0,Ce.Z)(Ve);return Yt.length<=1?Yt[0]:Yt}const Ne=()=>{const{status:Ve,errors:Yt=[],warnings:tn=[]}=(0,_e.useContext)(Be.aM);return{status:Ve,errors:Yt,warnings:tn}};Ne.Context=Be.aM;var ke=Ne,Se=ve(16089);function nt(Ve){const[Yt,tn]=_e.useState(Ve),vt=(0,_e.useRef)(null),rt=(0,_e.useRef)([]),Vt=(0,_e.useRef)(!1);_e.useEffect(()=>(Vt.current=!1,()=>{Vt.current=!0,Se.Z.cancel(vt.current),vt.current=null}),[]);function rn(Pn){Vt.current||(vt.current===null&&(rt.current=[],vt.current=(0,Se.Z)(()=>{vt.current=null,tn(kn=>{let St=kn;return rt.current.forEach(hn=>{St=hn(St)}),St})})),rt.current.push(Pn))}return[Yt,rn]}function Pt(){const{itemRef:Ve}=_e.useContext(Be.q3),Yt=_e.useRef({});function tn(vt,rt){const Vt=rt&&typeof rt=="object"&&rt.ref,rn=vt.join("_");return(Yt.current.name!==rn||Yt.current.originRef!==Vt)&&(Yt.current.name=rn,Yt.current.originRef=Vt,Yt.current.ref=(0,Vn.sQ)(Ve(vt),Vt)),Yt.current.ref}return tn}var Xe=ve(29194),Je=ve(34280),yt=ve(2738),wt=ve(27382),ot=ve(37028);const It=Ve=>{const{formItemCls:Yt}=Ve;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Yt}-control`]:{display:"flex"}}}};var sn=(0,dt.b)(["Form","item-item"],(Ve,Yt)=>{let{rootPrefixCls:tn}=Yt;const vt=je(Ve,tn);return[It(vt)]}),Ht=Ve=>{const{prefixCls:Yt,status:tn,wrapperCol:vt,children:rt,errors:Vt,warnings:rn,_internalItemRender:Pn,extra:kn,help:St,fieldId:hn,marginBottom:In,onErrorVisibleChanged:ii}=Ve,Gt=`${Yt}-item`,Jt=_e.useContext(Be.q3),hi=vt||Jt.wrapperCol||{},fi=ze()(`${Gt}-control`,hi.className),ui=_e.useMemo(()=>Object.assign({},Jt),[Jt]);delete ui.labelCol,delete ui.wrapperCol;const ni=_e.createElement("div",{className:`${Gt}-control-input`},_e.createElement("div",{className:`${Gt}-control-input-content`},rt)),ci=_e.useMemo(()=>({prefixCls:Yt,status:tn}),[Yt,tn]),li=In!==null||Vt.length||rn.length?_e.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},_e.createElement(Be.Rk.Provider,{value:ci},_e.createElement(Tt,{fieldId:hn,errors:Vt,warnings:rn,help:St,helpStatus:tn,className:`${Gt}-explain-connected`,onVisibleChanged:ii})),!!In&&_e.createElement("div",{style:{width:0,height:In}})):null,Ni={};hn&&(Ni.id=`${hn}_extra`);const Qi=kn?_e.createElement("div",Object.assign({},Ni,{className:`${Gt}-extra`}),kn):null,lr=Pn&&Pn.mark==="pro_table_render"&&Pn.render?Pn.render(Ve,{input:ni,errorList:li,extra:Qi}):_e.createElement(_e.Fragment,null,ni,li,Qi);return _e.createElement(Be.q3.Provider,{value:ui},_e.createElement(ot.Z,Object.assign({},hi,{className:fi}),lr),_e.createElement(sn,{prefixCls:Yt}))},xn=ve(61485),Dn=ve(31724),cn=ve(9763),Un=ve(6848),ti=function(Ve,Yt){var tn={};for(var vt in Ve)Object.prototype.hasOwnProperty.call(Ve,vt)&&Yt.indexOf(vt)<0&&(tn[vt]=Ve[vt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,vt=Object.getOwnPropertySymbols(Ve);rt<vt.length;rt++)Yt.indexOf(vt[rt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,vt[rt])&&(tn[vt[rt]]=Ve[vt[rt]]);return tn};function Wn(Ve){return Ve?typeof Ve=="object"&&!_e.isValidElement(Ve)?Ve:{title:Ve}:null}var Jn=Ve=>{let{prefixCls:Yt,label:tn,htmlFor:vt,labelCol:rt,labelAlign:Vt,colon:rn,required:Pn,requiredMark:kn,tooltip:St}=Ve;var hn;const[In]=(0,cn.Z)("Form"),{vertical:ii,labelAlign:Gt,labelCol:Jt,labelWrap:hi,colon:fi}=_e.useContext(Be.q3);if(!tn)return null;const ui=rt||Jt||{},ni=Vt||Gt,ci=`${Yt}-item-label`,li=ze()(ci,ni==="left"&&`${ci}-left`,ui.className,{[`${ci}-wrap`]:!!hi});let Ni=tn;const Qi=rn===!0||fi!==!1&&rn!==!1;Qi&&!ii&&typeof tn=="string"&&tn.trim()!==""&&(Ni=tn.replace(/[:|]\s*$/,""));const wn=Wn(St);if(wn){const{icon:fn=_e.createElement(xn.Z,null)}=wn,Rn=ti(wn,["icon"]),Ci=_e.createElement(Un.Z,Object.assign({},Rn),_e.cloneElement(fn,{className:`${Yt}-item-tooltip`,title:""}));Ni=_e.createElement(_e.Fragment,null,Ni,Ci)}const Pr=kn==="optional",Or=typeof kn=="function";Or?Ni=kn(Ni,{required:!!Pn}):Pr&&!Pn&&(Ni=_e.createElement(_e.Fragment,null,Ni,_e.createElement("span",{className:`${Yt}-item-optional`,title:""},(In==null?void 0:In.optional)||((hn=Dn.Z.Form)===null||hn===void 0?void 0:hn.optional))));const ar=ze()({[`${Yt}-item-required`]:Pn,[`${Yt}-item-required-mark-optional`]:Pr||Or,[`${Yt}-item-no-colon`]:!Qi});return _e.createElement(ot.Z,Object.assign({},ui,{className:li}),_e.createElement("label",{htmlFor:vt,className:ar,title:typeof tn=="string"?tn:""},Ni))},vi=ve(29679),pi=ve(19248),zi=ve(96512),$i=ve(58617);const Yn={success:vi.Z,warning:zi.Z,error:pi.Z,validating:$i.Z};function Gn(Ve){let{children:Yt,errors:tn,warnings:vt,hasFeedback:rt,validateStatus:Vt,prefixCls:rn,meta:Pn,noStyle:kn}=Ve;const St=`${rn}-item`,{feedbackIcons:hn}=_e.useContext(Be.q3),In=ln(tn,vt,Pn,null,!!rt,Vt),{isFormItemInput:ii,status:Gt}=_e.useContext(Be.aM),Jt=_e.useMemo(()=>{var hi;let fi;if(rt){const ci=rt!==!0&&rt.icons||hn,li=In&&((hi=ci==null?void 0:ci({status:In,errors:tn,warnings:vt}))===null||hi===void 0?void 0:hi[In]),Ni=In&&Yn[In];fi=li!==!1&&Ni?_e.createElement("span",{className:ze()(`${St}-feedback-icon`,`${St}-feedback-icon-${In}`)},li||_e.createElement(Ni,null)):null}let ui=!0,ni=In||"";return kn&&(ui=ii,ni=(In!=null?In:Gt)||""),{status:ni,errors:tn,warnings:vt,hasFeedback:!!rt,feedbackIcon:fi,isFormItemInput:ui}},[In,rt,kn,ii,Gt]);return _e.createElement(Be.aM.Provider,{value:Jt},Yt)}var oi=function(Ve,Yt){var tn={};for(var vt in Ve)Object.prototype.hasOwnProperty.call(Ve,vt)&&Yt.indexOf(vt)<0&&(tn[vt]=Ve[vt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,vt=Object.getOwnPropertySymbols(Ve);rt<vt.length;rt++)Yt.indexOf(vt[rt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,vt[rt])&&(tn[vt[rt]]=Ve[vt[rt]]);return tn};function Li(Ve){const{prefixCls:Yt,className:tn,rootClassName:vt,style:rt,help:Vt,errors:rn,warnings:Pn,validateStatus:kn,meta:St,hasFeedback:hn,hidden:In,children:ii,fieldId:Gt,required:Jt,isRequired:hi,onSubItemMetaChange:fi}=Ve,ui=oi(Ve,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),ni=`${Yt}-item`,{requiredMark:ci}=_e.useContext(Be.q3),li=_e.useRef(null),Ni=mt(rn),Qi=mt(Pn),lr=Vt!=null,wn=!!(lr||rn.length||Pn.length),Pr=!!li.current&&(0,Xe.Z)(li.current),[Or,ar]=_e.useState(null);(0,Je.Z)(()=>{if(wn&&li.current){const ki=getComputedStyle(li.current);ar(parseInt(ki.marginBottom,10))}},[wn,Pr]);const fn=ki=>{ki||ar(null)},Ci=function(){let ki=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Wi=ki?Ni:St.errors,cr=ki?Qi:St.warnings;return ln(Wi,cr,St,"",!!hn,kn)}(),_i=ze()(ni,tn,vt,{[`${ni}-with-help`]:lr||Ni.length||Qi.length,[`${ni}-has-feedback`]:Ci&&hn,[`${ni}-has-success`]:Ci==="success",[`${ni}-has-warning`]:Ci==="warning",[`${ni}-has-error`]:Ci==="error",[`${ni}-is-validating`]:Ci==="validating",[`${ni}-hidden`]:In});return _e.createElement("div",{className:_i,style:rt,ref:li},_e.createElement(wt.Z,Object.assign({className:`${ni}-row`},(0,yt.Z)(ui,["_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"])),_e.createElement(Jn,Object.assign({htmlFor:Gt},Ve,{requiredMark:ci,required:Jt!=null?Jt:hi,prefixCls:Yt})),_e.createElement(Ht,Object.assign({},Ve,St,{errors:Ni,warnings:Qi,prefixCls:Yt,status:Ci,help:Vt,marginBottom:Or,onErrorVisibleChanged:fn}),_e.createElement(Be.qI.Provider,{value:fi},_e.createElement(Gn,{prefixCls:Yt,meta:St,errors:St.errors,warnings:St.warnings,hasFeedback:hn,validateStatus:Ci},ii)))),!!Or&&_e.createElement("div",{className:`${ni}-margin-offset`,style:{marginBottom:-Or}}))}const di="__SPLIT__",gr=null,Ii=_e.memo(Ve=>{let{children:Yt}=Ve;return Yt},(Ve,Yt)=>Ve.value===Yt.value&&Ve.update===Yt.update&&Ve.childProps.length===Yt.childProps.length&&Ve.childProps.every((tn,vt)=>tn===Yt.childProps[vt]));function Le(Ve){return Ve!=null}function si(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function ji(Ve){const{name:Yt,noStyle:tn,className:vt,dependencies:rt,prefixCls:Vt,shouldUpdate:rn,rules:Pn,children:kn,required:St,label:hn,messageVariables:In,trigger:ii="onChange",validateTrigger:Gt,hidden:Jt,help:hi}=Ve,{getPrefixCls:fi}=_e.useContext(bt.E_),{name:ui}=_e.useContext(Be.q3),ni=Pe(kn),ci=typeof ni=="function",li=_e.useContext(Be.qI),{validateTrigger:Ni}=_e.useContext(et.FieldContext),Qi=Gt!==void 0?Gt:Ni,lr=Le(Yt),wn=fi("form",Vt),[Pr,Or]=qe(wn),ar=_e.useContext(et.ListContext),fn=_e.useRef(),[Rn,Ci]=nt({}),[_i,ki]=(0,En.Z)(()=>si()),Wi=Ln=>{const Hr=ar==null?void 0:ar.getKey(Ln.name);if(ki(Ln.destroy?si():Ln,!0),tn&&hi!==!1&&li){let so=Ln.name;if(Ln.destroy)so=fn.current||so;else if(Hr!==void 0){const[Bi,Mo]=Hr;so=[Bi].concat((0,ce.Z)(Mo)),fn.current=so}li(Ln,so)}},cr=(Ln,Hr)=>{Ci(so=>{const Bi=Object.assign({},so),oo=[].concat((0,ce.Z)(Ln.name.slice(0,-1)),(0,ce.Z)(Hr)).join(di);return Ln.destroy?delete Bi[oo]:Bi[oo]=Ln,Bi})},[qi,nr]=_e.useMemo(()=>{const Ln=(0,ce.Z)(_i.errors),Hr=(0,ce.Z)(_i.warnings);return Object.values(Rn).forEach(so=>{Ln.push.apply(Ln,(0,ce.Z)(so.errors||[])),Hr.push.apply(Hr,(0,ce.Z)(so.warnings||[]))}),[Ln,Hr]},[Rn,_i.errors,_i.warnings]),dr=Pt();function Mn(Ln,Hr,so){return tn&&!Jt?_e.createElement(Gn,{prefixCls:wn,hasFeedback:Ve.hasFeedback,validateStatus:Ve.validateStatus,meta:_i,errors:qi,warnings:nr,noStyle:!0},Ln):_e.createElement(Li,Object.assign({key:"row"},Ve,{className:ze()(vt,Or),prefixCls:wn,fieldId:Hr,isRequired:so,errors:qi,warnings:nr,meta:_i,onSubItemMetaChange:cr}),Ln)}if(!lr&&!ci&&!rt)return Pr(Mn(ni));let to={};return typeof hn=="string"?to.label=hn:Yt&&(to.label=String(Yt)),In&&(to=Object.assign(Object.assign({},to),In)),Pr(_e.createElement(et.Field,Object.assign({},Ve,{messageVariables:to,trigger:ii,validateTrigger:Qi,onMetaChange:Wi}),(Ln,Hr,so)=>{const Bi=kt(Yt).length&&Hr?Hr.name:[],Mo=un(Bi,ui),oo=St!==void 0?St:!!(Pn&&Pn.some(Wr=>{if(Wr&&typeof Wr=="object"&&Wr.required&&!Wr.warningOnly)return!0;if(typeof Wr=="function"){const no=Wr(so);return no&&no.required&&!no.warningOnly}return!1})),Ui=Object.assign({},Ln);let er=null;if(Array.isArray(ni)&&lr)er=ni;else if(!(ci&&(!(rn||rt)||lr))){if(!(rt&&!ci&&!lr))if((0,He.l$)(ni)){const Wr=Object.assign(Object.assign({},ni.props),Ui);if(Wr.id||(Wr.id=Mo),hi||qi.length>0||nr.length>0||Ve.extra){const tt=[];(hi||qi.length>0)&&tt.push(`${Mo}_help`),Ve.extra&&tt.push(`${Mo}_extra`),Wr["aria-describedby"]=tt.join(" ")}qi.length>0&&(Wr["aria-invalid"]="true"),oo&&(Wr["aria-required"]="true"),(0,Vn.Yr)(ni)&&(Wr.ref=dr(Bi,ni)),new Set([].concat((0,ce.Z)(kt(ii)),(0,ce.Z)(kt(Qi)))).forEach(tt=>{Wr[tt]=function(){for(var lo,_o,ga,Oa,Xo,Fa=arguments.length,Gr=new Array(Fa),Br=0;Br<Fa;Br++)Gr[Br]=arguments[Br];(ga=Ui[tt])===null||ga===void 0||(lo=ga).call.apply(lo,[Ui].concat(Gr)),(Xo=(Oa=ni.props)[tt])===null||Xo===void 0||(_o=Xo).call.apply(_o,[Oa].concat(Gr))}});const xi=[Wr["aria-required"],Wr["aria-invalid"],Wr["aria-describedby"]];er=_e.createElement(Ii,{value:Ui[Ve.valuePropName||"value"],update:ni,childProps:xi},(0,He.Tm)(ni,Wr))}else ci&&(rn||rt)&&!lr?er=ni(so):er=ni}return Mn(er,Mo,oo)}))}const gn=ji;gn.useStatus=ke;var qn=gn,mi=function(Ve,Yt){var tn={};for(var vt in Ve)Object.prototype.hasOwnProperty.call(Ve,vt)&&Yt.indexOf(vt)<0&&(tn[vt]=Ve[vt]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rt=0,vt=Object.getOwnPropertySymbols(Ve);rt<vt.length;rt++)Yt.indexOf(vt[rt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,vt[rt])&&(tn[vt[rt]]=Ve[vt[rt]]);return tn},jn=Ve=>{var{prefixCls:Yt,children:tn}=Ve,vt=mi(Ve,["prefixCls","children"]);const{getPrefixCls:rt}=_e.useContext(bt.E_),Vt=rt("form",Yt),rn=_e.useMemo(()=>({prefixCls:Vt,status:"error"}),[Vt]);return _e.createElement(et.List,Object.assign({},vt),(Pn,kn,St)=>_e.createElement(Be.Rk.Provider,{value:rn},tn(Pn.map(hn=>Object.assign(Object.assign({},hn),{fieldKey:hn.key})),kn,{errors:St.errors,warnings:St.warnings})))};function Tn(){const{form:Ve}=(0,_e.useContext)(Be.q3);return Ve}const At=gt;At.Item=qn,At.List=jn,At.ErrorList=Tt,At.useForm=$t,At.useFormInstance=Tn,At.useWatch=et.useWatch,At.Provider=Be.RV,At.create=()=>{};var Dt=At},8628:function(Sn,an,ve){"use strict";var ce=ve(59301),De=ve(34280),ze=ve(56762),Ct=ve(69507);function _e(){let Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Be=(0,ce.useRef)({}),mt=(0,ze.Z)(),ct=(0,Ct.ZP)();return(0,De.Z)(()=>{const Ze=ct.subscribe(Et=>{Be.current=Et,Ke&&mt()});return()=>ct.unsubscribe(Ze)},[]),Be.current}an.Z=_e},9432:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return de},n:function(){return he}});var ce=ve(19248),De=ve(92310),ze=ve.n(De),Ct=ve(93681),_e=ve(8654),Ke=ve(59301),Be=ve(19080),mt=ve(36355),ct=ve(1684),Ze=ve(19716),Et=ve(32441),ht=ve(33234),dt=ve(59412),Ae=ve(9937);function te(me){return!!(me.prefix||me.suffix||me.allowClear)}var ee=function(me,we){var Me={};for(var be in me)Object.prototype.hasOwnProperty.call(me,be)&&we.indexOf(be)<0&&(Me[be]=me[be]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,be=Object.getOwnPropertySymbols(me);Ie<be.length;Ie++)we.indexOf(be[Ie])<0&&Object.prototype.propertyIsEnumerable.call(me,be[Ie])&&(Me[be[Ie]]=me[be[Ie]]);return Me};function he(me,we){if(!me)return;me.focus(we);const{cursor:Me}=we||{};if(Me){const be=me.value.length;switch(Me){case"start":me.setSelectionRange(0,0);break;case"end":me.setSelectionRange(be,be);break;default:me.setSelectionRange(0,be);break}}}var de=(0,Ke.forwardRef)((me,we)=>{var Me;const{prefixCls:be,bordered:Ie=!0,status:je,size:qe,disabled:$e,onBlur:ft,onFocus:Re,suffix:Tt,allowClear:et,addonAfter:bt,addonBefore:Bt,className:Nt,style:Zt,styles:Ut,rootClassName:lt,onChange:Ge,classNames:kt}=me,un=ee(me,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:ln,direction:Ft,input:$t}=Ke.useContext(mt.E_),Qt=ln("input",be),Bn=(0,Ke.useRef)(null),[on,Cn]=(0,Ae.ZP)(Qt),{compactSize:gt,compactItemClassnames:En}=(0,ht.ri)(Qt,Ft),Vn=(0,Ze.Z)(sn=>{var Xt;return(Xt=qe!=null?qe:gt)!==null&&Xt!==void 0?Xt:sn}),He=Ke.useContext(ct.Z),Ce=$e!=null?$e:He,{status:Pe,hasFeedback:Ne,feedbackIcon:ke}=(0,Ke.useContext)(Et.aM),Se=(0,Be.F)(Pe,je),nt=te(me)||!!Ne,Pt=(0,Ke.useRef)(nt);(0,Ke.useEffect)(()=>{var sn;nt&&Pt.current,Pt.current=nt},[nt]);const Xe=(0,dt.Z)(Bn,!0),Je=sn=>{Xe(),ft==null||ft(sn)},yt=sn=>{Xe(),Re==null||Re(sn)},wt=sn=>{Xe(),Ge==null||Ge(sn)},ot=(Ne||Tt)&&Ke.createElement(Ke.Fragment,null,Tt,Ne&&ke);let It;return typeof et=="object"&&(et!=null&&et.clearIcon)?It=et:et&&(It={clearIcon:Ke.createElement(ce.Z,null)}),on(Ke.createElement(Ct.default,Object.assign({ref:(0,_e.sQ)(we,Bn),prefixCls:Qt,autoComplete:$t==null?void 0:$t.autoComplete},un,{disabled:Ce,onBlur:Je,onFocus:yt,style:Object.assign(Object.assign({},$t==null?void 0:$t.style),Zt),styles:Object.assign(Object.assign({},$t==null?void 0:$t.styles),Ut),suffix:ot,allowClear:It,className:ze()(Nt,lt,En,$t==null?void 0:$t.className),onChange:wt,addonAfter:bt&&Ke.createElement(ht.BR,null,Ke.createElement(Et.Ux,{override:!0,status:!0},bt)),addonBefore:Bt&&Ke.createElement(ht.BR,null,Ke.createElement(Et.Ux,{override:!0,status:!0},Bt)),classNames:Object.assign(Object.assign(Object.assign({},kt),$t==null?void 0:$t.classNames),{input:ze()({[`${Qt}-sm`]:Vn==="small",[`${Qt}-lg`]:Vn==="large",[`${Qt}-rtl`]:Ft==="rtl",[`${Qt}-borderless`]:!Ie},!nt&&(0,Be.Z)(Qt,Se),kt==null?void 0:kt.input,(Me=$t==null?void 0:$t.classNames)===null||Me===void 0?void 0:Me.input,Cn)}),classes:{affixWrapper:ze()({[`${Qt}-affix-wrapper-sm`]:Vn==="small",[`${Qt}-affix-wrapper-lg`]:Vn==="large",[`${Qt}-affix-wrapper-rtl`]:Ft==="rtl",[`${Qt}-affix-wrapper-borderless`]:!Ie},(0,Be.Z)(`${Qt}-affix-wrapper`,Se,Ne),Cn),wrapper:ze()({[`${Qt}-group-rtl`]:Ft==="rtl"},Cn),group:ze()({[`${Qt}-group-wrapper-sm`]:Vn==="small",[`${Qt}-group-wrapper-lg`]:Vn==="large",[`${Qt}-group-wrapper-rtl`]:Ft==="rtl",[`${Qt}-group-wrapper-disabled`]:Ce},(0,Be.Z)(`${Qt}-group-wrapper`,Se,Ne),Cn)}})))})},1643:function(Sn,an,ve){"use strict";var ce=ve(19248),De=ve(92310),ze=ve.n(De),Ct=ve(9296),_e=ve(59301),Ke=ve(19080),Be=ve(36355),mt=ve(1684),ct=ve(19716),Ze=ve(32441),Et=ve(9432),ht=ve(9937),dt=function(te,ee){var he={};for(var se in te)Object.prototype.hasOwnProperty.call(te,se)&&ee.indexOf(se)<0&&(he[se]=te[se]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,se=Object.getOwnPropertySymbols(te);de<se.length;de++)ee.indexOf(se[de])<0&&Object.prototype.propertyIsEnumerable.call(te,se[de])&&(he[se[de]]=te[se[de]]);return he};const Ae=(0,_e.forwardRef)((te,ee)=>{const{prefixCls:he,bordered:se=!0,size:de,disabled:me,status:we,allowClear:Me,showCount:be,classNames:Ie,rootClassName:je,className:qe}=te,$e=dt(te,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:ft,direction:Re}=_e.useContext(Be.E_),Tt=(0,ct.Z)(de),et=_e.useContext(mt.Z),bt=me!=null?me:et,{status:Bt,hasFeedback:Nt,feedbackIcon:Zt}=_e.useContext(Ze.aM),Ut=(0,Ke.F)(Bt,we),lt=_e.useRef(null);_e.useImperativeHandle(ee,()=>{var Ft;return{resizableTextArea:(Ft=lt.current)===null||Ft===void 0?void 0:Ft.resizableTextArea,focus:$t=>{var Qt,Bn;(0,Et.n)((Bn=(Qt=lt.current)===null||Qt===void 0?void 0:Qt.resizableTextArea)===null||Bn===void 0?void 0:Bn.textArea,$t)},blur:()=>{var $t;return($t=lt.current)===null||$t===void 0?void 0:$t.blur()}}});const Ge=ft("input",he);let kt;typeof Me=="object"&&(Me!=null&&Me.clearIcon)?kt=Me:Me&&(kt={clearIcon:_e.createElement(ce.Z,null)});const[un,ln]=(0,ht.ZP)(Ge);return un(_e.createElement(Ct.default,Object.assign({},$e,{disabled:bt,allowClear:kt,className:ze()(qe,je),classes:{affixWrapper:ze()(`${Ge}-textarea-affix-wrapper`,{[`${Ge}-affix-wrapper-rtl`]:Re==="rtl",[`${Ge}-affix-wrapper-borderless`]:!se,[`${Ge}-affix-wrapper-sm`]:Tt==="small",[`${Ge}-affix-wrapper-lg`]:Tt==="large",[`${Ge}-textarea-show-count`]:be},(0,Ke.Z)(`${Ge}-affix-wrapper`,Ut),ln)},classNames:Object.assign(Object.assign({},Ie),{textarea:ze()({[`${Ge}-borderless`]:!se,[`${Ge}-sm`]:Tt==="small",[`${Ge}-lg`]:Tt==="large"},(0,Ke.Z)(Ge,Ut),ln,Ie==null?void 0:Ie.textarea)}),prefixCls:Ge,suffix:Nt&&_e.createElement("span",{className:`${Ge}-textarea-suffix`},Zt),showCount:be,ref:lt})))});an.Z=Ae},59412:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return De}});var ce=ve(59301);function De(ze,Ct){const _e=(0,ce.useRef)([]),Ke=()=>{_e.current.push(setTimeout(()=>{var Be,mt,ct,Ze;!((Be=ze.current)===null||Be===void 0)&&Be.input&&((mt=ze.current)===null||mt===void 0?void 0:mt.input.getAttribute("type"))==="password"&&(!((ct=ze.current)===null||ct===void 0)&&ct.input.hasAttribute("value"))&&((Ze=ze.current)===null||Ze===void 0||Ze.input.removeAttribute("value"))}))};return(0,ce.useEffect)(()=>(Ct&&Ke(),()=>_e.current.forEach(Be=>{Be&&clearTimeout(Be)})),[]),Ke}},92832:function(Sn,an,ve){"use strict";ve.d(an,{default:function(){return Tt}});var ce=ve(92310),De=ve.n(ce),ze=ve(59301),Ct=ve(36355),_e=ve(32441),Ke=ve(9937),mt=et=>{const{getPrefixCls:bt,direction:Bt}=(0,ze.useContext)(Ct.E_),{prefixCls:Nt,className:Zt}=et,Ut=bt("input-group",Nt),lt=bt("input"),[Ge,kt]=(0,Ke.ZP)(lt),un=De()(Ut,{[`${Ut}-lg`]:et.size==="large",[`${Ut}-sm`]:et.size==="small",[`${Ut}-compact`]:et.compact,[`${Ut}-rtl`]:Bt==="rtl"},kt,Zt),ln=(0,ze.useContext)(_e.aM),Ft=(0,ze.useMemo)(()=>Object.assign(Object.assign({},ln),{isFormItemInput:!1}),[ln]);return Ge(ze.createElement("span",{className:un,style:et.style,onMouseEnter:et.onMouseEnter,onMouseLeave:et.onMouseLeave,onFocus:et.onFocus,onBlur:et.onBlur},ze.createElement(_e.aM.Provider,{value:Ft},et.children)))},ct=ve(9432),Ze=ve(73331),Et=ve(15277),ht=ve(2738),dt=ve(8654),Ae=ve(59412),te=function(et,bt){var Bt={};for(var Nt in et)Object.prototype.hasOwnProperty.call(et,Nt)&&bt.indexOf(Nt)<0&&(Bt[Nt]=et[Nt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,Nt=Object.getOwnPropertySymbols(et);Zt<Nt.length;Zt++)bt.indexOf(Nt[Zt])<0&&Object.prototype.propertyIsEnumerable.call(et,Nt[Zt])&&(Bt[Nt[Zt]]=et[Nt[Zt]]);return Bt};const ee=et=>et?ze.createElement(Et.Z,null):ze.createElement(Ze.Z,null),he={click:"onClick",hover:"onMouseOver"};var de=ze.forwardRef((et,bt)=>{const{visibilityToggle:Bt=!0}=et,Nt=typeof Bt=="object"&&Bt.visible!==void 0,[Zt,Ut]=(0,ze.useState)(()=>Nt?Bt.visible:!1),lt=(0,ze.useRef)(null);ze.useEffect(()=>{Nt&&Ut(Bt.visible)},[Nt,Bt]);const Ge=(0,Ae.Z)(lt),kt=()=>{const{disabled:Ce}=et;Ce||(Zt&&Ge(),Ut(Pe=>{var Ne;const ke=!Pe;return typeof Bt=="object"&&((Ne=Bt.onVisibleChange)===null||Ne===void 0||Ne.call(Bt,ke)),ke}))},un=Ce=>{const{action:Pe="click",iconRender:Ne=ee}=et,ke=he[Pe]||"",Se=Ne(Zt),nt={[ke]:kt,className:`${Ce}-icon`,key:"passwordIcon",onMouseDown:Pt=>{Pt.preventDefault()},onMouseUp:Pt=>{Pt.preventDefault()}};return ze.cloneElement(ze.isValidElement(Se)?Se:ze.createElement("span",null,Se),nt)},{className:ln,prefixCls:Ft,inputPrefixCls:$t,size:Qt}=et,Bn=te(et,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:on}=ze.useContext(Ct.E_),Cn=on("input",$t),gt=on("input-password",Ft),En=Bt&&un(gt),Vn=De()(gt,ln,{[`${gt}-${Qt}`]:!!Qt}),He=Object.assign(Object.assign({},(0,ht.Z)(Bn,["suffix","iconRender","visibilityToggle"])),{type:Zt?"text":"password",className:Vn,prefixCls:Cn,suffix:En});return Qt&&(He.size=Qt),ze.createElement(ct.Z,Object.assign({ref:(0,dt.sQ)(bt,lt)},He))}),me=ve(47472),we=ve(92343),Me=ve(3113),be=ve(19716),Ie=ve(33234),je=function(et,bt){var Bt={};for(var Nt in et)Object.prototype.hasOwnProperty.call(et,Nt)&&bt.indexOf(Nt)<0&&(Bt[Nt]=et[Nt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,Nt=Object.getOwnPropertySymbols(et);Zt<Nt.length;Zt++)bt.indexOf(Nt[Zt])<0&&Object.prototype.propertyIsEnumerable.call(et,Nt[Zt])&&(Bt[Nt[Zt]]=et[Nt[Zt]]);return Bt},$e=ze.forwardRef((et,bt)=>{const{prefixCls:Bt,inputPrefixCls:Nt,className:Zt,size:Ut,suffix:lt,enterButton:Ge=!1,addonAfter:kt,loading:un,disabled:ln,onSearch:Ft,onChange:$t,onCompositionStart:Qt,onCompositionEnd:Bn}=et,on=je(et,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Cn,direction:gt}=ze.useContext(Ct.E_),En=ze.useRef(!1),Vn=Cn("input-search",Bt),He=Cn("input",Nt),{compactSize:Ce}=(0,Ie.ri)(Vn,gt),Pe=(0,be.Z)(Ht=>{var xn;return(xn=Ut!=null?Ut:Ce)!==null&&xn!==void 0?xn:Ht}),Ne=ze.useRef(null),ke=Ht=>{Ht&&Ht.target&&Ht.type==="click"&&Ft&&Ft(Ht.target.value,Ht,{source:"clear"}),$t&&$t(Ht)},Se=Ht=>{var xn;document.activeElement===((xn=Ne.current)===null||xn===void 0?void 0:xn.input)&&Ht.preventDefault()},nt=Ht=>{var xn,Dn;Ft&&Ft((Dn=(xn=Ne.current)===null||xn===void 0?void 0:xn.input)===null||Dn===void 0?void 0:Dn.value,Ht,{source:"input"})},Pt=Ht=>{En.current||un||nt(Ht)},Xe=typeof Ge=="boolean"?ze.createElement(me.Z,null):null,Je=`${Vn}-button`;let yt;const wt=Ge||{},ot=wt.type&&wt.type.__ANT_BUTTON===!0;ot||wt.type==="button"?yt=(0,we.Tm)(wt,Object.assign({onMouseDown:Se,onClick:Ht=>{var xn,Dn;(Dn=(xn=wt==null?void 0:wt.props)===null||xn===void 0?void 0:xn.onClick)===null||Dn===void 0||Dn.call(xn,Ht),nt(Ht)},key:"enterButton"},ot?{className:Je,size:Pe}:{})):yt=ze.createElement(Me.ZP,{className:Je,type:Ge?"primary":void 0,size:Pe,disabled:ln,key:"enterButton",onMouseDown:Se,onClick:nt,loading:un,icon:Xe},Ge),kt&&(yt=[yt,(0,we.Tm)(kt,{key:"addonAfter"})]);const It=De()(Vn,{[`${Vn}-rtl`]:gt==="rtl",[`${Vn}-${Pe}`]:!!Pe,[`${Vn}-with-button`]:!!Ge},Zt),sn=Ht=>{En.current=!0,Qt==null||Qt(Ht)},Xt=Ht=>{En.current=!1,Bn==null||Bn(Ht)};return ze.createElement(ct.Z,Object.assign({ref:(0,dt.sQ)(Ne,bt),onPressEnter:Pt},on,{size:Pe,onCompositionStart:sn,onCompositionEnd:Xt,prefixCls:He,addonAfter:yt,suffix:lt,onChange:ke,className:It,disabled:ln}))}),ft=ve(1643);const Re=ct.Z;Re.Group=mt,Re.Search=$e,Re.TextArea=ft.Z,Re.Password=de;var Tt=Re},45818:function(Sn,an,ve){"use strict";ve.d(an,{D:function(){return me},Z:function(){return be}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(je,qe){return De.createElement(_e.Z,(0,ce.Z)({},je,{ref:qe,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be,ct=ve(33853),Ze=ve(38819),Et=ve(92310),ht=ve.n(Et),dt=ve(2738),te=Ie=>!isNaN(parseFloat(Ie))&&isFinite(Ie),ee=ve(36355),he=ve(84966),se=function(Ie,je){var qe={};for(var $e in Ie)Object.prototype.hasOwnProperty.call(Ie,$e)&&je.indexOf($e)<0&&(qe[$e]=Ie[$e]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,$e=Object.getOwnPropertySymbols(Ie);ft<$e.length;ft++)je.indexOf($e[ft])<0&&Object.prototype.propertyIsEnumerable.call(Ie,$e[ft])&&(qe[$e[ft]]=Ie[$e[ft]]);return qe};const de={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},me=De.createContext({}),we=(()=>{let Ie=0;return function(){let je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ie+=1,`${je}${Ie}`}})();var be=De.forwardRef((Ie,je)=>{const{prefixCls:qe,className:$e,trigger:ft,children:Re,defaultCollapsed:Tt=!1,theme:et="dark",style:bt={},collapsible:Bt=!1,reverseArrow:Nt=!1,width:Zt=200,collapsedWidth:Ut=80,zeroWidthTriggerStyle:lt,breakpoint:Ge,onCollapse:kt,onBreakpoint:un}=Ie,ln=se(Ie,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Ft}=(0,De.useContext)(he.Gs),[$t,Qt]=(0,De.useState)("collapsed"in Ie?Ie.collapsed:Tt),[Bn,on]=(0,De.useState)(!1);(0,De.useEffect)(()=>{"collapsed"in Ie&&Qt(Ie.collapsed)},[Ie.collapsed]);const Cn=(Pe,Ne)=>{"collapsed"in Ie||Qt(Pe),kt==null||kt(Pe,Ne)},gt=(0,De.useRef)();gt.current=Pe=>{on(Pe.matches),un==null||un(Pe.matches),$t!==Pe.matches&&Cn(Pe.matches,"responsive")},(0,De.useEffect)(()=>{function Pe(ke){return gt.current(ke)}let Ne;if(typeof window!="undefined"){const{matchMedia:ke}=window;if(ke&&Ge&&Ge in de){Ne=ke(`(max-width: ${de[Ge]})`);try{Ne.addEventListener("change",Pe)}catch(Se){Ne.addListener(Pe)}Pe(Ne)}}return()=>{try{Ne==null||Ne.removeEventListener("change",Pe)}catch(ke){Ne==null||Ne.removeListener(Pe)}}},[Ge]),(0,De.useEffect)(()=>{const Pe=we("ant-sider-");return Ft.addSider(Pe),()=>Ft.removeSider(Pe)},[]);const En=()=>{Cn(!$t,"clickTrigger")},{getPrefixCls:Vn}=(0,De.useContext)(ee.E_),He=()=>{const Pe=Vn("layout-sider",qe),Ne=(0,dt.Z)(ln,["collapsed"]),ke=$t?Ut:Zt,Se=te(ke)?`${ke}px`:String(ke),nt=parseFloat(String(Ut||0))===0?De.createElement("span",{onClick:En,className:ht()(`${Pe}-zero-width-trigger`,`${Pe}-zero-width-trigger-${Nt?"right":"left"}`),style:lt},ft||De.createElement(mt,null)):null,Je={expanded:Nt?De.createElement(Ze.Z,null):De.createElement(ct.Z,null),collapsed:Nt?De.createElement(ct.Z,null):De.createElement(Ze.Z,null)}[$t?"collapsed":"expanded"],yt=ft!==null?nt||De.createElement("div",{className:`${Pe}-trigger`,onClick:En,style:{width:Se}},ft||Je):null,wt=Object.assign(Object.assign({},bt),{flex:`0 0 ${Se}`,maxWidth:Se,minWidth:Se,width:Se}),ot=ht()(Pe,`${Pe}-${et}`,{[`${Pe}-collapsed`]:!!$t,[`${Pe}-has-trigger`]:Bt&&ft!==null&&!nt,[`${Pe}-below`]:!!Bn,[`${Pe}-zero-width`]:parseFloat(Se)===0},$e);return De.createElement("aside",Object.assign({className:ot},Ne,{style:wt,ref:je}),De.createElement("div",{className:`${Pe}-children`},Re),Bt||Bn&&nt?yt:null)},Ce=De.useMemo(()=>({siderCollapsed:$t}),[$t]);return De.createElement(me.Provider,{value:Ce},He())})},84966:function(Sn,an,ve){"use strict";ve.d(an,{VY:function(){return me},$_:function(){return de},h4:function(){return se},Gs:function(){return dt},ZP:function(){return we}});var ce=ve(26407),De=ve(92310),ze=ve.n(De),Ct=ve(2738),_e=ve(59301),Ke=ve(36355),Be=ve(83116),ct=Me=>{const{componentCls:be,bodyBg:Ie,lightSiderBg:je,lightTriggerBg:qe,lightTriggerColor:$e}=Me;return{[`${be}-sider-light`]:{background:je,[`${be}-sider-trigger`]:{color:$e,background:qe},[`${be}-sider-zero-width-trigger`]:{color:$e,background:qe,border:`1px solid ${Ie}`,borderInlineStart:0}}}};const Ze=Me=>{const{antCls:be,componentCls:Ie,colorText:je,triggerColor:qe,footerBg:$e,triggerBg:ft,headerHeight:Re,headerPadding:Tt,headerColor:et,footerPadding:bt,triggerHeight:Bt,zeroTriggerHeight:Nt,zeroTriggerWidth:Zt,motionDurationMid:Ut,motionDurationSlow:lt,fontSize:Ge,borderRadius:kt,bodyBg:un,headerBg:ln,siderBg:Ft}=Me;return{[Ie]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:un,"&, *":{boxSizing:"border-box"},[`&${Ie}-has-sider`]:{flexDirection:"row",[`> ${Ie}, > ${Ie}-content`]:{width:0}},[`${Ie}-header, &${Ie}-footer`]:{flex:"0 0 auto"},[`${Ie}-sider`]:{position:"relative",minWidth:0,background:Ft,transition:`all ${Ut}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${be}-menu${be}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:Bt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:Bt,color:qe,lineHeight:`${Bt}px`,textAlign:"center",background:ft,cursor:"pointer",transition:`all ${Ut}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Re,insetInlineEnd:-Zt,zIndex:1,width:Zt,height:Nt,color:qe,fontSize:Me.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Ft,borderStartStartRadius:0,borderStartEndRadius:kt,borderEndEndRadius:kt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${lt} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${lt}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Zt,borderStartStartRadius:kt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:kt}}}}},ct(Me)),{"&-rtl":{direction:"rtl"}}),[`${Ie}-header`]:{height:Re,padding:Tt,color:et,lineHeight:`${Re}px`,background:ln,[`${be}-menu`]:{lineHeight:"inherit"}},[`${Ie}-footer`]:{padding:bt,color:je,fontSize:Ge,background:$e},[`${Ie}-content`]:{flex:"auto",minHeight:0}}};var Et=(0,Be.Z)("Layout",Me=>[Ze(Me)],Me=>{const{colorBgLayout:be,controlHeight:Ie,controlHeightLG:je,colorText:qe,controlHeightSM:$e,marginXXS:ft,colorTextLightSolid:Re,colorBgContainer:Tt}=Me,et=je*1.25;return{colorBgHeader:"#001529",colorBgBody:be,colorBgTrigger:"#002140",bodyBg:be,headerBg:"#001529",headerHeight:Ie*2,headerPadding:`0 ${et}px`,headerColor:qe,footerPadding:`${$e}px ${et}px`,footerBg:be,siderBg:"#001529",triggerHeight:je+ft*2,triggerBg:"#002140",triggerColor:Re,zeroTriggerWidth:je,zeroTriggerHeight:je,lightSiderBg:Tt,lightTriggerBg:Tt,lightTriggerColor:qe}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),ht=function(Me,be){var Ie={};for(var je in Me)Object.prototype.hasOwnProperty.call(Me,je)&&be.indexOf(je)<0&&(Ie[je]=Me[je]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,je=Object.getOwnPropertySymbols(Me);qe<je.length;qe++)be.indexOf(je[qe])<0&&Object.prototype.propertyIsEnumerable.call(Me,je[qe])&&(Ie[je[qe]]=Me[je[qe]]);return Ie};const dt=_e.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Ae(Me){let{suffixCls:be,tagName:Ie,displayName:je}=Me;return qe=>_e.forwardRef((ft,Re)=>_e.createElement(qe,Object.assign({ref:Re,suffixCls:be,tagName:Ie},ft)))}const te=_e.forwardRef((Me,be)=>{const{prefixCls:Ie,suffixCls:je,className:qe,tagName:$e}=Me,ft=ht(Me,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Re}=_e.useContext(Ke.E_),Tt=Re("layout",Ie),[et,bt]=Et(Tt),Bt=je?`${Tt}-${je}`:Tt;return et(_e.createElement($e,Object.assign({className:ze()(Ie||Bt,qe,bt),ref:be},ft)))}),ee=_e.forwardRef((Me,be)=>{const{direction:Ie}=_e.useContext(Ke.E_),[je,qe]=_e.useState([]),{prefixCls:$e,className:ft,rootClassName:Re,children:Tt,hasSider:et,tagName:bt,style:Bt}=Me,Nt=ht(Me,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Zt=(0,Ct.Z)(Nt,["suffixCls"]),{getPrefixCls:Ut,layout:lt}=_e.useContext(Ke.E_),Ge=Ut("layout",$e),[kt,un]=Et(Ge),ln=ze()(Ge,{[`${Ge}-has-sider`]:typeof et=="boolean"?et:je.length>0,[`${Ge}-rtl`]:Ie==="rtl"},lt==null?void 0:lt.className,ft,Re,un),Ft=_e.useMemo(()=>({siderHook:{addSider:$t=>{qe(Qt=>[].concat((0,ce.Z)(Qt),[$t]))},removeSider:$t=>{qe(Qt=>Qt.filter(Bn=>Bn!==$t))}}}),[]);return kt(_e.createElement(dt.Provider,{value:Ft},_e.createElement(bt,Object.assign({ref:be,className:ln,style:Object.assign(Object.assign({},lt==null?void 0:lt.style),Bt)},Zt),Tt)))}),he=Ae({tagName:"div",displayName:"Layout"})(ee),se=Ae({suffixCls:"header",tagName:"header",displayName:"Header"})(te),de=Ae({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(te),me=Ae({suffixCls:"content",tagName:"main",displayName:"Content"})(te);var we=he},40875:function(Sn,an,ve){"use strict";ve.d(an,{J:function(){return Ke}});var ce=ve(59301),De=ve(33234),ze=ve(70425),Ct=function(Be,mt){var ct={};for(var Ze in Be)Object.prototype.hasOwnProperty.call(Be,Ze)&&mt.indexOf(Ze)<0&&(ct[Ze]=Be[Ze]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,Ze=Object.getOwnPropertySymbols(Be);Et<Ze.length;Et++)mt.indexOf(Ze[Et])<0&&Object.prototype.propertyIsEnumerable.call(Be,Ze[Et])&&(ct[Ze[Et]]=Be[Ze[Et]]);return ct};const _e=ce.createContext(null),Ke=ce.forwardRef((Be,mt)=>{const{children:ct}=Be,Ze=Ct(Be,["children"]),Et=ce.useContext(_e),ht=ce.useMemo(()=>Object.assign(Object.assign({},Et),Ze),[Et,Ze.prefixCls,Ze.mode,Ze.selectable]);return ce.createElement(_e.Provider,{value:ht},ce.createElement(De.BR,null,(0,ze.supportNodeRef)(ct)?ce.cloneElement(ct,{ref:mt}):ct))});an.Z=_e},20834:function(Sn,an,ve){"use strict";ve.d(an,{default:function(){return Ce}});var ce=ve(15285),De=ve(59301),ze=ve(45818),Ct=ve(92310),_e=ve.n(Ct),Ke=ve(36355),Be=function(Pe,Ne){var ke={};for(var Se in Pe)Object.prototype.hasOwnProperty.call(Pe,Se)&&Ne.indexOf(Se)<0&&(ke[Se]=Pe[Se]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Se=Object.getOwnPropertySymbols(Pe);nt<Se.length;nt++)Ne.indexOf(Se[nt])<0&&Object.prototype.propertyIsEnumerable.call(Pe,Se[nt])&&(ke[Se[nt]]=Pe[Se[nt]]);return ke},ct=Pe=>{const{prefixCls:Ne,className:ke,dashed:Se}=Pe,nt=Be(Pe,["prefixCls","className","dashed"]),{getPrefixCls:Pt}=De.useContext(Ke.E_),Xe=Pt("menu",Ne),Je=_e()({[`${Xe}-item-divider-dashed`]:!!Se},ke);return De.createElement(ce.iz,Object.assign({className:Je},nt))},Ze=ve(11592),Et=ve(2738),ht=ve(6848),dt=ve(92343),te=(0,De.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),he=Pe=>{var Ne;const{className:ke,children:Se,icon:nt,title:Pt,danger:Xe}=Pe,{prefixCls:Je,firstLevel:yt,direction:wt,disableMenuItemTitleTooltip:ot,inlineCollapsed:It}=De.useContext(te),sn=Un=>{const ti=De.createElement("span",{className:`${Je}-title-content`},Se);return(!nt||(0,dt.l$)(Se)&&Se.type==="span")&&Se&&Un&&yt&&typeof Se=="string"?De.createElement("div",{className:`${Je}-inline-collapsed-noicon`},Se.charAt(0)):ti},{siderCollapsed:Xt}=De.useContext(ze.D);let Ht=Pt;typeof Pt=="undefined"?Ht=yt?Se:"":Pt===!1&&(Ht="");const xn={title:Ht};!Xt&&!It&&(xn.title=null,xn.open=!1);const Dn=(0,Ze.Z)(Se).length;let cn=De.createElement(ce.ck,Object.assign({},(0,Et.Z)(Pe,["title","icon","danger"]),{className:_e()({[`${Je}-item-danger`]:Xe,[`${Je}-item-only-child`]:(nt?Dn+1:Dn)===1},ke),title:typeof Pt=="string"?Pt:void 0}),(0,dt.Tm)(nt,{className:_e()((0,dt.l$)(nt)?(Ne=nt.props)===null||Ne===void 0?void 0:Ne.className:"",`${Je}-item-icon`)}),sn(It));return ot||(cn=De.createElement(ht.Z,Object.assign({},xn,{placement:wt==="rtl"?"left":"right",overlayClassName:`${Je}-inline-collapsed-tooltip`}),cn)),cn},de=Pe=>{var Ne;const{popupClassName:ke,icon:Se,title:nt,theme:Pt}=Pe,Xe=De.useContext(te),{prefixCls:Je,inlineCollapsed:yt,theme:wt}=Xe,ot=(0,ce.Xl)();let It;if(!Se)It=yt&&!ot.length&&nt&&typeof nt=="string"?De.createElement("div",{className:`${Je}-inline-collapsed-noicon`},nt.charAt(0)):De.createElement("span",{className:`${Je}-title-content`},nt);else{const Xt=(0,dt.l$)(nt)&&nt.type==="span";It=De.createElement(De.Fragment,null,(0,dt.Tm)(Se,{className:_e()((0,dt.l$)(Se)?(Ne=Se.props)===null||Ne===void 0?void 0:Ne.className:"",`${Je}-item-icon`)}),Xt?nt:De.createElement("span",{className:`${Je}-title-content`},nt))}const sn=De.useMemo(()=>Object.assign(Object.assign({},Xe),{firstLevel:!1}),[Xe]);return De.createElement(te.Provider,{value:sn},De.createElement(ce.Wd,Object.assign({},(0,Et.Z)(Pe,["icon"]),{title:It,popupClassName:_e()(Je,ke,`${Je}-${Pt||wt}`)})))},me=ve(18785),we=ve(70425),Me=ve(62892),be=ve(40875),Ie=function(Pe,Ne){var ke={};for(var Se in Pe)Object.prototype.hasOwnProperty.call(Pe,Se)&&Ne.indexOf(Se)<0&&(ke[Se]=Pe[Se]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Se=Object.getOwnPropertySymbols(Pe);nt<Se.length;nt++)Ne.indexOf(Se[nt])<0&&Object.prototype.propertyIsEnumerable.call(Pe,Se[nt])&&(ke[Se[nt]]=Pe[Se[nt]]);return ke};function je(Pe){return(Pe||[]).map((Ne,ke)=>{if(Ne&&typeof Ne=="object"){const Se=Ne,{label:nt,children:Pt,key:Xe,type:Je}=Se,yt=Ie(Se,["label","children","key","type"]),wt=Xe!=null?Xe:`tmp-${ke}`;return Pt||Je==="group"?Je==="group"?De.createElement(ce.BW,Object.assign({key:wt},yt,{title:nt}),je(Pt)):De.createElement(de,Object.assign({key:wt},yt,{title:nt}),je(Pt)):Je==="divider"?De.createElement(ct,Object.assign({key:wt},yt)):De.createElement(he,Object.assign({key:wt},yt),nt)}return null}).filter(Ne=>Ne)}function qe(Pe){return De.useMemo(()=>Pe&&je(Pe),[Pe])}var $e=ve(64993),ft=ve(17313),Re=ve(8378),Tt=ve(13826),et=ve(29878),bt=ve(83116),Bt=ve(37613),Zt=Pe=>{const{componentCls:Ne,motionDurationSlow:ke,horizontalLineHeight:Se,colorSplit:nt,lineWidth:Pt,lineType:Xe,itemPaddingInline:Je}=Pe;return{[`${Ne}-horizontal`]:{lineHeight:Se,border:0,borderBottom:`${Pt}px ${Xe} ${nt}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Ne}-item, ${Ne}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Je},[`> ${Ne}-item:hover,
> ${Ne}-item-active,
> ${Ne}-submenu ${Ne}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Ne}-item, ${Ne}-submenu-title`]:{transition:[`border-color ${ke}`,`background ${ke}`].join(",")},[`${Ne}-submenu-arrow`]:{display:"none"}}}},lt=Pe=>{let{componentCls:Ne,menuArrowOffset:ke}=Pe;return{[`${Ne}-rtl`]:{direction:"rtl"},[`${Ne}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Ne}-rtl${Ne}-vertical,
${Ne}-submenu-rtl ${Ne}-vertical`]:{[`${Ne}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${ke})`},"&::after":{transform:`rotate(45deg) translateY(${ke})`}}}}};const Ge=Pe=>Object.assign({},(0,ft.oN)(Pe));var un=(Pe,Ne)=>{const{componentCls:ke,itemColor:Se,itemSelectedColor:nt,groupTitleColor:Pt,itemBg:Xe,subMenuItemBg:Je,itemSelectedBg:yt,activeBarHeight:wt,activeBarWidth:ot,activeBarBorderWidth:It,motionDurationSlow:sn,motionEaseInOut:Xt,motionEaseOut:Ht,itemPaddingInline:xn,motionDurationMid:Dn,itemHoverColor:cn,lineType:Un,colorSplit:ti,itemDisabledColor:Wn,dangerItemColor:Zn,dangerItemHoverColor:Jn,dangerItemSelectedColor:vi,dangerItemActiveBg:pi,dangerItemSelectedBg:zi,itemHoverBg:$i,itemActiveBg:Yn,menuSubMenuBg:Gn,horizontalItemSelectedColor:oi,horizontalItemSelectedBg:Li,horizontalItemBorderRadius:di,horizontalItemHoverBg:gr,popupBg:Ii}=Pe;return{[`${ke}-${Ne}, ${ke}-${Ne} > ${ke}`]:{color:Se,background:Xe,[`&${ke}-root:focus-visible`]:Object.assign({},Ge(Pe)),[`${ke}-item-group-title`]:{color:Pt},[`${ke}-submenu-selected`]:{[`> ${ke}-submenu-title`]:{color:nt}},[`${ke}-item-disabled, ${ke}-submenu-disabled`]:{color:`${Wn} !important`},[`${ke}-item:not(${ke}-item-selected):not(${ke}-submenu-selected)`]:{[`&:hover, > ${ke}-submenu-title:hover`]:{color:cn}},[`&:not(${ke}-horizontal)`]:{[`${ke}-item:not(${ke}-item-selected)`]:{"&:hover":{backgroundColor:$i},"&:active":{backgroundColor:Yn}},[`${ke}-submenu-title`]:{"&:hover":{backgroundColor:$i},"&:active":{backgroundColor:Yn}}},[`${ke}-item-danger`]:{color:Zn,[`&${ke}-item:hover`]:{[`&:not(${ke}-item-selected):not(${ke}-submenu-selected)`]:{color:Jn}},[`&${ke}-item:active`]:{background:pi}},[`${ke}-item a`]:{"&, &:hover":{color:"inherit"}},[`${ke}-item-selected`]:{color:nt,[`&${ke}-item-danger`]:{color:vi},"a, a:hover":{color:"inherit"}},[`& ${ke}-item-selected`]:{backgroundColor:yt,[`&${ke}-item-danger`]:{backgroundColor:zi}},[`${ke}-item, ${ke}-submenu-title`]:{[`&:not(${ke}-item-disabled):focus-visible`]:Object.assign({},Ge(Pe))},[`&${ke}-submenu > ${ke}`]:{backgroundColor:Gn},[`&${ke}-popup > ${ke}`]:{backgroundColor:Ii},[`&${ke}-horizontal`]:Object.assign(Object.assign({},Ne==="dark"?{borderBottom:0}:{}),{[`> ${ke}-item, > ${ke}-submenu`]:{top:It,marginTop:-It,marginBottom:0,borderRadius:di,"&::after":{position:"absolute",insetInline:xn,bottom:0,borderBottom:`${wt}px solid transparent`,transition:`border-color ${sn} ${Xt}`,content:'""'},"&:hover, &-active, &-open":{background:gr,"&::after":{borderBottomWidth:wt,borderBottomColor:oi}},"&-selected":{color:oi,backgroundColor:Li,"&:hover":{backgroundColor:Li},"&::after":{borderBottomWidth:wt,borderBottomColor:oi}}}}),[`&${ke}-root`]:{[`&${ke}-inline, &${ke}-vertical`]:{borderInlineEnd:`${It}px ${Un} ${ti}`}},[`&${ke}-inline`]:{[`${ke}-sub${ke}-inline`]:{background:Je},[`${ke}-item, ${ke}-submenu-title`]:It&&ot?{width:`calc(100% + ${It}px)`}:{},[`${ke}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ot}px solid ${nt}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Dn} ${Ht}`,`opacity ${Dn} ${Ht}`].join(","),content:'""'},[`&${ke}-item-danger`]:{"&::after":{borderInlineEndColor:vi}}},[`${ke}-selected, ${ke}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Dn} ${Xt}`,`opacity ${Dn} ${Xt}`].join(",")}}}}}};const ln=Pe=>{const{componentCls:Ne,itemHeight:ke,itemMarginInline:Se,padding:nt,menuArrowSize:Pt,marginXS:Xe,itemMarginBlock:Je}=Pe,yt=nt+Pt+Xe;return{[`${Ne}-item`]:{position:"relative",overflow:"hidden"},[`${Ne}-item, ${Ne}-submenu-title`]:{height:ke,lineHeight:`${ke}px`,paddingInline:nt,overflow:"hidden",textOverflow:"ellipsis",marginInline:Se,marginBlock:Je,width:`calc(100% - ${Se*2}px)`},[`> ${Ne}-item,
> ${Ne}-submenu > ${Ne}-submenu-title`]:{height:ke,lineHeight:`${ke}px`},[`${Ne}-item-group-list ${Ne}-submenu-title,
${Ne}-submenu-title`]:{paddingInlineEnd:yt}}};var $t=Pe=>{const{componentCls:Ne,iconCls:ke,itemHeight:Se,colorTextLightSolid:nt,dropdownWidth:Pt,controlHeightLG:Xe,motionDurationMid:Je,motionEaseOut:yt,paddingXL:wt,itemMarginInline:ot,fontSizeLG:It,motionDurationSlow:sn,paddingXS:Xt,boxShadowSecondary:Ht,collapsedWidth:xn,collapsedIconSize:Dn}=Pe,cn={height:Se,lineHeight:`${Se}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Ne]:{"&-inline, &-vertical":Object.assign({[`&${Ne}-root`]:{boxShadow:"none"}},ln(Pe))},[`${Ne}-submenu-popup`]:{[`${Ne}-vertical`]:Object.assign(Object.assign({},ln(Pe)),{boxShadow:Ht})}},{[`${Ne}-submenu-popup ${Ne}-vertical${Ne}-sub`]:{minWidth:Pt,maxHeight:`calc(100vh - ${Xe*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Ne}-inline`]:{width:"100%",[`&${Ne}-root`]:{[`${Ne}-item, ${Ne}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${sn}`,`background ${sn}`,`padding ${Je} ${yt}`].join(","),[`> ${Ne}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Ne}-sub${Ne}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Ne}-submenu > ${Ne}-submenu-title`]:cn,[`& ${Ne}-item-group-title`]:{paddingInlineStart:wt}},[`${Ne}-item`]:cn}},{[`${Ne}-inline-collapsed`]:{width:xn,[`&${Ne}-root`]:{[`${Ne}-item, ${Ne}-submenu ${Ne}-submenu-title`]:{[`> ${Ne}-inline-collapsed-noicon`]:{fontSize:It,textAlign:"center"}}},[`> ${Ne}-item,
> ${Ne}-item-group > ${Ne}-item-group-list > ${Ne}-item,
> ${Ne}-item-group > ${Ne}-item-group-list > ${Ne}-submenu > ${Ne}-submenu-title,
> ${Ne}-submenu > ${Ne}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${It/2}px - ${ot}px)`,textOverflow:"clip",[`
${Ne}-submenu-arrow,
${Ne}-submenu-expand-icon
`]:{opacity:0},[`${Ne}-item-icon, ${ke}`]:{margin:0,fontSize:Dn,lineHeight:`${Se}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Ne}-item-icon, ${ke}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Ne}-item-icon, ${ke}`]:{display:"none"},"a, a:hover":{color:nt}},[`${Ne}-item-group-title`]:Object.assign(Object.assign({},ft.vS),{paddingInline:Xt})}}]};const Qt=Pe=>{const{componentCls:Ne,motionDurationSlow:ke,motionDurationMid:Se,motionEaseInOut:nt,motionEaseOut:Pt,iconCls:Xe,iconSize:Je,iconMarginInlineEnd:yt}=Pe;return{[`${Ne}-item, ${Ne}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${ke}`,`background ${ke}`,`padding ${ke} ${nt}`].join(","),[`${Ne}-item-icon, ${Xe}`]:{minWidth:Je,fontSize:Je,transition:[`font-size ${Se} ${Pt}`,`margin ${ke} ${nt}`,`color ${ke}`].join(","),"+ span":{marginInlineStart:yt,opacity:1,transition:[`opacity ${ke} ${nt}`,`margin ${ke}`,`color ${ke}`].join(",")}},[`${Ne}-item-icon`]:Object.assign({},(0,ft.Ro)()),[`&${Ne}-item-only-child`]:{[`> ${Xe}, > ${Ne}-item-icon`]:{marginInlineEnd:0}}},[`${Ne}-item-disabled, ${Ne}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Ne}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Bn=Pe=>{const{componentCls:Ne,motionDurationSlow:ke,motionEaseInOut:Se,borderRadius:nt,menuArrowSize:Pt,menuArrowOffset:Xe}=Pe;return{[`${Ne}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Pe.margin,width:Pt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${ke} ${Se}, opacity ${ke}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Pt*.6,height:Pt*.15,backgroundColor:"currentcolor",borderRadius:nt,transition:[`background ${ke} ${Se}`,`transform ${ke} ${Se}`,`top ${ke} ${Se}`,`color ${ke} ${Se}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Xe})`},"&::after":{transform:`rotate(-45deg) translateY(${Xe})`}}}}},on=Pe=>{const{antCls:Ne,componentCls:ke,fontSize:Se,motionDurationSlow:nt,motionDurationMid:Pt,motionEaseInOut:Xe,paddingXS:Je,padding:yt,colorSplit:wt,lineWidth:ot,zIndexPopup:It,borderRadiusLG:sn,subMenuItemBorderRadius:Xt,menuArrowSize:Ht,menuArrowOffset:xn,lineType:Dn,menuPanelMaskInset:cn,groupTitleLineHeight:Un,groupTitleFontSize:ti}=Pe;return[{"":{[`${ke}`]:Object.assign(Object.assign({},(0,ft.dF)()),{"&-hidden":{display:"none"}})},[`${ke}-submenu-hidden`]:{display:"none"}},{[ke]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ft.Wf)(Pe)),(0,ft.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:Se,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${nt} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${ke}-item`]:{flex:"none"}},[`${ke}-item, ${ke}-submenu, ${ke}-submenu-title`]:{borderRadius:Pe.itemBorderRadius},[`${ke}-item-group-title`]:{padding:`${Je}px ${yt}px`,fontSize:ti,lineHeight:Un,transition:`all ${nt}`},[`&-horizontal ${ke}-submenu`]:{transition:[`border-color ${nt} ${Xe}`,`background ${nt} ${Xe}`].join(",")},[`${ke}-submenu, ${ke}-submenu-inline`]:{transition:[`border-color ${nt} ${Xe}`,`background ${nt} ${Xe}`,`padding ${Pt} ${Xe}`].join(",")},[`${ke}-submenu ${ke}-sub`]:{cursor:"initial",transition:[`background ${nt} ${Xe}`,`padding ${nt} ${Xe}`].join(",")},[`${ke}-title-content`]:{transition:`color ${nt}`},[`${ke}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${ke}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:wt,borderStyle:Dn,borderWidth:0,borderTopWidth:ot,marginBlock:ot,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Qt(Pe)),{[`${ke}-item-group`]:{[`${ke}-item-group-list`]:{margin:0,padding:0,[`${ke}-item, ${ke}-submenu-title`]:{paddingInline:`${Se*2}px ${yt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:It,borderRadius:sn,boxShadow:"none",transformOrigin:"0 0",[`&${ke}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${cn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:cn},"\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:Pe.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Pe.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Pe.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Pe.paddingXS},[`> ${ke}`]:Object.assign(Object.assign(Object.assign({borderRadius:sn},Qt(Pe)),Bn(Pe)),{[`${ke}-item, ${ke}-submenu > ${ke}-submenu-title`]:{borderRadius:Xt},[`${ke}-submenu-title::after`]:{transition:`transform ${nt} ${Xe}`}})}}),Bn(Pe)),{[`&-inline-collapsed ${ke}-submenu-arrow,
&-inline ${ke}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${xn})`},"&::after":{transform:`rotate(45deg) translateX(-${xn})`}},[`${ke}-submenu-open${ke}-submenu-inline > ${ke}-submenu-title > ${ke}-submenu-arrow`]:{transform:`translateY(-${Ht*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${xn})`},"&::before":{transform:`rotate(45deg) translateX(${xn})`}}})},{[`${Ne}-layout-header`]:{[ke]:{lineHeight:"inherit"}}}]};var Cn=(Pe,Ne)=>(0,bt.Z)("Menu",Se=>{if(Ne===!1)return[];const{colorBgElevated:nt,colorPrimary:Pt,colorTextLightSolid:Xe,controlHeightLG:Je,fontSize:yt,darkItemColor:wt,darkDangerItemColor:ot,darkItemBg:It,darkSubMenuItemBg:sn,darkItemSelectedColor:Xt,darkItemSelectedBg:Ht,darkDangerItemSelectedBg:xn,darkItemHoverBg:Dn,darkGroupTitleColor:cn,darkItemHoverColor:Un,darkItemDisabledColor:ti,darkDangerItemHoverColor:Wn,darkDangerItemSelectedColor:Zn,darkDangerItemActiveBg:Jn}=Se,vi=yt/7*5,pi=(0,Bt.TS)(Se,{menuArrowSize:vi,menuHorizontalHeight:Je*1.15,menuArrowOffset:`${vi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:nt}),zi=(0,Bt.TS)(pi,{itemColor:wt,itemHoverColor:Un,groupTitleColor:cn,itemSelectedColor:Xt,itemBg:It,popupBg:It,subMenuItemBg:sn,itemActiveBg:"transparent",itemSelectedBg:Ht,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Dn,itemDisabledColor:ti,dangerItemColor:ot,dangerItemHoverColor:Wn,dangerItemSelectedColor:Zn,dangerItemActiveBg:Jn,dangerItemSelectedBg:xn,menuSubMenuBg:sn,horizontalItemSelectedColor:Xe,horizontalItemSelectedBg:Pt});return[on(pi),Zt(pi),$t(pi),un(pi,"light"),un(zi,"dark"),lt(pi),(0,Re.Z)(pi),(0,Tt.oN)(pi,"slide-up"),(0,Tt.oN)(pi,"slide-down"),(0,et._y)(pi,"zoom-big")]},Se=>{const{colorPrimary:nt,colorError:Pt,colorTextDisabled:Xe,colorErrorBg:Je,colorText:yt,colorTextDescription:wt,colorBgContainer:ot,colorFillAlter:It,colorFillContent:sn,lineWidth:Xt,lineWidthBold:Ht,controlItemBgActive:xn,colorBgTextHover:Dn,controlHeightLG:cn,lineHeight:Un,colorBgElevated:ti,marginXXS:Wn,padding:Zn,fontSize:Jn,controlHeightSM:vi,fontSizeLG:pi,colorTextLightSolid:zi,colorErrorHover:$i}=Se,Yn=new $e.C(zi).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Se.zIndexPopupBase+50,radiusItem:Se.borderRadiusLG,itemBorderRadius:Se.borderRadiusLG,radiusSubMenuItem:Se.borderRadiusSM,subMenuItemBorderRadius:Se.borderRadiusSM,colorItemText:yt,itemColor:yt,colorItemTextHover:yt,itemHoverColor:yt,colorItemTextHoverHorizontal:nt,horizontalItemHoverColor:nt,colorGroupTitle:wt,groupTitleColor:wt,colorItemTextSelected:nt,itemSelectedColor:nt,colorItemTextSelectedHorizontal:nt,horizontalItemSelectedColor:nt,colorItemBg:ot,itemBg:ot,colorItemBgHover:Dn,itemHoverBg:Dn,colorItemBgActive:sn,itemActiveBg:xn,colorSubItemBg:It,subMenuItemBg:It,colorItemBgSelected:xn,itemSelectedBg:xn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Ht,activeBarHeight:Ht,colorActiveBarBorderSize:Xt,activeBarBorderWidth:Xt,colorItemTextDisabled:Xe,itemDisabledColor:Xe,colorDangerItemText:Pt,dangerItemColor:Pt,colorDangerItemTextHover:Pt,dangerItemHoverColor:Pt,colorDangerItemTextSelected:Pt,dangerItemSelectedColor:Pt,colorDangerItemBgActive:Je,dangerItemActiveBg:Je,colorDangerItemBgSelected:Je,dangerItemSelectedBg:Je,itemMarginInline:Se.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:cn,groupTitleLineHeight:Un,collapsedWidth:cn*2,popupBg:ti,itemMarginBlock:Wn,itemPaddingInline:Zn,horizontalLineHeight:`${cn*1.15}px`,iconSize:Jn,iconMarginInlineEnd:vi-Jn,collapsedIconSize:pi,groupTitleFontSize:Jn,darkItemDisabledColor:new $e.C(zi).setAlpha(.25).toRgbString(),darkItemColor:Yn,darkDangerItemColor:Pt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:zi,darkItemSelectedBg:nt,darkDangerItemSelectedBg:Pt,darkItemHoverBg:"transparent",darkGroupTitleColor:Yn,darkItemHoverColor:zi,darkDangerItemHoverColor:$i,darkDangerItemSelectedColor:zi,darkDangerItemActiveBg:Pt}},{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"]]})(Pe),gt=function(Pe,Ne){var ke={};for(var Se in Pe)Object.prototype.hasOwnProperty.call(Pe,Se)&&Ne.indexOf(Se)<0&&(ke[Se]=Pe[Se]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Se=Object.getOwnPropertySymbols(Pe);nt<Se.length;nt++)Ne.indexOf(Se[nt])<0&&Object.prototype.propertyIsEnumerable.call(Pe,Se[nt])&&(ke[Se[nt]]=Pe[Se[nt]]);return ke},Vn=(0,De.forwardRef)((Pe,Ne)=>{var ke,Se;const nt=De.useContext(be.Z),Pt=nt||{},{getPrefixCls:Xe,getPopupContainer:Je,direction:yt,menu:wt}=De.useContext(Ke.E_),ot=Xe(),{prefixCls:It,className:sn,style:Xt,theme:Ht="light",expandIcon:xn,_internalDisableMenuItemTitleTooltip:Dn,inlineCollapsed:cn,siderCollapsed:Un,items:ti,children:Wn,rootClassName:Zn,mode:Jn,selectable:vi,onClick:pi,overflowedIndicatorPopupClassName:zi}=Pe,$i=gt(Pe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Yn=(0,Et.Z)($i,["collapsedWidth"]),Gn=qe(ti)||Wn;(ke=Pt.validator)===null||ke===void 0||ke.call(Pt,{mode:Jn});const oi=(0,we.useEvent)(function(){var Fi;pi==null||pi.apply(void 0,arguments),(Fi=Pt.onClick)===null||Fi===void 0||Fi.call(Pt)}),Li=Pt.mode||Jn,di=vi!=null?vi:Pt.selectable,gr=De.useMemo(()=>Un!==void 0?Un:cn,[cn,Un]),Ii={horizontal:{motionName:`${ot}-slide-up`},inline:(0,Me.Z)(ot),other:{motionName:`${ot}-zoom-big`}},Le=Xe("menu",It||Pt.prefixCls),[si,ji]=Cn(Le,!nt),gn=_e()(`${Le}-${Ht}`,wt==null?void 0:wt.className,sn);let qn;if(typeof xn=="function")qn=xn;else if(xn===null||xn===!1)qn=null;else if(Pt.expandIcon===null||Pt.expandIcon===!1)qn=null;else{const Fi=xn!=null?xn:Pt.expandIcon;qn=(0,dt.Tm)(Fi,{className:_e()(`${Le}-submenu-expand-icon`,(0,dt.l$)(Fi)?(Se=Fi.props)===null||Se===void 0?void 0:Se.className:"")})}const mi=De.useMemo(()=>({prefixCls:Le,inlineCollapsed:gr||!1,direction:yt,firstLevel:!0,theme:Ht,mode:Li,disableMenuItemTitleTooltip:Dn}),[Le,gr,yt,Dn,Ht]);return si(De.createElement(be.Z.Provider,{value:null},De.createElement(te.Provider,{value:mi},De.createElement(ce.ZP,Object.assign({getPopupContainer:Je,overflowedIndicator:De.createElement(me.Z,null),overflowedIndicatorPopupClassName:_e()(Le,`${Le}-${Ht}`,zi),mode:Li,selectable:di,onClick:oi},Yn,{inlineCollapsed:gr,style:Object.assign(Object.assign({},wt==null?void 0:wt.style),Xt),className:gn,prefixCls:Le,direction:yt,defaultMotions:Ii,expandIcon:qn,ref:Ne,rootClassName:_e()(Zn,ji)}),Gn))))});const He=(0,De.forwardRef)((Pe,Ne)=>{const ke=(0,De.useRef)(null),Se=De.useContext(ze.D);return(0,De.useImperativeHandle)(Ne,()=>({menu:ke.current,focus:nt=>{var Pt;(Pt=ke.current)===null||Pt===void 0||Pt.focus(nt)}})),De.createElement(Vn,Object.assign({ref:ke},Pe,Se))});He.Item=he,He.SubMenu=de,He.Divider=ct,He.ItemGroup=ce.BW;var Ce=He},58421:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Pt}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(Je,yt){return De.createElement(_e.Z,(0,ce.Z)({},Je,{ref:yt,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be,ct=ve(49198),Ze=ve(33853),Et=ve(38819),ht=ve(92310),dt=ve.n(ht),Ae=ve(400),te=ve(33708),ee=ve(6909),he=ve(4771),se=ve(9427),de=ve(25440),me=ve(26112),we={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Me=we,be=ve(91735),Ie=function(Xe){(0,se.Z)(yt,Xe);var Je=(0,de.Z)(yt);function yt(){var wt;(0,ee.Z)(this,yt);for(var ot=arguments.length,It=new Array(ot),sn=0;sn<ot;sn++)It[sn]=arguments[sn];return wt=Je.call.apply(Je,[this].concat(It)),wt.state={goInputText:""},wt.getValidValue=function(){var Xt=wt.state.goInputText;return!Xt||Number.isNaN(Xt)?void 0:Number(Xt)},wt.buildOptionText=function(Xt){return"".concat(Xt," ").concat(wt.props.locale.items_per_page)},wt.changeSize=function(Xt){wt.props.changeSize(Number(Xt))},wt.handleChange=function(Xt){wt.setState({goInputText:Xt.target.value})},wt.handleBlur=function(Xt){var Ht=wt.props,xn=Ht.goButton,Dn=Ht.quickGo,cn=Ht.rootPrefixCls,Un=wt.state.goInputText;xn||Un===""||(wt.setState({goInputText:""}),!(Xt.relatedTarget&&(Xt.relatedTarget.className.indexOf("".concat(cn,"-item-link"))>=0||Xt.relatedTarget.className.indexOf("".concat(cn,"-item"))>=0))&&Dn(wt.getValidValue()))},wt.go=function(Xt){var Ht=wt.state.goInputText;Ht!==""&&(Xt.keyCode===Me.ENTER||Xt.type==="click")&&(wt.setState({goInputText:""}),wt.props.quickGo(wt.getValidValue()))},wt}return(0,he.Z)(yt,[{key:"getPageSizeOptions",value:function(){var ot=this.props,It=ot.pageSize,sn=ot.pageSizeOptions;return sn.some(function(Xt){return Xt.toString()===It.toString()})?sn:sn.concat([It.toString()]).sort(function(Xt,Ht){var xn=Number.isNaN(Number(Xt))?0:Number(Xt),Dn=Number.isNaN(Number(Ht))?0:Number(Ht);return xn-Dn})}},{key:"render",value:function(){var ot=this,It=this.props,sn=It.pageSize,Xt=It.locale,Ht=It.rootPrefixCls,xn=It.changeSize,Dn=It.quickGo,cn=It.goButton,Un=It.selectComponentClass,ti=It.buildOptionText,Wn=It.selectPrefixCls,Zn=It.disabled,Jn=this.state.goInputText,vi="".concat(Ht,"-options"),pi=Un,zi=null,$i=null,Yn=null;if(!xn&&!Dn)return null;var Gn=this.getPageSizeOptions();if(xn&&pi){var oi=Gn.map(function(Li,di){return De.createElement(pi.Option,{key:di,value:Li.toString()},(ti||ot.buildOptionText)(Li))});zi=De.createElement(pi,{disabled:Zn,prefixCls:Wn,showSearch:!1,className:"".concat(vi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(sn||Gn[0]).toString(),onChange:this.changeSize,getPopupContainer:function(di){return di.parentNode},"aria-label":Xt.page_size,defaultOpen:!1},oi)}return Dn&&(cn&&(Yn=typeof cn=="boolean"?De.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Zn,className:"".concat(vi,"-quick-jumper-button")},Xt.jump_to_confirm):De.createElement("span",{onClick:this.go,onKeyUp:this.go},cn)),$i=De.createElement("div",{className:"".concat(vi,"-quick-jumper")},Xt.jump_to,De.createElement("input",{disabled:Zn,type:"text",value:Jn,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Xt.page}),Xt.page,Yn)),De.createElement("li",{className:"".concat(vi)},zi,$i)}}]),yt}(De.Component);Ie.defaultProps={pageSizeOptions:["10","20","50","100"]};var je=Ie,qe=function(Je){var yt,wt=Je.rootPrefixCls,ot=Je.page,It=Je.active,sn=Je.className,Xt=Je.showTitle,Ht=Je.onClick,xn=Je.onKeyPress,Dn=Je.itemRender,cn="".concat(wt,"-item"),Un=dt()(cn,"".concat(cn,"-").concat(ot),(yt={},(0,Ae.Z)(yt,"".concat(cn,"-active"),It),(0,Ae.Z)(yt,"".concat(cn,"-disabled"),!ot),(0,Ae.Z)(yt,Je.className,sn),yt)),ti=function(){Ht(ot)},Wn=function(vi){xn(vi,Ht,ot)},Zn=Dn(ot,"page",De.createElement("a",{rel:"nofollow"},ot));return Zn?De.createElement("li",{title:Xt?ot.toString():null,className:Un,onClick:ti,onKeyPress:Wn,tabIndex:0},Zn):null},$e=qe;function ft(){}function Re(Xe){var Je=Number(Xe);return typeof Je=="number"&&!Number.isNaN(Je)&&isFinite(Je)&&Math.floor(Je)===Je}var Tt=function(Je,yt,wt){return wt};function et(Xe,Je,yt){var wt=typeof Xe=="undefined"?Je.pageSize:Xe;return Math.floor((yt.total-1)/wt)+1}var bt=function(Xe){(0,se.Z)(yt,Xe);var Je=(0,de.Z)(yt);function yt(wt){var ot;(0,ee.Z)(this,yt),ot=Je.call(this,wt),ot.paginationNode=De.createRef(),ot.getJumpPrevPage=function(){return Math.max(1,ot.state.current-(ot.props.showLessItems?3:5))},ot.getJumpNextPage=function(){return Math.min(et(void 0,ot.state,ot.props),ot.state.current+(ot.props.showLessItems?3:5))},ot.getItemIcon=function(xn,Dn){var cn=ot.props.prefixCls,Un=xn||De.createElement("button",{type:"button","aria-label":Dn,className:"".concat(cn,"-item-link")});return typeof xn=="function"&&(Un=De.createElement(xn,(0,te.Z)({},ot.props))),Un},ot.isValid=function(xn){var Dn=ot.props.total;return Re(xn)&&xn!==ot.state.current&&Re(Dn)&&Dn>0},ot.shouldDisplayQuickJumper=function(){var xn=ot.props,Dn=xn.showQuickJumper,cn=xn.total,Un=ot.state.pageSize;return cn<=Un?!1:Dn},ot.handleKeyDown=function(xn){(xn.keyCode===Me.ARROW_UP||xn.keyCode===Me.ARROW_DOWN)&&xn.preventDefault()},ot.handleKeyUp=function(xn){var Dn=ot.getValidValue(xn),cn=ot.state.currentInputValue;Dn!==cn&&ot.setState({currentInputValue:Dn}),xn.keyCode===Me.ENTER?ot.handleChange(Dn):xn.keyCode===Me.ARROW_UP?ot.handleChange(Dn-1):xn.keyCode===Me.ARROW_DOWN&&ot.handleChange(Dn+1)},ot.handleBlur=function(xn){var Dn=ot.getValidValue(xn);ot.handleChange(Dn)},ot.changePageSize=function(xn){var Dn=ot.state.current,cn=et(xn,ot.state,ot.props);Dn=Dn>cn?cn:Dn,cn===0&&(Dn=ot.state.current),typeof xn=="number"&&("pageSize"in ot.props||ot.setState({pageSize:xn}),"current"in ot.props||ot.setState({current:Dn,currentInputValue:Dn})),ot.props.onShowSizeChange(Dn,xn),"onChange"in ot.props&&ot.props.onChange&&ot.props.onChange(Dn,xn)},ot.handleChange=function(xn){var Dn=ot.props,cn=Dn.disabled,Un=Dn.onChange,ti=ot.state,Wn=ti.pageSize,Zn=ti.current,Jn=ti.currentInputValue;if(ot.isValid(xn)&&!cn){var vi=et(void 0,ot.state,ot.props),pi=xn;return xn>vi?pi=vi:xn<1&&(pi=1),"current"in ot.props||ot.setState({current:pi}),pi!==Jn&&ot.setState({currentInputValue:pi}),Un(pi,Wn),pi}return Zn},ot.prev=function(){ot.hasPrev()&&ot.handleChange(ot.state.current-1)},ot.next=function(){ot.hasNext()&&ot.handleChange(ot.state.current+1)},ot.jumpPrev=function(){ot.handleChange(ot.getJumpPrevPage())},ot.jumpNext=function(){ot.handleChange(ot.getJumpNextPage())},ot.hasPrev=function(){return ot.state.current>1},ot.hasNext=function(){return ot.state.current<et(void 0,ot.state,ot.props)},ot.runIfEnter=function(xn,Dn){if(xn.key==="Enter"||xn.charCode===13){for(var cn=arguments.length,Un=new Array(cn>2?cn-2:0),ti=2;ti<cn;ti++)Un[ti-2]=arguments[ti];Dn.apply(void 0,Un)}},ot.runIfEnterPrev=function(xn){ot.runIfEnter(xn,ot.prev)},ot.runIfEnterNext=function(xn){ot.runIfEnter(xn,ot.next)},ot.runIfEnterJumpPrev=function(xn){ot.runIfEnter(xn,ot.jumpPrev)},ot.runIfEnterJumpNext=function(xn){ot.runIfEnter(xn,ot.jumpNext)},ot.handleGoTO=function(xn){(xn.keyCode===Me.ENTER||xn.type==="click")&&ot.handleChange(ot.state.currentInputValue)},ot.renderPrev=function(xn){var Dn=ot.props,cn=Dn.prevIcon,Un=Dn.itemRender,ti=Un(xn,"prev",ot.getItemIcon(cn,"prev page")),Wn=!ot.hasPrev();return(0,De.isValidElement)(ti)?(0,De.cloneElement)(ti,{disabled:Wn}):ti},ot.renderNext=function(xn){var Dn=ot.props,cn=Dn.nextIcon,Un=Dn.itemRender,ti=Un(xn,"next",ot.getItemIcon(cn,"next page")),Wn=!ot.hasNext();return(0,De.isValidElement)(ti)?(0,De.cloneElement)(ti,{disabled:Wn}):ti};var It=wt.onChange!==ft,sn="current"in wt;sn&&!It&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Xt=wt.defaultCurrent;"current"in wt&&(Xt=wt.current);var Ht=wt.defaultPageSize;return"pageSize"in wt&&(Ht=wt.pageSize),Xt=Math.min(Xt,et(Ht,void 0,wt)),ot.state={current:Xt,currentInputValue:Xt,pageSize:Ht},ot}return(0,he.Z)(yt,[{key:"componentDidUpdate",value:function(ot,It){var sn=this.props.prefixCls;if(It.current!==this.state.current&&this.paginationNode.current){var Xt=this.paginationNode.current.querySelector(".".concat(sn,"-item-").concat(It.current));if(Xt&&document.activeElement===Xt){var Ht;Xt==null||(Ht=Xt.blur)===null||Ht===void 0||Ht.call(Xt)}}}},{key:"getValidValue",value:function(ot){var It=ot.target.value,sn=et(void 0,this.state,this.props),Xt=this.state.currentInputValue,Ht;return It===""?Ht=It:Number.isNaN(Number(It))?Ht=Xt:It>=sn?Ht=sn:Ht=Number(It),Ht}},{key:"getShowSizeChanger",value:function(){var ot=this.props,It=ot.showSizeChanger,sn=ot.total,Xt=ot.totalBoundaryShowSizeChanger;return typeof It!="undefined"?It:sn>Xt}},{key:"render",value:function(){var ot=this.props,It=ot.prefixCls,sn=ot.className,Xt=ot.style,Ht=ot.disabled,xn=ot.hideOnSinglePage,Dn=ot.total,cn=ot.locale,Un=ot.showQuickJumper,ti=ot.showLessItems,Wn=ot.showTitle,Zn=ot.showTotal,Jn=ot.simple,vi=ot.itemRender,pi=ot.showPrevNextJumpers,zi=ot.jumpPrevIcon,$i=ot.jumpNextIcon,Yn=ot.selectComponentClass,Gn=ot.selectPrefixCls,oi=ot.pageSizeOptions,Li=this.state,di=Li.current,gr=Li.pageSize,Ii=Li.currentInputValue;if(xn===!0&&Dn<=gr)return null;var Le=et(void 0,this.state,this.props),si=[],ji=null,gn=null,qn=null,mi=null,Fi=null,jn=Un&&Un.goButton,Tn=ti?1:2,At=di-1>0?di-1:0,Dt=di+1<Le?di+1:Le,Ve=(0,me.Z)(this.props,{aria:!0,data:!0}),Yt=Zn&&De.createElement("li",{className:"".concat(It,"-total-text")},Zn(Dn,[Dn===0?0:(di-1)*gr+1,di*gr>Dn?Dn:di*gr]));if(Jn){jn&&(typeof jn=="boolean"?Fi=De.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},cn.jump_to_confirm):Fi=De.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},jn),Fi=De.createElement("li",{title:Wn?"".concat(cn.jump_to).concat(di,"/").concat(Le):null,className:"".concat(It,"-simple-pager")},Fi));var tn=this.renderPrev(At);return De.createElement("ul",(0,ce.Z)({className:dt()(It,"".concat(It,"-simple"),(0,Ae.Z)({},"".concat(It,"-disabled"),Ht),sn),style:Xt,ref:this.paginationNode},Ve),Yt,tn?De.createElement("li",{title:Wn?cn.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:dt()("".concat(It,"-prev"),(0,Ae.Z)({},"".concat(It,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},tn):null,De.createElement("li",{title:Wn?"".concat(di,"/").concat(Le):null,className:"".concat(It,"-simple-pager")},De.createElement("input",{type:"text",value:Ii,disabled:Ht,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),De.createElement("span",{className:"".concat(It,"-slash")},"/"),Le),De.createElement("li",{title:Wn?cn.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:dt()("".concat(It,"-next"),(0,Ae.Z)({},"".concat(It,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Dt)),Fi)}if(Le<=3+Tn*2){var vt={locale:cn,rootPrefixCls:It,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Wn,itemRender:vi};Le||si.push(De.createElement($e,(0,ce.Z)({},vt,{key:"noPager",page:1,className:"".concat(It,"-item-disabled")})));for(var rt=1;rt<=Le;rt+=1){var Vt=di===rt;si.push(De.createElement($e,(0,ce.Z)({},vt,{key:rt,page:rt,active:Vt})))}}else{var rn=ti?cn.prev_3:cn.prev_5,Pn=ti?cn.next_3:cn.next_5,kn=vi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(zi,"prev page")),St=vi(this.getJumpNextPage(),"jump-next",this.getItemIcon($i,"next page"));pi&&(ji=kn?De.createElement("li",{title:Wn?rn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:dt()("".concat(It,"-jump-prev"),(0,Ae.Z)({},"".concat(It,"-jump-prev-custom-icon"),!!zi))},kn):null,gn=St?De.createElement("li",{title:Wn?Pn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:dt()("".concat(It,"-jump-next"),(0,Ae.Z)({},"".concat(It,"-jump-next-custom-icon"),!!$i))},St):null),mi=De.createElement($e,{locale:cn,last:!0,rootPrefixCls:It,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Le,page:Le,active:!1,showTitle:Wn,itemRender:vi}),qn=De.createElement($e,{locale:cn,rootPrefixCls:It,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Wn,itemRender:vi});var hn=Math.max(1,di-Tn),In=Math.min(di+Tn,Le);di-1<=Tn&&(In=1+Tn*2),Le-di<=Tn&&(hn=Le-Tn*2);for(var ii=hn;ii<=In;ii+=1){var Gt=di===ii;si.push(De.createElement($e,{locale:cn,rootPrefixCls:It,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ii,page:ii,active:Gt,showTitle:Wn,itemRender:vi}))}di-1>=Tn*2&&di!==3&&(si[0]=(0,De.cloneElement)(si[0],{className:"".concat(It,"-item-after-jump-prev")}),si.unshift(ji)),Le-di>=Tn*2&&di!==Le-2&&(si[si.length-1]=(0,De.cloneElement)(si[si.length-1],{className:"".concat(It,"-item-before-jump-next")}),si.push(gn)),hn!==1&&si.unshift(qn),In!==Le&&si.push(mi)}var Jt=!this.hasPrev()||!Le,hi=!this.hasNext()||!Le,fi=this.renderPrev(At),ui=this.renderNext(Dt);return De.createElement("ul",(0,ce.Z)({className:dt()(It,sn,(0,Ae.Z)({},"".concat(It,"-disabled"),Ht)),style:Xt,ref:this.paginationNode},Ve),Yt,fi?De.createElement("li",{title:Wn?cn.prev_page:null,onClick:this.prev,tabIndex:Jt?null:0,onKeyPress:this.runIfEnterPrev,className:dt()("".concat(It,"-prev"),(0,Ae.Z)({},"".concat(It,"-disabled"),Jt)),"aria-disabled":Jt},fi):null,si,ui?De.createElement("li",{title:Wn?cn.next_page:null,onClick:this.next,tabIndex:hi?null:0,onKeyPress:this.runIfEnterNext,className:dt()("".concat(It,"-next"),(0,Ae.Z)({},"".concat(It,"-disabled"),hi)),"aria-disabled":hi},ui):null,De.createElement(je,{disabled:Ht,locale:cn,rootPrefixCls:It,selectComponentClass:Yn,selectPrefixCls:Gn,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:di,pageSize:gr,pageSizeOptions:oi,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:jn}))}}],[{key:"getDerivedStateFromProps",value:function(ot,It){var sn={};if("current"in ot&&(sn.current=ot.current,ot.current!==It.current&&(sn.currentInputValue=sn.current)),"pageSize"in ot&&ot.pageSize!==It.pageSize){var Xt=It.current,Ht=et(ot.pageSize,It,ot);Xt=Xt>Ht?Ht:Xt,"current"in ot||(sn.current=Xt,sn.currentInputValue=Xt),sn.pageSize=ot.pageSize}return sn}}]),yt}(De.Component);bt.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:ft,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:ft,locale:be.Z,style:{},itemRender:Tt,totalBoundaryShowSizeChanger:50};var Bt=bt,Nt=ve(22075),Zt=ve(36355),Ut=ve(19716),lt=ve(8628),Ge=ve(9763),kt=ve(57809);const un=Xe=>De.createElement(kt.default,Object.assign({},Xe,{showSearch:!0,size:"small"})),ln=Xe=>De.createElement(kt.default,Object.assign({},Xe,{showSearch:!0,size:"middle"}));un.Option=kt.default.Option,ln.Option=kt.default.Option;var Ft=ve(9937),$t=ve(17313),Qt=ve(83116),Bn=ve(37613);const on=Xe=>{const{componentCls:Je}=Xe;return{[`${Je}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Je}-item-link`]:{color:Xe.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Je}-item-link`]:{color:Xe.colorTextDisabled,cursor:"not-allowed"}}},[`&${Je}-disabled`]:{cursor:"not-allowed",[`${Je}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:Xe.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:Xe.colorBorder,backgroundColor:Xe.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:Xe.itemActiveBgDisabled},a:{color:Xe.itemActiveColorDisabled}}},[`${Je}-item-link`]:{color:Xe.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Je}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Je}-simple-pager`]:{color:Xe.colorTextDisabled},[`${Je}-jump-prev, ${Je}-jump-next`]:{[`${Je}-item-link-icon`]:{opacity:0},[`${Je}-item-ellipsis`]:{opacity:1}}},[`&${Je}-simple`]:{[`${Je}-prev, ${Je}-next`]:{[`&${Je}-disabled ${Je}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Cn=Xe=>{const{componentCls:Je}=Xe;return{[`&${Je}-mini ${Je}-total-text, &${Je}-mini ${Je}-simple-pager`]:{height:Xe.itemSizeSM,lineHeight:`${Xe.itemSizeSM}px`},[`&${Je}-mini ${Je}-item`]:{minWidth:Xe.itemSizeSM,height:Xe.itemSizeSM,margin:0,lineHeight:`${Xe.itemSizeSM-2}px`},[`&${Je}-mini:not(${Je}-disabled) ${Je}-item:not(${Je}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Xe.colorBgTextHover},"&:active":{backgroundColor:Xe.colorBgTextActive}},[`&${Je}-mini ${Je}-prev, &${Je}-mini ${Je}-next`]:{minWidth:Xe.itemSizeSM,height:Xe.itemSizeSM,margin:0,lineHeight:`${Xe.itemSizeSM}px`},[`&${Je}-mini:not(${Je}-disabled)`]:{[`${Je}-prev, ${Je}-next`]:{[`&:hover ${Je}-item-link`]:{backgroundColor:Xe.colorBgTextHover},[`&:active ${Je}-item-link`]:{backgroundColor:Xe.colorBgTextActive},[`&${Je}-disabled:hover ${Je}-item-link`]:{backgroundColor:"transparent"}}},[`
&${Je}-mini ${Je}-prev ${Je}-item-link,
&${Je}-mini ${Je}-next ${Je}-item-link
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Xe.itemSizeSM,lineHeight:`${Xe.itemSizeSM}px`}},[`&${Je}-mini ${Je}-jump-prev, &${Je}-mini ${Je}-jump-next`]:{height:Xe.itemSizeSM,marginInlineEnd:0,lineHeight:`${Xe.itemSizeSM}px`},[`&${Je}-mini ${Je}-options`]:{marginInlineStart:Xe.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Xe.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Xe.itemSizeSM,lineHeight:`${Xe.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Ft.x0)(Xe)),{width:Xe.paginationMiniQuickJumperInputWidth,height:Xe.controlHeightSM})}}}},gt=Xe=>{const{componentCls:Je}=Xe;return{[`
&${Je}-simple ${Je}-prev,
&${Je}-simple ${Je}-next
`]:{height:Xe.itemSizeSM,lineHeight:`${Xe.itemSizeSM}px`,verticalAlign:"top",[`${Je}-item-link`]:{height:Xe.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:Xe.colorBgTextHover},"&:active":{backgroundColor:Xe.colorBgTextActive},"&::after":{height:Xe.itemSizeSM,lineHeight:`${Xe.itemSizeSM}px`}}},[`&${Je}-simple ${Je}-simple-pager`]:{display:"inline-block",height:Xe.itemSizeSM,marginInlineEnd:Xe.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:Xe.marginXS,padding:`0 ${Xe.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:Xe.itemInputBg,border:`${Xe.lineWidth}px ${Xe.lineType} ${Xe.colorBorder}`,borderRadius:Xe.borderRadius,outline:"none",transition:`border-color ${Xe.motionDurationMid}`,color:"inherit","&:hover":{borderColor:Xe.colorPrimary},"&:focus":{borderColor:Xe.colorPrimaryHover,boxShadow:`${Xe.inputOutlineOffset}px 0 ${Xe.controlOutlineWidth}px ${Xe.controlOutline}`},"&[disabled]":{color:Xe.colorTextDisabled,backgroundColor:Xe.colorBgContainerDisabled,borderColor:Xe.colorBorder,cursor:"not-allowed"}}}}},En=Xe=>{const{componentCls:Je}=Xe;return{[`${Je}-jump-prev, ${Je}-jump-next`]:{outline:0,[`${Je}-item-container`]:{position:"relative",[`${Je}-item-link-icon`]:{color:Xe.colorPrimary,fontSize:Xe.fontSizeSM,opacity:0,transition:`all ${Xe.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Je}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:Xe.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:Xe.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:Xe.paginationEllipsisTextIndent,opacity:1,transition:`all ${Xe.motionDurationMid}`}},"&:hover":{[`${Je}-item-link-icon`]:{opacity:1},[`${Je}-item-ellipsis`]:{opacity:0}}},[`
${Je}-prev,
${Je}-jump-prev,
${Je}-jump-next
`]:{marginInlineEnd:Xe.marginXS},[`
${Je}-prev,
${Je}-next,
${Je}-jump-prev,
${Je}-jump-next
`]:{display:"inline-block",minWidth:Xe.itemSize,height:Xe.itemSize,color:Xe.colorText,fontFamily:Xe.fontFamily,lineHeight:`${Xe.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:Xe.borderRadius,cursor:"pointer",transition:`all ${Xe.motionDurationMid}`},[`${Je}-prev, ${Je}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Xe.colorText,cursor:"pointer",userSelect:"none"},[`${Je}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:Xe.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${Xe.lineWidth}px ${Xe.lineType} transparent`,borderRadius:Xe.borderRadius,outline:"none",transition:`all ${Xe.motionDurationMid}`},[`&:hover ${Je}-item-link`]:{backgroundColor:Xe.colorBgTextHover},[`&:active ${Je}-item-link`]:{backgroundColor:Xe.colorBgTextActive},[`&${Je}-disabled:hover`]:{[`${Je}-item-link`]:{backgroundColor:"transparent"}}},[`${Je}-slash`]:{marginInlineEnd:Xe.paginationSlashMarginInlineEnd,marginInlineStart:Xe.paginationSlashMarginInlineStart},[`${Je}-options`]:{display:"inline-block",marginInlineStart:Xe.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:Xe.controlHeight,marginInlineStart:Xe.marginXS,lineHeight:`${Xe.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Ft.ik)(Xe)),{width:Xe.controlHeightLG*1.25,height:Xe.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Xe.marginXS,marginInlineEnd:Xe.marginXS})}}}},Vn=Xe=>{const{componentCls:Je}=Xe;return{[`${Je}-item`]:{display:"inline-block",minWidth:Xe.itemSize,height:Xe.itemSize,marginInlineEnd:Xe.marginXS,fontFamily:Xe.fontFamily,lineHeight:`${Xe.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${Xe.lineWidth}px ${Xe.lineType} transparent`,borderRadius:Xe.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${Xe.paginationItemPaddingInline}px`,color:Xe.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Je}-item-active)`]:{"&:hover":{transition:`all ${Xe.motionDurationMid}`,backgroundColor:Xe.colorBgTextHover},"&:active":{backgroundColor:Xe.colorBgTextActive}},"&-active":{fontWeight:Xe.fontWeightStrong,backgroundColor:Xe.itemActiveBg,borderColor:Xe.colorPrimary,a:{color:Xe.colorPrimary},"&:hover":{borderColor:Xe.colorPrimaryHover},"&:hover a":{color:Xe.colorPrimaryHover}}}}},He=Xe=>{const{componentCls:Je}=Xe;return{[Je]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,$t.Wf)(Xe)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Je}-total-text`]:{display:"inline-block",height:Xe.itemSize,marginInlineEnd:Xe.marginXS,lineHeight:`${Xe.itemSize-2}px`,verticalAlign:"middle"}}),Vn(Xe)),En(Xe)),gt(Xe)),Cn(Xe)),on(Xe)),{[`@media only screen and (max-width: ${Xe.screenLG}px)`]:{[`${Je}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Xe.screenSM}px)`]:{[`${Je}-options`]:{display:"none"}}}),[`&${Xe.componentCls}-rtl`]:{direction:"rtl"}}},Ce=Xe=>{const{componentCls:Je}=Xe;return{[`${Je}${Je}-disabled:not(${Je}-mini)`]:{"&, &:hover":{[`${Je}-item-link`]:{borderColor:Xe.colorBorder}},"&:focus-visible":{[`${Je}-item-link`]:{borderColor:Xe.colorBorder}},[`${Je}-item, ${Je}-item-link`]:{backgroundColor:Xe.colorBgContainerDisabled,borderColor:Xe.colorBorder,[`&:hover:not(${Je}-item-active)`]:{backgroundColor:Xe.colorBgContainerDisabled,borderColor:Xe.colorBorder,a:{color:Xe.colorTextDisabled}},[`&${Je}-item-active`]:{backgroundColor:Xe.itemActiveBgDisabled}},[`${Je}-prev, ${Je}-next`]:{"&:hover button":{backgroundColor:Xe.colorBgContainerDisabled,borderColor:Xe.colorBorder,color:Xe.colorTextDisabled},[`${Je}-item-link`]:{backgroundColor:Xe.colorBgContainerDisabled,borderColor:Xe.colorBorder}}},[`${Je}:not(${Je}-mini)`]:{[`${Je}-prev, ${Je}-next`]:{"&:hover button":{borderColor:Xe.colorPrimaryHover,backgroundColor:Xe.itemBg},[`${Je}-item-link`]:{backgroundColor:Xe.itemLinkBg,borderColor:Xe.colorBorder},[`&:hover ${Je}-item-link`]:{borderColor:Xe.colorPrimary,backgroundColor:Xe.itemBg,color:Xe.colorPrimary},[`&${Je}-disabled`]:{[`${Je}-item-link`]:{borderColor:Xe.colorBorder,color:Xe.colorTextDisabled}}},[`${Je}-item`]:{backgroundColor:Xe.itemBg,border:`${Xe.lineWidth}px ${Xe.lineType} ${Xe.colorBorder}`,[`&:hover:not(${Je}-item-active)`]:{borderColor:Xe.colorPrimary,backgroundColor:Xe.itemBg,a:{color:Xe.colorPrimary}},"&-active":{borderColor:Xe.colorPrimary}}}}},Pe=Xe=>{const{componentCls:Je}=Xe;return{[`${Je}:not(${Je}-disabled)`]:{[`${Je}-item`]:Object.assign({},(0,$t.Qy)(Xe)),[`${Je}-jump-prev, ${Je}-jump-next`]:{"&:focus-visible":Object.assign({[`${Je}-item-link-icon`]:{opacity:1},[`${Je}-item-ellipsis`]:{opacity:0}},(0,$t.oN)(Xe))},[`${Je}-prev, ${Je}-next`]:{[`&:focus-visible ${Je}-item-link`]:Object.assign({},(0,$t.oN)(Xe))}}}};var Ne=(0,Qt.Z)("Pagination",Xe=>{const Je=(0,Bn.TS)(Xe,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:Xe.marginXXS/2,paginationMiniQuickJumperInputWidth:Xe.controlHeightLG*1.1,paginationItemPaddingInline:Xe.marginXXS*1.5,paginationEllipsisLetterSpacing:Xe.marginXXS/2,paginationSlashMarginInlineStart:Xe.marginXXS,paginationSlashMarginInlineEnd:Xe.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Ft.e5)(Xe),(0,Ft.TM)(Xe));return[He(Je),Pe(Je),Xe.wireframe&&Ce(Je)]},Xe=>({itemBg:Xe.colorBgContainer,itemSize:Xe.controlHeight,itemSizeSM:Xe.controlHeightSM,itemActiveBg:Xe.colorBgContainer,itemLinkBg:Xe.colorBgContainer,itemActiveColorDisabled:Xe.colorTextDisabled,itemActiveBgDisabled:Xe.controlItemBgActiveDisabled,itemInputBg:Xe.colorBgContainer,miniOptionsSizeChangerTop:0})),ke=function(Xe,Je){var yt={};for(var wt in Xe)Object.prototype.hasOwnProperty.call(Xe,wt)&&Je.indexOf(wt)<0&&(yt[wt]=Xe[wt]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,wt=Object.getOwnPropertySymbols(Xe);ot<wt.length;ot++)Je.indexOf(wt[ot])<0&&Object.prototype.propertyIsEnumerable.call(Xe,wt[ot])&&(yt[wt[ot]]=Xe[wt[ot]]);return yt},nt=Xe=>{const{prefixCls:Je,selectPrefixCls:yt,className:wt,rootClassName:ot,style:It,size:sn,locale:Xt,selectComponentClass:Ht,responsive:xn,showSizeChanger:Dn}=Xe,cn=ke(Xe,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:Un}=(0,lt.Z)(xn),{getPrefixCls:ti,direction:Wn,pagination:Zn={}}=De.useContext(Zt.E_),Jn=ti("pagination",Je),[vi,pi]=Ne(Jn),zi=Dn!=null?Dn:Zn.showSizeChanger,$i=De.useMemo(()=>{const Le=De.createElement("span",{className:`${Jn}-item-ellipsis`},"\u2022\u2022\u2022"),si=De.createElement("button",{className:`${Jn}-item-link`,type:"button",tabIndex:-1},Wn==="rtl"?De.createElement(Et.Z,null):De.createElement(Ze.Z,null)),ji=De.createElement("button",{className:`${Jn}-item-link`,type:"button",tabIndex:-1},Wn==="rtl"?De.createElement(Ze.Z,null):De.createElement(Et.Z,null)),gn=De.createElement("a",{className:`${Jn}-item-link`},De.createElement("div",{className:`${Jn}-item-container`},Wn==="rtl"?De.createElement(ct.Z,{className:`${Jn}-item-link-icon`}):De.createElement(mt,{className:`${Jn}-item-link-icon`}),Le)),qn=De.createElement("a",{className:`${Jn}-item-link`},De.createElement("div",{className:`${Jn}-item-container`},Wn==="rtl"?De.createElement(mt,{className:`${Jn}-item-link-icon`}):De.createElement(ct.Z,{className:`${Jn}-item-link-icon`}),Le));return{prevIcon:si,nextIcon:ji,jumpPrevIcon:gn,jumpNextIcon:qn}},[Wn,Jn]),[Yn]=(0,Ge.Z)("Pagination",Nt.Z),Gn=Object.assign(Object.assign({},Yn),Xt),oi=(0,Ut.Z)(sn),Li=oi==="small"||!!(Un&&!oi&&xn),di=ti("select",yt),gr=dt()({[`${Jn}-mini`]:Li,[`${Jn}-rtl`]:Wn==="rtl"},Zn==null?void 0:Zn.className,wt,ot,pi),Ii=Object.assign(Object.assign({},Zn==null?void 0:Zn.style),It);return vi(De.createElement(Bt,Object.assign({},$i,cn,{style:Ii,prefixCls:Jn,selectPrefixCls:di,className:gr,selectComponentClass:Ht||(Li?un:ln),locale:Gn,showSizeChanger:zi})))},Pt=nt},39722:function(Sn,an,ve){"use strict";ve.d(an,{t5:function(){return Ze}});var ce=ve(92310),De=ve.n(ce),ze=ve(55477),Ct=ve(59301),_e=ve(36355),Ke=ve(77578),Be=ve(17356),mt=function(ht,dt){var Ae={};for(var te in ht)Object.prototype.hasOwnProperty.call(ht,te)&&dt.indexOf(te)<0&&(Ae[te]=ht[te]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,te=Object.getOwnPropertySymbols(ht);ee<te.length;ee++)dt.indexOf(te[ee])<0&&Object.prototype.propertyIsEnumerable.call(ht,te[ee])&&(Ae[te[ee]]=ht[te[ee]]);return Ae};const ct=(ht,dt,Ae)=>{if(!(!dt&&!Ae))return Ct.createElement(Ct.Fragment,null,dt&&Ct.createElement("div",{className:`${ht}-title`},(0,Ke.Z)(dt)),Ct.createElement("div",{className:`${ht}-inner-content`},(0,Ke.Z)(Ae)))},Ze=ht=>{const{hashId:dt,prefixCls:Ae,className:te,style:ee,placement:he="top",title:se,content:de,children:me}=ht;return Ct.createElement("div",{className:De()(dt,Ae,`${Ae}-pure`,`${Ae}-placement-${he}`,te),style:ee},Ct.createElement("div",{className:`${Ae}-arrow`}),Ct.createElement(ze.G,Object.assign({},ht,{className:dt,prefixCls:Ae}),me||ct(Ae,se,de)))},Et=ht=>{const{prefixCls:dt}=ht,Ae=mt(ht,["prefixCls"]),{getPrefixCls:te}=Ct.useContext(_e.E_),ee=te("popover",dt),[he,se]=(0,Be.Z)(ee);return he(Ct.createElement(Ze,Object.assign({},Ae,{prefixCls:ee,hashId:se})))};an.ZP=Et},60324:function(Sn,an,ve){"use strict";var ce=ve(92310),De=ve.n(ce),ze=ve(59301),Ct=ve(77578),_e=ve(62892),Ke=ve(36355),Be=ve(6848),mt=ve(39722),ct=ve(17356),Ze=function(dt,Ae){var te={};for(var ee in dt)Object.prototype.hasOwnProperty.call(dt,ee)&&Ae.indexOf(ee)<0&&(te[ee]=dt[ee]);if(dt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,ee=Object.getOwnPropertySymbols(dt);he<ee.length;he++)Ae.indexOf(ee[he])<0&&Object.prototype.propertyIsEnumerable.call(dt,ee[he])&&(te[ee[he]]=dt[ee[he]]);return te};const Et=dt=>{let{title:Ae,content:te,prefixCls:ee}=dt;return ze.createElement(ze.Fragment,null,Ae&&ze.createElement("div",{className:`${ee}-title`},(0,Ct.Z)(Ae)),ze.createElement("div",{className:`${ee}-inner-content`},(0,Ct.Z)(te)))},ht=ze.forwardRef((dt,Ae)=>{const{prefixCls:te,title:ee,content:he,overlayClassName:se,placement:de="top",trigger:me="hover",mouseEnterDelay:we=.1,mouseLeaveDelay:Me=.1,overlayStyle:be={}}=dt,Ie=Ze(dt,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:je}=ze.useContext(Ke.E_),qe=je("popover",te),[$e,ft]=(0,ct.Z)(qe),Re=je(),Tt=De()(se,ft);return $e(ze.createElement(Be.Z,Object.assign({placement:de,trigger:me,mouseEnterDelay:we,mouseLeaveDelay:Me,overlayStyle:be},Ie,{prefixCls:qe,overlayClassName:Tt,ref:Ae,overlay:ee||he?ze.createElement(Et,{prefixCls:qe,title:ee,content:he}):null,transitionName:(0,_e.m)(Re,"zoom-big",Ie.transitionName),"data-popover-inject":!0})))});ht._InternalPanelDoNotUseOrYouWillBeFired=mt.ZP,an.Z=ht},17356:function(Sn,an,ve){"use strict";var ce=ve(17313),De=ve(29878),ze=ve(19447),Ct=ve(33166),_e=ve(83116),Ke=ve(37613);const Be=Ze=>{const{componentCls:Et,popoverColor:ht,minWidth:dt,fontWeightStrong:Ae,popoverPadding:te,boxShadowSecondary:ee,colorTextHeading:he,borderRadiusLG:se,zIndexPopup:de,marginXS:me,colorBgElevated:we,popoverBg:Me}=Ze;return[{[Et]:Object.assign(Object.assign({},(0,ce.Wf)(Ze)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:de,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":we,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${Et}-content`]:{position:"relative"},[`${Et}-inner`]:{backgroundColor:Me,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:te},[`${Et}-title`]:{minWidth:dt,marginBottom:me,color:he,fontWeight:Ae},[`${Et}-inner-content`]:{color:ht}})},(0,ze.ZP)(Ze,{colorBg:"var(--antd-arrow-background-color)"}),{[`${Et}-pure`]:{position:"relative",maxWidth:"none",margin:Ze.sizePopupArrow,display:"inline-block",[`${Et}-content`]:{display:"inline-block"}}}]},mt=Ze=>{const{componentCls:Et}=Ze;return{[Et]:Ct.i.map(ht=>{const dt=Ze[`${ht}6`];return{[`&${Et}-${ht}`]:{"--antd-arrow-background-color":dt,[`${Et}-inner`]:{backgroundColor:dt},[`${Et}-arrow`]:{background:"transparent"}}}})}},ct=Ze=>{const{componentCls:Et,lineWidth:ht,lineType:dt,colorSplit:Ae,paddingSM:te,controlHeight:ee,fontSize:he,lineHeight:se,padding:de}=Ze,me=ee-Math.round(he*se),we=me/2,Me=me/2-ht,be=de;return{[Et]:{[`${Et}-inner`]:{padding:0},[`${Et}-title`]:{margin:0,padding:`${we}px ${be}px ${Me}px`,borderBottom:`${ht}px ${dt} ${Ae}`},[`${Et}-inner-content`]:{padding:`${te}px ${be}px`}}}};an.Z=(0,_e.Z)("Popover",Ze=>{const{colorBgElevated:Et,colorText:ht,wireframe:dt}=Ze,Ae=(0,Ke.TS)(Ze,{popoverPadding:12,popoverBg:Et,popoverColor:ht});return[Be(Ae),mt(Ae),dt&&ct(Ae),(0,De._y)(Ae,"zoom-big")]},Ze=>({width:177,minWidth:177,zIndexPopup:Ze.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},13570:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Ge}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(un,ln){return De.createElement(_e.Z,(0,ce.Z)({},un,{ref:ln,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be,ct=ve(92310),Ze=ve.n(ct),Et=ve(400),ht=ve(33606),dt=ve(37061),Ae=ve(18929),te=ve(10228),ee=ve(26112);function he(kt,un){var ln=kt.disabled,Ft=kt.prefixCls,$t=kt.character,Qt=kt.characterRender,Bn=kt.index,on=kt.count,Cn=kt.value,gt=kt.allowHalf,En=kt.focused,Vn=kt.onHover,He=kt.onClick,Ce=function(Je){Vn(Je,Bn)},Pe=function(Je){He(Je,Bn)},Ne=function(Je){Je.keyCode===te.Z.ENTER&&He(Je,Bn)},ke=Bn+1,Se=new Set([Ft]);Cn===0&&Bn===0&&En?Se.add("".concat(Ft,"-focused")):gt&&Cn+.5>=ke&&Cn<ke?(Se.add("".concat(Ft,"-half")),Se.add("".concat(Ft,"-active")),En&&Se.add("".concat(Ft,"-focused"))):(ke<=Cn?Se.add("".concat(Ft,"-full")):Se.add("".concat(Ft,"-zero")),ke===Cn&&En&&Se.add("".concat(Ft,"-focused")));var nt=typeof $t=="function"?$t(kt):$t,Pt=De.createElement("li",{className:Ze()(Array.from(Se)),ref:un},De.createElement("div",{onClick:ln?null:Pe,onKeyDown:ln?null:Ne,onMouseMove:ln?null:Ce,role:"radio","aria-checked":Cn>Bn?"true":"false","aria-posinset":Bn+1,"aria-setsize":on,tabIndex:ln?-1:0},De.createElement("div",{className:"".concat(Ft,"-first")},nt),De.createElement("div",{className:"".concat(Ft,"-second")},nt)));return Qt&&(Pt=Qt(Pt,kt)),Pt}var se=De.forwardRef(he);function de(){var kt=De.useRef({});function un(Ft){return kt.current[Ft]}function ln(Ft){return function($t){kt.current[Ft]=$t}}return[un,ln]}function me(kt){var un=kt.pageXOffset,ln="scrollLeft";if(typeof un!="number"){var Ft=kt.document;un=Ft.documentElement[ln],typeof un!="number"&&(un=Ft.body[ln])}return un}function we(kt){var un,ln,Ft=kt.ownerDocument,$t=Ft.body,Qt=Ft&&Ft.documentElement,Bn=kt.getBoundingClientRect();return un=Bn.left,ln=Bn.top,un-=Qt.clientLeft||$t.clientLeft||0,ln-=Qt.clientTop||$t.clientTop||0,{left:un,top:ln}}function Me(kt){var un=we(kt),ln=kt.ownerDocument,Ft=ln.defaultView||ln.parentWindow;return un.left+=me(Ft),un.left}var be=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function Ie(kt,un){var ln,Ft=kt.prefixCls,$t=Ft===void 0?"rc-rate":Ft,Qt=kt.className,Bn=kt.defaultValue,on=kt.value,Cn=kt.count,gt=Cn===void 0?5:Cn,En=kt.allowHalf,Vn=En===void 0?!1:En,He=kt.allowClear,Ce=He===void 0?!0:He,Pe=kt.character,Ne=Pe===void 0?"\u2605":Pe,ke=kt.characterRender,Se=kt.disabled,nt=kt.direction,Pt=nt===void 0?"ltr":nt,Xe=kt.tabIndex,Je=Xe===void 0?0:Xe,yt=kt.autoFocus,wt=kt.onHoverChange,ot=kt.onChange,It=kt.onFocus,sn=kt.onBlur,Xt=kt.onKeyDown,Ht=kt.onMouseLeave,xn=(0,dt.Z)(kt,be),Dn=de(),cn=(0,ht.Z)(Dn,2),Un=cn[0],ti=cn[1],Wn=De.useRef(null),Zn=function(){if(!Se){var rt;(rt=Wn.current)===null||rt===void 0||rt.focus()}};De.useImperativeHandle(un,function(){return{focus:Zn,blur:function(){if(!Se){var rt;(rt=Wn.current)===null||rt===void 0||rt.blur()}}}});var Jn=(0,Ae.Z)(Bn||0,{value:on}),vi=(0,ht.Z)(Jn,2),pi=vi[0],zi=vi[1],$i=(0,Ae.Z)(null),Yn=(0,ht.Z)($i,2),Gn=Yn[0],oi=Yn[1],Li=function(rt,Vt){var rn=Pt==="rtl",Pn=rt+1;if(Vn){var kn=Un(rt),St=Me(kn),hn=kn.clientWidth;(rn&&Vt-St>hn/2||!rn&&Vt-St<hn/2)&&(Pn-=.5)}return Pn},di=function(rt){zi(rt),ot==null||ot(rt)},gr=De.useState(!1),Ii=(0,ht.Z)(gr,2),Le=Ii[0],si=Ii[1],ji=function(){si(!0),It==null||It()},gn=function(){si(!1),sn==null||sn()},qn=De.useState(null),mi=(0,ht.Z)(qn,2),Fi=mi[0],jn=mi[1],Tn=function(rt,Vt){var rn=Li(Vt,rt.pageX);rn!==Gn&&(jn(rn),oi(null)),wt==null||wt(rn)},At=function(rt){Se||(jn(null),oi(null),wt==null||wt(void 0)),rt&&(Ht==null||Ht(rt))},Dt=function(rt,Vt){var rn=Li(Vt,rt.pageX),Pn=!1;Ce&&(Pn=rn===pi),At(),di(Pn?0:rn),oi(Pn?rn:null)},Ve=function(rt){var Vt=rt.keyCode,rn=Pt==="rtl",Pn=pi;Vt===te.Z.RIGHT&&Pn<gt&&!rn?(Vn?Pn+=.5:Pn+=1,di(Pn),rt.preventDefault()):Vt===te.Z.LEFT&&Pn>0&&!rn||Vt===te.Z.RIGHT&&Pn>0&&rn?(Vn?Pn-=.5:Pn-=1,di(Pn),rt.preventDefault()):Vt===te.Z.LEFT&&Pn<gt&&rn&&(Vn?Pn+=.5:Pn+=1,di(Pn),rt.preventDefault()),Xt==null||Xt(rt)};De.useEffect(function(){yt&&!Se&&Zn()},[]);var Yt=new Array(gt).fill(0).map(function(vt,rt){return De.createElement(se,{ref:ti(rt),index:rt,count:gt,disabled:Se,prefixCls:"".concat($t,"-star"),allowHalf:Vn,value:Fi===null?pi:Fi,onClick:Dt,onHover:Tn,key:vt||rt,character:Ne,characterRender:ke,focused:Le})}),tn=Ze()($t,Qt,(ln={},(0,Et.Z)(ln,"".concat($t,"-disabled"),Se),(0,Et.Z)(ln,"".concat($t,"-rtl"),Pt==="rtl"),ln));return De.createElement("ul",(0,ce.Z)({className:tn,onMouseLeave:At,tabIndex:Se?-1:Je,onFocus:Se?null:ji,onBlur:Se?null:gn,onKeyDown:Se?null:Ve,ref:Wn,role:"radiogroup"},(0,ee.Z)(xn,{aria:!0,data:!0,attr:!0})),Yt)}var je=De.forwardRef(Ie),qe=je,$e=ve(36355),ft=ve(6848),Re=ve(17313),Tt=ve(83116),et=ve(37613);const bt=kt=>{const{componentCls:un}=kt;return{[`${un}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:kt.marginXS},"> div":{transition:`all ${kt.motionDurationMid}, outline 0s`,"&:hover":{transform:kt.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${kt.lineWidth}px dashed ${kt.starColor}`,transform:kt.starHoverScale}},"&-first, &-second":{color:kt.starBg,transition:`all ${kt.motionDurationMid}`,userSelect:"none",[kt.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${un}-star-first, &-half ${un}-star-second`]:{opacity:1},[`&-half ${un}-star-first, &-full ${un}-star-second`]:{color:"inherit"}}}},Bt=kt=>({[`&-rtl${kt.componentCls}`]:{direction:"rtl"}}),Nt=kt=>{const{componentCls:un}=kt;return{[un]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Re.Wf)(kt)),{display:"inline-block",margin:0,padding:0,color:kt.starColor,fontSize:kt.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${un} ${un}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),bt(kt)),{[`+ ${un}-text`]:{display:"inline-block",marginInlineStart:kt.marginXS,fontSize:kt.fontSize}}),Bt(kt))}};var Zt=(0,Tt.Z)("Rate",kt=>{const un=(0,et.TS)(kt,{});return[Nt(un)]},kt=>({starColor:kt.yellow6,starSize:kt.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:kt.colorFillContent})),Ut=function(kt,un){var ln={};for(var Ft in kt)Object.prototype.hasOwnProperty.call(kt,Ft)&&un.indexOf(Ft)<0&&(ln[Ft]=kt[Ft]);if(kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $t=0,Ft=Object.getOwnPropertySymbols(kt);$t<Ft.length;$t++)un.indexOf(Ft[$t])<0&&Object.prototype.propertyIsEnumerable.call(kt,Ft[$t])&&(ln[Ft[$t]]=kt[Ft[$t]]);return ln},Ge=De.forwardRef((kt,un)=>{const{prefixCls:ln,className:Ft,rootClassName:$t,style:Qt,tooltips:Bn,character:on=De.createElement(mt,null)}=kt,Cn=Ut(kt,["prefixCls","className","rootClassName","style","tooltips","character"]),gt=(Se,nt)=>{let{index:Pt}=nt;return Bn?De.createElement(ft.Z,{title:Bn[Pt]},Se):Se},{getPrefixCls:En,direction:Vn,rate:He}=De.useContext($e.E_),Ce=En("rate",ln),[Pe,Ne]=Zt(Ce),ke=Object.assign(Object.assign({},He==null?void 0:He.style),Qt);return Pe(De.createElement(qe,Object.assign({ref:un,character:on,characterRender:gt},Cn,{className:Ze()(Ft,$t,Ne,He==null?void 0:He.className),style:ke,prefixCls:Ce,direction:Vn})))})},57809:function(Sn,an,ve){"use strict";var ce=ve(92310),De=ve.n(ce),ze=ve(77861),Ct=ve(2738),_e=ve(59301),Ke=ve(53487),Be=ve(62892),mt=ve(19080),ct=ve(36355),Ze=ve(1684),Et=ve(93891),ht=ve(19716),dt=ve(32441),Ae=ve(33234),te=ve(14154),ee=ve(58582),he=ve(84443),se=ve(66339),de=function(Ie,je){var qe={};for(var $e in Ie)Object.prototype.hasOwnProperty.call(Ie,$e)&&je.indexOf($e)<0&&(qe[$e]=Ie[$e]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,$e=Object.getOwnPropertySymbols(Ie);ft<$e.length;ft++)je.indexOf($e[ft])<0&&Object.prototype.propertyIsEnumerable.call(Ie,$e[ft])&&(qe[$e[ft]]=Ie[$e[ft]]);return qe};const me="SECRET_COMBOBOX_MODE_DO_NOT_USE",we=(Ie,je)=>{var qe,{prefixCls:$e,bordered:ft=!0,className:Re,rootClassName:Tt,getPopupContainer:et,popupClassName:bt,dropdownClassName:Bt,listHeight:Nt=256,placement:Zt,listItemHeight:Ut=24,size:lt,disabled:Ge,notFoundContent:kt,status:un,builtinPlacements:ln,dropdownMatchSelectWidth:Ft,popupMatchSelectWidth:$t,direction:Qt,style:Bn,allowClear:on}=Ie,Cn=de(Ie,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:gt,getPrefixCls:En,renderEmpty:Vn,direction:He,virtual:Ce,popupMatchSelectWidth:Pe,popupOverflow:Ne,select:ke}=_e.useContext(ct.E_),Se=En("select",$e),nt=En(),Pt=Qt!=null?Qt:He,{compactSize:Xe,compactItemClassnames:Je}=(0,Ae.ri)(Se,Pt),[yt,wt]=(0,te.Z)(Se),ot=_e.useMemo(()=>{const{mode:Ii}=Cn;if(Ii!=="combobox")return Ii===me?"combobox":Ii},[Cn.mode]),It=ot==="multiple"||ot==="tags",sn=(0,he.Z)(Cn.suffixIcon,Cn.showArrow),Xt=(qe=$t!=null?$t:Ft)!==null&&qe!==void 0?qe:Pe,{status:Ht,hasFeedback:xn,isFormItemInput:Dn,feedbackIcon:cn}=_e.useContext(dt.aM),Un=(0,mt.F)(Ht,un);let ti;kt!==void 0?ti=kt:ot==="combobox"?ti=null:ti=(Vn==null?void 0:Vn("Select"))||_e.createElement(Et.Z,{componentName:"Select"});const{suffixIcon:Wn,itemIcon:Zn,removeIcon:Jn,clearIcon:vi}=(0,se.Z)(Object.assign(Object.assign({},Cn),{multiple:It,hasFeedback:xn,feedbackIcon:cn,showSuffixIcon:sn,prefixCls:Se,showArrow:Cn.showArrow,componentName:"Select"})),pi=on===!0?{clearIcon:vi}:on,zi=(0,Ct.Z)(Cn,["suffixIcon","itemIcon"]),$i=De()(bt||Bt,{[`${Se}-dropdown-${Pt}`]:Pt==="rtl"},Tt,wt),Yn=(0,ht.Z)(Ii=>{var Le;return(Le=lt!=null?lt:Xe)!==null&&Le!==void 0?Le:Ii}),Gn=_e.useContext(Ze.Z),oi=Ge!=null?Ge:Gn,Li=De()({[`${Se}-lg`]:Yn==="large",[`${Se}-sm`]:Yn==="small",[`${Se}-rtl`]:Pt==="rtl",[`${Se}-borderless`]:!ft,[`${Se}-in-form-item`]:Dn},(0,mt.Z)(Se,Un,xn),Je,ke==null?void 0:ke.className,Re,Tt,wt),di=_e.useMemo(()=>Zt!==void 0?Zt:Pt==="rtl"?"bottomRight":"bottomLeft",[Zt,Pt]),gr=(0,ee.Z)(ln,Ne);return yt(_e.createElement(ze.ZP,Object.assign({ref:je,virtual:Ce,showSearch:ke==null?void 0:ke.showSearch},zi,{style:Object.assign(Object.assign({},ke==null?void 0:ke.style),Bn),dropdownMatchSelectWidth:Xt,builtinPlacements:gr,transitionName:(0,Be.m)(nt,"slide-up",Cn.transitionName),listHeight:Nt,listItemHeight:Ut,mode:ot,prefixCls:Se,placement:di,direction:Pt,suffixIcon:Wn,menuItemSelectedIcon:Zn,removeIcon:Jn,allowClear:pi,notFoundContent:ti,className:Li,getPopupContainer:et||gt,dropdownClassName:$i,disabled:oi})))},Me=_e.forwardRef(we),be=(0,Ke.Z)(Me);Me.SECRET_COMBOBOX_MODE_DO_NOT_USE=me,Me.Option=ze.Wx,Me.OptGroup=ze.Xo,Me._InternalPanelDoNotUseOrYouWillBeFired=be,an.default=Me},14154:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Me}});var ce=ve(17313),De=ve(74207),ze=ve(37613),Ct=ve(83116),_e=ve(13826),Ke=ve(92899);const Be=be=>{const{optionHeight:Ie,optionFontSize:je,optionLineHeight:qe,optionPadding:$e}=be;return{position:"relative",display:"block",minHeight:Ie,padding:$e,color:be.colorText,fontWeight:"normal",fontSize:je,lineHeight:qe,boxSizing:"border-box"}};var ct=be=>{const{antCls:Ie,componentCls:je}=be,qe=`${je}-item`,$e=`&${Ie}-slide-up-enter${Ie}-slide-up-enter-active`,ft=`&${Ie}-slide-up-appear${Ie}-slide-up-appear-active`,Re=`&${Ie}-slide-up-leave${Ie}-slide-up-leave-active`,Tt=`${je}-dropdown-placement-`;return[{[`${je}-dropdown`]:Object.assign(Object.assign({},(0,ce.Wf)(be)),{position:"absolute",top:-9999,zIndex:be.zIndexPopup,boxSizing:"border-box",padding:be.paddingXXS,overflow:"hidden",fontSize:be.fontSize,fontVariant:"initial",backgroundColor:be.colorBgElevated,borderRadius:be.borderRadiusLG,outline:"none",boxShadow:be.boxShadowSecondary,[`
${$e}${Tt}bottomLeft,
${ft}${Tt}bottomLeft
`]:{animationName:_e.fJ},[`
${$e}${Tt}topLeft,
${ft}${Tt}topLeft,
${$e}${Tt}topRight,
${ft}${Tt}topRight
`]:{animationName:_e.Qt},[`${Re}${Tt}bottomLeft`]:{animationName:_e.Uw},[`
${Re}${Tt}topLeft,
${Re}${Tt}topRight
`]:{animationName:_e.ly},"&-hidden":{display:"none"},[`${qe}`]:Object.assign(Object.assign({},Be(be)),{cursor:"pointer",transition:`background ${be.motionDurationSlow} ease`,borderRadius:be.borderRadiusSM,"&-group":{color:be.colorTextDescription,fontSize:be.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ce.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${qe}-option-disabled)`]:{backgroundColor:be.optionActiveBg},[`&-selected:not(${qe}-option-disabled)`]:{color:be.optionSelectedColor,fontWeight:be.optionSelectedFontWeight,backgroundColor:be.optionSelectedBg,[`${qe}-option-state`]:{color:be.colorPrimary}},"&-disabled":{[`&${qe}-option-selected`]:{backgroundColor:be.colorBgContainerDisabled},color:be.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:be.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,_e.oN)(be,"slide-up"),(0,_e.oN)(be,"slide-down"),(0,Ke.Fm)(be,"move-up"),(0,Ke.Fm)(be,"move-down")]};const Ze=2,Et=be=>{let{controlHeightSM:Ie,controlHeight:je,lineWidth:qe}=be;const $e=(je-Ie)/2-qe,ft=Math.ceil($e/2);return[$e,ft]};function ht(be,Ie){const{componentCls:je,iconCls:qe}=be,$e=`${je}-selection-overflow`,ft=be.multipleSelectItemHeight,[Re]=Et(be),Tt=Ie?`${je}-${Ie}`:"";return{[`${je}-multiple${Tt}`]:{fontSize:be.fontSize,[$e]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${je}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Re-Ze}px ${Ze*2}px`,borderRadius:be.borderRadius,[`${je}-show-search&`]:{cursor:"text"},[`${je}-disabled&`]:{background:be.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Ze}px 0`,lineHeight:`${ft}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${je}-show-arrow ${je}-selector,
&${je}-allow-clear ${je}-selector
`]:{paddingInlineEnd:be.fontSizeIcon+be.controlPaddingHorizontal},[`${je}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:ft,marginTop:Ze,marginBottom:Ze,lineHeight:`${ft-be.lineWidth*2}px`,background:be.multipleItemBg,border:`${be.lineWidth}px ${be.lineType} ${be.multipleItemBorderColor}`,borderRadius:be.borderRadiusSM,cursor:"default",transition:`font-size ${be.motionDurationSlow}, line-height ${be.motionDurationSlow}, height ${be.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Ze*2,paddingInlineStart:be.paddingXS,paddingInlineEnd:be.paddingXS/2,[`${je}-disabled&`]:{color:be.multipleItemColorDisabled,borderColor:be.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:be.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ce.Ro)()),{display:"inline-flex",alignItems:"center",color:be.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${qe}`]:{verticalAlign:"-0.2em"},"&:hover":{color:be.colorIconHover}})},[`${$e}-item + ${$e}-item`]:{[`${je}-selection-search`]:{marginInlineStart:0}},[`${je}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:be.inputPaddingHorizontalBase-Re,"\n &-input,\n &-mirror\n ":{height:ft,fontFamily:be.fontFamily,lineHeight:`${ft}px`,transition:`all ${be.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${je}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:be.inputPaddingHorizontalBase,insetInlineEnd:be.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${be.motionDurationSlow}`}}}}var Ae=be=>{const{componentCls:Ie}=be,je=(0,ze.TS)(be,{controlHeight:be.controlHeightSM,multipleSelectItemHeight:be.controlHeightXS,borderRadius:be.borderRadiusSM,borderRadiusSM:be.borderRadiusXS}),qe=(0,ze.TS)(be,{fontSize:be.fontSizeLG,controlHeight:be.controlHeightLG,multipleSelectItemHeight:be.multipleItemHeightLG,borderRadius:be.borderRadiusLG,borderRadiusSM:be.borderRadius}),[,$e]=Et(be);return[ht(be),ht(je,"sm"),{[`${Ie}-multiple${Ie}-sm`]:{[`${Ie}-selection-placeholder`]:{insetInline:be.controlPaddingHorizontalSM-be.lineWidth},[`${Ie}-selection-search`]:{marginInlineStart:$e}}},ht(qe,"lg")]};function te(be,Ie){const{componentCls:je,inputPaddingHorizontalBase:qe,borderRadius:$e}=be,ft=be.controlHeight-be.lineWidth*2,Re=Math.ceil(be.fontSize*1.25),Tt=Ie?`${je}-${Ie}`:"";return{[`${je}-single${Tt}`]:{fontSize:be.fontSize,[`${je}-selector`]:Object.assign(Object.assign({},(0,ce.Wf)(be)),{display:"flex",borderRadius:$e,[`${je}-selection-search`]:{position:"absolute",top:0,insetInlineStart:qe,insetInlineEnd:qe,bottom:0,"&-input":{width:"100%"}},[`
${je}-selection-item,
${je}-selection-placeholder
`]:{padding:0,lineHeight:`${ft}px`,transition:`all ${be.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${ft}px`}},[`${je}-selection-item`]:{position:"relative",userSelect:"none"},[`${je}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${je}-selection-item:after`,`${je}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${je}-show-arrow ${je}-selection-item,
&${je}-show-arrow ${je}-selection-placeholder
`]:{paddingInlineEnd:Re},[`&${je}-open ${je}-selection-item`]:{color:be.colorTextPlaceholder},[`&:not(${je}-customize-input)`]:{[`${je}-selector`]:{width:"100%",height:be.controlHeight,padding:`0 ${qe}px`,[`${je}-selection-search-input`]:{height:ft},"&:after":{lineHeight:`${ft}px`}}},[`&${je}-customize-input`]:{[`${je}-selector`]:{"&:after":{display:"none"},[`${je}-selection-search`]:{position:"static",width:"100%"},[`${je}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${qe}px`,"&:after":{display:"none"}}}}}}}function ee(be){const{componentCls:Ie}=be,je=be.controlPaddingHorizontalSM-be.lineWidth;return[te(be),te((0,ze.TS)(be,{controlHeight:be.controlHeightSM,borderRadius:be.borderRadiusSM}),"sm"),{[`${Ie}-single${Ie}-sm`]:{[`&:not(${Ie}-customize-input)`]:{[`${Ie}-selection-search`]:{insetInlineStart:je,insetInlineEnd:je},[`${Ie}-selector`]:{padding:`0 ${je}px`},[`&${Ie}-show-arrow ${Ie}-selection-search`]:{insetInlineEnd:je+be.fontSize*1.5},[`
&${Ie}-show-arrow ${Ie}-selection-item,
&${Ie}-show-arrow ${Ie}-selection-placeholder
`]:{paddingInlineEnd:be.fontSize*1.5}}}},te((0,ze.TS)(be,{controlHeight:be.singleItemHeightLG,fontSize:be.fontSizeLG,borderRadius:be.borderRadiusLG}),"lg")]}const he=be=>{const{componentCls:Ie,selectorBg:je}=be;return{position:"relative",backgroundColor:je,border:`${be.lineWidth}px ${be.lineType} ${be.colorBorder}`,transition:`all ${be.motionDurationMid} ${be.motionEaseInOut}`,input:{cursor:"pointer"},[`${Ie}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${Ie}-disabled&`]:{color:be.colorTextDisabled,background:be.colorBgContainerDisabled,cursor:"not-allowed",[`${Ie}-multiple&`]:{background:be.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(be,Ie){let je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:qe,borderHoverColor:$e,outlineColor:ft,antCls:Re}=Ie,Tt=je?{[`${qe}-selector`]:{borderColor:$e}}:{};return{[be]:{[`&:not(${qe}-disabled):not(${qe}-customize-input):not(${Re}-pagination-size-changer)`]:Object.assign(Object.assign({},Tt),{[`${qe}-focused& ${qe}-selector`]:{borderColor:$e,boxShadow:`0 0 0 ${Ie.controlOutlineWidth}px ${ft}`,outline:0},[`&:hover ${qe}-selector`]:{borderColor:$e}})}}},de=be=>{const{componentCls:Ie}=be;return{[`${Ie}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},me=be=>{const{componentCls:Ie,inputPaddingHorizontalBase:je,iconCls:qe}=be;return{[Ie]:Object.assign(Object.assign({},(0,ce.Wf)(be)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${Ie}-customize-input) ${Ie}-selector`]:Object.assign(Object.assign({},he(be)),de(be)),[`${Ie}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},ce.vS),[`${Ie}-selection-placeholder`]:Object.assign(Object.assign({},ce.vS),{flex:1,color:be.colorTextPlaceholder,pointerEvents:"none"}),[`${Ie}-arrow`]:Object.assign(Object.assign({},(0,ce.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,height:be.fontSizeIcon,marginTop:-be.fontSizeIcon/2,color:be.colorTextQuaternary,fontSize:be.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[qe]:{verticalAlign:"top",transition:`transform ${be.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${Ie}-suffix)`]:{pointerEvents:"auto"}},[`${Ie}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${Ie}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,zIndex:1,display:"inline-block",width:be.fontSizeIcon,height:be.fontSizeIcon,marginTop:-be.fontSizeIcon/2,color:be.colorTextQuaternary,fontSize:be.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:be.clearBg,cursor:"pointer",opacity:0,transition:`color ${be.motionDurationMid} ease, opacity ${be.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:be.colorTextTertiary}},"&:hover":{[`${Ie}-clear`]:{opacity:1}}}),[`${Ie}-has-feedback`]:{[`${Ie}-clear`]:{insetInlineEnd:je+be.fontSize+be.paddingXS}}}},we=be=>{const{componentCls:Ie}=be;return[{[Ie]:{[`&-borderless ${Ie}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${Ie}-in-form-item`]:{width:"100%"}}},me(be),ee(be),Ae(be),ct(be),{[`${Ie}-rtl`]:{direction:"rtl"}},se(Ie,(0,ze.TS)(be,{borderHoverColor:be.colorPrimaryHover,outlineColor:be.controlOutline})),se(`${Ie}-status-error`,(0,ze.TS)(be,{borderHoverColor:be.colorErrorHover,outlineColor:be.colorErrorOutline}),!0),se(`${Ie}-status-warning`,(0,ze.TS)(be,{borderHoverColor:be.colorWarningHover,outlineColor:be.colorWarningOutline}),!0),(0,De.c)(be,{borderElCls:`${Ie}-selector`,focusElCls:`${Ie}-focused`})]};var Me=(0,Ct.Z)("Select",(be,Ie)=>{let{rootPrefixCls:je}=Ie;const qe=(0,ze.TS)(be,{rootPrefixCls:je,inputPaddingHorizontalBase:be.paddingSM-1,multipleSelectItemHeight:be.multipleItemHeight});return[we(qe)]},be=>{const{fontSize:Ie,lineHeight:je,controlHeight:qe,controlPaddingHorizontal:$e,zIndexPopupBase:ft,colorText:Re,fontWeightStrong:Tt,controlItemBgActive:et,controlItemBgHover:bt,colorBgContainer:Bt,colorFillSecondary:Nt,controlHeightLG:Zt,controlHeightSM:Ut,colorBgContainerDisabled:lt,colorTextDisabled:Ge}=be;return{zIndexPopup:ft+50,optionSelectedColor:Re,optionSelectedFontWeight:Tt,optionSelectedBg:et,optionActiveBg:bt,optionPadding:`${(qe-Ie*je)/2}px ${$e}px`,optionFontSize:Ie,optionLineHeight:je,optionHeight:qe,selectorBg:Bt,clearBg:Bt,singleItemHeightLG:Zt,multipleItemBg:Nt,multipleItemBorderColor:"transparent",multipleItemHeight:Ut,multipleItemHeightLG:qe,multipleSelectorBgDisabled:lt,multipleItemColorDisabled:Ge,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return De}});const ce=ze=>{const _e={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:ze==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},_e),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},_e),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},_e),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},_e),{points:["br","tr"],offset:[0,-4]})}};function De(ze,Ct){return ze||ce(Ct)}},84443:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return ce}});function ce(De,ze){return ze!==void 0?ze:De!==null}},66339:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});var ce=ve(40001),De=ve(19248),ze=ve(99267),Ct=ve(84105),_e=ve(58617),Ke=ve(47472),Be=ve(59301);function mt(ct){let{suffixIcon:Ze,clearIcon:Et,menuItemSelectedIcon:ht,removeIcon:dt,loading:Ae,multiple:te,hasFeedback:ee,prefixCls:he,showSuffixIcon:se,feedbackIcon:de,showArrow:me,componentName:we}=ct;const Me=Et!=null?Et:Be.createElement(De.Z,null),be=$e=>Ze===null&&!ee&&!me?null:Be.createElement(Be.Fragment,null,se!==!1&&$e,ee&&de);let Ie=null;if(Ze!==void 0)Ie=be(Ze);else if(Ae)Ie=be(Be.createElement(_e.Z,{spin:!0}));else{const $e=`${he}-suffix`;Ie=ft=>{let{open:Re,showSearch:Tt}=ft;return be(Re&&Tt?Be.createElement(Ke.Z,{className:$e}):Be.createElement(Ct.Z,{className:$e}))}}let je=null;ht!==void 0?je=ht:te?je=Be.createElement(ce.Z,null):je=null;let qe=null;return dt!==void 0?qe=dt:qe=Be.createElement(ze.Z,null),{clearIcon:Me,suffixIcon:Ie,itemIcon:je,removeIcon:qe}}},61621:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Ne}});var ce=ve(92310),De=ve.n(ce),ze=ve(59301),Ct=ve(36355),_e=ve(2738),Be=ke=>{const{prefixCls:Se,className:nt,style:Pt,size:Xe,shape:Je}=ke,yt=De()({[`${Se}-lg`]:Xe==="large",[`${Se}-sm`]:Xe==="small"}),wt=De()({[`${Se}-circle`]:Je==="circle",[`${Se}-square`]:Je==="square",[`${Se}-round`]:Je==="round"}),ot=ze.useMemo(()=>typeof Xe=="number"?{width:Xe,height:Xe,lineHeight:`${Xe}px`}:{},[Xe]);return ze.createElement("span",{className:De()(Se,yt,wt,nt),style:Object.assign(Object.assign({},ot),Pt)})},mt=ve(93083),ct=ve(83116),Ze=ve(37613);const Et=new mt.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),ht=ke=>({height:ke,lineHeight:`${ke}px`}),dt=ke=>Object.assign({width:ke},ht(ke)),Ae=ke=>({background:ke.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Et,animationDuration:ke.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),te=ke=>Object.assign({width:ke*5,minWidth:ke*5},ht(ke)),ee=ke=>{const{skeletonAvatarCls:Se,gradientFromColor:nt,controlHeight:Pt,controlHeightLG:Xe,controlHeightSM:Je}=ke;return{[`${Se}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:nt},dt(Pt)),[`${Se}${Se}-circle`]:{borderRadius:"50%"},[`${Se}${Se}-lg`]:Object.assign({},dt(Xe)),[`${Se}${Se}-sm`]:Object.assign({},dt(Je))}},he=ke=>{const{controlHeight:Se,borderRadiusSM:nt,skeletonInputCls:Pt,controlHeightLG:Xe,controlHeightSM:Je,gradientFromColor:yt}=ke;return{[`${Pt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:yt,borderRadius:nt},te(Se)),[`${Pt}-lg`]:Object.assign({},te(Xe)),[`${Pt}-sm`]:Object.assign({},te(Je))}},se=ke=>Object.assign({width:ke},ht(ke)),de=ke=>{const{skeletonImageCls:Se,imageSizeBase:nt,gradientFromColor:Pt,borderRadiusSM:Xe}=ke;return{[`${Se}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Pt,borderRadius:Xe},se(nt*2)),{[`${Se}-path`]:{fill:"#bfbfbf"},[`${Se}-svg`]:Object.assign(Object.assign({},se(nt)),{maxWidth:nt*4,maxHeight:nt*4}),[`${Se}-svg${Se}-svg-circle`]:{borderRadius:"50%"}}),[`${Se}${Se}-circle`]:{borderRadius:"50%"}}},me=(ke,Se,nt)=>{const{skeletonButtonCls:Pt}=ke;return{[`${nt}${Pt}-circle`]:{width:Se,minWidth:Se,borderRadius:"50%"},[`${nt}${Pt}-round`]:{borderRadius:Se}}},we=ke=>Object.assign({width:ke*2,minWidth:ke*2},ht(ke)),Me=ke=>{const{borderRadiusSM:Se,skeletonButtonCls:nt,controlHeight:Pt,controlHeightLG:Xe,controlHeightSM:Je,gradientFromColor:yt}=ke;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${nt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:yt,borderRadius:Se,width:Pt*2,minWidth:Pt*2},we(Pt))},me(ke,Pt,nt)),{[`${nt}-lg`]:Object.assign({},we(Xe))}),me(ke,Xe,`${nt}-lg`)),{[`${nt}-sm`]:Object.assign({},we(Je))}),me(ke,Je,`${nt}-sm`))},be=ke=>{const{componentCls:Se,skeletonAvatarCls:nt,skeletonTitleCls:Pt,skeletonParagraphCls:Xe,skeletonButtonCls:Je,skeletonInputCls:yt,skeletonImageCls:wt,controlHeight:ot,controlHeightLG:It,controlHeightSM:sn,gradientFromColor:Xt,padding:Ht,marginSM:xn,borderRadius:Dn,titleHeight:cn,blockRadius:Un,paragraphLiHeight:ti,controlHeightXS:Wn,paragraphMarginTop:Zn}=ke;return{[`${Se}`]:{display:"table",width:"100%",[`${Se}-header`]:{display:"table-cell",paddingInlineEnd:Ht,verticalAlign:"top",[`${nt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Xt},dt(ot)),[`${nt}-circle`]:{borderRadius:"50%"},[`${nt}-lg`]:Object.assign({},dt(It)),[`${nt}-sm`]:Object.assign({},dt(sn))},[`${Se}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Pt}`]:{width:"100%",height:cn,background:Xt,borderRadius:Un,[`+ ${Xe}`]:{marginBlockStart:sn}},[`${Xe}`]:{padding:0,"> li":{width:"100%",height:ti,listStyle:"none",background:Xt,borderRadius:Un,"+ li":{marginBlockStart:Wn}}},[`${Xe}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Se}-content`]:{[`${Pt}, ${Xe} > li`]:{borderRadius:Dn}}},[`${Se}-with-avatar ${Se}-content`]:{[`${Pt}`]:{marginBlockStart:xn,[`+ ${Xe}`]:{marginBlockStart:Zn}}},[`${Se}${Se}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Me(ke)),ee(ke)),he(ke)),de(ke)),[`${Se}${Se}-block`]:{width:"100%",[`${Je}`]:{width:"100%"},[`${yt}`]:{width:"100%"}},[`${Se}${Se}-active`]:{[`
${Pt},
${Xe} > li,
${nt},
${Je},
${yt},
${wt}
`]:Object.assign({},Ae(ke))}}};var Ie=(0,ct.Z)("Skeleton",ke=>{const{componentCls:Se}=ke,nt=(0,Ze.TS)(ke,{skeletonAvatarCls:`${Se}-avatar`,skeletonTitleCls:`${Se}-title`,skeletonParagraphCls:`${Se}-paragraph`,skeletonButtonCls:`${Se}-button`,skeletonInputCls:`${Se}-input`,skeletonImageCls:`${Se}-image`,imageSizeBase:ke.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${ke.gradientFromColor} 25%, ${ke.gradientToColor} 37%, ${ke.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[be(nt)]},ke=>{const{colorFillContent:Se,colorFill:nt}=ke,Pt=Se,Xe=nt;return{color:Pt,colorGradientEnd:Xe,gradientFromColor:Pt,gradientToColor:Xe,titleHeight:ke.controlHeight/2,blockRadius:ke.borderRadiusSM,paragraphMarginTop:ke.marginLG+ke.marginXXS,paragraphLiHeight:ke.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),qe=ke=>{const{prefixCls:Se,className:nt,rootClassName:Pt,active:Xe,shape:Je="circle",size:yt="default"}=ke,{getPrefixCls:wt}=ze.useContext(Ct.E_),ot=wt("skeleton",Se),[It,sn]=Ie(ot),Xt=(0,_e.Z)(ke,["prefixCls","className"]),Ht=De()(ot,`${ot}-element`,{[`${ot}-active`]:Xe},nt,Pt,sn);return It(ze.createElement("div",{className:Ht},ze.createElement(Be,Object.assign({prefixCls:`${ot}-avatar`,shape:Je,size:yt},Xt))))},ft=ke=>{const{prefixCls:Se,className:nt,rootClassName:Pt,active:Xe,block:Je=!1,size:yt="default"}=ke,{getPrefixCls:wt}=ze.useContext(Ct.E_),ot=wt("skeleton",Se),[It,sn]=Ie(ot),Xt=(0,_e.Z)(ke,["prefixCls"]),Ht=De()(ot,`${ot}-element`,{[`${ot}-active`]:Xe,[`${ot}-block`]:Je},nt,Pt,sn);return It(ze.createElement("div",{className:Ht},ze.createElement(Be,Object.assign({prefixCls:`${ot}-button`,size:yt},Xt))))};const Re="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 et=ke=>{const{prefixCls:Se,className:nt,rootClassName:Pt,style:Xe,active:Je}=ke,{getPrefixCls:yt}=ze.useContext(Ct.E_),wt=yt("skeleton",Se),[ot,It]=Ie(wt),sn=De()(wt,`${wt}-element`,{[`${wt}-active`]:Je},nt,Pt,It);return ot(ze.createElement("div",{className:sn},ze.createElement("div",{className:De()(`${wt}-image`,nt),style:Xe},ze.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${wt}-image-svg`},ze.createElement("path",{d:Re,className:`${wt}-image-path`})))))},Bt=ke=>{const{prefixCls:Se,className:nt,rootClassName:Pt,active:Xe,block:Je,size:yt="default"}=ke,{getPrefixCls:wt}=ze.useContext(Ct.E_),ot=wt("skeleton",Se),[It,sn]=Ie(ot),Xt=(0,_e.Z)(ke,["prefixCls"]),Ht=De()(ot,`${ot}-element`,{[`${ot}-active`]:Xe,[`${ot}-block`]:Je},nt,Pt,sn);return It(ze.createElement("div",{className:Ht},ze.createElement(Be,Object.assign({prefixCls:`${ot}-input`,size:yt},Xt))))},Nt=ve(92413),Zt={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"},Ut=Zt,lt=ve(7657),Ge=function(Se,nt){return ze.createElement(lt.Z,(0,Nt.Z)({},Se,{ref:nt,icon:Ut}))},kt=ze.forwardRef(Ge),un=kt,Ft=ke=>{const{prefixCls:Se,className:nt,rootClassName:Pt,style:Xe,active:Je,children:yt}=ke,{getPrefixCls:wt}=ze.useContext(Ct.E_),ot=wt("skeleton",Se),[It,sn]=Ie(ot),Xt=De()(ot,`${ot}-element`,{[`${ot}-active`]:Je},sn,nt,Pt),Ht=yt!=null?yt:ze.createElement(un,null);return It(ze.createElement("div",{className:Xt},ze.createElement("div",{className:De()(`${ot}-image`,nt),style:Xe},Ht)))},$t=ve(26407),Bn=ke=>{const Se=wt=>{const{width:ot,rows:It=2}=ke;if(Array.isArray(ot))return ot[wt];if(It-1===wt)return ot},{prefixCls:nt,className:Pt,style:Xe,rows:Je}=ke,yt=(0,$t.Z)(Array(Je)).map((wt,ot)=>ze.createElement("li",{key:ot,style:{width:Se(ot)}}));return ze.createElement("ul",{className:De()(nt,Pt),style:Xe},yt)},Cn=ke=>{let{prefixCls:Se,className:nt,width:Pt,style:Xe}=ke;return ze.createElement("h3",{className:De()(Se,nt),style:Object.assign({width:Pt},Xe)})};function gt(ke){return ke&&typeof ke=="object"?ke:{}}function En(ke,Se){return ke&&!Se?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Vn(ke,Se){return!ke&&Se?{width:"38%"}:ke&&Se?{width:"50%"}:{}}function He(ke,Se){const nt={};return(!ke||!Se)&&(nt.width="61%"),!ke&&Se?nt.rows=3:nt.rows=2,nt}const Ce=ke=>{const{prefixCls:Se,loading:nt,className:Pt,rootClassName:Xe,style:Je,children:yt,avatar:wt=!1,title:ot=!0,paragraph:It=!0,active:sn,round:Xt}=ke,{getPrefixCls:Ht,direction:xn,skeleton:Dn}=ze.useContext(Ct.E_),cn=Ht("skeleton",Se),[Un,ti]=Ie(cn);if(nt||!("loading"in ke)){const Wn=!!wt,Zn=!!ot,Jn=!!It;let vi;if(Wn){const $i=Object.assign(Object.assign({prefixCls:`${cn}-avatar`},En(Zn,Jn)),gt(wt));vi=ze.createElement("div",{className:`${cn}-header`},ze.createElement(Be,Object.assign({},$i)))}let pi;if(Zn||Jn){let $i;if(Zn){const Gn=Object.assign(Object.assign({prefixCls:`${cn}-title`},Vn(Wn,Jn)),gt(ot));$i=ze.createElement(Cn,Object.assign({},Gn))}let Yn;if(Jn){const Gn=Object.assign(Object.assign({prefixCls:`${cn}-paragraph`},He(Wn,Zn)),gt(It));Yn=ze.createElement(Bn,Object.assign({},Gn))}pi=ze.createElement("div",{className:`${cn}-content`},$i,Yn)}const zi=De()(cn,{[`${cn}-with-avatar`]:Wn,[`${cn}-active`]:sn,[`${cn}-rtl`]:xn==="rtl",[`${cn}-round`]:Xt},Dn==null?void 0:Dn.className,Pt,Xe,ti);return Un(ze.createElement("div",{className:zi,style:Object.assign(Object.assign({},Dn==null?void 0:Dn.style),Je)},vi,pi))}return typeof yt!="undefined"?yt:null};Ce.Button=ft,Ce.Avatar=qe,Ce.Input=Bt,Ce.Image=et,Ce.Node=Ft;var Pe=Ce,Ne=Pe},81327:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return he}});var ce=ve(59301),De=ve(92310),ze=ve.n(De),Ct=ve(11592),_e=ve(36355),Ke=ve(33234);const Be=ce.createContext({latestIndex:0}),mt=Be.Provider;var Ze=se=>{let{className:de,index:me,children:we,split:Me,style:be}=se;const{latestIndex:Ie}=ce.useContext(Be);return we==null?null:ce.createElement(ce.Fragment,null,ce.createElement("div",{className:de,style:be},we),me<Ie&&Me&&ce.createElement("span",{className:`${de}-split`},Me))},Et=ve(2856);function ht(se){return["small","middle","large"].includes(se)}function dt(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var Ae=function(se,de){var me={};for(var we in se)Object.prototype.hasOwnProperty.call(se,we)&&de.indexOf(we)<0&&(me[we]=se[we]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Me=0,we=Object.getOwnPropertySymbols(se);Me<we.length;Me++)de.indexOf(we[Me])<0&&Object.prototype.propertyIsEnumerable.call(se,we[Me])&&(me[we[Me]]=se[we[Me]]);return me};const ee=ce.forwardRef((se,de)=>{var me,we;const{getPrefixCls:Me,space:be,direction:Ie}=ce.useContext(_e.E_),{size:je=(be==null?void 0:be.size)||"small",align:qe,className:$e,rootClassName:ft,children:Re,direction:Tt="horizontal",prefixCls:et,split:bt,style:Bt,wrap:Nt=!1,classNames:Zt,styles:Ut}=se,lt=Ae(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ge,kt]=Array.isArray(je)?je:[je,je],un=ht(kt),ln=ht(Ge),Ft=dt(kt),$t=dt(Ge),Qt=(0,Ct.Z)(Re,{keepEmpty:!0}),Bn=qe===void 0&&Tt==="horizontal"?"center":qe,on=Me("space",et),[Cn,gt]=(0,Et.Z)(on),En=ze()(on,be==null?void 0:be.className,gt,`${on}-${Tt}`,{[`${on}-rtl`]:Ie==="rtl",[`${on}-align-${Bn}`]:Bn,[`${on}-gap-row-${kt}`]:un,[`${on}-gap-col-${Ge}`]:ln},$e,ft),Vn=ze()(`${on}-item`,(me=Zt==null?void 0:Zt.item)!==null&&me!==void 0?me:(we=be==null?void 0:be.classNames)===null||we===void 0?void 0:we.item);let He=0;const Ce=Qt.map((ke,Se)=>{var nt,Pt;ke!=null&&(He=Se);const Xe=ke&&ke.key||`${Vn}-${Se}`;return ce.createElement(Ze,{className:Vn,key:Xe,index:Se,split:bt,style:(nt=Ut==null?void 0:Ut.item)!==null&&nt!==void 0?nt:(Pt=be==null?void 0:be.styles)===null||Pt===void 0?void 0:Pt.item},ke)}),Pe=ce.useMemo(()=>({latestIndex:He}),[He]);if(Qt.length===0)return null;const Ne={};return Nt&&(Ne.flexWrap="wrap"),!ln&&$t&&(Ne.columnGap=Ge),!un&&Ft&&(Ne.rowGap=kt),Cn(ce.createElement("div",Object.assign({ref:de,className:En,style:Object.assign(Object.assign(Object.assign({},Ne),be==null?void 0:be.style),Bt)},lt),ce.createElement(mt,{value:Pe},Ce)))});ee.Compact=Ke.ZP;var he=ee},31797:function(Sn,an,ve){"use strict";ve.d(an,{default:function(){return Ie}});var ce=ve(59301),De=ve(56762),ze=ve(92343),Ct=ve(92310),_e=ve.n(Ct),Ke=ve(36355),Be=ve(61621),ct=je=>{const{value:qe,formatter:$e,precision:ft,decimalSeparator:Re,groupSeparator:Tt="",prefixCls:et}=je;let bt;if(typeof $e=="function")bt=$e(qe);else{const Bt=String(qe),Nt=Bt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Nt||Bt==="-")bt=Bt;else{const Zt=Nt[1];let Ut=Nt[2]||"0",lt=Nt[4]||"";Ut=Ut.replace(/\B(?=(\d{3})+(?!\d))/g,Tt),typeof ft=="number"&&(lt=lt.padEnd(ft,"0").slice(0,ft>0?ft:0)),lt&&(lt=`${Re}${lt}`),bt=[ce.createElement("span",{key:"int",className:`${et}-content-value-int`},Zt,Ut),lt&&ce.createElement("span",{key:"decimal",className:`${et}-content-value-decimal`},lt)]}}return ce.createElement("span",{className:`${et}-content-value`},bt)},Ze=ve(17313),Et=ve(83116),ht=ve(37613);const dt=je=>{const{componentCls:qe,marginXXS:$e,padding:ft,colorTextDescription:Re,titleFontSize:Tt,colorTextHeading:et,contentFontSize:bt,fontFamily:Bt}=je;return{[`${qe}`]:Object.assign(Object.assign({},(0,Ze.Wf)(je)),{[`${qe}-title`]:{marginBottom:$e,color:Re,fontSize:Tt},[`${qe}-skeleton`]:{paddingTop:ft},[`${qe}-content`]:{color:et,fontSize:bt,fontFamily:Bt,[`${qe}-content-value`]:{display:"inline-block",direction:"ltr"},[`${qe}-content-prefix, ${qe}-content-suffix`]:{display:"inline-block"},[`${qe}-content-prefix`]:{marginInlineEnd:$e},[`${qe}-content-suffix`]:{marginInlineStart:$e}}})}};var Ae=(0,Et.Z)("Statistic",je=>{const qe=(0,ht.TS)(je,{});return[dt(qe)]},je=>{const{fontSizeHeading3:qe,fontSize:$e}=je;return{titleFontSize:$e,contentFontSize:qe}}),ee=je=>{const{prefixCls:qe,className:$e,rootClassName:ft,style:Re,valueStyle:Tt,value:et=0,title:bt,valueRender:Bt,prefix:Nt,suffix:Zt,loading:Ut=!1,onMouseEnter:lt,onMouseLeave:Ge,decimalSeparator:kt=".",groupSeparator:un=","}=je,{getPrefixCls:ln,direction:Ft,statistic:$t}=ce.useContext(Ke.E_),Qt=ln("statistic",qe),[Bn,on]=Ae(Qt),Cn=ce.createElement(ct,Object.assign({decimalSeparator:kt,groupSeparator:un,prefixCls:Qt},je,{value:et})),gt=_e()(Qt,{[`${Qt}-rtl`]:Ft==="rtl"},$t==null?void 0:$t.className,$e,ft,on);return Bn(ce.createElement("div",{className:gt,style:Object.assign(Object.assign({},$t==null?void 0:$t.style),Re),onMouseEnter:lt,onMouseLeave:Ge},bt&&ce.createElement("div",{className:`${Qt}-title`},bt),ce.createElement(Be.Z,{paragraph:!1,loading:Ut,className:`${Qt}-skeleton`},ce.createElement("div",{style:Tt,className:`${Qt}-content`},Nt&&ce.createElement("span",{className:`${Qt}-content-prefix`},Nt),Bt?Bt(Cn):Cn,Zt&&ce.createElement("span",{className:`${Qt}-content-suffix`},Zt)))))};const he=[["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 se(je,qe){let $e=je;const ft=/\[[^\]]*]/g,Re=(qe.match(ft)||[]).map(Bt=>Bt.slice(1,-1)),Tt=qe.replace(ft,"[]"),et=he.reduce((Bt,Nt)=>{let[Zt,Ut]=Nt;if(Bt.includes(Zt)){const lt=Math.floor($e/Ut);return $e-=lt*Ut,Bt.replace(new RegExp(`${Zt}+`,"g"),Ge=>{const kt=Ge.length;return lt.toString().padStart(kt,"0")})}return Bt},Tt);let bt=0;return et.replace(ft,()=>{const Bt=Re[bt];return bt+=1,Bt})}function de(je,qe){const{format:$e=""}=qe,ft=new Date(je).getTime(),Re=Date.now(),Tt=Math.max(ft-Re,0);return se(Tt,$e)}const me=1e3/30;function we(je){return new Date(je).getTime()}const Me=je=>{const{value:qe,format:$e="HH:mm:ss",onChange:ft,onFinish:Re}=je,Tt=(0,De.Z)(),et=ce.useRef(null),bt=()=>{Re==null||Re(),et.current&&(clearInterval(et.current),et.current=null)},Bt=()=>{const Ut=we(qe);Ut>=Date.now()&&(et.current=setInterval(()=>{Tt(),ft==null||ft(Ut-Date.now()),Ut<Date.now()&&bt()},me))};ce.useEffect(()=>(Bt(),()=>{et.current&&(clearInterval(et.current),et.current=null)}),[qe]);const Nt=(Ut,lt)=>de(Ut,Object.assign(Object.assign({},lt),{format:$e})),Zt=Ut=>(0,ze.Tm)(Ut,{title:void 0});return ce.createElement(ee,Object.assign({},je,{valueRender:Zt,formatter:Nt}))};var be=ce.memo(Me);ee.Countdown=be;var Ie=ee},15969:function(Sn,an,ve){"use strict";ve.d(an,{N:function(){return ce}});const ce=De=>({color:De.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${De.motionDurationSlow}`,"&:focus, &:hover":{color:De.colorLinkHover},"&:active":{color:De.colorLinkActive}})},78673:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return Tt}});var ce=ve(58617),De=ve(92310),ze=ve.n(De),Ct=ve(92413),_e=ve(400),Ke=ve(33606),Be=ve(37061),mt=ve(59301),ct=ve(18929),Ze=ve(10228),Et=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],ht=mt.forwardRef(function(et,bt){var Bt,Nt=et.prefixCls,Zt=Nt===void 0?"rc-switch":Nt,Ut=et.className,lt=et.checked,Ge=et.defaultChecked,kt=et.disabled,un=et.loadingIcon,ln=et.checkedChildren,Ft=et.unCheckedChildren,$t=et.onClick,Qt=et.onChange,Bn=et.onKeyDown,on=(0,Be.Z)(et,Et),Cn=(0,ct.Z)(!1,{value:lt,defaultValue:Ge}),gt=(0,Ke.Z)(Cn,2),En=gt[0],Vn=gt[1];function He(ke,Se){var nt=En;return kt||(nt=ke,Vn(nt),Qt==null||Qt(nt,Se)),nt}function Ce(ke){ke.which===Ze.Z.LEFT?He(!1,ke):ke.which===Ze.Z.RIGHT&&He(!0,ke),Bn==null||Bn(ke)}function Pe(ke){var Se=He(!En,ke);$t==null||$t(Se,ke)}var Ne=ze()(Zt,Ut,(Bt={},(0,_e.Z)(Bt,"".concat(Zt,"-checked"),En),(0,_e.Z)(Bt,"".concat(Zt,"-disabled"),kt),Bt));return mt.createElement("button",(0,Ct.Z)({},on,{type:"button",role:"switch","aria-checked":En,disabled:kt,className:Ne,ref:bt,onKeyDown:Ce,onClick:Pe}),un,mt.createElement("span",{className:"".concat(Zt,"-inner")},mt.createElement("span",{className:"".concat(Zt,"-inner-checked")},ln),mt.createElement("span",{className:"".concat(Zt,"-inner-unchecked")},Ft)))});ht.displayName="Switch";var dt=ht,Ae=ve(14088),te=ve(36355),ee=ve(1684),he=ve(19716),se=ve(64993),de=ve(17313),me=ve(83116),we=ve(37613);const Me=et=>{const{componentCls:bt,trackHeightSM:Bt,trackPadding:Nt,trackMinWidthSM:Zt,innerMinMarginSM:Ut,innerMaxMarginSM:lt,handleSizeSM:Ge}=et,kt=`${bt}-inner`;return{[bt]:{[`&${bt}-small`]:{minWidth:Zt,height:Bt,lineHeight:`${Bt}px`,[`${bt}-inner`]:{paddingInlineStart:lt,paddingInlineEnd:Ut,[`${kt}-checked`]:{marginInlineStart:`calc(-100% + ${Ge+Nt*2}px - ${lt*2}px)`,marginInlineEnd:`calc(100% - ${Ge+Nt*2}px + ${lt*2}px)`},[`${kt}-unchecked`]:{marginTop:-Bt,marginInlineStart:0,marginInlineEnd:0}},[`${bt}-handle`]:{width:Ge,height:Ge},[`${bt}-loading-icon`]:{top:(Ge-et.switchLoadingIconSize)/2,fontSize:et.switchLoadingIconSize},[`&${bt}-checked`]:{[`${bt}-inner`]:{paddingInlineStart:Ut,paddingInlineEnd:lt,[`${kt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${kt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ge+Nt*2}px + ${lt*2}px)`,marginInlineEnd:`calc(-100% + ${Ge+Nt*2}px - ${lt*2}px)`}},[`${bt}-handle`]:{insetInlineStart:`calc(100% - ${Ge+Nt}px)`}},[`&:not(${bt}-disabled):active`]:{[`&:not(${bt}-checked) ${kt}`]:{[`${kt}-unchecked`]:{marginInlineStart:et.marginXXS/2,marginInlineEnd:-et.marginXXS/2}},[`&${bt}-checked ${kt}`]:{[`${kt}-checked`]:{marginInlineStart:-et.marginXXS/2,marginInlineEnd:et.marginXXS/2}}}}}}},be=et=>{const{componentCls:bt,handleSize:Bt}=et;return{[bt]:{[`${bt}-loading-icon${et.iconCls}`]:{position:"relative",top:(Bt-et.fontSize)/2,color:et.switchLoadingIconColor,verticalAlign:"top"},[`&${bt}-checked ${bt}-loading-icon`]:{color:et.switchColor}}}},Ie=et=>{const{componentCls:bt,motion:Bt,trackPadding:Nt,handleBg:Zt,handleShadow:Ut,handleSize:lt}=et,Ge=`${bt}-handle`;return{[bt]:{[Ge]:{position:"absolute",top:Nt,insetInlineStart:Nt,width:lt,height:lt,transition:`all ${et.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Zt,borderRadius:lt/2,boxShadow:Ut,transition:`all ${et.switchDuration} ease-in-out`,content:'""'}},[`&${bt}-checked ${Ge}`]:{insetInlineStart:`calc(100% - ${lt+Nt}px)`},[`&:not(${bt}-disabled):active`]:Bt?{[`${Ge}::before`]:{insetInlineEnd:et.switchHandleActiveInset,insetInlineStart:0},[`&${bt}-checked ${Ge}::before`]:{insetInlineEnd:0,insetInlineStart:et.switchHandleActiveInset}}:{}}}},je=et=>{const{componentCls:bt,trackHeight:Bt,trackPadding:Nt,innerMinMargin:Zt,innerMaxMargin:Ut,handleSize:lt}=et,Ge=`${bt}-inner`;return{[bt]:{[Ge]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Ut,paddingInlineEnd:Zt,transition:`padding-inline-start ${et.switchDuration} ease-in-out, padding-inline-end ${et.switchDuration} ease-in-out`,[`${Ge}-checked, ${Ge}-unchecked`]:{display:"block",color:et.colorTextLightSolid,fontSize:et.fontSizeSM,transition:`margin-inline-start ${et.switchDuration} ease-in-out, margin-inline-end ${et.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ge}-checked`]:{marginInlineStart:`calc(-100% + ${lt+Nt*2}px - ${Ut*2}px)`,marginInlineEnd:`calc(100% - ${lt+Nt*2}px + ${Ut*2}px)`},[`${Ge}-unchecked`]:{marginTop:-Bt,marginInlineStart:0,marginInlineEnd:0}},[`&${bt}-checked ${Ge}`]:{paddingInlineStart:Zt,paddingInlineEnd:Ut,[`${Ge}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ge}-unchecked`]:{marginInlineStart:`calc(100% - ${lt+Nt*2}px + ${Ut*2}px)`,marginInlineEnd:`calc(-100% + ${lt+Nt*2}px - ${Ut*2}px)`}},[`&:not(${bt}-disabled):active`]:{[`&:not(${bt}-checked) ${Ge}`]:{[`${Ge}-unchecked`]:{marginInlineStart:Nt*2,marginInlineEnd:-Nt*2}},[`&${bt}-checked ${Ge}`]:{[`${Ge}-checked`]:{marginInlineStart:-Nt*2,marginInlineEnd:Nt*2}}}}}},qe=et=>{const{componentCls:bt,trackHeight:Bt,trackMinWidth:Nt}=et;return{[bt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,de.Wf)(et)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Nt,height:Bt,lineHeight:`${Bt}px`,verticalAlign:"middle",background:et.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${et.motionDurationMid}`,userSelect:"none",[`&:hover:not(${bt}-disabled)`]:{background:et.colorTextTertiary}}),(0,de.Qy)(et)),{[`&${bt}-checked`]:{background:et.switchColor,[`&:hover:not(${bt}-disabled)`]:{background:et.colorPrimaryHover}},[`&${bt}-loading, &${bt}-disabled`]:{cursor:"not-allowed",opacity:et.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${bt}-rtl`]:{direction:"rtl"}})}};var $e=(0,me.Z)("Switch",et=>{const bt=(0,we.TS)(et,{switchDuration:et.motionDurationMid,switchColor:et.colorPrimary,switchDisabledOpacity:et.opacityLoading,switchLoadingIconSize:et.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${et.opacityLoading})`,switchHandleActiveInset:"-30%"});return[qe(bt),je(bt),Ie(bt),be(bt),Me(bt)]},et=>{const{fontSize:bt,lineHeight:Bt,controlHeight:Nt,colorWhite:Zt}=et,Ut=bt*Bt,lt=Nt/2,Ge=2,kt=Ut-Ge*2,un=lt-Ge*2;return{trackHeight:Ut,trackHeightSM:lt,trackMinWidth:kt*2+Ge*4,trackMinWidthSM:un*2+Ge*2,trackPadding:Ge,handleBg:Zt,handleSize:kt,handleSizeSM:un,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:kt/2,innerMaxMargin:kt+Ge+Ge*2,innerMinMarginSM:un/2,innerMaxMarginSM:un+Ge+Ge*2}}),ft=function(et,bt){var Bt={};for(var Nt in et)Object.prototype.hasOwnProperty.call(et,Nt)&&bt.indexOf(Nt)<0&&(Bt[Nt]=et[Nt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,Nt=Object.getOwnPropertySymbols(et);Zt<Nt.length;Zt++)bt.indexOf(Nt[Zt])<0&&Object.prototype.propertyIsEnumerable.call(et,Nt[Zt])&&(Bt[Nt[Zt]]=et[Nt[Zt]]);return Bt};const Re=mt.forwardRef((et,bt)=>{const{prefixCls:Bt,size:Nt,disabled:Zt,loading:Ut,className:lt,rootClassName:Ge,style:kt}=et,un=ft(et,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:ln,direction:Ft,switch:$t}=mt.useContext(te.E_),Qt=mt.useContext(ee.Z),Bn=(Zt!=null?Zt:Qt)||Ut,on=ln("switch",Bt),Cn=mt.createElement("div",{className:`${on}-handle`},Ut&&mt.createElement(ce.Z,{className:`${on}-loading-icon`})),[gt,En]=$e(on),Vn=(0,he.Z)(Nt),He=ze()($t==null?void 0:$t.className,{[`${on}-small`]:Vn==="small",[`${on}-loading`]:Ut,[`${on}-rtl`]:Ft==="rtl"},lt,Ge,En),Ce=Object.assign(Object.assign({},$t==null?void 0:$t.style),kt);return gt(mt.createElement(Ae.Z,{component:"Switch"},mt.createElement(dt,Object.assign({},un,{prefixCls:on,className:He,style:Ce,disabled:Bn,ref:bt,loadingIcon:Cn}))))});Re.__ANT_SWITCH=!0;var Tt=Re},1710:function(Sn,an,ve){"use strict";ve.d(an,{default:function(){return Jo}});var ce={},De="rc-table-internal-hook",ze=ve(33606),Ct=ve(6089),_e=ve(34280),Ke=ve(13697),Be=ve(59301),mt=ve(4676);function ct(Qe){var Ue=Be.createContext(void 0),jt=function(nn){var Wt=nn.value,bn=nn.children,yn=Be.useRef(Wt);yn.current=Wt;var Fn=Be.useState(function(){return{getValue:function(){return yn.current},listeners:new Set}}),ei=(0,ze.Z)(Fn,1),Nn=ei[0];return(0,_e.Z)(function(){(0,mt.unstable_batchedUpdates)(function(){Nn.listeners.forEach(function(Qn){Qn(Wt)})})},[Wt]),Be.createElement(Ue.Provider,{value:Nn},bn)};return{Context:Ue,Provider:jt,defaultValue:Qe}}function Ze(Qe,Ue){var jt=(0,Ct.Z)(typeof Ue=="function"?Ue:function(Qn){if(Ue===void 0)return Qn;if(!Array.isArray(Ue))return Qn[Ue];var Ai={};return Ue.forEach(function(Pi){Ai[Pi]=Qn[Pi]}),Ai}),zt=Be.useContext(Qe==null?void 0:Qe.Context),nn=zt||{},Wt=nn.listeners,bn=nn.getValue,yn=Be.useRef();yn.current=jt(zt?bn():Qe==null?void 0:Qe.defaultValue);var Fn=Be.useState({}),ei=(0,ze.Z)(Fn,2),Nn=ei[1];return(0,_e.Z)(function(){if(!zt)return;function Qn(Ai){var Pi=jt(Ai);(0,Ke.Z)(yn.current,Pi,!0)||Nn({})}return Wt.add(Qn),function(){Wt.delete(Qn)}},[zt]),yn.current}var Et=ve(92413),ht=ve(8654);function dt(){var Qe=Be.createContext(null);function Ue(){return Be.useContext(Qe)}function jt(nn,Wt){var bn=(0,ht.Yr)(nn),yn=function(ei,Nn){var Qn=bn?{ref:Nn}:{},Ai=Be.useRef(0),Pi=Be.useRef(ei),yi=Ue();return yi!==null?Be.createElement(nn,(0,Et.Z)({},ei,Qn)):((!Wt||Wt(Pi.current,ei))&&(Ai.current+=1),Pi.current=ei,Be.createElement(Qe.Provider,{value:Ai.current},Be.createElement(nn,(0,Et.Z)({},ei,Qn))))};return bn?Be.forwardRef(yn):yn}function zt(nn,Wt){var bn=(0,ht.Yr)(nn),yn=function(ei,Nn){var Qn=bn?{ref:Nn}:{};return Ue(),Be.createElement(nn,(0,Et.Z)({},ei,Qn))};return bn?Be.memo(Be.forwardRef(yn),Wt):Be.memo(yn,Wt)}return{makeImmutable:jt,responseImmutable:zt,useImmutableMark:Ue}}var Ae=dt(),te=Ae.makeImmutable,ee=Ae.responseImmutable,he=Ae.useImmutableMark,se=dt(),de=se.makeImmutable,me=se.responseImmutable,we=se.useImmutableMark,Me=ct(),be=Me;function Ie(Qe,Ue){var jt=Be.useRef(0);jt.current+=1;var zt=Be.useRef(Qe),nn=[];Object.keys(Qe||{}).map(function(bn){var yn;(Qe==null?void 0:Qe[bn])!==((yn=zt.current)===null||yn===void 0?void 0:yn[bn])&&nn.push(bn)}),zt.current=Qe;var Wt=Be.useRef([]);return nn.length&&(Wt.current=nn),Be.useDebugValue(jt.current),Be.useDebugValue(Wt.current.join(", ")),Ue&&console.log("".concat(Ue,":"),jt.current,Wt.current),jt.current}var je=null,qe=Be.memo(function(){var Qe=Ie();return Be.createElement("h1",null,"Render Times: ",Qe)});qe.displayName="RenderBlock";var $e=ve(39559),ft=ve(33708),Re=ve(400),Tt=ve(92310),et=ve.n(Tt),bt=ve(80547),Bt=ve(97938),Nt=ve(48736),Zt=Be.createContext({renderWithProps:!1}),Ut=Zt,lt="RC_TABLE_KEY";function Ge(Qe){return Qe==null?[]:Array.isArray(Qe)?Qe:[Qe]}function kt(Qe){var Ue=[],jt={};return Qe.forEach(function(zt){for(var nn=zt||{},Wt=nn.key,bn=nn.dataIndex,yn=Wt||Ge(bn).join("-")||lt;jt[yn];)yn="".concat(yn,"_next");jt[yn]=!0,Ue.push(yn)}),Ue}function un(Qe){return Qe!=null}function ln(Qe){return Qe&&(0,$e.Z)(Qe)==="object"&&!Array.isArray(Qe)&&!Be.isValidElement(Qe)}function Ft(Qe,Ue,jt,zt,nn,Wt){var bn=Be.useContext(Ut),yn=we(),Fn=(0,bt.Z)(function(){if(un(zt))return[zt];var ei=Ue==null||Ue===""?[]:Array.isArray(Ue)?Ue:[Ue],Nn=(0,Bt.Z)(Qe,ei),Qn=Nn,Ai=void 0;if(nn){var Pi=nn(Nn,Qe,jt);ln(Pi)?(Qn=Pi.children,Ai=Pi.props,bn.renderWithProps=!0):Qn=Pi}return[Qn,Ai]},[yn,Qe,zt,Ue,nn,jt],function(ei,Nn){if(Wt){var Qn=(0,ze.Z)(ei,2),Ai=Qn[1],Pi=(0,ze.Z)(Nn,2),yi=Pi[1];return Wt(yi,Ai)}return bn.renderWithProps?!0:!(0,Ke.Z)(ei,Nn,!0)});return Fn}function $t(Qe,Ue,jt,zt){var nn=Qe+Ue-1;return Qe<=zt&&nn>=jt}function Qt(Qe,Ue){return Ze(be,function(jt){var zt=$t(Qe,Ue||1,jt.hoverStartRow,jt.hoverEndRow);return[zt,jt.onHover]})}var Bn=function(Ue){var jt=Ue.ellipsis,zt=Ue.rowType,nn=Ue.children,Wt,bn=jt===!0?{showTitle:!0}:jt;return bn&&(bn.showTitle||zt==="header")&&(typeof nn=="string"||typeof nn=="number"?Wt=nn.toString():Be.isValidElement(nn)&&typeof nn.props.children=="string"&&(Wt=nn.props.children)),Wt};function on(Qe){var Ue,jt,zt,nn,Wt,bn,yn,Fn,ei=Qe.component,Nn=Qe.children,Qn=Qe.ellipsis,Ai=Qe.scope,Pi=Qe.prefixCls,yi=Qe.className,or=Qe.align,bi=Qe.record,Yi=Qe.render,Xi=Qe.dataIndex,Er=Qe.renderIndex,Xr=Qe.shouldCellUpdate,uo=Qe.index,pr=Qe.rowType,Ur=Qe.colSpan,jo=Qe.rowSpan,Cr=Qe.fixLeft,_r=Qe.fixRight,xr=Qe.firstFixLeft,Vi=Qe.lastFixLeft,Nr=Qe.firstFixRight,io=Qe.lastFixRight,So=Qe.appendNode,wo=Qe.additionalProps,mr=wo===void 0?{}:wo,Zo=Qe.isSticky,Ko="".concat(Pi,"-cell"),Pa=Ze(be,["supportSticky","allColumnsFixedLeft"]),sa=Pa.supportSticky,os=Pa.allColumnsFixedLeft,ts=Ft(bi,Xi,Er,Nn,Yi,Xr),Go=(0,ze.Z)(ts,2),ao=Go[0],pa=Go[1],as={},Ua=typeof Cr=="number"&&sa,Ms=typeof _r=="number"&&sa;Ua&&(as.position="sticky",as.left=Cr),Ms&&(as.position="sticky",as.right=_r);var Co=(Ue=(jt=(zt=pa==null?void 0:pa.colSpan)!==null&&zt!==void 0?zt:mr.colSpan)!==null&&jt!==void 0?jt:Ur)!==null&&Ue!==void 0?Ue:1,po=(nn=(Wt=(bn=pa==null?void 0:pa.rowSpan)!==null&&bn!==void 0?bn:mr.rowSpan)!==null&&Wt!==void 0?Wt:jo)!==null&&nn!==void 0?nn:1,Eo=Qt(uo,po),Qr=(0,ze.Z)(Eo,2),ya=Qr[0],qr=Qr[1],zo=function(ws){var Rs;bi&&qr(uo,uo+po-1),mr==null||(Rs=mr.onMouseEnter)===null||Rs===void 0||Rs.call(mr,ws)},ha=function(ws){var Rs;bi&&qr(-1,-1),mr==null||(Rs=mr.onMouseLeave)===null||Rs===void 0||Rs.call(mr,ws)};if(Co===0||po===0)return null;var ca=(yn=mr.title)!==null&&yn!==void 0?yn:Bn({rowType:pr,ellipsis:Qn,children:ao}),Vs=et()(Ko,yi,(Fn={},(0,Re.Z)(Fn,"".concat(Ko,"-fix-left"),Ua&&sa),(0,Re.Z)(Fn,"".concat(Ko,"-fix-left-first"),xr&&sa),(0,Re.Z)(Fn,"".concat(Ko,"-fix-left-last"),Vi&&sa),(0,Re.Z)(Fn,"".concat(Ko,"-fix-left-all"),Vi&&os&&sa),(0,Re.Z)(Fn,"".concat(Ko,"-fix-right"),Ms&&sa),(0,Re.Z)(Fn,"".concat(Ko,"-fix-right-first"),Nr&&sa),(0,Re.Z)(Fn,"".concat(Ko,"-fix-right-last"),io&&sa),(0,Re.Z)(Fn,"".concat(Ko,"-ellipsis"),Qn),(0,Re.Z)(Fn,"".concat(Ko,"-with-append"),So),(0,Re.Z)(Fn,"".concat(Ko,"-fix-sticky"),(Ua||Ms)&&Zo&&sa),(0,Re.Z)(Fn,"".concat(Ko,"-row-hover"),!pa&&ya),Fn),mr.className,pa==null?void 0:pa.className),Ns={};or&&(Ns.textAlign=or);var hl=(0,ft.Z)((0,ft.Z)((0,ft.Z)((0,ft.Z)({},as),mr.style),Ns),pa==null?void 0:pa.style),wa=ao;return(0,$e.Z)(wa)==="object"&&!Array.isArray(wa)&&!Be.isValidElement(wa)&&(wa=null),Qn&&(Vi||Nr)&&(wa=Be.createElement("span",{className:"".concat(Ko,"-content")},wa)),Be.createElement(ei,(0,Et.Z)({},pa,mr,{className:Vs,style:hl,title:ca,scope:Ai,onMouseEnter:zo,onMouseLeave:ha,colSpan:Co!==1?Co:null,rowSpan:po!==1?po:null}),So,wa)}var Cn=Be.memo(on);function gt(Qe,Ue,jt,zt,nn,Wt){var bn=jt[Qe]||{},yn=jt[Ue]||{},Fn,ei;bn.fixed==="left"?Fn=zt.left[nn==="rtl"?Ue:Qe]:yn.fixed==="right"&&(ei=zt.right[nn==="rtl"?Qe:Ue]);var Nn=!1,Qn=!1,Ai=!1,Pi=!1,yi=jt[Ue+1],or=jt[Qe-1],bi=!(Wt!=null&&Wt.children);if(nn==="rtl"){if(Fn!==void 0){var Yi=or&&or.fixed==="left";Pi=!Yi&&bi}else if(ei!==void 0){var Xi=yi&&yi.fixed==="right";Ai=!Xi&&bi}}else if(Fn!==void 0){var Er=yi&&yi.fixed==="left";Nn=!Er&&bi}else if(ei!==void 0){var Xr=or&&or.fixed==="right";Qn=!Xr&&bi}return{fixLeft:Fn,fixRight:ei,lastFixLeft:Nn,firstFixRight:Qn,lastFixRight:Ai,firstFixLeft:Pi,isSticky:zt.isSticky}}var En=Be.createContext({}),Vn=En;function He(Qe){var Ue=Qe.className,jt=Qe.index,zt=Qe.children,nn=Qe.colSpan,Wt=nn===void 0?1:nn,bn=Qe.rowSpan,yn=Qe.align,Fn=Ze(be,["prefixCls","direction"]),ei=Fn.prefixCls,Nn=Fn.direction,Qn=Be.useContext(Vn),Ai=Qn.scrollColumnIndex,Pi=Qn.stickyOffsets,yi=Qn.flattenColumns,or=Qn.columns,bi=jt+Wt-1,Yi=bi+1===Ai?Wt+1:Wt,Xi=gt(jt,jt+Yi-1,yi,Pi,Nn,or==null?void 0:or[jt]);return Be.createElement(Cn,(0,Et.Z)({className:Ue,index:jt,component:"td",prefixCls:ei,record:null,dataIndex:null,align:yn,colSpan:Yi,rowSpan:bn,render:function(){return zt}},Xi))}var Ce=ve(37061),Pe=["children"];function Ne(Qe){var Ue=Qe.children,jt=(0,Ce.Z)(Qe,Pe);return Be.createElement("tr",jt,Ue)}function ke(Qe){var Ue=Qe.children;return Ue}ke.Row=Ne,ke.Cell=He;var Se=ke;function nt(Qe){var Ue=Qe.children,jt=Qe.stickyOffsets,zt=Qe.flattenColumns,nn=Qe.columns,Wt=Ze(be,"prefixCls"),bn=zt.length-1,yn=zt[bn],Fn=Be.useMemo(function(){return{stickyOffsets:jt,flattenColumns:zt,scrollColumnIndex:yn!=null&&yn.scrollbar?bn:null,columns:nn}},[yn,zt,bn,jt,nn]);return Be.createElement(Vn.Provider,{value:Fn},Be.createElement("tfoot",{className:"".concat(Wt,"-summary")},Ue))}var Pt=me(nt),Xe=Se,Je=ve(70425),yt=ve(29301),wt=ve(29194),ot=ve(24514),It=ve(75152),sn=ve(26112);function Xt(Qe,Ue,jt,zt,nn,Wt,bn){Qe.push({record:Ue,indent:jt,index:bn});var yn=Wt(Ue),Fn=nn==null?void 0:nn.has(yn);if(Ue&&Array.isArray(Ue[zt])&&Fn)for(var ei=0;ei<Ue[zt].length;ei+=1)Xt(Qe,Ue[zt][ei],jt+1,zt,nn,Wt,ei)}function Ht(Qe,Ue,jt,zt){var nn=Be.useMemo(function(){if(jt!=null&&jt.size){for(var Wt=[],bn=0;bn<(Qe==null?void 0:Qe.length);bn+=1){var yn=Qe[bn];Xt(Wt,yn,0,Ue,jt,zt,bn)}return Wt}return Qe==null?void 0:Qe.map(function(Fn,ei){return{record:Fn,indent:0,index:ei}})},[Qe,Ue,jt,zt]);return nn}function xn(Qe){var Ue=Qe.prefixCls,jt=Qe.children,zt=Qe.component,nn=Qe.cellComponent,Wt=Qe.className,bn=Qe.expanded,yn=Qe.colSpan,Fn=Qe.isEmpty,ei=Ze(be,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Nn=ei.scrollbarSize,Qn=ei.fixHeader,Ai=ei.fixColumn,Pi=ei.componentWidth,yi=ei.horizonScroll,or=jt;return(Fn?yi&&Pi:Ai)&&(or=Be.createElement("div",{style:{width:Pi-(Qn?Nn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ue,"-expanded-row-fixed")},or)),Be.createElement(zt,{className:Wt,style:{display:bn?null:"none"}},Be.createElement(Cn,{component:nn,prefixCls:Ue,colSpan:yn},or))}var Dn=xn;function cn(Qe,Ue,jt,zt){var nn=Ze(be,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Wt=nn.flattenColumns,bn=nn.expandableType,yn=nn.expandedKeys,Fn=nn.childrenColumnName,ei=nn.onTriggerExpand,Nn=nn.rowExpandable,Qn=nn.onRow,Ai=nn.expandRowByClick,Pi=nn.rowClassName,yi=bn==="nest",or=bn==="row"&&(!Nn||Nn(Qe)),bi=or||yi,Yi=yn&&yn.has(Ue),Xi=Fn&&Qe&&Qe[Fn],Er=(0,Je.useEvent)(ei),Xr=Qn==null?void 0:Qn(Qe,jt),uo=Xr==null?void 0:Xr.onClick,pr=function(_r){Ai&&bi&&ei(Qe,_r);for(var xr=arguments.length,Vi=new Array(xr>1?xr-1:0),Nr=1;Nr<xr;Nr++)Vi[Nr-1]=arguments[Nr];uo==null||uo.apply(void 0,[_r].concat(Vi))},Ur;typeof Pi=="string"?Ur=Pi:typeof Pi=="function"&&(Ur=Pi(Qe,jt,zt));var jo=kt(Wt);return(0,ft.Z)((0,ft.Z)({},nn),{},{columnsKey:jo,nestExpandable:yi,expanded:Yi,hasNestChildren:Xi,record:Qe,onTriggerExpand:Er,rowSupportExpand:or,expandable:bi,rowProps:(0,ft.Z)((0,ft.Z)({},Xr),{},{className:et()(Ur,Xr==null?void 0:Xr.className),onClick:pr})})}function Un(Qe,Ue,jt,zt,nn){var Wt=Qe.record,bn=Qe.prefixCls,yn=Qe.columnsKey,Fn=Qe.fixedInfoList,ei=Qe.expandIconColumnIndex,Nn=Qe.nestExpandable,Qn=Qe.indentSize,Ai=Qe.expandIcon,Pi=Qe.expanded,yi=Qe.hasNestChildren,or=Qe.onTriggerExpand,bi=yn[jt],Yi=Fn[jt],Xi;jt===(ei||0)&&Nn&&(Xi=Be.createElement(Be.Fragment,null,Be.createElement("span",{style:{paddingLeft:"".concat(Qn*zt,"px")},className:"".concat(bn,"-row-indent indent-level-").concat(zt)}),Ai({prefixCls:bn,expanded:Pi,expandable:yi,record:Wt,onExpand:or})));var Er;return Ue.onCell&&(Er=Ue.onCell(Wt,nn)),{key:bi,fixedInfo:Yi,appendCellNode:Xi,additionalCellProps:Er||{}}}function ti(Qe){var Ue=Qe.className,jt=Qe.style,zt=Qe.record,nn=Qe.index,Wt=Qe.renderIndex,bn=Qe.rowKey,yn=Qe.indent,Fn=yn===void 0?0:yn,ei=Qe.rowComponent,Nn=Qe.cellComponent,Qn=Qe.scopeCellComponent,Ai=cn(zt,bn,nn,Fn),Pi=Ai.prefixCls,yi=Ai.flattenColumns,or=Ai.expandedRowClassName,bi=Ai.expandedRowRender,Yi=Ai.rowProps,Xi=Ai.expanded,Er=Ai.rowSupportExpand,Xr=Be.useState(!1),uo=(0,ze.Z)(Xr,2),pr=uo[0],Ur=uo[1];Be.useEffect(function(){Xi&&Ur(!0)},[Xi]);var jo=Be.createElement(ei,(0,Et.Z)({},Yi,{"data-row-key":bn,className:et()(Ue,"".concat(Pi,"-row"),"".concat(Pi,"-row-level-").concat(Fn),Yi==null?void 0:Yi.className),style:(0,ft.Z)((0,ft.Z)({},jt),Yi==null?void 0:Yi.style)}),yi.map(function(Vi,Nr){var io=Vi.render,So=Vi.dataIndex,wo=Vi.className,mr=Un(Ai,Vi,Nr,Fn,nn),Zo=mr.key,Ko=mr.fixedInfo,Pa=mr.appendCellNode,sa=mr.additionalCellProps;return Be.createElement(Cn,(0,Et.Z)({className:wo,ellipsis:Vi.ellipsis,align:Vi.align,scope:Vi.rowScope,component:Vi.rowScope?Qn:Nn,prefixCls:Pi,key:Zo,record:zt,index:nn,renderIndex:Wt,dataIndex:So,render:io,shouldCellUpdate:Vi.shouldCellUpdate},Ko,{appendNode:Pa,additionalProps:sa}))})),Cr;if(Er&&(pr||Xi)){var _r=bi(zt,nn,Fn+1,Xi),xr=or&&or(zt,nn,Fn);Cr=Be.createElement(Dn,{expanded:Xi,className:et()("".concat(Pi,"-expanded-row"),"".concat(Pi,"-expanded-row-level-").concat(Fn+1),xr),prefixCls:Pi,component:ei,cellComponent:Nn,colSpan:yi.length,isEmpty:!1},_r)}return Be.createElement(Be.Fragment,null,jo,Cr)}ti.displayName="BodyRow";var Wn=me(ti);function Zn(Qe){var Ue=Qe.columnKey,jt=Qe.onColumnResize,zt=Be.useRef();return Be.useEffect(function(){zt.current&&jt(Ue,zt.current.offsetWidth)},[]),Be.createElement(yt.Z,{data:Ue},Be.createElement("td",{ref:zt,style:{padding:0,border:0,height:0}},Be.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Jn(Qe){var Ue=Qe.prefixCls,jt=Qe.columnsKey,zt=Qe.onColumnResize;return Be.createElement("tr",{"aria-hidden":"true",className:"".concat(Ue,"-measure-row"),style:{height:0,fontSize:0}},Be.createElement(yt.Z.Collection,{onBatchResize:function(Wt){Wt.forEach(function(bn){var yn=bn.data,Fn=bn.size;zt(yn,Fn.offsetWidth)})}},jt.map(function(nn){return Be.createElement(Zn,{key:nn,columnKey:nn,onColumnResize:zt})})))}function vi(Qe){var Ue=Qe.data,jt=Qe.measureColumnWidth,zt=Ze(be,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),nn=zt.prefixCls,Wt=zt.getComponent,bn=zt.onColumnResize,yn=zt.flattenColumns,Fn=zt.getRowKey,ei=zt.expandedKeys,Nn=zt.childrenColumnName,Qn=zt.emptyNode,Ai=Ht(Ue,Nn,ei,Fn),Pi=Be.useRef({renderWithProps:!1}),yi=Wt(["body","wrapper"],"tbody"),or=Wt(["body","row"],"tr"),bi=Wt(["body","cell"],"td"),Yi=Wt(["body","cell"],"th"),Xi;Ue.length?Xi=Ai.map(function(Xr,uo){var pr=Xr.record,Ur=Xr.indent,jo=Xr.index,Cr=Fn(pr,uo);return Be.createElement(Wn,{key:Cr,rowKey:Cr,record:pr,index:uo,renderIndex:jo,rowComponent:or,cellComponent:bi,scopeCellComponent:Yi,getRowKey:Fn,indent:Ur})}):Xi=Be.createElement(Dn,{expanded:!0,className:"".concat(nn,"-placeholder"),prefixCls:nn,component:or,cellComponent:bi,colSpan:yn.length,isEmpty:!0},Qn);var Er=kt(yn);return Be.createElement(Ut.Provider,{value:Pi.current},Be.createElement(yi,{className:"".concat(nn,"-tbody")},jt&&Be.createElement(Jn,{prefixCls:nn,columnsKey:Er,onColumnResize:bn}),Xi))}vi.displayName="Body";var pi=me(vi),zi=["expandable"],$i="RC_TABLE_INTERNAL_COL_DEFINE";function Yn(Qe){var Ue=Qe.expandable,jt=(0,Ce.Z)(Qe,zi),zt;return"expandable"in Qe?zt=(0,ft.Z)((0,ft.Z)({},jt),Ue):zt=jt,zt.showExpandColumn===!1&&(zt.expandIconColumnIndex=-1),zt}var Gn=["columnType"];function oi(Qe){for(var Ue=Qe.colWidths,jt=Qe.columns,zt=Qe.columCount,nn=[],Wt=zt||jt.length,bn=!1,yn=Wt-1;yn>=0;yn-=1){var Fn=Ue[yn],ei=jt&&jt[yn],Nn=ei&&ei[$i];if(Fn||Nn||bn){var Qn=Nn||{},Ai=Qn.columnType,Pi=(0,Ce.Z)(Qn,Gn);nn.unshift(Be.createElement("col",(0,Et.Z)({key:yn,style:{width:Fn}},Pi))),bn=!0}}return Be.createElement("colgroup",null,nn)}var Li=oi,di=ve(26407),gr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Ii(Qe,Ue){return(0,Be.useMemo)(function(){for(var jt=[],zt=0;zt<Ue;zt+=1){var nn=Qe[zt];if(nn!==void 0)jt[zt]=nn;else return null}return jt},[Qe.join("_"),Ue])}var Le=Be.forwardRef(function(Qe,Ue){var jt=Qe.className,zt=Qe.noData,nn=Qe.columns,Wt=Qe.flattenColumns,bn=Qe.colWidths,yn=Qe.columCount,Fn=Qe.stickyOffsets,ei=Qe.direction,Nn=Qe.fixHeader,Qn=Qe.stickyTopOffset,Ai=Qe.stickyBottomOffset,Pi=Qe.stickyClassName,yi=Qe.onScroll,or=Qe.maxContentScroll,bi=Qe.children,Yi=(0,Ce.Z)(Qe,gr),Xi=Ze(be,["prefixCls","scrollbarSize","isSticky"]),Er=Xi.prefixCls,Xr=Xi.scrollbarSize,uo=Xi.isSticky,pr=uo&&!Nn?0:Xr,Ur=Be.useRef(null),jo=Be.useCallback(function(wo){(0,ht.mH)(Ue,wo),(0,ht.mH)(Ur,wo)},[]);Be.useEffect(function(){var wo;function mr(Zo){var Ko=Zo,Pa=Ko.currentTarget,sa=Ko.deltaX;sa&&(yi({currentTarget:Pa,scrollLeft:Pa.scrollLeft+sa}),Zo.preventDefault())}return(wo=Ur.current)===null||wo===void 0||wo.addEventListener("wheel",mr),function(){var Zo;(Zo=Ur.current)===null||Zo===void 0||Zo.removeEventListener("wheel",mr)}},[]);var Cr=Be.useMemo(function(){return Wt.every(function(wo){return wo.width})},[Wt]),_r=Wt[Wt.length-1],xr={fixed:_r?_r.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Er,"-cell-scrollbar")}}},Vi=(0,Be.useMemo)(function(){return pr?[].concat((0,di.Z)(nn),[xr]):nn},[pr,nn]),Nr=(0,Be.useMemo)(function(){return pr?[].concat((0,di.Z)(Wt),[xr]):Wt},[pr,Wt]),io=(0,Be.useMemo)(function(){var wo=Fn.right,mr=Fn.left;return(0,ft.Z)((0,ft.Z)({},Fn),{},{left:ei==="rtl"?[].concat((0,di.Z)(mr.map(function(Zo){return Zo+pr})),[0]):mr,right:ei==="rtl"?wo:[].concat((0,di.Z)(wo.map(function(Zo){return Zo+pr})),[0]),isSticky:uo})},[pr,Fn,uo]),So=Ii(bn,yn);return Be.createElement("div",{style:(0,ft.Z)({overflow:"hidden"},uo?{top:Qn,bottom:Ai}:{}),ref:jo,className:et()(jt,(0,Re.Z)({},Pi,!!Pi))},Be.createElement("table",{style:{tableLayout:"fixed",visibility:zt||So?null:"hidden"}},(!zt||!or||Cr)&&Be.createElement(Li,{colWidths:So?[].concat((0,di.Z)(So),[pr]):[],columCount:yn+1,columns:Nr}),bi((0,ft.Z)((0,ft.Z)({},Yi),{},{stickyOffsets:io,columns:Vi,flattenColumns:Nr}))))});Le.displayName="FixedHolder";var si=Be.memo(Le);function ji(Qe){var Ue=Qe.cells,jt=Qe.stickyOffsets,zt=Qe.flattenColumns,nn=Qe.rowComponent,Wt=Qe.cellComponent,bn=Qe.tdCellComponent,yn=Qe.onHeaderRow,Fn=Qe.index,ei=Ze(be,["prefixCls","direction"]),Nn=ei.prefixCls,Qn=ei.direction,Ai;yn&&(Ai=yn(Ue.map(function(yi){return yi.column}),Fn));var Pi=kt(Ue.map(function(yi){return yi.column}));return Be.createElement(nn,Ai,Ue.map(function(yi,or){var bi=yi.column,Yi=gt(yi.colStart,yi.colEnd,zt,jt,Qn,bi),Xi;return bi&&bi.onHeaderCell&&(Xi=yi.column.onHeaderCell(bi)),Be.createElement(Cn,(0,Et.Z)({},yi,{scope:bi.title?yi.colSpan>1?"colgroup":"col":null,ellipsis:bi.ellipsis,align:bi.align,component:bi.title?Wt:bn,prefixCls:Nn,key:Pi[or]},Yi,{additionalProps:Xi,rowType:"header"}))}))}ji.displayName="HeaderRow";var gn=ji;function qn(Qe){var Ue=[];function jt(bn,yn){var Fn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ue[Fn]=Ue[Fn]||[];var ei=yn,Nn=bn.filter(Boolean).map(function(Qn){var Ai={key:Qn.key,className:Qn.className||"",children:Qn.title,column:Qn,colStart:ei},Pi=1,yi=Qn.children;return yi&&yi.length>0&&(Pi=jt(yi,ei,Fn+1).reduce(function(or,bi){return or+bi},0),Ai.hasSubColumns=!0),"colSpan"in Qn&&(Pi=Qn.colSpan),"rowSpan"in Qn&&(Ai.rowSpan=Qn.rowSpan),Ai.colSpan=Pi,Ai.colEnd=Ai.colStart+Pi-1,Ue[Fn].push(Ai),ei+=Pi,Pi});return Nn}jt(Qe,0);for(var zt=Ue.length,nn=function(yn){Ue[yn].forEach(function(Fn){!("rowSpan"in Fn)&&!Fn.hasSubColumns&&(Fn.rowSpan=zt-yn)})},Wt=0;Wt<zt;Wt+=1)nn(Wt);return Ue}function mi(Qe){var Ue=Qe.stickyOffsets,jt=Qe.columns,zt=Qe.flattenColumns,nn=Qe.onHeaderRow,Wt=Ze(be,["prefixCls","getComponent"]),bn=Wt.prefixCls,yn=Wt.getComponent,Fn=Be.useMemo(function(){return qn(jt)},[jt]),ei=yn(["header","wrapper"],"thead"),Nn=yn(["header","row"],"tr"),Qn=yn(["header","cell"],"th"),Ai=yn(["header","cell"],"td");return Be.createElement(ei,{className:"".concat(bn,"-thead")},Fn.map(function(Pi,yi){var or=Be.createElement(gn,{key:yi,flattenColumns:zt,cells:Pi,stickyOffsets:Ue,rowComponent:Nn,cellComponent:Qn,tdCellComponent:Ai,onHeaderRow:nn,index:yi});return or}))}var Fi=me(mi),jn=ve(11592);function Tn(Qe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ue=="number"?Ue:Ue.endsWith("%")?Qe*parseFloat(Ue)/100:null}function At(Qe,Ue){return Be.useMemo(function(){if(Ue&&Ue>0){var jt=0,zt=0;Qe.forEach(function(ei){var Nn=Tn(Ue,ei.width);Nn?jt+=Nn:zt+=1});var nn=Ue-jt,Wt=zt,bn=nn/zt,yn=0,Fn=Qe.map(function(ei){var Nn=(0,ft.Z)({},ei),Qn=Tn(Ue,Nn.width);if(Qn)Nn.width=Qn;else{var Ai=Math.floor(bn);Nn.width=Wt===1?nn:Ai,nn-=Ai,Wt-=1}return yn+=Nn.width,Nn});return[Fn,yn]}return[Qe,Ue]},[Qe,Ue])}var Dt=["children"],Ve=["fixed"];function Yt(Qe){return(0,jn.Z)(Qe).filter(function(Ue){return Be.isValidElement(Ue)}).map(function(Ue){var jt=Ue.key,zt=Ue.props,nn=zt.children,Wt=(0,Ce.Z)(zt,Dt),bn=(0,ft.Z)({key:jt},Wt);return nn&&(bn.children=Yt(nn)),bn})}function tn(Qe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Qe.filter(function(jt){return jt&&(0,$e.Z)(jt)==="object"}).reduce(function(jt,zt,nn){var Wt=zt.fixed,bn=Wt===!0?"left":Wt,yn="".concat(Ue,"-").concat(nn),Fn=zt.children;return Fn&&Fn.length>0?[].concat((0,di.Z)(jt),(0,di.Z)(tn(Fn,yn).map(function(ei){return(0,ft.Z)({fixed:bn},ei)}))):[].concat((0,di.Z)(jt),[(0,ft.Z)((0,ft.Z)({key:yn},zt),{},{fixed:bn})])},[])}function vt(Qe){for(var Ue=!0,jt=0;jt<Qe.length;jt+=1){var zt=Qe[jt];if(Ue&&zt.fixed!=="left")Ue=!1;else if(!Ue&&zt.fixed==="left"){warning(!1,"Index ".concat(jt-1," of `columns` missing `fixed='left'` prop."));break}}for(var nn=!0,Wt=Qe.length-1;Wt>=0;Wt-=1){var bn=Qe[Wt];if(nn&&bn.fixed!=="right")nn=!1;else if(!nn&&bn.fixed==="right"){warning(!1,"Index ".concat(Wt+1," of `columns` missing `fixed='right'` prop."));break}}}function rt(Qe){return Qe.map(function(Ue){var jt=Ue.fixed,zt=(0,Ce.Z)(Ue,Ve),nn=jt;return jt==="left"?nn="right":jt==="right"&&(nn="left"),(0,ft.Z)({fixed:nn},zt)})}function Vt(Qe,Ue){var jt=Qe.prefixCls,zt=Qe.columns,nn=Qe.children,Wt=Qe.expandable,bn=Qe.expandedKeys,yn=Qe.columnTitle,Fn=Qe.getRowKey,ei=Qe.onTriggerExpand,Nn=Qe.expandIcon,Qn=Qe.rowExpandable,Ai=Qe.expandIconColumnIndex,Pi=Qe.direction,yi=Qe.expandRowByClick,or=Qe.columnWidth,bi=Qe.fixed,Yi=Qe.scrollWidth,Xi=Be.useMemo(function(){return zt||Yt(nn)},[zt,nn]),Er=Be.useMemo(function(){if(Wt){var _r,xr=Xi.slice();if(!xr.includes(ce)){var Vi=Ai||0;Vi>=0&&xr.splice(Vi,0,ce)}var Nr=xr.indexOf(ce);xr=xr.filter(function(mr,Zo){return mr!==ce||Zo===Nr});var io=Xi[Nr],So;(bi==="left"||bi)&&!Ai?So="left":(bi==="right"||bi)&&Ai===Xi.length?So="right":So=io?io.fixed:null;var wo=(_r={},(0,Re.Z)(_r,$i,{className:"".concat(jt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Re.Z)(_r,"title",yn),(0,Re.Z)(_r,"fixed",So),(0,Re.Z)(_r,"className","".concat(jt,"-row-expand-icon-cell")),(0,Re.Z)(_r,"width",or),(0,Re.Z)(_r,"render",function(Zo,Ko,Pa){var sa=Fn(Ko,Pa),os=bn.has(sa),ts=Qn?Qn(Ko):!0,Go=Nn({prefixCls:jt,expanded:os,expandable:ts,record:Ko,onExpand:ei});return yi?Be.createElement("span",{onClick:function(pa){return pa.stopPropagation()}},Go):Go}),_r);return xr.map(function(mr){return mr===ce?wo:mr})}return Xi.filter(function(mr){return mr!==ce})},[Wt,Xi,Fn,bn,Nn,Pi]),Xr=Be.useMemo(function(){var _r=Er;return Ue&&(_r=Ue(_r)),_r.length||(_r=[{render:function(){return null}}]),_r},[Ue,Er,Pi]),uo=Be.useMemo(function(){return Pi==="rtl"?rt(tn(Xr)):tn(Xr)},[Xr,Pi,Yi]),pr=At(uo,Yi),Ur=(0,ze.Z)(pr,2),jo=Ur[0],Cr=Ur[1];return[Xr,jo,Cr]}var rn=Vt;function Pn(Qe){var Ue,jt=Qe.prefixCls,zt=Qe.record,nn=Qe.onExpand,Wt=Qe.expanded,bn=Qe.expandable,yn="".concat(jt,"-row-expand-icon");if(!bn)return Be.createElement("span",{className:et()(yn,"".concat(jt,"-row-spaced"))});var Fn=function(Nn){nn(zt,Nn),Nn.stopPropagation()};return Be.createElement("span",{className:et()(yn,(Ue={},(0,Re.Z)(Ue,"".concat(jt,"-row-expanded"),Wt),(0,Re.Z)(Ue,"".concat(jt,"-row-collapsed"),!Wt),Ue)),onClick:Fn})}function kn(Qe,Ue,jt){var zt=[];function nn(Wt){(Wt||[]).forEach(function(bn,yn){zt.push(Ue(bn,yn)),nn(bn[jt])})}return nn(Qe),zt}function St(Qe,Ue,jt){var zt=Yn(Qe),nn=zt.expandIcon,Wt=zt.expandedRowKeys,bn=zt.defaultExpandedRowKeys,yn=zt.defaultExpandAllRows,Fn=zt.expandedRowRender,ei=zt.onExpand,Nn=zt.onExpandedRowsChange,Qn=zt.childrenColumnName,Ai=nn||Pn,Pi=Qn||"children",yi=Be.useMemo(function(){return Fn?"row":Qe.expandable&&Qe.internalHooks===De&&Qe.expandable.__PARENT_RENDER_ICON__||Ue.some(function(uo){return uo&&(0,$e.Z)(uo)==="object"&&uo[Pi]})?"nest":!1},[!!Fn,Ue]),or=Be.useState(function(){return bn||(yn?kn(Ue,jt,Pi):[])}),bi=(0,ze.Z)(or,2),Yi=bi[0],Xi=bi[1],Er=Be.useMemo(function(){return new Set(Wt||Yi||[])},[Wt,Yi]),Xr=Be.useCallback(function(uo){var pr=jt(uo,Ue.indexOf(uo)),Ur,jo=Er.has(pr);jo?(Er.delete(pr),Ur=(0,di.Z)(Er)):Ur=[].concat((0,di.Z)(Er),[pr]),Xi(Ur),ei&&ei(!jo,uo),Nn&&Nn(Ur)},[jt,Er,Ue,ei,Nn]);return[zt,yi,Er,Ai,Pi,Xr]}function hn(Qe,Ue,jt,zt){var nn=Qe.map(function(Wt,bn){return gt(bn,bn,Qe,Ue,jt,zt==null?void 0:zt[bn])});return(0,bt.Z)(function(){return nn},[nn],function(Wt,bn){return!(0,Ke.Z)(Wt,bn)})}function In(Qe){var Ue=(0,Be.useRef)(Qe),jt=(0,Be.useState)({}),zt=(0,ze.Z)(jt,2),nn=zt[1],Wt=(0,Be.useRef)(null),bn=(0,Be.useRef)([]);function yn(Fn){bn.current.push(Fn);var ei=Promise.resolve();Wt.current=ei,ei.then(function(){if(Wt.current===ei){var Nn=bn.current,Qn=Ue.current;bn.current=[],Nn.forEach(function(Ai){Ue.current=Ai(Ue.current)}),Wt.current=null,Qn!==Ue.current&&nn({})}})}return(0,Be.useEffect)(function(){return function(){Wt.current=null}},[]),[Ue.current,yn]}function ii(Qe){var Ue=(0,Be.useRef)(Qe||null),jt=(0,Be.useRef)();function zt(){window.clearTimeout(jt.current)}function nn(bn){Ue.current=bn,zt(),jt.current=window.setTimeout(function(){Ue.current=null,jt.current=void 0},100)}function Wt(){return Ue.current}return(0,Be.useEffect)(function(){return zt},[]),[nn,Wt]}function Gt(){var Qe=Be.useState(-1),Ue=(0,ze.Z)(Qe,2),jt=Ue[0],zt=Ue[1],nn=Be.useState(-1),Wt=(0,ze.Z)(nn,2),bn=Wt[0],yn=Wt[1],Fn=Be.useCallback(function(ei,Nn){zt(ei),yn(Nn)},[]);return[jt,bn,Fn]}var Jt=ve(47273),hi=(0,Jt.Z)()?window:null;function fi(Qe,Ue){var jt=(0,$e.Z)(Qe)==="object"?Qe:{},zt=jt.offsetHeader,nn=zt===void 0?0:zt,Wt=jt.offsetSummary,bn=Wt===void 0?0:Wt,yn=jt.offsetScroll,Fn=yn===void 0?0:yn,ei=jt.getContainer,Nn=ei===void 0?function(){return hi}:ei,Qn=Nn()||hi;return Be.useMemo(function(){var Ai=!!Qe;return{isSticky:Ai,stickyClassName:Ai?"".concat(Ue,"-sticky-holder"):"",offsetHeader:nn,offsetSummary:bn,offsetScroll:Fn,container:Qn}},[Fn,nn,bn,Ue,Qn])}function ui(Qe,Ue,jt){var zt=(0,Be.useMemo)(function(){for(var nn=[],Wt=[],bn=0,yn=0,Fn=0;Fn<Ue;Fn+=1)if(jt==="rtl"){Wt[Fn]=yn,yn+=Qe[Fn]||0;var ei=Ue-Fn-1;nn[ei]=bn,bn+=Qe[ei]||0}else{nn[Fn]=bn,bn+=Qe[Fn]||0;var Nn=Ue-Fn-1;Wt[Nn]=yn,yn+=Qe[Nn]||0}return{left:nn,right:Wt}},[Qe,Ue,jt]);return zt}var ni=ui;function ci(Qe){var Ue=Qe.className,jt=Qe.children;return Be.createElement("div",{className:Ue},jt)}var li=ci,Ni=ve(8224),Qi=ve(55468),lr=function(Ue,jt){var zt,nn,Wt=Ue.scrollBodyRef,bn=Ue.onScroll,yn=Ue.offsetScroll,Fn=Ue.container,ei=Ze(be,"prefixCls"),Nn=((zt=Wt.current)===null||zt===void 0?void 0:zt.scrollWidth)||0,Qn=((nn=Wt.current)===null||nn===void 0?void 0:nn.clientWidth)||0,Ai=Nn&&Qn*(Qn/Nn),Pi=Be.useRef(),yi=In({scrollLeft:0,isHiddenScrollBar:!1}),or=(0,ze.Z)(yi,2),bi=or[0],Yi=or[1],Xi=Be.useRef({delta:0,x:0}),Er=Be.useState(!1),Xr=(0,ze.Z)(Er,2),uo=Xr[0],pr=Xr[1],Ur=function(){pr(!1)},jo=function(Nr){Nr.persist(),Xi.current.delta=Nr.pageX-bi.scrollLeft,Xi.current.x=0,pr(!0),Nr.preventDefault()},Cr=function(Nr){var io,So=Nr||((io=window)===null||io===void 0?void 0:io.event),wo=So.buttons;if(!uo||wo===0){uo&&pr(!1);return}var mr=Xi.current.x+Nr.pageX-Xi.current.x-Xi.current.delta;mr<=0&&(mr=0),mr+Ai>=Qn&&(mr=Qn-Ai),bn({scrollLeft:mr/Qn*(Nn+2)}),Xi.current.x=Nr.pageX},_r=function(){if(Wt.current){var Nr=(0,Qi.os)(Wt.current).top,io=Nr+Wt.current.offsetHeight,So=Fn===window?document.documentElement.scrollTop+window.innerHeight:(0,Qi.os)(Fn).top+Fn.clientHeight;io-(0,It.Z)()<=So||Nr>=So-yn?Yi(function(wo){return(0,ft.Z)((0,ft.Z)({},wo),{},{isHiddenScrollBar:!0})}):Yi(function(wo){return(0,ft.Z)((0,ft.Z)({},wo),{},{isHiddenScrollBar:!1})})}},xr=function(Nr){Yi(function(io){return(0,ft.Z)((0,ft.Z)({},io),{},{scrollLeft:Nr/Nn*Qn||0})})};return Be.useImperativeHandle(jt,function(){return{setScrollLeft:xr}}),Be.useEffect(function(){var Vi=(0,Ni.Z)(document.body,"mouseup",Ur,!1),Nr=(0,Ni.Z)(document.body,"mousemove",Cr,!1);return _r(),function(){Vi.remove(),Nr.remove()}},[Ai,uo]),Be.useEffect(function(){var Vi=(0,Ni.Z)(Fn,"scroll",_r,!1),Nr=(0,Ni.Z)(window,"resize",_r,!1);return function(){Vi.remove(),Nr.remove()}},[Fn]),Be.useEffect(function(){bi.isHiddenScrollBar||Yi(function(Vi){var Nr=Wt.current;return Nr?(0,ft.Z)((0,ft.Z)({},Vi),{},{scrollLeft:Nr.scrollLeft/Nr.scrollWidth*Nr.clientWidth}):Vi})},[bi.isHiddenScrollBar]),Nn<=Qn||!Ai||bi.isHiddenScrollBar?null:Be.createElement("div",{style:{height:(0,It.Z)(),width:Qn,bottom:yn},className:"".concat(ei,"-sticky-scroll")},Be.createElement("div",{onMouseDown:jo,ref:Pi,className:et()("".concat(ei,"-sticky-scroll-bar"),(0,Re.Z)({},"".concat(ei,"-sticky-scroll-bar-active"),uo)),style:{width:"".concat(Ai,"px"),transform:"translate3d(".concat(bi.scrollLeft,"px, 0, 0)")}}))},wn=Be.forwardRef(lr);function Pr(Qe){return null}var Or=Pr;function ar(Qe){return null}var fn=ar,Rn="rc-table",Ci=[],_i={};function ki(){return"No Data"}function Wi(Qe){var Ue,jt=(0,ft.Z)({rowKey:"key",prefixCls:Rn,emptyText:ki},Qe),zt=jt.prefixCls,nn=jt.className,Wt=jt.rowClassName,bn=jt.style,yn=jt.data,Fn=jt.rowKey,ei=jt.scroll,Nn=jt.tableLayout,Qn=jt.direction,Ai=jt.title,Pi=jt.footer,yi=jt.summary,or=jt.caption,bi=jt.id,Yi=jt.showHeader,Xi=jt.components,Er=jt.emptyText,Xr=jt.onRow,uo=jt.onHeaderRow,pr=jt.internalHooks,Ur=jt.transformColumns,jo=jt.internalRefs,Cr=jt.tailor,_r=jt.sticky,xr=yn||Ci,Vi=!!xr.length,Nr=pr===De,io=Be.useCallback(function(Ea,ns){return(0,Bt.Z)(Xi,Ea)||ns},[Xi]),So=Be.useMemo(function(){return typeof Fn=="function"?Fn:function(Ea){var ns=Ea&&Ea[Fn];return ns}},[Fn]),wo=io(["body"]),mr=Gt(),Zo=(0,ze.Z)(mr,3),Ko=Zo[0],Pa=Zo[1],sa=Zo[2],os=St(jt,xr,So),ts=(0,ze.Z)(os,6),Go=ts[0],ao=ts[1],pa=ts[2],as=ts[3],Ua=ts[4],Ms=ts[5],Co=ei==null?void 0:ei.x,po=Be.useState(0),Eo=(0,ze.Z)(po,2),Qr=Eo[0],ya=Eo[1],qr=rn((0,ft.Z)((0,ft.Z)((0,ft.Z)({},jt),Go),{},{expandable:!!Go.expandedRowRender,columnTitle:Go.columnTitle,expandedKeys:pa,getRowKey:So,onTriggerExpand:Ms,expandIcon:as,expandIconColumnIndex:Go.expandIconColumnIndex,direction:Qn,scrollWidth:Nr&&Cr&&typeof Co=="number"?Co:null}),Nr?Ur:null),zo=(0,ze.Z)(qr,3),ha=zo[0],ca=zo[1],Vs=zo[2],Ns=Vs!=null?Vs:Co,hl=Be.useMemo(function(){return{columns:ha,flattenColumns:ca}},[ha,ca]),wa=Be.useRef(),Us=Be.useRef(),ws=Be.useRef(),Rs=Be.useRef(),fh=Be.useRef(),Ca=Be.useState(!1),Ta=(0,ze.Z)(Ca,2),za=Ta[0],ms=Ta[1],js=Be.useState(!1),ra=(0,ze.Z)(js,2),Ha=ra[0],zs=ra[1],jl=In(new Map),au=(0,ze.Z)(jl,2),Yl=au[0],wu=au[1],Cu=kt(ca),su=Cu.map(function(Ea){return Yl.get(Ea)}),ba=Be.useMemo(function(){return su},[su.join("_")]),Xs=ni(ba,ca.length,Qn),fs=ei&&un(ei.y),Wa=ei&&un(Ns)||!!Go.fixed,lu=Wa&&ca.some(function(Ea){var ns=Ea.fixed;return ns}),kh=Be.useRef(),Eu=fi(_r,zt),th=Eu.isSticky,gh=Eu.offsetHeader,Xl=Eu.offsetSummary,Sa=Eu.offsetScroll,Ya=Eu.stickyClassName,ks=Eu.container,Xa=Be.useMemo(function(){return yi==null?void 0:yi(xr)},[yi,xr]),fa=(fs||th)&&Be.isValidElement(Xa)&&Xa.type===Se&&Xa.props.fixed,_s,zl,Zu;fs&&(zl={overflowY:"scroll",maxHeight:ei.y}),Wa&&(_s={overflowX:"auto"},fs||(zl={overflowY:"hidden"}),Zu={width:Ns===!0?"auto":Ns,minWidth:"100%"});var pf=Be.useCallback(function(Ea,ns){(0,wt.Z)(wa.current)&&wu(function(il){if(il.get(Ea)!==ns){var bu=new Map(il);return bu.set(Ea,ns),bu}return il})},[]),qt=ii(null),$h=(0,ze.Z)(qt,2),ph=$h[0],mf=$h[1];function Nc(Ea,ns){ns&&(typeof ns=="function"?ns(Ea):ns.scrollLeft!==Ea&&(ns.scrollLeft=Ea,ns.scrollLeft!==Ea&&setTimeout(function(){ns.scrollLeft=Ea},0)))}var cc=(0,Ct.Z)(function(Ea){var ns=Ea.currentTarget,il=Ea.scrollLeft,bu=Qn==="rtl",Mu=typeof il=="number"?il:ns.scrollLeft,Gd=ns||_i;if(!mf()||mf()===Gd){var Uh;ph(Gd),Nc(Mu,Us.current),Nc(Mu,ws.current),Nc(Mu,fh.current),Nc(Mu,(Uh=kh.current)===null||Uh===void 0?void 0:Uh.setScrollLeft)}var ld=ns||Us.current;if(ld){var Hu=ld.scrollWidth,Ah=ld.clientWidth;if(Hu===Ah){ms(!1),zs(!1);return}bu?(ms(-Mu<Hu-Ah),zs(-Mu>0)):(ms(Mu>0),zs(Mu<Hu-Ah))}}),Id=function(){Wa&&ws.current?cc({currentTarget:ws.current}):(ms(!1),zs(!1))},$g=function(ns){var il=ns.width;il!==Qr&&(Id(),ya(wa.current?wa.current.offsetWidth:il))},Js=Be.useRef(!1);Be.useEffect(function(){Js.current&&Id()},[Wa,yn,ha.length]),Be.useEffect(function(){Js.current=!0},[]);var ad=Be.useState(0),Rd=(0,ze.Z)(ad,2),sd=Rd[0],vf=Rd[1],Uf=Be.useState(!0),yf=(0,ze.Z)(Uf,2),jd=yf[0],uu=yf[1];Be.useEffect(function(){(!Cr||!Nr)&&(ws.current instanceof Element?vf((0,It.o)(ws.current).width):vf((0,It.o)(Rs.current).width)),uu((0,ot.G)("position","sticky"))},[]),Be.useEffect(function(){Nr&&jo&&(jo.body.current=ws.current)});var kc=Be.useCallback(function(Ea){return Be.createElement(Be.Fragment,null,Be.createElement(Fi,Ea),fa==="top"&&Be.createElement(Pt,Ea,Xa))},[fa,Xa]),Sf=Be.useCallback(function(Ea){return Be.createElement(Pt,Ea,Xa)},[Xa]),nh=io(["table"],"table"),Kh=Be.useMemo(function(){return Nn||(lu?Ns==="max-content"?"auto":"fixed":fs||th||ca.some(function(Ea){var ns=Ea.ellipsis;return ns})?"fixed":"auto")},[fs,lu,ca,Nn,th]),Ac,dc={colWidths:ba,columCount:ca.length,stickyOffsets:Xs,onHeaderRow:uo,fixHeader:fs,scroll:ei},_l=Be.useMemo(function(){return Vi?null:typeof Er=="function"?Er():Er},[Vi,Er]),zd=Be.createElement(pi,{data:xr,measureColumnWidth:fs||Wa||th}),_d=Be.createElement(Li,{colWidths:ca.map(function(Ea){var ns=Ea.width;return ns}),columns:ca}),hu=or!=null?Be.createElement("caption",{className:"".concat(zt,"-caption")},or):void 0,Tc=(0,sn.Z)(jt,{data:!0}),Zd=(0,sn.Z)(jt,{aria:!0});if(fs||th){var Hd;typeof wo=="function"?(Hd=wo(xr,{scrollbarSize:sd,ref:ws,onScroll:cc}),dc.colWidths=ca.map(function(Ea,ns){var il=Ea.width,bu=ns===ca.length-1?il-sd:il;return typeof bu=="number"&&!Number.isNaN(bu)?bu:0})):Hd=Be.createElement("div",{style:(0,ft.Z)((0,ft.Z)({},_s),zl),onScroll:cc,ref:ws,className:et()("".concat(zt,"-body"))},Be.createElement(nh,(0,Et.Z)({style:(0,ft.Z)((0,ft.Z)({},Zu),{},{tableLayout:Kh})},Zd),hu,_d,zd,!fa&&Xa&&Be.createElement(Pt,{stickyOffsets:Xs,flattenColumns:ca,columns:ha},Xa)));var Vh=(0,ft.Z)((0,ft.Z)((0,ft.Z)({noData:!xr.length,maxContentScroll:Wa&&Ns==="max-content"},dc),hl),{},{direction:Qn,stickyClassName:Ya,onScroll:cc});Ac=Be.createElement(Be.Fragment,null,Yi!==!1&&Be.createElement(si,(0,Et.Z)({},Vh,{stickyTopOffset:gh,className:"".concat(zt,"-header"),ref:Us}),kc),Hd,fa&&fa!=="top"&&Be.createElement(si,(0,Et.Z)({},Vh,{stickyBottomOffset:Xl,className:"".concat(zt,"-summary"),ref:fh}),Sf),th&&Be.createElement(wn,{ref:kh,offsetScroll:Sa,scrollBodyRef:ws,onScroll:cc,container:ks}))}else Ac=Be.createElement("div",{style:(0,ft.Z)((0,ft.Z)({},_s),zl),className:et()("".concat(zt,"-content")),onScroll:cc,ref:ws},Be.createElement(nh,(0,Et.Z)({style:(0,ft.Z)((0,ft.Z)({},Zu),{},{tableLayout:Kh})},Zd),hu,_d,Yi!==!1&&Be.createElement(Fi,(0,Et.Z)({},dc,hl)),zd,Xa&&Be.createElement(Pt,{stickyOffsets:Xs,flattenColumns:ca,columns:ha},Xa)));var Ll=Be.createElement("div",(0,Et.Z)({className:et()(zt,nn,(Ue={},(0,Re.Z)(Ue,"".concat(zt,"-rtl"),Qn==="rtl"),(0,Re.Z)(Ue,"".concat(zt,"-ping-left"),za),(0,Re.Z)(Ue,"".concat(zt,"-ping-right"),Ha),(0,Re.Z)(Ue,"".concat(zt,"-layout-fixed"),Nn==="fixed"),(0,Re.Z)(Ue,"".concat(zt,"-fixed-header"),fs),(0,Re.Z)(Ue,"".concat(zt,"-fixed-column"),lu),(0,Re.Z)(Ue,"".concat(zt,"-scroll-horizontal"),Wa),(0,Re.Z)(Ue,"".concat(zt,"-has-fix-left"),ca[0]&&ca[0].fixed),(0,Re.Z)(Ue,"".concat(zt,"-has-fix-right"),ca[ca.length-1]&&ca[ca.length-1].fixed==="right"),Ue)),style:bn,id:bi,ref:wa},Tc),Ai&&Be.createElement(li,{className:"".concat(zt,"-title")},Ai(xr)),Be.createElement("div",{ref:Rs,className:"".concat(zt,"-container")},Ac),Pi&&Be.createElement(li,{className:"".concat(zt,"-footer")},Pi(xr)));Wa&&(Ll=Be.createElement(yt.Z,{onResize:$g},Ll));var Wd=hn(ca,Xs,Qn,ha),As=Be.useMemo(function(){return{scrollX:Ns,prefixCls:zt,getComponent:io,scrollbarSize:sd,direction:Qn,fixedInfoList:Wd,isSticky:th,supportSticky:jd,componentWidth:Qr,fixHeader:fs,fixColumn:lu,horizonScroll:Wa,tableLayout:Kh,rowClassName:Wt,expandedRowClassName:Go.expandedRowClassName,expandIcon:as,expandableType:ao,expandRowByClick:Go.expandRowByClick,expandedRowRender:Go.expandedRowRender,onTriggerExpand:Ms,expandIconColumnIndex:Go.expandIconColumnIndex,indentSize:Go.indentSize,allColumnsFixedLeft:ca.every(function(Ea){return Ea.fixed==="left"}),emptyNode:_l,columns:ha,flattenColumns:ca,onColumnResize:pf,hoverStartRow:Ko,hoverEndRow:Pa,onHover:sa,rowExpandable:Go.rowExpandable,onRow:Xr,getRowKey:So,expandedKeys:pa,childrenColumnName:Ua}},[Ns,zt,io,sd,Qn,Wd,th,jd,Qr,fs,lu,Wa,Kh,Wt,Go.expandedRowClassName,as,ao,Go.expandRowByClick,Go.expandedRowRender,Ms,Go.expandIconColumnIndex,Go.indentSize,_l,ha,ca,pf,Ko,Pa,sa,Go.rowExpandable,Xr,So,pa,Ua]);return Be.createElement(be.Provider,{value:As},Ll)}function cr(Qe){return de(Wi,Qe)}var qi=cr();qi.EXPAND_COLUMN=ce,qi.INTERNAL_HOOKS=De,qi.Column=Or,qi.ColumnGroup=fn,qi.Summary=Xe;var nr=qi,dr=ve(4409),Mn=ct(null),to=ct(null);function Ln(Qe,Ue,jt){var zt=Ue||1;return jt[Qe+zt]-(jt[Qe]||0)}function Hr(Qe){var Ue=Qe.rowInfo,jt=Qe.column,zt=Qe.colIndex,nn=Qe.indent,Wt=Qe.index,bn=Qe.renderIndex,yn=Qe.record,Fn=Qe.style,ei=Qe.className,Nn=Qe.inverse,Qn=Qe.getHeight,Ai=jt.render,Pi=jt.dataIndex,yi=jt.className,or=jt.width,bi=Ze(to,["columnsOffset"]),Yi=bi.columnsOffset,Xi=Un(Ue,jt,zt,nn,Wt),Er=Xi.key,Xr=Xi.fixedInfo,uo=Xi.appendCellNode,pr=Xi.additionalCellProps,Ur=pr.style,jo=pr.colSpan,Cr=jo===void 0?1:jo,_r=pr.rowSpan,xr=_r===void 0?1:_r,Vi=zt-1,Nr=Ln(Vi,Cr,Yi),io=Cr>1?or-Nr:0,So=(0,ft.Z)((0,ft.Z)((0,ft.Z)({},Ur),Fn),{},{flex:"0 0 ".concat(Nr,"px"),width:"".concat(Nr,"px"),marginRight:io,pointerEvents:"auto"}),wo=Be.useMemo(function(){return Nn?xr<=1:Cr===0||xr===0||xr>1},[xr,Cr,Nn]);wo?So.visibility="hidden":Nn&&(So.height=Qn==null?void 0:Qn(xr));var mr=wo?function(){return null}:Ai,Zo={};return(xr===0||Cr===0)&&(Zo.rowSpan=1,Zo.colSpan=1),Be.createElement(Cn,(0,Et.Z)({className:et()(yi,ei),ellipsis:jt.ellipsis,align:jt.align,scope:jt.rowScope,component:"div",prefixCls:Ue.prefixCls,key:Er,record:yn,index:Wt,renderIndex:bn,dataIndex:Pi,render:mr,shouldCellUpdate:jt.shouldCellUpdate},Xr,{appendNode:uo,additionalProps:(0,ft.Z)((0,ft.Z)({},pr),{},{style:So},Zo)}))}var so=Hr,Bi=["data","index","className","rowKey","style","extra","getHeight"],Mo=Be.forwardRef(function(Qe,Ue){var jt=Qe.data,zt=Qe.index,nn=Qe.className,Wt=Qe.rowKey,bn=Qe.style,yn=Qe.extra,Fn=Qe.getHeight,ei=(0,Ce.Z)(Qe,Bi),Nn=jt.record,Qn=jt.indent,Ai=jt.index,Pi=Ze(be,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),yi=Pi.scrollX,or=Pi.flattenColumns,bi=Pi.prefixCls,Yi=Pi.fixColumn,Xi=Pi.componentWidth,Er=cn(Nn,Wt,zt,Qn),Xr=Er.rowSupportExpand,uo=Er.expanded,pr=Er.rowProps,Ur=Er.expandedRowRender,jo=Er.expandedRowClassName,Cr;if(Xr&&uo){var _r=Ur(Nn,zt,Qn+1,uo),xr=jo==null?void 0:jo(Nn,zt,Qn),Vi={};Yi&&(Vi={style:(0,Re.Z)({},"--virtual-width","".concat(Xi,"px"))});var Nr="".concat(bi,"-expanded-row-cell");Cr=Be.createElement("div",{className:et()("".concat(bi,"-expanded-row"),"".concat(bi,"-expanded-row-level-").concat(Qn+1),xr)},Be.createElement(Cn,{component:"div",prefixCls:bi,className:et()(Nr,(0,Re.Z)({},"".concat(Nr,"-fixed"),Yi)),additionalProps:Vi},_r))}var io=(0,ft.Z)((0,ft.Z)({},bn),{},{width:yi});yn&&(io.position="absolute",io.pointerEvents="none");var So=Be.createElement("div",(0,Et.Z)({},pr,ei,{ref:Xr?null:Ue,className:et()(nn,"".concat(bi,"-row"),pr==null?void 0:pr.className,(0,Re.Z)({},"".concat(bi,"-row-extra"),yn)),style:(0,ft.Z)((0,ft.Z)({},io),pr==null?void 0:pr.style)}),or.map(function(wo,mr){return Be.createElement(so,{key:mr,rowInfo:Er,column:wo,colIndex:mr,indent:Qn,index:zt,renderIndex:Ai,record:Nn,inverse:yn,getHeight:Fn})}));return Xr?Be.createElement("div",{ref:Ue},So,Cr):So}),oo=me(Mo),Ui=oo,er=Be.forwardRef(function(Qe,Ue){var jt=Qe.data,zt=Qe.onScroll,nn=Ze(be,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Wt=nn.flattenColumns,bn=nn.onColumnResize,yn=nn.getRowKey,Fn=nn.expandedKeys,ei=nn.prefixCls,Nn=nn.childrenColumnName,Qn=nn.emptyNode,Ai=nn.scrollX,Pi=Ze(Mn),yi=Pi.scrollY,or=Pi.listItemHeight,bi=Be.useRef(),Yi=Ht(jt,Nn,Fn,yn),Xi=Be.useMemo(function(){var Cr=0;return Wt.map(function(_r){var xr=_r.width,Vi=_r.key;return Cr+=xr,[Vi,xr,Cr]})},[Wt]),Er=Be.useMemo(function(){return Xi.map(function(Cr){return Cr[2]})},[Xi]);Be.useEffect(function(){Xi.forEach(function(Cr){var _r=(0,ze.Z)(Cr,2),xr=_r[0],Vi=_r[1];bn(xr,Vi)})},[Xi]),Be.useImperativeHandle(Ue,function(){var Cr={};return Object.defineProperty(Cr,"scrollLeft",{get:function(){var xr;return((xr=bi.current)===null||xr===void 0?void 0:xr.getScrollInfo().x)||0},set:function(xr){var Vi;(Vi=bi.current)===null||Vi===void 0||Vi.scrollTo({left:xr})}}),Cr});var Xr=function(_r,xr){var Vi,Nr=(Vi=Yi[xr])===null||Vi===void 0?void 0:Vi.record,io=_r.onCell;if(io){var So,wo=io(Nr,xr);return(So=wo==null?void 0:wo.rowSpan)!==null&&So!==void 0?So:1}return 1},uo=function(_r){var xr=_r.start,Vi=_r.end,Nr=_r.getSize,io=_r.offsetY;if(Vi<0)return null;for(var So=Wt.filter(function(Co){return Xr(Co,xr)===0}),wo=xr,mr=function(po){if(So=So.filter(function(Eo){return Xr(Eo,po)===0}),!So.length)return wo=po,"break"},Zo=xr;Zo>=0;Zo-=1){var Ko=mr(Zo);if(Ko==="break")break}for(var Pa=Wt.filter(function(Co){return Xr(Co,Vi)!==1}),sa=Vi,os=function(po){if(Pa=Pa.filter(function(Eo){return Xr(Eo,po)!==1}),!Pa.length)return sa=Math.max(po-1,Vi),"break"},ts=Vi;ts<Yi.length;ts+=1){var Go=os(ts);if(Go==="break")break}for(var ao=[],pa=function(po){var Eo=Yi[po];if(!Eo)return"continue";Wt.some(function(Qr){return Xr(Qr,po)>1})&&ao.push(po)},as=wo;as<=sa;as+=1)var Ua=pa(as);var Ms=ao.map(function(Co){var po=Yi[Co],Eo=yn(po.record,Co),Qr=function(zo){var ha=Co+zo-1,ca=yn(Yi[ha].record,ha),Vs=Nr(Eo,ca);return Vs.bottom-Vs.top},ya=Nr(Eo);return Be.createElement(Ui,{key:Co,data:po,rowKey:Eo,index:Co,style:{top:-io+ya.top},extra:!0,getHeight:Qr})});return Ms},pr=Be.useMemo(function(){return{columnsOffset:Er}},[Er]),Ur="".concat(ei,"-tbody"),jo;return Yi.length?jo=Be.createElement(dr.Z,{fullHeight:!1,ref:bi,className:et()(Ur,"".concat(Ur,"-virtual")),height:yi,itemHeight:or||24,data:Yi,itemKey:function(_r){return yn(_r.record)},scrollWidth:Ai,onVirtualScroll:function(_r){var xr=_r.x;zt({scrollLeft:xr})},extraRender:uo},function(Cr,_r,xr){var Vi=yn(Cr.record,_r);return Be.createElement(Ui,(0,Et.Z)({data:Cr,rowKey:Vi,index:_r},xr))}):jo=Be.createElement("div",{className:et()("".concat(ei,"-placeholder"))},Be.createElement(Cn,{component:"div",prefixCls:ei},Qn)),Be.createElement(to.Provider,{value:pr},jo)}),Wr=me(er),no=Wr,xi=function(Ue,jt){var zt=jt.ref,nn=jt.onScroll;return Be.createElement(no,{ref:zt,data:Ue,onScroll:nn})},tt=100;function lo(Qe){var Ue=Qe.columns,jt=Qe.scroll,zt=Qe.prefixCls,nn=zt===void 0?Rn:zt,Wt=Qe.className,bn=Qe.listItemHeight,yn=jt||{},Fn=yn.x,ei=yn.y;typeof Fn!="number"&&(Fn=((Ue||[]).length+1)*tt),typeof ei!="number"&&(ei=500);var Nn=Be.useMemo(function(){return{scrollY:ei,listItemHeight:bn}},[ei,bn]);return Be.createElement(Mn.Provider,{value:Nn},Be.createElement(nr,(0,Et.Z)({},Qe,{className:et()(Wt,"".concat(nn,"-virtual")),scroll:(0,ft.Z)((0,ft.Z)({},jt),{},{x:Fn}),components:{body:xi},columns:Ue,internalHooks:De,tailor:!0})))}function _o(Qe){return de(lo,Qe)}var ga=_o(),Oa=null;function Xo(Qe){return null}var Fa=Xo;function Gr(Qe){return null}var Br=Gr,yr=ve(2738),xo=ve(68031),ua=ve(36355),Tr=ve(93891),ir=ve(19716),Xn=ve(8628),wr=ve(31724),bo=ve(58421),ta=ve(71418),No=ve(88088);function vo(Qe){return function(jt){let{prefixCls:zt,onExpand:nn,record:Wt,expanded:bn,expandable:yn}=jt;const Fn=`${zt}-row-expand-icon`;return Be.createElement("button",{type:"button",onClick:ei=>{nn(Wt,ei),ei.stopPropagation()},className:et()(Fn,{[`${Fn}-spaced`]:!yn,[`${Fn}-expanded`]:yn&&bn,[`${Fn}-collapsed`]:yn&&!bn}),"aria-label":bn?Qe.collapse:Qe.expand,"aria-expanded":bn})}}var na=vo;function ia(Qe,Ue){return"key"in Qe&&Qe.key!==void 0&&Qe.key!==null?Qe.key:Qe.dataIndex?Array.isArray(Qe.dataIndex)?Qe.dataIndex.join("."):Qe.dataIndex:Ue}function Ba(Qe,Ue){return Ue?`${Ue}-${Qe}`:`${Qe}`}function Na(Qe,Ue){return typeof Qe=="function"?Qe(Ue):Qe}function is(Qe,Ue){const jt=Na(Qe,Ue);return Object.prototype.toString.call(jt)==="[object Object]"?"":jt}var pn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},Ia=pn,Vl=ve(7657),Hs=function(Ue,jt){return Be.createElement(Vl.Z,(0,Et.Z)({},Ue,{ref:jt,icon:Ia}))},wl=Be.forwardRef(Hs),ka=wl,yu=ve(56762);function Cl(Qe){const Ue=Be.useRef(Qe),jt=(0,yu.Z)();return[()=>Ue.current,zt=>{Ue.current=zt,jt()}]}var ma=ve(3113),Fo=ve(24905),Ul=ve(38854),$r=ve(64165),$o=ve(20834),yo=ve(40875),Di=ve(5112),$a=ve(17574),Ka=ve(47472),bs=ve(92832);function El(Qe){let{value:Ue,onChange:jt,filterSearch:zt,tablePrefixCls:nn,locale:Wt}=Qe;return zt?Be.createElement("div",{className:`${nn}-filter-dropdown-search`},Be.createElement(bs.default,{prefix:Be.createElement(Ka.Z,null),placeholder:Wt.filterSearchPlaceholder,onChange:jt,value:Ue,htmlSize:1,className:`${nn}-filter-dropdown-search-input`})):null}var Dl=El,Ei=ve(10228);const Ma=Qe=>{const{keyCode:Ue}=Qe;Ue===Ei.Z.ENTER&&Qe.stopPropagation()};var bl=Be.forwardRef((Qe,Ue)=>Be.createElement("div",{className:Qe.className,onClick:jt=>jt.stopPropagation(),onKeyDown:Ma,ref:Ue},Qe.children));function Ol(Qe){let Ue=[];return(Qe||[]).forEach(jt=>{let{value:zt,children:nn}=jt;Ue.push(zt),nn&&(Ue=[].concat((0,di.Z)(Ue),(0,di.Z)(Ol(nn))))}),Ue}function Il(Qe){return Qe.some(Ue=>{let{children:jt}=Ue;return jt})}function Jr(Qe,Ue){return typeof Ue=="string"||typeof Ue=="number"?Ue==null?void 0:Ue.toString().toLowerCase().includes(Qe.trim().toLowerCase()):!1}function Ju(Qe){let{filters:Ue,prefixCls:jt,filteredKeys:zt,filterMultiple:nn,searchValue:Wt,filterSearch:bn}=Qe;return Ue.map((yn,Fn)=>{const ei=String(yn.value);if(yn.children)return{key:ei||Fn,label:yn.text,popupClassName:`${jt}-dropdown-submenu`,children:Ju({filters:yn.children,prefixCls:jt,filteredKeys:zt,filterMultiple:nn,searchValue:Wt,filterSearch:bn})};const Nn=nn?Fo.default:Di.ZP,Qn={key:yn.value!==void 0?ei:Fn,label:Be.createElement(Be.Fragment,null,Be.createElement(Nn,{checked:zt.includes(ei)}),Be.createElement("span",null,yn.text))};return Wt.trim()?typeof bn=="function"?bn(Wt,yn)?Qn:null:Jr(Wt,yn.text)?Qn:null:Qn})}function nl(Qe){var Ue,jt;const{tablePrefixCls:zt,prefixCls:nn,column:Wt,dropdownPrefixCls:bn,columnKey:yn,filterMultiple:Fn,filterMode:ei="menu",filterSearch:Nn=!1,filterState:Qn,triggerFilter:Ai,locale:Pi,children:yi,getPopupContainer:or}=Qe,{filterDropdownOpen:bi,onFilterDropdownOpenChange:Yi,filterResetToDefaultFilteredValue:Xi,defaultFilteredValue:Er,filterDropdownVisible:Xr,onFilterDropdownVisibleChange:uo}=Wt,[pr,Ur]=Be.useState(!1),jo=!!(Qn&&(!((Ue=Qn.filteredKeys)===null||Ue===void 0)&&Ue.length||Qn.forceFiltered)),Cr=qr=>{Ur(qr),Yi==null||Yi(qr),uo==null||uo(qr)},_r=(jt=bi!=null?bi:Xr)!==null&&jt!==void 0?jt:pr,xr=Qn==null?void 0:Qn.filteredKeys,[Vi,Nr]=Cl(xr||[]),io=qr=>{let{selectedKeys:zo}=qr;Nr(zo)},So=(qr,zo)=>{let{node:ha,checked:ca}=zo;io(Fn?{selectedKeys:qr}:{selectedKeys:ca&&ha.key?[ha.key]:[]})};Be.useEffect(()=>{pr&&io({selectedKeys:xr||[]})},[xr]);const[wo,mr]=Be.useState([]),Zo=qr=>{mr(qr)},[Ko,Pa]=Be.useState(""),sa=qr=>{const{value:zo}=qr.target;Pa(zo)};Be.useEffect(()=>{pr||Pa("")},[pr]);const os=qr=>{const zo=qr&&qr.length?qr:null;if(zo===null&&(!Qn||!Qn.filteredKeys)||(0,Ke.Z)(zo,Qn==null?void 0:Qn.filteredKeys,!0))return null;Ai({column:Wt,key:yn,filteredKeys:zo})},ts=()=>{Cr(!1),os(Vi())},Go=function(){let{confirm:qr,closeDropdown:zo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};qr&&os([]),zo&&Cr(!1),Pa(""),Nr(Xi?(Er||[]).map(ha=>String(ha)):[])},ao=function(){let{closeDropdown:qr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};qr&&Cr(!1),os(Vi())},pa=qr=>{qr&&xr!==void 0&&Nr(xr||[]),Cr(qr),!qr&&!Wt.filterDropdown&&ts()},as=et()({[`${bn}-menu-without-submenu`]:!Il(Wt.filters||[])}),Ua=qr=>{if(qr.target.checked){const zo=Ol(Wt==null?void 0:Wt.filters).map(ha=>String(ha));Nr(zo)}else Nr([])},Ms=qr=>{let{filters:zo}=qr;return(zo||[]).map((ha,ca)=>{const Vs=String(ha.value),Ns={title:ha.text,key:ha.value!==void 0?Vs:ca};return ha.children&&(Ns.children=Ms({filters:ha.children})),Ns})},Co=qr=>{var zo;return Object.assign(Object.assign({},qr),{text:qr.title,value:qr.key,children:((zo=qr.children)===null||zo===void 0?void 0:zo.map(ha=>Co(ha)))||[]})};let po;if(typeof Wt.filterDropdown=="function")po=Wt.filterDropdown({prefixCls:`${bn}-custom`,setSelectedKeys:qr=>io({selectedKeys:qr}),selectedKeys:Vi(),confirm:ao,clearFilters:Go,filters:Wt.filters,visible:_r,close:()=>{Cr(!1)}});else if(Wt.filterDropdown)po=Wt.filterDropdown;else{const qr=Vi()||[],zo=()=>(Wt.filters||[]).length===0?Be.createElement($r.Z,{image:$r.Z.PRESENTED_IMAGE_SIMPLE,description:Pi.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):ei==="tree"?Be.createElement(Be.Fragment,null,Be.createElement(Dl,{filterSearch:Nn,value:Ko,onChange:sa,tablePrefixCls:zt,locale:Pi}),Be.createElement("div",{className:`${zt}-filter-dropdown-tree`},Fn?Be.createElement(Fo.default,{checked:qr.length===Ol(Wt.filters).length,indeterminate:qr.length>0&&qr.length<Ol(Wt.filters).length,className:`${zt}-filter-dropdown-checkall`,onChange:Ua},Pi.filterCheckall):null,Be.createElement($a.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:Fn,checkStrictly:!Fn,className:`${bn}-menu`,onCheck:So,checkedKeys:qr,selectedKeys:qr,showIcon:!1,treeData:Ms({filters:Wt.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Ko.trim()?ca=>typeof Nn=="function"?Nn(Ko,Co(ca)):Jr(Ko,ca.title):void 0}))):Be.createElement(Be.Fragment,null,Be.createElement(Dl,{filterSearch:Nn,value:Ko,onChange:sa,tablePrefixCls:zt,locale:Pi}),Be.createElement($o.default,{selectable:!0,multiple:Fn,prefixCls:`${bn}-menu`,className:as,onSelect:io,onDeselect:io,selectedKeys:qr,getPopupContainer:or,openKeys:wo,onOpenChange:Zo,items:Ju({filters:Wt.filters||[],filterSearch:Nn,prefixCls:nn,filteredKeys:Vi(),filterMultiple:Fn,searchValue:Ko})})),ha=()=>Xi?(0,Ke.Z)((Er||[]).map(ca=>String(ca)),qr,!0):qr.length===0;po=Be.createElement(Be.Fragment,null,zo(),Be.createElement("div",{className:`${nn}-dropdown-btns`},Be.createElement(ma.ZP,{type:"link",size:"small",disabled:ha(),onClick:()=>Go()},Pi.filterReset),Be.createElement(ma.ZP,{type:"primary",size:"small",onClick:ts},Pi.filterConfirm)))}Wt.filterDropdown&&(po=Be.createElement(yo.J,{selectable:void 0},po));const Eo=()=>Be.createElement(bl,{className:`${nn}-dropdown`},po);let Qr;typeof Wt.filterIcon=="function"?Qr=Wt.filterIcon(jo):Wt.filterIcon?Qr=Wt.filterIcon:Qr=Be.createElement(ka,null);const{direction:ya}=Be.useContext(ua.E_);return Be.createElement("div",{className:`${nn}-column`},Be.createElement("span",{className:`${zt}-column-title`},yi),Be.createElement(Ul.Z,{dropdownRender:Eo,trigger:["click"],open:_r,onOpenChange:pa,getPopupContainer:or,placement:ya==="rtl"?"bottomLeft":"bottomRight"},Be.createElement("span",{role:"button",tabIndex:-1,className:et()(`${nn}-trigger`,{active:jo}),onClick:qr=>{qr.stopPropagation()}},Qr)))}var vs=nl;function ys(Qe,Ue,jt){let zt=[];return(Qe||[]).forEach((nn,Wt)=>{var bn;const yn=Ba(Wt,jt);if(nn.filters||"filterDropdown"in nn||"onFilter"in nn)if("filteredValue"in nn){let Fn=nn.filteredValue;"filterDropdown"in nn||(Fn=(bn=Fn==null?void 0:Fn.map(String))!==null&&bn!==void 0?bn:Fn),zt.push({column:nn,key:ia(nn,yn),filteredKeys:Fn,forceFiltered:nn.filtered})}else zt.push({column:nn,key:ia(nn,yn),filteredKeys:Ue&&nn.defaultFilteredValue?nn.defaultFilteredValue:void 0,forceFiltered:nn.filtered});"children"in nn&&(zt=[].concat((0,di.Z)(zt),(0,di.Z)(ys(nn.children,Ue,yn))))}),zt}function Su(Qe,Ue,jt,zt,nn,Wt,bn,yn){return jt.map((Fn,ei)=>{const Nn=Ba(ei,yn),{filterMultiple:Qn=!0,filterMode:Ai,filterSearch:Pi}=Fn;let yi=Fn;if(yi.filters||yi.filterDropdown){const or=ia(yi,Nn),bi=zt.find(Yi=>{let{key:Xi}=Yi;return or===Xi});yi=Object.assign(Object.assign({},yi),{title:Yi=>Be.createElement(vs,{tablePrefixCls:Qe,prefixCls:`${Qe}-filter`,dropdownPrefixCls:Ue,column:yi,columnKey:or,filterState:bi,filterMultiple:Qn,filterMode:Ai,filterSearch:Pi,triggerFilter:Wt,locale:nn,getPopupContainer:bn},Na(Fn.title,Yi))})}return"children"in yi&&(yi=Object.assign(Object.assign({},yi),{children:Su(Qe,Ue,yi.children,zt,nn,Wt,bn,Nn)})),yi})}function Iu(Qe){const Ue={};return Qe.forEach(jt=>{let{key:zt,filteredKeys:nn,column:Wt}=jt;const{filters:bn,filterDropdown:yn}=Wt;if(yn)Ue[zt]=nn||null;else if(Array.isArray(nn)){const Fn=Ol(bn);Ue[zt]=Fn.filter(ei=>nn.includes(String(ei)))}else Ue[zt]=null}),Ue}function Ys(Qe,Ue){return Ue.reduce((jt,zt)=>{const{column:{onFilter:nn,filters:Wt},filteredKeys:bn}=zt;return nn&&bn&&bn.length?jt.filter(yn=>bn.some(Fn=>{const ei=Ol(Wt),Nn=ei.findIndex(Ai=>String(Ai)===String(Fn)),Qn=Nn!==-1?ei[Nn]:Fn;return nn(Qn,yn)})):jt},Qe)}const ul=Qe=>Qe.flatMap(Ue=>"children"in Ue?[Ue].concat((0,di.Z)(ul(Ue.children||[]))):[Ue]);function Mh(Qe){let{prefixCls:Ue,dropdownPrefixCls:jt,mergedColumns:zt,onFilterChange:nn,getPopupContainer:Wt,locale:bn}=Qe;const yn=Be.useMemo(()=>ul(zt||[]),[zt]),[Fn,ei]=Be.useState(()=>ys(yn,!0)),Nn=Be.useMemo(()=>{const yi=ys(yn,!1);if(yi.length===0)return yi;let or=!0,bi=!0;if(yi.forEach(Yi=>{let{filteredKeys:Xi}=Yi;Xi!==void 0?or=!1:bi=!1}),or){const Yi=(yn||[]).map((Xi,Er)=>ia(Xi,Ba(Er)));return Fn.filter(Xi=>{let{key:Er}=Xi;return Yi.includes(Er)}).map(Xi=>{const Er=yn[Yi.findIndex(Xr=>Xr===Xi.key)];return Object.assign(Object.assign({},Xi),{column:Object.assign(Object.assign({},Xi.column),Er),forceFiltered:Er.filtered})})}return yi},[yn,Fn]),Qn=Be.useMemo(()=>Iu(Nn),[Nn]),Ai=yi=>{const or=Nn.filter(bi=>{let{key:Yi}=bi;return Yi!==yi.key});or.push(yi),ei(or),nn(Iu(or),or)};return[yi=>Su(Ue,jt,yi,Nn,bn,Ai,Wt),Nn,Qn]}var uc=Mh;function Lh(Qe,Ue,jt){const zt=Be.useRef({});function nn(Wt){if(!zt.current||zt.current.data!==Qe||zt.current.childrenColumnName!==Ue||zt.current.getRowKey!==jt){let yn=function(Fn){Fn.forEach((ei,Nn)=>{const Qn=jt(ei,Nn);bn.set(Qn,ei),ei&&typeof ei=="object"&&Ue in ei&&yn(ei[Ue]||[])})};const bn=new Map;yn(Qe),zt.current={data:Qe,childrenColumnName:Ue,kvMap:bn,getRowKey:jt}}return zt.current.kvMap.get(Wt)}return[nn]}var hc=ve(50371),Fh=function(Qe,Ue){var jt={};for(var zt in Qe)Object.prototype.hasOwnProperty.call(Qe,zt)&&Ue.indexOf(zt)<0&&(jt[zt]=Qe[zt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nn=0,zt=Object.getOwnPropertySymbols(Qe);nn<zt.length;nn++)Ue.indexOf(zt[nn])<0&&Object.prototype.propertyIsEnumerable.call(Qe,zt[nn])&&(jt[zt[nn]]=Qe[zt[nn]]);return jt};const Ru=10;function Qu(Qe,Ue){const jt={current:Qe.current,pageSize:Qe.pageSize};return Object.keys(Ue&&typeof Ue=="object"?Ue:{}).forEach(nn=>{const Wt=Qe[nn];typeof Wt!="function"&&(jt[nn]=Wt)}),jt}function Rl(Qe,Ue,jt){const zt=jt&&typeof jt=="object"?jt:{},{total:nn=0}=zt,Wt=Fh(zt,["total"]),[bn,yn]=(0,Be.useState)(()=>({current:"defaultCurrent"in Wt?Wt.defaultCurrent:1,pageSize:"defaultPageSize"in Wt?Wt.defaultPageSize:Ru})),Fn=(0,hc.Z)(bn,Wt,{total:nn>0?nn:Qe}),ei=Math.ceil((nn||Qe)/Fn.pageSize);Fn.current>ei&&(Fn.current=ei||1);const Nn=(Ai,Pi)=>{yn({current:Ai!=null?Ai:1,pageSize:Pi||Fn.pageSize})},Qn=(Ai,Pi)=>{var yi;jt&&((yi=jt.onChange)===null||yi===void 0||yi.call(jt,Ai,Pi)),Nn(Ai,Pi),Ue(Ai,Pi||(Fn==null?void 0:Fn.pageSize))};return jt===!1?[{},()=>{}]:[Object.assign(Object.assign({},Fn),{onChange:Qn}),Nn]}var Hh=Rl,qu=ve(84105),eh=ve(35654),Po=ve(90782),Vo=ve(71430),Ws=ve(18929);const ds={},es="SELECT_ALL",Aa="SELECT_INVERT",_a="SELECT_NONE",rs=[],Va=(Qe,Ue)=>{let jt=[];return(Ue||[]).forEach(zt=>{jt.push(zt),zt&&typeof zt=="object"&&Qe in zt&&(jt=[].concat((0,di.Z)(jt),(0,di.Z)(Va(Qe,zt[Qe]))))}),jt};var $s=(Qe,Ue)=>{const{preserveSelectedRowKeys:jt,selectedRowKeys:zt,defaultSelectedRowKeys:nn,getCheckboxProps:Wt,onChange:bn,onSelect:yn,onSelectAll:Fn,onSelectInvert:ei,onSelectNone:Nn,onSelectMultiple:Qn,columnWidth:Ai,type:Pi,selections:yi,fixed:or,renderCell:bi,hideSelectAll:Yi,checkStrictly:Xi=!0}=Ue||{},{prefixCls:Er,data:Xr,pageData:uo,getRecordByKey:pr,getRowKey:Ur,expandType:jo,childrenColumnName:Cr,locale:_r,getPopupContainer:xr}=Qe,[Vi,Nr]=(0,Ws.Z)(zt||nn||rs,{value:zt}),io=Be.useRef(new Map),So=(0,Be.useCallback)(Co=>{if(jt){const po=new Map;Co.forEach(Eo=>{let Qr=pr(Eo);!Qr&&io.current.has(Eo)&&(Qr=io.current.get(Eo)),po.set(Eo,Qr)}),io.current=po}},[pr,jt]);Be.useEffect(()=>{So(Vi)},[Vi]);const{keyEntities:wo}=(0,Be.useMemo)(()=>{if(Xi)return{keyEntities:null};let Co=Xr;if(jt){const po=new Set(Xr.map((Qr,ya)=>Ur(Qr,ya))),Eo=Array.from(io.current).reduce((Qr,ya)=>{let[qr,zo]=ya;return po.has(qr)?Qr:Qr.concat(zo)},[]);Co=[].concat((0,di.Z)(Co),(0,di.Z)(Eo))}return(0,Vo.I8)(Co,{externalGetKey:Ur,childrenPropName:Cr})},[Xr,Ur,Xi,Cr,jt]),mr=(0,Be.useMemo)(()=>Va(Cr,uo),[Cr,uo]),Zo=(0,Be.useMemo)(()=>{const Co=new Map;return mr.forEach((po,Eo)=>{const Qr=Ur(po,Eo),ya=(Wt?Wt(po):null)||{};Co.set(Qr,ya)}),Co},[mr,Ur,Wt]),Ko=(0,Be.useCallback)(Co=>{var po;return!!(!((po=Zo.get(Ur(Co)))===null||po===void 0)&&po.disabled)},[Zo,Ur]),[Pa,sa]=(0,Be.useMemo)(()=>{if(Xi)return[Vi||[],[]];const{checkedKeys:Co,halfCheckedKeys:po}=(0,Po.S)(Vi,!0,wo,Ko);return[Co||[],po]},[Vi,Xi,wo,Ko]),os=(0,Be.useMemo)(()=>{const Co=Pi==="radio"?Pa.slice(0,1):Pa;return new Set(Co)},[Pa,Pi]),ts=(0,Be.useMemo)(()=>Pi==="radio"?new Set:new Set(sa),[sa,Pi]),[Go,ao]=(0,Be.useState)(null);Be.useEffect(()=>{Ue||Nr(rs)},[!!Ue]);const pa=(0,Be.useCallback)((Co,po)=>{let Eo,Qr;So(Co),jt?(Eo=Co,Qr=Co.map(ya=>io.current.get(ya))):(Eo=[],Qr=[],Co.forEach(ya=>{const qr=pr(ya);qr!==void 0&&(Eo.push(ya),Qr.push(qr))})),Nr(Eo),bn==null||bn(Eo,Qr,{type:po})},[Nr,pr,bn,jt]),as=(0,Be.useCallback)((Co,po,Eo,Qr)=>{if(yn){const ya=Eo.map(qr=>pr(qr));yn(pr(Co),po,ya,Qr)}pa(Eo,"single")},[yn,pr,pa]),Ua=(0,Be.useMemo)(()=>!yi||Yi?null:(yi===!0?[es,Aa,_a]:yi).map(po=>po===es?{key:"all",text:_r.selectionAll,onSelect(){pa(Xr.map((Eo,Qr)=>Ur(Eo,Qr)).filter(Eo=>{const Qr=Zo.get(Eo);return!(Qr!=null&&Qr.disabled)||os.has(Eo)}),"all")}}:po===Aa?{key:"invert",text:_r.selectInvert,onSelect(){const Eo=new Set(os);uo.forEach((ya,qr)=>{const zo=Ur(ya,qr),ha=Zo.get(zo);ha!=null&&ha.disabled||(Eo.has(zo)?Eo.delete(zo):Eo.add(zo))});const Qr=Array.from(Eo);ei&&ei(Qr),pa(Qr,"invert")}}:po===_a?{key:"none",text:_r.selectNone,onSelect(){Nn==null||Nn(),pa(Array.from(os).filter(Eo=>{const Qr=Zo.get(Eo);return Qr==null?void 0:Qr.disabled}),"none")}}:po).map(po=>Object.assign(Object.assign({},po),{onSelect:function(){for(var Eo,Qr,ya=arguments.length,qr=new Array(ya),zo=0;zo<ya;zo++)qr[zo]=arguments[zo];(Qr=po.onSelect)===null||Qr===void 0||(Eo=Qr).call.apply(Eo,[po].concat(qr)),ao(null)}})),[yi,os,uo,Ur,ei,pa]);return[(0,Be.useCallback)(Co=>{var po;if(!Ue)return Co.filter(Ca=>Ca!==ds);let Eo=(0,di.Z)(Co);const Qr=new Set(os),ya=mr.map(Ur).filter(Ca=>!Zo.get(Ca).disabled),qr=ya.every(Ca=>Qr.has(Ca)),zo=ya.some(Ca=>Qr.has(Ca)),ha=()=>{const Ca=[];qr?ya.forEach(za=>{Qr.delete(za),Ca.push(za)}):ya.forEach(za=>{Qr.has(za)||(Qr.add(za),Ca.push(za))});const Ta=Array.from(Qr);Fn==null||Fn(!qr,Ta.map(za=>pr(za)),Ca.map(za=>pr(za))),pa(Ta,"all"),ao(null)};let ca;if(Pi!=="radio"){let Ca;if(Ua){const ra={getPopupContainer:xr,items:Ua.map((Ha,zs)=>{const{key:jl,text:au,onSelect:Yl}=Ha;return{key:jl!=null?jl:zs,onClick:()=>{Yl==null||Yl(ya)},label:au}})};Ca=Be.createElement("div",{className:`${Er}-selection-extra`},Be.createElement(Ul.Z,{menu:ra,getPopupContainer:xr},Be.createElement("span",null,Be.createElement(qu.Z,null))))}const Ta=mr.map((ra,Ha)=>{const zs=Ur(ra,Ha),jl=Zo.get(zs)||{};return Object.assign({checked:Qr.has(zs)},jl)}).filter(ra=>{let{disabled:Ha}=ra;return Ha}),za=!!Ta.length&&Ta.length===mr.length,ms=za&&Ta.every(ra=>{let{checked:Ha}=ra;return Ha}),js=za&&Ta.some(ra=>{let{checked:Ha}=ra;return Ha});ca=!Yi&&Be.createElement("div",{className:`${Er}-selection`},Be.createElement(Fo.default,{checked:za?ms:!!mr.length&&qr,indeterminate:za?!ms&&js:!qr&&zo,onChange:ha,disabled:mr.length===0||za,"aria-label":Ca?"Custom selection":"Select all",skipGroup:!0}),Ca)}let Vs;Pi==="radio"?Vs=(Ca,Ta,za)=>{const ms=Ur(Ta,za),js=Qr.has(ms);return{node:Be.createElement(Di.ZP,Object.assign({},Zo.get(ms),{checked:js,onClick:ra=>ra.stopPropagation(),onChange:ra=>{Qr.has(ms)||as(ms,!0,[ms],ra.nativeEvent)}})),checked:js}}:Vs=(Ca,Ta,za)=>{var ms;const js=Ur(Ta,za),ra=Qr.has(js),Ha=ts.has(js),zs=Zo.get(js);let jl;return jo==="nest"?jl=Ha:jl=(ms=zs==null?void 0:zs.indeterminate)!==null&&ms!==void 0?ms:Ha,{node:Be.createElement(Fo.default,Object.assign({},zs,{indeterminate:jl,checked:ra,skipGroup:!0,onClick:au=>au.stopPropagation(),onChange:au=>{let{nativeEvent:Yl}=au;const{shiftKey:wu}=Yl;let Cu=-1,su=-1;if(wu&&Xi){const ba=new Set([Go,js]);ya.some((Xs,fs)=>{if(ba.has(Xs))if(Cu===-1)Cu=fs;else return su=fs,!0;return!1})}if(su!==-1&&Cu!==su&&Xi){const ba=ya.slice(Cu,su+1),Xs=[];ra?ba.forEach(Wa=>{Qr.has(Wa)&&(Xs.push(Wa),Qr.delete(Wa))}):ba.forEach(Wa=>{Qr.has(Wa)||(Xs.push(Wa),Qr.add(Wa))});const fs=Array.from(Qr);Qn==null||Qn(!ra,fs.map(Wa=>pr(Wa)),Xs.map(Wa=>pr(Wa))),pa(fs,"multiple")}else{const ba=Pa;if(Xi){const Xs=ra?(0,eh._5)(ba,js):(0,eh.L0)(ba,js);as(js,!ra,Xs,Yl)}else{const Xs=(0,Po.S)([].concat((0,di.Z)(ba),[js]),!0,wo,Ko),{checkedKeys:fs,halfCheckedKeys:Wa}=Xs;let lu=fs;if(ra){const kh=new Set(fs);kh.delete(js),lu=(0,Po.S)(Array.from(kh),{checked:!1,halfCheckedKeys:Wa},wo,Ko).checkedKeys}as(js,!ra,lu,Yl)}}ao(ra?null:js)}})),checked:ra}};const Ns=(Ca,Ta,za)=>{const{node:ms,checked:js}=Vs(Ca,Ta,za);return bi?bi(js,Ta,za,ms):ms};if(!Eo.includes(ds))if(Eo.findIndex(Ca=>{var Ta;return((Ta=Ca[$i])===null||Ta===void 0?void 0:Ta.columnType)==="EXPAND_COLUMN"})===0){const[Ca,...Ta]=Eo;Eo=[Ca,ds].concat((0,di.Z)(Ta))}else Eo=[ds].concat((0,di.Z)(Eo));const hl=Eo.indexOf(ds);Eo=Eo.filter((Ca,Ta)=>Ca!==ds||Ta===hl);const wa=Eo[hl-1],Us=Eo[hl+1];let ws=or;ws===void 0&&((Us==null?void 0:Us.fixed)!==void 0?ws=Us.fixed:(wa==null?void 0:wa.fixed)!==void 0&&(ws=wa.fixed)),ws&&wa&&((po=wa[$i])===null||po===void 0?void 0:po.columnType)==="EXPAND_COLUMN"&&wa.fixed===void 0&&(wa.fixed=ws);const Rs=et()(`${Er}-selection-col`,{[`${Er}-selection-col-with-dropdown`]:yi&&Pi==="checkbox"}),fh={fixed:ws,width:Ai,className:`${Er}-selection-column`,title:Ue.columnTitle||ca,render:Ns,onCell:Ue.onCell,[$i]:{className:Rs}};return Eo.map(Ca=>Ca===ds?fh:Ca)},[Ur,mr,Ue,Pa,os,ts,Ai,Ua,jo,Go,Zo,Qn,as,Ko]),os]},va=ve(89489),rd=ve(59477),Mc=ve(6848);const Kt="ascend",_t="descend";function mn(Qe){return typeof Qe.sorter=="object"&&typeof Qe.sorter.multiple=="number"?Qe.sorter.multiple:!1}function it(Qe){return typeof Qe=="function"?Qe:Qe&&typeof Qe=="object"&&Qe.compare?Qe.compare:!1}function vn(Qe,Ue){return Ue?Qe[Qe.indexOf(Ue)+1]:Qe[0]}function jr(Qe,Ue,jt){let zt=[];function nn(Wt,bn){zt.push({column:Wt,key:ia(Wt,bn),multiplePriority:mn(Wt),sortOrder:Wt.sortOrder})}return(Qe||[]).forEach((Wt,bn)=>{const yn=Ba(bn,jt);Wt.children?("sortOrder"in Wt&&nn(Wt,yn),zt=[].concat((0,di.Z)(zt),(0,di.Z)(jr(Wt.children,Ue,yn)))):Wt.sorter&&("sortOrder"in Wt?nn(Wt,yn):Ue&&Wt.defaultSortOrder&&zt.push({column:Wt,key:ia(Wt,yn),multiplePriority:mn(Wt),sortOrder:Wt.defaultSortOrder}))}),zt}function Bo(Qe,Ue,jt,zt,nn,Wt,bn,yn){return(Ue||[]).map((Fn,ei)=>{const Nn=Ba(ei,yn);let Qn=Fn;if(Qn.sorter){const Ai=Qn.sortDirections||nn,Pi=Qn.showSorterTooltip===void 0?bn:Qn.showSorterTooltip,yi=ia(Qn,Nn),or=jt.find(jo=>{let{key:Cr}=jo;return Cr===yi}),bi=or?or.sortOrder:null,Yi=vn(Ai,bi);let Xi;if(Fn.sortIcon)Xi=Fn.sortIcon({sortOrder:bi});else{const jo=Ai.includes(Kt)&&Be.createElement(rd.Z,{className:et()(`${Qe}-column-sorter-up`,{active:bi===Kt})}),Cr=Ai.includes(_t)&&Be.createElement(va.Z,{className:et()(`${Qe}-column-sorter-down`,{active:bi===_t})});Xi=Be.createElement("span",{className:et()(`${Qe}-column-sorter`,{[`${Qe}-column-sorter-full`]:!!(jo&&Cr)})},Be.createElement("span",{className:`${Qe}-column-sorter-inner`,"aria-hidden":"true"},jo,Cr))}const{cancelSort:Er,triggerAsc:Xr,triggerDesc:uo}=Wt||{};let pr=Er;Yi===_t?pr=uo:Yi===Kt&&(pr=Xr);const Ur=typeof Pi=="object"?Pi:{title:pr};Qn=Object.assign(Object.assign({},Qn),{className:et()(Qn.className,{[`${Qe}-column-sort`]:bi}),title:jo=>{const Cr=Be.createElement("div",{className:`${Qe}-column-sorters`},Be.createElement("span",{className:`${Qe}-column-title`},Na(Fn.title,jo)),Xi);return Pi?Be.createElement(Mc.Z,Object.assign({},Ur),Cr):Cr},onHeaderCell:jo=>{const Cr=Fn.onHeaderCell&&Fn.onHeaderCell(jo)||{},_r=Cr.onClick,xr=Cr.onKeyDown;Cr.onClick=io=>{zt({column:Fn,key:yi,sortOrder:Yi,multiplePriority:mn(Fn)}),_r==null||_r(io)},Cr.onKeyDown=io=>{io.keyCode===Ei.Z.ENTER&&(zt({column:Fn,key:yi,sortOrder:Yi,multiplePriority:mn(Fn)}),xr==null||xr(io))};const Vi=is(Fn.title,{}),Nr=Vi==null?void 0:Vi.toString();return bi?Cr["aria-sort"]=bi==="ascend"?"ascending":"descending":Cr["aria-label"]=Nr||"",Cr.className=et()(Cr.className,`${Qe}-column-has-sorters`),Cr.tabIndex=0,Fn.ellipsis&&(Cr.title=(Vi!=null?Vi:"").toString()),Cr}})}return"children"in Qn&&(Qn=Object.assign(Object.assign({},Qn),{children:Bo(Qe,Qn.children,jt,zt,nn,Wt,bn,Nn)})),Qn})}function Ir(Qe){const{column:Ue,sortOrder:jt}=Qe;return{column:Ue,order:jt,field:Ue.dataIndex,columnKey:Ue.key}}function zr(Qe){const Ue=Qe.filter(jt=>{let{sortOrder:zt}=jt;return zt}).map(Ir);return Ue.length===0&&Qe.length?Object.assign(Object.assign({},Ir(Qe[Qe.length-1])),{column:void 0}):Ue.length<=1?Ue[0]||{}:Ue}function Ro(Qe,Ue,jt){const zt=Ue.slice().sort((bn,yn)=>yn.multiplePriority-bn.multiplePriority),nn=Qe.slice(),Wt=zt.filter(bn=>{let{column:{sorter:yn},sortOrder:Fn}=bn;return it(yn)&&Fn});return Wt.length?nn.sort((bn,yn)=>{for(let Fn=0;Fn<Wt.length;Fn+=1){const ei=Wt[Fn],{column:{sorter:Nn},sortOrder:Qn}=ei,Ai=it(Nn);if(Ai&&Qn){const Pi=Ai(bn,yn,Qn);if(Pi!==0)return Qn===Kt?Pi:-Pi}}return 0}).map(bn=>{const yn=bn[jt];return yn?Object.assign(Object.assign({},bn),{[jt]:Ro(yn,Ue,jt)}):bn}):nn}function fo(Qe){let{prefixCls:Ue,mergedColumns:jt,onSorterChange:zt,sortDirections:nn,tableLocale:Wt,showSorterTooltip:bn}=Qe;const[yn,Fn]=Be.useState(jr(jt,!0)),ei=Be.useMemo(()=>{let yi=!0;const or=jr(jt,!1);if(!or.length)return yn;const bi=[];function Yi(Er){yi?bi.push(Er):bi.push(Object.assign(Object.assign({},Er),{sortOrder:null}))}let Xi=null;return or.forEach(Er=>{Xi===null?(Yi(Er),Er.sortOrder&&(Er.multiplePriority===!1?yi=!1:Xi=!0)):(Xi&&Er.multiplePriority!==!1||(yi=!1),Yi(Er))}),bi},[jt,yn]),Nn=Be.useMemo(()=>{const yi=ei.map(or=>{let{column:bi,sortOrder:Yi}=or;return{column:bi,order:Yi}});return{sortColumns:yi,sortColumn:yi[0]&&yi[0].column,sortOrder:yi[0]&&yi[0].order}},[ei]);function Qn(yi){let or;yi.multiplePriority===!1||!ei.length||ei[0].multiplePriority===!1?or=[yi]:or=[].concat((0,di.Z)(ei.filter(bi=>{let{key:Yi}=bi;return Yi!==yi.key})),[yi]),Fn(or),zt(zr(or),or)}return[yi=>Bo(Ue,yi,ei,Qn,nn,Wt,bn),ei,Nn,()=>zr(ei)]}function Wo(Qe,Ue){return Qe.map(jt=>{const zt=Object.assign({},jt);return zt.title=Na(jt.title,Ue),"children"in zt&&(zt.children=Wo(zt.children,Ue)),zt})}function co(Qe){return[Be.useCallback(jt=>Wo(jt,Qe),[Qe])]}var Zi=cr((Qe,Ue)=>{const{_renderTimes:jt}=Qe,{_renderTimes:zt}=Ue;return jt!==zt}),Ki=_o((Qe,Ue)=>{const{_renderTimes:jt}=Qe,{_renderTimes:zt}=Ue;return jt!==zt}),Dr=ve(64993),Ar=ve(17313),rr=ve(83116),br=ve(37613),Rr=Qe=>{const{componentCls:Ue}=Qe,jt=`${Qe.lineWidth}px ${Qe.lineType} ${Qe.tableBorderColor}`,zt=(nn,Wt,bn)=>({[`&${Ue}-${nn}`]:{[`> ${Ue}-container`]:{[`> ${Ue}-content, > ${Ue}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${Ue}-expanded-row-fixed`]:{margin:`-${Wt}px -${bn+Qe.lineWidth}px`}}}}}});return{[`${Ue}-wrapper`]:{[`${Ue}${Ue}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${Ue}-title`]:{border:jt,borderBottom:0},[`> ${Ue}-container`]:{borderInlineStart:jt,borderTop:jt,[`
> ${Ue}-content,
> ${Ue}-header,
> ${Ue}-body,
> ${Ue}-summary
`]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:jt},"> thead":{"> tr:not(:last-child) > th":{borderBottom:jt},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${Ue}-cell-fix-right-first::after`]:{borderInlineEnd:jt}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${Ue}-expanded-row-fixed`]:{margin:`-${Qe.tablePaddingVertical}px -${Qe.tablePaddingHorizontal+Qe.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:Qe.lineWidth,bottom:0,borderInlineEnd:jt,content:'""'}}}}}},[`&${Ue}-scroll-horizontal`]:{[`> ${Ue}-container > ${Ue}-body`]:{"> table > tbody":{[`
> tr${Ue}-expanded-row,
> tr${Ue}-placeholder
`]:{"> th, > td":{borderInlineEnd:0}}}}}},zt("middle",Qe.tablePaddingVerticalMiddle,Qe.tablePaddingHorizontalMiddle)),zt("small",Qe.tablePaddingVerticalSmall,Qe.tablePaddingHorizontalSmall)),{[`> ${Ue}-footer`]:{border:jt,borderTop:0}}),[`${Ue}-cell`]:{[`${Ue}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Qe.lineWidth}px 0 ${Qe.lineWidth}px ${Qe.tableHeaderBg}`}},[`${Ue}-bordered ${Ue}-cell-scrollbar`]:{borderInlineEnd:jt}}}},ur=Qe=>{const{componentCls:Ue}=Qe;return{[`${Ue}-wrapper`]:{[`${Ue}-cell-ellipsis`]:Object.assign(Object.assign({},Ar.vS),{wordBreak:"keep-all",[`
&${Ue}-cell-fix-left-last,
&${Ue}-cell-fix-right-first
`]:{overflow:"visible",[`${Ue}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${Ue}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Ri=Qe=>{const{componentCls:Ue}=Qe;return{[`${Ue}-wrapper`]:{[`${Ue}-tbody > tr${Ue}-placeholder`]:{textAlign:"center",color:Qe.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:Qe.colorBgContainer}}}}},To=ve(15969),ko=Qe=>{const{componentCls:Ue,antCls:jt,controlInteractiveSize:zt,motionDurationSlow:nn,lineWidth:Wt,paddingXS:bn,lineType:yn,tableBorderColor:Fn,tableExpandIconBg:ei,tableExpandColumnWidth:Nn,borderRadius:Qn,fontSize:Ai,fontSizeSM:Pi,lineHeight:yi,tablePaddingVertical:or,tablePaddingHorizontal:bi,tableExpandedRowBg:Yi,paddingXXS:Xi}=Qe,Er=zt/2-Wt,Xr=Er*2+Wt*3,uo=`${Wt}px ${yn} ${Fn}`,pr=Xi-Wt;return{[`${Ue}-wrapper`]:{[`${Ue}-expand-icon-col`]:{width:Nn},[`${Ue}-row-expand-icon-cell`]:{textAlign:"center",[`${Ue}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${Ue}-row-indent`]:{height:1,float:"left"},[`${Ue}-row-expand-icon`]:Object.assign(Object.assign({},(0,To.N)(Qe)),{position:"relative",float:"left",boxSizing:"border-box",width:Xr,height:Xr,padding:0,color:"inherit",lineHeight:`${Xr}px`,background:ei,border:uo,borderRadius:Qn,transform:`scale(${zt/Xr})`,transition:`all ${nn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${nn} ease-out`,content:'""'},"&::before":{top:Er,insetInlineEnd:pr,insetInlineStart:pr,height:Wt},"&::after":{top:pr,bottom:pr,insetInlineStart:Er,width:Wt,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${Ue}-row-indent + ${Ue}-row-expand-icon`]:{marginTop:(Ai*yi-Wt*3)/2-Math.ceil((Pi*1.4-Wt*3)/2),marginInlineEnd:bn},[`tr${Ue}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Yi}},[`${jt}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${Ue}-expanded-row-fixed`]:{position:"relative",margin:`-${or}px -${bi}px`,padding:`${or}px ${bi}px`}}}},Lr=Qe=>{const{componentCls:Ue,antCls:jt,iconCls:zt,tableFilterDropdownWidth:nn,tableFilterDropdownSearchWidth:Wt,paddingXXS:bn,paddingXS:yn,colorText:Fn,lineWidth:ei,lineType:Nn,tableBorderColor:Qn,tableHeaderIconColor:Ai,fontSizeSM:Pi,tablePaddingHorizontal:yi,borderRadius:or,motionDurationSlow:bi,colorTextDescription:Yi,colorPrimary:Xi,tableHeaderFilterActiveBg:Er,colorTextDisabled:Xr,tableFilterDropdownBg:uo,tableFilterDropdownHeight:pr,controlItemBgHover:Ur,controlItemBgActive:jo,boxShadowSecondary:Cr,filterDropdownMenuBg:_r}=Qe,xr=`${jt}-dropdown`,Vi=`${Ue}-filter-dropdown`,Nr=`${jt}-tree`,io=`${ei}px ${Nn} ${Qn}`;return[{[`${Ue}-wrapper`]:{[`${Ue}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${Ue}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-bn,marginInline:`${bn}px ${-yi/2}px`,padding:`0 ${bn}px`,color:Ai,fontSize:Pi,borderRadius:or,cursor:"pointer",transition:`all ${bi}`,"&:hover":{color:Yi,background:Er},"&.active":{color:Xi}}}},{[`${jt}-dropdown`]:{[Vi]:Object.assign(Object.assign({},(0,Ar.Wf)(Qe)),{minWidth:nn,backgroundColor:uo,borderRadius:or,boxShadow:Cr,overflow:"hidden",[`${xr}-menu`]:{maxHeight:pr,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:_r,"&:empty::after":{display:"block",padding:`${yn}px 0`,color:Xr,fontSize:Pi,textAlign:"center",content:'"Not Found"'}},[`${Vi}-tree`]:{paddingBlock:`${yn}px 0`,paddingInline:yn,[Nr]:{padding:0},[`${Nr}-treenode ${Nr}-node-content-wrapper:hover`]:{backgroundColor:Ur},[`${Nr}-treenode-checkbox-checked ${Nr}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:jo}}},[`${Vi}-search`]:{padding:yn,borderBottom:io,"&-input":{input:{minWidth:Wt},[zt]:{color:Xr}}},[`${Vi}-checkall`]:{width:"100%",marginBottom:bn,marginInlineStart:bn},[`${Vi}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${yn-ei}px ${yn}px`,overflow:"hidden",borderTop:io}})}},{[`${jt}-dropdown ${Vi}, ${Vi}-submenu`]:{[`${jt}-checkbox-wrapper + span`]:{paddingInlineStart:yn,color:Fn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Bs=Qe=>{const{componentCls:Ue,lineWidth:jt,colorSplit:zt,motionDurationSlow:nn,zIndexTableFixed:Wt,tableBg:bn,zIndexTableSticky:yn}=Qe,Fn=zt;return{[`${Ue}-wrapper`]:{[`
${Ue}-cell-fix-left,
${Ue}-cell-fix-right
`]:{position:"sticky !important",zIndex:Wt,background:bn},[`
${Ue}-cell-fix-left-first::after,
${Ue}-cell-fix-left-last::after
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-jt,width:30,transform:"translateX(100%)",transition:`box-shadow ${nn}`,content:'""',pointerEvents:"none"},[`${Ue}-cell-fix-left-all::after`]:{display:"none"},[`
${Ue}-cell-fix-right-first::after,
${Ue}-cell-fix-right-last::after
`]:{position:"absolute",top:0,bottom:-jt,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${nn}`,content:'""',pointerEvents:"none"},[`${Ue}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:yn+1,width:30,transition:`box-shadow ${nn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${Ue}-ping-left`]:{[`&:not(${Ue}-has-fix-left) ${Ue}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${Fn}`}},[`
${Ue}-cell-fix-left-first::after,
${Ue}-cell-fix-left-last::after
`]:{boxShadow:`inset 10px 0 8px -8px ${Fn}`},[`${Ue}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${Ue}-ping-right`]:{[`&:not(${Ue}-has-fix-right) ${Ue}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${Fn}`}},[`
${Ue}-cell-fix-right-first::after,
${Ue}-cell-fix-right-last::after
`]:{boxShadow:`inset -10px 0 8px -8px ${Fn}`}}}}},Ra=Qe=>{const{componentCls:Ue,antCls:jt}=Qe;return{[`${Ue}-wrapper`]:{[`${Ue}-pagination${jt}-pagination`]:{margin:`${Qe.margin}px 0`},[`${Ue}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:Qe.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Za=Qe=>{const{componentCls:Ue,tableRadius:jt}=Qe;return{[`${Ue}-wrapper`]:{[Ue]:{[`${Ue}-title, ${Ue}-header`]:{borderRadius:`${jt}px ${jt}px 0 0`},[`${Ue}-title + ${Ue}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${Ue}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:jt,borderStartEndRadius:jt,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:jt},"> *:last-child":{borderStartEndRadius:jt}}},"&-footer":{borderRadius:`0 0 ${jt}px ${jt}px`}}}}},ju=Qe=>{const{componentCls:Ue}=Qe;return{[`${Ue}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${Ue}-pagination-left`]:{justifyContent:"flex-end"},[`${Ue}-pagination-right`]:{justifyContent:"flex-start"},[`${Ue}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${Ue}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${Ue}-row-indent`]:{float:"right"}}}}},Bh=Qe=>{const{componentCls:Ue,antCls:jt,iconCls:zt,fontSizeIcon:nn,padding:Wt,paddingXS:bn,tableHeaderIconColor:yn,tableHeaderIconColorHover:Fn,tableSelectionColumnWidth:ei}=Qe;return{[`${Ue}-wrapper`]:{[`${Ue}-selection-col`]:{width:ei,[`&${Ue}-selection-col-with-dropdown`]:{width:ei+nn+Wt/4}},[`${Ue}-bordered ${Ue}-selection-col`]:{width:ei+bn*2,[`&${Ue}-selection-col-with-dropdown`]:{width:ei+nn+Wt/4+bn*2}},[`
table tr th${Ue}-selection-column,
table tr td${Ue}-selection-column
`]:{paddingInlineEnd:Qe.paddingXS,paddingInlineStart:Qe.paddingXS,textAlign:"center",[`${jt}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${Ue}-selection-column${Ue}-cell-fix-left`]:{zIndex:Qe.zIndexTableFixed+1},[`table tr th${Ue}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${Ue}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${Ue}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${Qe.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${Qe.tablePaddingHorizontal/4}px`,[zt]:{color:yn,fontSize:nn,verticalAlign:"baseline","&:hover":{color:Fn}}}}}},zu=Qe=>{const{componentCls:Ue}=Qe,jt=(zt,nn,Wt,bn)=>({[`${Ue}${Ue}-${zt}`]:{fontSize:bn,[`
${Ue}-title,
${Ue}-footer,
${Ue}-cell,
${Ue}-thead > tr > th,
${Ue}-tbody > tr > th,
${Ue}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{padding:`${nn}px ${Wt}px`},[`${Ue}-filter-trigger`]:{marginInlineEnd:`-${Wt/2}px`},[`${Ue}-expanded-row-fixed`]:{margin:`-${nn}px -${Wt}px`},[`${Ue}-tbody`]:{[`${Ue}-wrapper:only-child ${Ue}`]:{marginBlock:`-${nn}px`,marginInline:`${Qe.tableExpandColumnWidth-Wt}px -${Wt}px`}},[`${Ue}-selection-column`]:{paddingInlineStart:`${Wt/4}px`}}});return{[`${Ue}-wrapper`]:Object.assign(Object.assign({},jt("middle",Qe.tablePaddingVerticalMiddle,Qe.tablePaddingHorizontalMiddle,Qe.tableFontSizeMiddle)),jt("small",Qe.tablePaddingVerticalSmall,Qe.tablePaddingHorizontalSmall,Qe.tableFontSizeSmall))}},Ml=Qe=>{const{componentCls:Ue,marginXXS:jt,fontSizeIcon:zt,tableHeaderIconColor:nn,tableHeaderIconColorHover:Wt}=Qe;return{[`${Ue}-wrapper`]:{[`${Ue}-thead th${Ue}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${Qe.motionDurationSlow}`,"&:hover":{background:Qe.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:Qe.colorPrimary},[`
&${Ue}-cell-fix-left:hover,
&${Ue}-cell-fix-right:hover
`]:{background:Qe.tableFixedHeaderSortActiveBg}},[`${Ue}-thead th${Ue}-column-sort`]:{background:Qe.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${Ue}-column-sort`]:{background:Qe.tableBodySortBg},[`${Ue}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${Ue}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${Ue}-column-sorter`]:{marginInlineStart:jt,color:nn,fontSize:0,transition:`color ${Qe.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:zt,"&.active":{color:Qe.colorPrimary}},[`${Ue}-column-sorter-up + ${Ue}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${Ue}-column-sorters:hover ${Ue}-column-sorter`]:{color:Wt}}}},Nh=Qe=>{const{componentCls:Ue,opacityLoading:jt,tableScrollThumbBg:zt,tableScrollThumbBgHover:nn,tableScrollThumbSize:Wt,tableScrollBg:bn,zIndexTableSticky:yn,stickyScrollBarBorderRadius:Fn}=Qe,ei=`${Qe.lineWidth}px ${Qe.lineType} ${Qe.tableBorderColor}`;return{[`${Ue}-wrapper`]:{[`${Ue}-sticky`]:{"&-holder":{position:"sticky",zIndex:yn,background:Qe.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Wt}px !important`,zIndex:yn,display:"flex",alignItems:"center",background:bn,borderTop:ei,opacity:jt,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Wt,backgroundColor:zt,borderRadius:Fn,transition:`all ${Qe.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:nn}}}}}}},_u=Qe=>{const{componentCls:Ue,lineWidth:jt,tableBorderColor:zt}=Qe,nn=`${jt}px ${Qe.lineType} ${zt}`;return{[`${Ue}-wrapper`]:{[`${Ue}-summary`]:{position:"relative",zIndex:Qe.zIndexTableFixed,background:Qe.tableBg,"> tr":{"> th, > td":{borderBottom:nn}}},[`div${Ue}-summary`]:{boxShadow:`0 -${jt}px 0 ${zt}`}}}},xu=Qe=>{const{componentCls:Ue}=Qe,jt=`${Qe.lineWidth}px ${Qe.lineType} ${Qe.tableBorderColor}`,zt=`${Ue}-expanded-row-cell`;return{[`${Ue}-wrapper`]:{[`${Ue}-tbody-virtual`]:{[`${Ue}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${Ue}-cell`]:{borderBottom:jt},[`${Ue}-expanded-row`]:{[`${zt}${zt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${Qe.lineWidth}px)`,borderInlineEnd:"none"}}},[`${Ue}-bordered`]:{[`${Ue}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:jt,position:"absolute"},[`${Ue}-cell`]:{borderInlineEnd:jt,[`&${Ue}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-Qe.lineWidth,borderInlineStart:jt}}}}}}};const Pu=Qe=>{const{componentCls:Ue,fontWeightStrong:jt,tablePaddingVertical:zt,tablePaddingHorizontal:nn,lineWidth:Wt,lineType:bn,tableBorderColor:yn,tableFontSize:Fn,tableBg:ei,tableRadius:Nn,tableHeaderTextColor:Qn,motionDurationMid:Ai,tableHeaderBg:Pi,tableHeaderCellSplitColor:yi,tableRowHoverBg:or,tableSelectedRowBg:bi,tableSelectedRowHoverBg:Yi,tableFooterTextColor:Xi,tableFooterBg:Er,paddingContentVerticalLG:Xr}=Qe,uo=`${Wt}px ${bn} ${yn}`;return{[`${Ue}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ar.dF)()),{[Ue]:Object.assign(Object.assign({},(0,Ar.Wf)(Qe)),{fontSize:Fn,background:ei,borderRadius:`${Nn}px ${Nn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Nn}px ${Nn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
${Ue}-cell,
${Ue}-thead > tr > th,
${Ue}-tbody > tr > th,
${Ue}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{position:"relative",padding:`${Xr}px ${nn}px`,overflowWrap:"break-word"},[`${Ue}-title`]:{padding:`${zt}px ${nn}px`},[`${Ue}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Qn,fontWeight:jt,textAlign:"start",background:Pi,borderBottom:uo,transition:`background ${Ai} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${Ue}-selection-column):not(${Ue}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:yi,transform:"translateY(-50%)",transition:`background-color ${Ai}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${Ue}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${Ai}, border-color ${Ai}`,borderBottom:uo,[`
> ${Ue}-wrapper:only-child,
> ${Ue}-expanded-row-fixed > ${Ue}-wrapper:only-child
`]:{[Ue]:{marginBlock:`-${zt}px`,marginInline:`${Qe.tableExpandColumnWidth-nn}px -${nn}px`,[`${Ue}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Qn,fontWeight:jt,textAlign:"start",background:Pi,borderBottom:uo,transition:`background ${Ai} ease`},[`
&${Ue}-row:hover > th,
&${Ue}-row:hover > td,
> th${Ue}-cell-row-hover,
> td${Ue}-cell-row-hover
`]:{background:or},[`&${Ue}-row-selected`]:{"> th, > td":{background:bi},"&:hover > th, &:hover > td":{background:Yi}}}},[`${Ue}-footer`]:{padding:`${zt}px ${nn}px`,color:Xi,background:Er}})}};var dh=(0,rr.Z)("Table",Qe=>{const{colorTextHeading:Ue,colorSplit:jt,colorIcon:zt,colorIconHover:nn,opacityLoading:Wt,colorBgContainer:bn,controlInteractiveSize:yn,headerBg:Fn,headerColor:ei,headerSortActiveBg:Nn,headerSortHoverBg:Qn,bodySortBg:Ai,rowHoverBg:Pi,rowSelectedBg:yi,rowSelectedHoverBg:or,rowExpandedBg:bi,cellPaddingBlock:Yi,cellPaddingInline:Xi,cellPaddingBlockMD:Er,cellPaddingInlineMD:Xr,cellPaddingBlockSM:uo,cellPaddingInlineSM:pr,borderColor:Ur,footerBg:jo,footerColor:Cr,headerBorderRadius:_r,cellFontSize:xr,cellFontSizeMD:Vi,cellFontSizeSM:Nr,headerSplitColor:io,fixedHeaderSortActiveBg:So,headerFilterHoverBg:wo,filterDropdownBg:mr,expandIconBg:Zo,selectionColumnWidth:Ko,stickyScrollBarBg:Pa}=Qe,sa=new Dr.C(zt),os=new Dr.C(nn),ts=2,Go=(0,br.TS)(Qe,{tableFontSize:xr,tableBg:bn,tableRadius:_r,tablePaddingVertical:Yi,tablePaddingHorizontal:Xi,tablePaddingVerticalMiddle:Er,tablePaddingHorizontalMiddle:Xr,tablePaddingVerticalSmall:uo,tablePaddingHorizontalSmall:pr,tableBorderColor:Ur,tableHeaderTextColor:ei,tableHeaderBg:Fn,tableFooterTextColor:Cr,tableFooterBg:jo,tableHeaderCellSplitColor:io,tableHeaderSortBg:Nn,tableHeaderSortHoverBg:Qn,tableHeaderIconColor:sa.clone().setAlpha(sa.getAlpha()*Wt).toRgbString(),tableHeaderIconColorHover:os.clone().setAlpha(os.getAlpha()*Wt).toRgbString(),tableBodySortBg:Ai,tableFixedHeaderSortActiveBg:So,tableHeaderFilterActiveBg:wo,tableFilterDropdownBg:mr,tableRowHoverBg:Pi,tableSelectedRowBg:yi,tableSelectedRowHoverBg:or,zIndexTableFixed:ts,zIndexTableSticky:ts+1,tableFontSizeMiddle:Vi,tableFontSizeSmall:Nr,tableSelectionColumnWidth:Ko,tableExpandIconBg:Zo,tableExpandColumnWidth:yn+2*Qe.padding,tableExpandedRowBg:bi,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Pa,tableScrollThumbBgHover:Ue,tableScrollBg:jt});return[Pu(Go),Ra(Go),_u(Go),Ml(Go),Lr(Go),Rr(Go),Za(Go),ko(Go),_u(Go),Ri(Go),Bh(Go),Bs(Go),Nh(Go),ur(Go),zu(Go),ju(Go),xu(Go)]},Qe=>{const{colorFillAlter:Ue,colorBgContainer:jt,colorTextHeading:zt,colorFillSecondary:nn,colorFillContent:Wt,controlItemBgActive:bn,controlItemBgActiveHover:yn,padding:Fn,paddingSM:ei,paddingXS:Nn,colorBorderSecondary:Qn,borderRadiusLG:Ai,fontSize:Pi,controlHeight:yi,colorTextPlaceholder:or}=Qe,bi=new Dr.C(nn).onBackground(jt).toHexShortString(),Yi=new Dr.C(Wt).onBackground(jt).toHexShortString(),Xi=new Dr.C(Ue).onBackground(jt).toHexShortString();return{headerBg:Xi,headerColor:zt,headerSortActiveBg:bi,headerSortHoverBg:Yi,bodySortBg:Xi,rowHoverBg:Xi,rowSelectedBg:bn,rowSelectedHoverBg:yn,rowExpandedBg:Ue,cellPaddingBlock:Fn,cellPaddingInline:Fn,cellPaddingBlockMD:ei,cellPaddingInlineMD:Nn,cellPaddingBlockSM:Nn,cellPaddingInlineSM:Nn,borderColor:Qn,headerBorderRadius:Ai,footerBg:Xi,footerColor:zt,cellFontSize:Pi,cellFontSizeMD:Pi,cellFontSizeSM:Pi,headerSplitColor:Qn,fixedHeaderSortActiveBg:bi,headerFilterHoverBg:Wt,filterDropdownMenuBg:jt,filterDropdownBg:jt,expandIconBg:jt,selectionColumnWidth:yi,stickyScrollBarBg:or,stickyScrollBarBorderRadius:100}});const Lc=[],Fc=(Qe,Ue)=>{const{prefixCls:jt,className:zt,rootClassName:nn,style:Wt,size:bn,bordered:yn,dropdownPrefixCls:Fn,dataSource:ei,pagination:Nn,rowSelection:Qn,rowKey:Ai="key",rowClassName:Pi,columns:yi,children:or,childrenColumnName:bi,onChange:Yi,getPopupContainer:Xi,loading:Er,expandIcon:Xr,expandable:uo,expandedRowRender:pr,expandIconColumnIndex:Ur,indentSize:jo,scroll:Cr,sortDirections:_r,locale:xr,showSorterTooltip:Vi=!0,virtual:Nr}=Qe,io=Be.useMemo(()=>yi||Yt(or),[yi,or]),So=Be.useMemo(()=>io.some(Sa=>Sa.responsive),[io]),wo=(0,Xn.Z)(So),mr=Be.useMemo(()=>{const Sa=new Set(Object.keys(wo).filter(Ya=>wo[Ya]));return io.filter(Ya=>!Ya.responsive||Ya.responsive.some(ks=>Sa.has(ks)))},[io,wo]),Zo=(0,yr.Z)(Qe,["className","style","columns"]),{locale:Ko=wr.Z,direction:Pa,table:sa,renderEmpty:os,getPrefixCls:ts,getPopupContainer:Go}=Be.useContext(ua.E_),ao=(0,ir.Z)(bn),pa=Object.assign(Object.assign({},Ko.Table),xr),as=ei||Lc,Ua=ts("table",jt),Ms=ts("dropdown",Fn),Co=Object.assign({childrenColumnName:bi,expandIconColumnIndex:Ur},uo),{childrenColumnName:po="children"}=Co,Eo=Be.useMemo(()=>as.some(Sa=>Sa==null?void 0:Sa[po])?"nest":pr||uo&&uo.expandedRowRender?"row":null,[as]),Qr={body:Be.useRef()},ya=Be.useMemo(()=>typeof Ai=="function"?Ai:Sa=>Sa==null?void 0:Sa[Ai],[Ai]),[qr]=Lh(as,po,ya),zo={},ha=function(Sa,Ya){let ks=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Xa,fa,_s;const zl=Object.assign(Object.assign({},zo),Sa);ks&&((Xa=zo.resetPagination)===null||Xa===void 0||Xa.call(zo),!((fa=zl.pagination)===null||fa===void 0)&&fa.current&&(zl.pagination.current=1),Nn&&Nn.onChange&&Nn.onChange(1,(_s=zl.pagination)===null||_s===void 0?void 0:_s.pageSize)),Cr&&Cr.scrollToFirstRowOnChange!==!1&&Qr.body.current&&(0,xo.Z)(0,{getContainer:()=>Qr.body.current}),Yi==null||Yi(zl.pagination,zl.filters,zl.sorter,{currentDataSource:Ys(Ro(as,zl.sorterStates,po),zl.filterStates),action:Ya})},ca=(Sa,Ya)=>{ha({sorter:Sa,sorterStates:Ya},"sort",!1)},[Vs,Ns,hl,wa]=fo({prefixCls:Ua,mergedColumns:mr,onSorterChange:ca,sortDirections:_r||["ascend","descend"],tableLocale:pa,showSorterTooltip:Vi}),Us=Be.useMemo(()=>Ro(as,Ns,po),[as,Ns]);zo.sorter=wa(),zo.sorterStates=Ns;const ws=(Sa,Ya)=>{ha({filters:Sa,filterStates:Ya},"filter",!0)},[Rs,fh,Ca]=uc({prefixCls:Ua,locale:pa,dropdownPrefixCls:Ms,mergedColumns:mr,onFilterChange:ws,getPopupContainer:Xi||Go}),Ta=Ys(Us,fh);zo.filters=Ca,zo.filterStates=fh;const za=Be.useMemo(()=>{const Sa={};return Object.keys(Ca).forEach(Ya=>{Ca[Ya]!==null&&(Sa[Ya]=Ca[Ya])}),Object.assign(Object.assign({},hl),{filters:Sa})},[hl,Ca]),[ms]=co(za),js=(Sa,Ya)=>{ha({pagination:Object.assign(Object.assign({},zo.pagination),{current:Sa,pageSize:Ya})},"paginate")},[ra,Ha]=Hh(Ta.length,js,Nn);zo.pagination=Nn===!1?{}:Qu(ra,Nn),zo.resetPagination=Ha;const zs=Be.useMemo(()=>{if(Nn===!1||!ra.pageSize)return Ta;const{current:Sa=1,total:Ya,pageSize:ks=Ru}=ra;return Ta.length<Ya?Ta.length>ks?Ta.slice((Sa-1)*ks,Sa*ks):Ta:Ta.slice((Sa-1)*ks,Sa*ks)},[!!Nn,Ta,ra&&ra.current,ra&&ra.pageSize,ra&&ra.total]),[jl,au]=$s({prefixCls:Ua,data:Ta,pageData:zs,getRowKey:ya,getRecordByKey:qr,expandType:Eo,childrenColumnName:po,locale:pa,getPopupContainer:Xi||Go},Qn),Yl=(Sa,Ya,ks)=>{let Xa;return typeof Pi=="function"?Xa=et()(Pi(Sa,Ya,ks)):Xa=et()(Pi),et()({[`${Ua}-row-selected`]:au.has(ya(Sa,Ya))},Xa)};Co.__PARENT_RENDER_ICON__=Co.expandIcon,Co.expandIcon=Co.expandIcon||Xr||na(pa),Eo==="nest"&&Co.expandIconColumnIndex===void 0?Co.expandIconColumnIndex=Qn?1:0:Co.expandIconColumnIndex>0&&Qn&&(Co.expandIconColumnIndex-=1),typeof Co.indentSize!="number"&&(Co.indentSize=typeof jo=="number"?jo:15);const wu=Be.useCallback(Sa=>ms(jl(Rs(Vs(Sa)))),[Vs,Rs,jl]);let Cu,su;if(Nn!==!1&&(ra!=null&&ra.total)){let Sa;ra.size?Sa=ra.size:Sa=ao==="small"||ao==="middle"?"small":void 0;const Ya=fa=>Be.createElement(bo.Z,Object.assign({},ra,{className:et()(`${Ua}-pagination ${Ua}-pagination-${fa}`,ra.className),size:Sa})),ks=Pa==="rtl"?"left":"right",{position:Xa}=ra;if(Xa!==null&&Array.isArray(Xa)){const fa=Xa.find(Zu=>Zu.includes("top")),_s=Xa.find(Zu=>Zu.includes("bottom")),zl=Xa.every(Zu=>`${Zu}`=="none");!fa&&!_s&&!zl&&(su=Ya(ks)),fa&&(Cu=Ya(fa.toLowerCase().replace("top",""))),_s&&(su=Ya(_s.toLowerCase().replace("bottom","")))}else su=Ya(ks)}let ba;typeof Er=="boolean"?ba={spinning:Er}:typeof Er=="object"&&(ba=Object.assign({spinning:!0},Er));const[Xs,fs]=dh(Ua),[,Wa]=(0,No.Z)(),lu=et()(`${Ua}-wrapper`,sa==null?void 0:sa.className,{[`${Ua}-wrapper-rtl`]:Pa==="rtl"},zt,nn,fs),kh=Object.assign(Object.assign({},sa==null?void 0:sa.style),Wt),Eu=xr&&xr.emptyText||(os==null?void 0:os("Table"))||Be.createElement(Tr.Z,{componentName:"Table"}),th=Nr?Ki:Zi,gh={},Xl=Be.useMemo(()=>{const{fontSize:Sa,lineHeight:Ya,padding:ks,paddingXS:Xa,paddingSM:fa}=Wa,_s=Math.floor(Sa*Ya);switch(ao){case"large":return ks*2+_s;case"small":return Xa*2+_s;default:return fa*2+_s}},[Wa,ao]);return Nr&&(gh.listItemHeight=Xl),Xs(Be.createElement("div",{ref:Ue,className:lu,style:kh},Be.createElement(ta.Z,Object.assign({spinning:!1},ba),Cu,Be.createElement(th,Object.assign({},gh,Zo,{columns:mr,direction:Pa,expandable:Co,prefixCls:Ua,className:et()({[`${Ua}-middle`]:ao==="middle",[`${Ua}-small`]:ao==="small",[`${Ua}-bordered`]:yn,[`${Ua}-empty`]:as.length===0}),data:zs,rowKey:ya,rowClassName:Yl,emptyText:Eu,internalHooks:De,internalRefs:Qr,transformColumns:wu})),su)))};var Bc=Be.forwardRef(Fc);const od=(Qe,Ue)=>{const jt=Be.useRef(0);return jt.current+=1,Be.createElement(Bc,Object.assign({},Qe,{ref:Ue,_renderTimes:jt.current}))},_n=Be.forwardRef(od);_n.SELECTION_COLUMN=ds,_n.EXPAND_COLUMN=ce,_n.SELECTION_ALL=es,_n.SELECTION_INVERT=Aa,_n.SELECTION_NONE=_a,_n.Column=Fa,_n.ColumnGroup=Br,_n.Summary=Xe;var Sr=_n,Jo=Sr},12563:function(Sn,an,ve){"use strict";ve.d(an,{default:function(){return ft}});var ce=ve(59301),De=ve(99267),ze=ve(92310),Ct=ve.n(ze),_e=ve(36785),Ke=ve(47729),Be=ve(14088),mt=ve(36355),ct=ve(17313),Ze=ve(37613),Et=ve(83116);const ht=Re=>{const{paddingXXS:Tt,lineWidth:et,tagPaddingHorizontal:bt,componentCls:Bt}=Re,Nt=bt-et,Zt=Tt-et;return{[Bt]:Object.assign(Object.assign({},(0,ct.Wf)(Re)),{display:"inline-block",height:"auto",marginInlineEnd:Re.marginXS,paddingInline:Nt,fontSize:Re.tagFontSize,lineHeight:Re.tagLineHeight,whiteSpace:"nowrap",background:Re.defaultBg,border:`${Re.lineWidth}px ${Re.lineType} ${Re.colorBorder}`,borderRadius:Re.borderRadiusSM,opacity:1,transition:`all ${Re.motionDurationMid}`,textAlign:"start",position:"relative",[`&${Bt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Re.defaultColor},[`${Bt}-close-icon`]:{marginInlineStart:Zt,color:Re.colorTextDescription,fontSize:Re.tagIconSize,cursor:"pointer",transition:`all ${Re.motionDurationMid}`,"&:hover":{color:Re.colorTextHeading}},[`&${Bt}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${Re.iconCls}-close, ${Re.iconCls}-close:hover`]:{color:Re.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${Bt}-checkable-checked):hover`]:{color:Re.colorPrimary,backgroundColor:Re.colorFillSecondary},"&:active, &-checked":{color:Re.colorTextLightSolid},"&-checked":{backgroundColor:Re.colorPrimary,"&:hover":{backgroundColor:Re.colorPrimaryHover}},"&:active":{backgroundColor:Re.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${Re.iconCls} + span, > span + ${Re.iconCls}`]:{marginInlineStart:Nt}}),[`${Bt}-borderless`]:{borderColor:"transparent",background:Re.tagBorderlessBg}}},dt=Re=>{const{lineWidth:Tt,fontSizeIcon:et}=Re,bt=Re.fontSizeSM,Bt=`${Re.lineHeightSM*bt}px`;return(0,Ze.TS)(Re,{tagFontSize:bt,tagLineHeight:Bt,tagIconSize:et-2*Tt,tagPaddingHorizontal:8,tagBorderlessBg:Re.colorFillTertiary})},Ae=Re=>({defaultBg:Re.colorFillQuaternary,defaultColor:Re.colorText});var te=(0,Et.Z)("Tag",Re=>{const Tt=dt(Re);return ht(Tt)},Ae),ee=function(Re,Tt){var et={};for(var bt in Re)Object.prototype.hasOwnProperty.call(Re,bt)&&Tt.indexOf(bt)<0&&(et[bt]=Re[bt]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Bt=0,bt=Object.getOwnPropertySymbols(Re);Bt<bt.length;Bt++)Tt.indexOf(bt[Bt])<0&&Object.prototype.propertyIsEnumerable.call(Re,bt[Bt])&&(et[bt[Bt]]=Re[bt[Bt]]);return et},se=Re=>{const{prefixCls:Tt,style:et,className:bt,checked:Bt,onChange:Nt,onClick:Zt}=Re,Ut=ee(Re,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:lt,tag:Ge}=ce.useContext(mt.E_),kt=Qt=>{Nt==null||Nt(!Bt),Zt==null||Zt(Qt)},un=lt("tag",Tt),[ln,Ft]=te(un),$t=Ct()(un,`${un}-checkable`,{[`${un}-checkable-checked`]:Bt},Ge==null?void 0:Ge.className,bt,Ft);return ln(ce.createElement("span",Object.assign({},Ut,{style:Object.assign(Object.assign({},et),Ge==null?void 0:Ge.style),className:$t,onClick:kt})))},de=ve(45157);const me=Re=>(0,de.Z)(Re,(Tt,et)=>{let{textColor:bt,lightBorderColor:Bt,lightColor:Nt,darkColor:Zt}=et;return{[`${Re.componentCls}-${Tt}`]:{color:bt,background:Nt,borderColor:Bt,"&-inverse":{color:Re.colorTextLightSolid,background:Zt,borderColor:Zt},[`&${Re.componentCls}-borderless`]:{borderColor:"transparent"}}}});var we=(0,Et.b)(["Tag","preset"],Re=>{const Tt=dt(Re);return me(Tt)},Ae);function Me(Re){return typeof Re!="string"?Re:Re.charAt(0).toUpperCase()+Re.slice(1)}const be=(Re,Tt,et)=>{const bt=Me(et);return{[`${Re.componentCls}-${Tt}`]:{color:Re[`color${et}`],background:Re[`color${bt}Bg`],borderColor:Re[`color${bt}Border`],[`&${Re.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Ie=(0,Et.b)(["Tag","status"],Re=>{const Tt=dt(Re);return[be(Tt,"success","Success"),be(Tt,"processing","Info"),be(Tt,"error","Error"),be(Tt,"warning","Warning")]},Ae),je=function(Re,Tt){var et={};for(var bt in Re)Object.prototype.hasOwnProperty.call(Re,bt)&&Tt.indexOf(bt)<0&&(et[bt]=Re[bt]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Bt=0,bt=Object.getOwnPropertySymbols(Re);Bt<bt.length;Bt++)Tt.indexOf(bt[Bt])<0&&Object.prototype.propertyIsEnumerable.call(Re,bt[Bt])&&(et[bt[Bt]]=Re[bt[Bt]]);return et};const qe=(Re,Tt)=>{const{prefixCls:et,className:bt,rootClassName:Bt,style:Nt,children:Zt,icon:Ut,color:lt,onClose:Ge,closeIcon:kt,closable:un,bordered:ln=!0}=Re,Ft=je(Re,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:$t,direction:Qt,tag:Bn}=ce.useContext(mt.E_),[on,Cn]=ce.useState(!0);ce.useEffect(()=>{"visible"in Ft&&Cn(Ft.visible)},[Ft.visible]);const gt=(0,_e.o2)(lt),En=(0,_e.yT)(lt),Vn=gt||En,He=Object.assign(Object.assign({backgroundColor:lt&&!Vn?lt:void 0},Bn==null?void 0:Bn.style),Nt),Ce=$t("tag",et),[Pe,Ne]=te(Ce),ke=Ct()(Ce,Bn==null?void 0:Bn.className,{[`${Ce}-${lt}`]:Vn,[`${Ce}-has-color`]:lt&&!Vn,[`${Ce}-hidden`]:!on,[`${Ce}-rtl`]:Qt==="rtl",[`${Ce}-borderless`]:!ln},bt,Bt,Ne),Se=wt=>{wt.stopPropagation(),Ge==null||Ge(wt),!wt.defaultPrevented&&Cn(!1)},[,nt]=(0,Ke.Z)(un,kt,wt=>wt===null?ce.createElement(De.Z,{className:`${Ce}-close-icon`,onClick:Se}):ce.createElement("span",{className:`${Ce}-close-icon`,onClick:Se},wt),null,!1),Pt=typeof Ft.onClick=="function"||Zt&&Zt.type==="a",Xe=Ut||null,Je=Xe?ce.createElement(ce.Fragment,null,Xe,Zt&&ce.createElement("span",null,Zt)):Zt,yt=ce.createElement("span",Object.assign({},Ft,{ref:Tt,className:ke,style:He}),Je,nt,gt&&ce.createElement(we,{key:"preset",prefixCls:Ce}),En&&ce.createElement(Ie,{key:"status",prefixCls:Ce}));return Pe(Pt?ce.createElement(Be.Z,{component:"Tag"},yt):yt)},$e=ce.forwardRef(qe);$e.CheckableTag=se;var ft=$e},17574:function(Sn,an,ve){"use strict";ve.d(an,{default:function(){return lt}});var ce=ve(23130),De=ve(26407),ze=ve(52671),Ct=ve(8657),_e=ve(92413),Ke=ve(59301),Be={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"},mt=Be,ct=ve(7657),Ze=function(kt,un){return Ke.createElement(ct.Z,(0,_e.Z)({},kt,{ref:un,icon:mt}))},Et=Ke.forwardRef(Ze),ht=Et,dt=ve(92310),Ae=ve.n(dt),te=ve(35654),ee=ve(71430),he=ve(36355),se=ve(56082),de=ve(62892),me=ve(20648);const we=4;function Me(Ge){const{dropPosition:kt,dropLevelOffset:un,prefixCls:ln,indent:Ft,direction:$t="ltr"}=Ge,Qt=$t==="ltr"?"left":"right",Bn=$t==="ltr"?"right":"left",on={[Qt]:-un*Ft+we,[Bn]:0};switch(kt){case-1:on.top=-3;break;case 1:on.bottom=-3;break;default:on.bottom=-3,on[Qt]=Ft+we;break}return Ke.createElement("div",{style:on,className:`${ln}-drop-indicator`})}var be=ve(71997),je=Ke.forwardRef((Ge,kt)=>{const{getPrefixCls:un,direction:ln,virtual:Ft,tree:$t}=Ke.useContext(he.E_),{prefixCls:Qt,className:Bn,showIcon:on=!1,showLine:Cn,switcherIcon:gt,blockNode:En=!1,children:Vn,checkable:He=!1,selectable:Ce=!0,draggable:Pe,motion:Ne,style:ke}=Ge,Se=un("tree",Qt),nt=un(),Pt=Ne!=null?Ne:Object.assign(Object.assign({},(0,de.Z)(nt)),{motionAppear:!1}),Xe=Object.assign(Object.assign({},Ge),{checkable:He,selectable:Ce,showIcon:on,motion:Pt,blockNode:En,showLine:!!Cn,dropIndicatorRender:Me}),[Je,yt]=(0,me.ZP)(Se),wt=Ke.useMemo(()=>{if(!Pe)return!1;let It={};switch(typeof Pe){case"function":It.nodeDraggable=Pe;break;case"object":It=Object.assign({},Pe);break;default:break}return It.icon!==!1&&(It.icon=It.icon||Ke.createElement(se.Z,null)),It},[Pe]),ot=It=>Ke.createElement(be.Z,{prefixCls:Se,switcherIcon:gt,treeNodeProps:It,showLine:Cn});return Je(Ke.createElement(ce.Z,Object.assign({itemHeight:20,ref:kt,virtual:Ft},Xe,{style:Object.assign(Object.assign({},$t==null?void 0:$t.style),ke),prefixCls:Se,className:Ae()({[`${Se}-icon-hide`]:!on,[`${Se}-block-node`]:En,[`${Se}-unselectable`]:!Ce,[`${Se}-rtl`]:ln==="rtl"},$t==null?void 0:$t.className,Bn,yt),direction:ln,checkable:He&&Ke.createElement("span",{className:`${Se}-checkbox-inner`}),selectable:Ce,switcherIcon:ot,draggable:wt}),Vn))}),qe;(function(Ge){Ge[Ge.None=0]="None",Ge[Ge.Start=1]="Start",Ge[Ge.End=2]="End"})(qe||(qe={}));function $e(Ge,kt){function un(ln){const{key:Ft,children:$t}=ln;kt(Ft,ln)!==!1&&$e($t||[],kt)}Ge.forEach(un)}function ft(Ge){let{treeData:kt,expandedKeys:un,startKey:ln,endKey:Ft}=Ge;const $t=[];let Qt=qe.None;if(ln&&ln===Ft)return[ln];if(!ln||!Ft)return[];function Bn(on){return on===ln||on===Ft}return $e(kt,on=>{if(Qt===qe.End)return!1;if(Bn(on)){if($t.push(on),Qt===qe.None)Qt=qe.Start;else if(Qt===qe.Start)return Qt=qe.End,!1}else Qt===qe.Start&&$t.push(on);return un.includes(on)}),$t}function Re(Ge,kt){const un=(0,De.Z)(kt),ln=[];return $e(Ge,(Ft,$t)=>{const Qt=un.indexOf(Ft);return Qt!==-1&&(ln.push($t),un.splice(Qt,1)),!!un.length}),ln}var Tt=function(Ge,kt){var un={};for(var ln in Ge)Object.prototype.hasOwnProperty.call(Ge,ln)&&kt.indexOf(ln)<0&&(un[ln]=Ge[ln]);if(Ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,ln=Object.getOwnPropertySymbols(Ge);Ft<ln.length;Ft++)kt.indexOf(ln[Ft])<0&&Object.prototype.propertyIsEnumerable.call(Ge,ln[Ft])&&(un[ln[Ft]]=Ge[ln[Ft]]);return un};function et(Ge){const{isLeaf:kt,expanded:un}=Ge;return kt?Ke.createElement(ze.Z,null):un?Ke.createElement(Ct.Z,null):Ke.createElement(ht,null)}function bt(Ge){let{treeData:kt,children:un}=Ge;return kt||(0,ee.zn)(un)}const Bt=(Ge,kt)=>{var{defaultExpandAll:un,defaultExpandParent:ln,defaultExpandedKeys:Ft}=Ge,$t=Tt(Ge,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const Qt=Ke.useRef(),Bn=Ke.useRef(),on=()=>{const{keyEntities:wt}=(0,ee.I8)(bt($t));let ot;return un?ot=Object.keys(wt):ln?ot=(0,te.r7)($t.expandedKeys||Ft||[],wt):ot=$t.expandedKeys||Ft,ot},[Cn,gt]=Ke.useState($t.selectedKeys||$t.defaultSelectedKeys||[]),[En,Vn]=Ke.useState(()=>on());Ke.useEffect(()=>{"selectedKeys"in $t&&gt($t.selectedKeys)},[$t.selectedKeys]),Ke.useEffect(()=>{"expandedKeys"in $t&&Vn($t.expandedKeys)},[$t.expandedKeys]);const He=(wt,ot)=>{var It;return"expandedKeys"in $t||Vn(wt),(It=$t.onExpand)===null||It===void 0?void 0:It.call($t,wt,ot)},Ce=(wt,ot)=>{var It;const{multiple:sn}=$t,{node:Xt,nativeEvent:Ht}=ot,{key:xn=""}=Xt,Dn=bt($t),cn=Object.assign(Object.assign({},ot),{selected:!0}),Un=(Ht==null?void 0:Ht.ctrlKey)||(Ht==null?void 0:Ht.metaKey),ti=Ht==null?void 0:Ht.shiftKey;let Wn;sn&&Un?(Wn=wt,Qt.current=xn,Bn.current=Wn,cn.selectedNodes=Re(Dn,Wn)):sn&&ti?(Wn=Array.from(new Set([].concat((0,De.Z)(Bn.current||[]),(0,De.Z)(ft({treeData:Dn,expandedKeys:En,startKey:xn,endKey:Qt.current}))))),cn.selectedNodes=Re(Dn,Wn)):(Wn=[xn],Qt.current=xn,Bn.current=Wn,cn.selectedNodes=Re(Dn,Wn)),(It=$t.onSelect)===null||It===void 0||It.call($t,Wn,cn),"selectedKeys"in $t||gt(Wn)},{getPrefixCls:Pe,direction:Ne}=Ke.useContext(he.E_),{prefixCls:ke,className:Se,showIcon:nt=!0,expandAction:Pt="click"}=$t,Xe=Tt($t,["prefixCls","className","showIcon","expandAction"]),Je=Pe("tree",ke),yt=Ae()(`${Je}-directory`,{[`${Je}-directory-rtl`]:Ne==="rtl"},Se);return Ke.createElement(je,Object.assign({icon:et,ref:kt,blockNode:!0},Xe,{showIcon:nt,expandAction:Pt,prefixCls:Je,className:yt,expandedKeys:En,selectedKeys:Cn,onSelect:Ce,onExpand:He}))};var Zt=Ke.forwardRef(Bt);const Ut=je;Ut.DirectoryTree=Zt,Ut.TreeNode=ce.O;var lt=Ut},20648:function(Sn,an,ve){"use strict";ve.d(an,{TM:function(){return dt},Yk:function(){return ht}});var ce=ve(93083),De=ve(98447),ze=ve(17313),Ct=ve(8378),_e=ve(37613),Ke=ve(83116);const Be=new ce.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),mt=(Ae,te)=>({[`.${Ae}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${te.motionDurationSlow}`}}}),ct=(Ae,te)=>({[`.${Ae}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:te.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${te.lineWidthBold}px solid ${te.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Ze=(Ae,te)=>{const{treeCls:ee,treeNodeCls:he,treeNodePadding:se,titleHeight:de,nodeSelectedBg:me,nodeHoverBg:we}=te,Me=te.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,ze.Wf)(te)),{background:te.colorBgContainer,borderRadius:te.borderRadius,transition:`background-color ${te.motionDurationSlow}`,[`&${ee}-rtl`]:{[`${ee}-switcher`]:{"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${ee}-active-focused)`]:Object.assign({},(0,ze.oN)(te)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${he}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:se,insetInlineStart:0,border:`1px solid ${te.colorPrimary}`,opacity:0,animationName:Be,animationDuration:te.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${he}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${se}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:te.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,ze.oN)(te)),[`&:not(${he}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:de,lineHeight:`${de}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${te.motionDurationSlow}`,[`${he}:hover &`]:{opacity:.45}},[`&${he}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:de}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},mt(Ae,te)),{position:"relative",flex:"none",alignSelf:"stretch",width:de,margin:0,lineHeight:`${de}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:te.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:de/2,bottom:-se,marginInlineStart:-1,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:de/2*.8,height:de/2,borderBottom:`1px solid ${te.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:Me},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:de,margin:0,padding:`0 ${te.paddingXS/2}px`,color:"inherit",lineHeight:`${de}px`,background:"transparent",borderRadius:te.borderRadius,cursor:"pointer",transition:`all ${te.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:we},[`&${ee}-node-selected`]:{backgroundColor:me},[`${ee}-iconEle`]:{display:"inline-block",width:de,height:de,lineHeight:`${de}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${de}px`,userSelect:"none"},ct(Ae,te)),[`${he}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${te.colorPrimary}`}},"&-show-line":{[`${ee}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:de/2,bottom:-se,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${he}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${de/2}px !important`}}}}})}},Et=Ae=>{const{treeCls:te,treeNodeCls:ee,treeNodePadding:he,directoryNodeSelectedBg:se,directoryNodeSelectedColor:de}=Ae;return{[`${te}${te}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:he,insetInlineStart:0,transition:`background-color ${Ae.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Ae.controlItemBgHover}},"> *":{zIndex:1},[`${te}-switcher`]:{transition:`color ${Ae.motionDurationMid}`},[`${te}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${te}-node-selected`]:{color:de,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:se},[`${te}-switcher`]:{color:de},[`${te}-node-content-wrapper`]:{color:de,background:"transparent"}}}}}},ht=(Ae,te)=>{const ee=`.${Ae}`,he=`${ee}-treenode`,se=te.paddingXS/2,de=(0,_e.TS)(te,{treeCls:ee,treeNodeCls:he,treeNodePadding:se});return[Ze(Ae,de),Et(de)]},dt=Ae=>{const{controlHeightSM:te}=Ae;return{titleHeight:te,nodeHoverBg:Ae.controlItemBgHover,nodeSelectedBg:Ae.controlItemBgActive}};an.ZP=(0,Ke.Z)("Tree",(Ae,te)=>{let{prefixCls:ee}=te;return[{[Ae.componentCls]:(0,De.C2)(`${ee}-checkbox`,Ae)},ht(ee,Ae),(0,Ct.Z)(Ae)]},Ae=>{const{colorTextLightSolid:te,colorPrimary:ee}=Ae;return Object.assign(Object.assign({},dt(Ae)),{directoryNodeSelectedColor:te,directoryNodeSelectedBg:ee})})},71997:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return he}});var ce=ve(92413),De=ve(59301),ze={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"},Ct=ze,_e=ve(7657),Ke=function(de,me){return De.createElement(_e.Z,(0,ce.Z)({},de,{ref:me,icon:Ct}))},Be=De.forwardRef(Ke),mt=Be,ct=ve(52671),Ze=ve(58617),Et=ve(15075),ht=ve(43531),dt=ve(92310),Ae=ve.n(dt),te=ve(92343),he=se=>{const{prefixCls:de,switcherIcon:me,treeNodeProps:we,showLine:Me}=se,{isLeaf:be,expanded:Ie,loading:je}=we;if(je)return De.createElement(Ze.Z,{className:`${de}-switcher-loading-icon`});let qe;if(Me&&typeof Me=="object"&&(qe=Me.showLeafIcon),be){if(!Me)return null;if(typeof qe!="boolean"&&qe){const Re=typeof qe=="function"?qe(we):qe,Tt=`${de}-switcher-line-custom-icon`;return(0,te.l$)(Re)?(0,te.Tm)(Re,{className:Ae()(Re.props.className||"",Tt)}):Re}return qe?De.createElement(ct.Z,{className:`${de}-switcher-line-icon`}):De.createElement("span",{className:`${de}-switcher-leaf-line`})}const $e=`${de}-switcher-icon`,ft=typeof me=="function"?me(we):me;return(0,te.l$)(ft)?(0,te.Tm)(ft,{className:Ae()(ft.props.className||"",$e)}):ft!==void 0?ft:Me?Ie?De.createElement(Et.Z,{className:`${de}-switcher-line-icon`}):De.createElement(ht.Z,{className:`${de}-switcher-line-icon`}):De.createElement(mt,{className:$e})}},99498:function(Sn,an,ve){(function(ce){ce(ve(89780))})(function(ce){ce.defineOption("placeholder","",function(mt,ct,Ze){var Et=Ze&&Ze!=ce.Init;if(ct&&!Et)mt.on("blur",_e),mt.on("change",Ke),mt.on("swapDoc",Ke),ce.on(mt.getInputField(),"compositionupdate",mt.state.placeholderCompose=function(){Ct(mt)}),Ke(mt);else if(!ct&&Et){mt.off("blur",_e),mt.off("change",Ke),mt.off("swapDoc",Ke),ce.off(mt.getInputField(),"compositionupdate",mt.state.placeholderCompose),De(mt);var ht=mt.getWrapperElement();ht.className=ht.className.replace(" CodeMirror-empty","")}ct&&!mt.hasFocus()&&_e(mt)});function De(mt){mt.state.placeholder&&(mt.state.placeholder.parentNode.removeChild(mt.state.placeholder),mt.state.placeholder=null)}function ze(mt){De(mt);var ct=mt.state.placeholder=document.createElement("pre");ct.style.cssText="height: 0; overflow: visible",ct.style.direction=mt.getOption("direction"),ct.className="CodeMirror-placeholder CodeMirror-line-like";var Ze=mt.getOption("placeholder");typeof Ze=="string"&&(Ze=document.createTextNode(Ze)),ct.appendChild(Ze),mt.display.lineSpace.insertBefore(ct,mt.display.lineSpace.firstChild)}function Ct(mt){setTimeout(function(){var ct=!1,Ze=mt.getInputField();Ze.nodeName=="TEXTAREA"?ct=!Ze.value:mt.lineCount()==1&&(ct=!/[^\u200b]/.test(Ze.querySelector(".CodeMirror-line").textContent)),ct?ze(mt):De(mt)},20)}function _e(mt){Be(mt)&&ze(mt)}function Ke(mt){var ct=mt.getWrapperElement(),Ze=Be(mt);ct.className=ct.className.replace(" CodeMirror-empty","")+(Ze?" CodeMirror-empty":""),Ze?ze(mt):De(mt)}function Be(mt){return mt.lineCount()===1&&mt.getLine(0)===""}})},25717:function(Sn,an,ve){(function(ce){ce(ve(89780))})(function(ce){var De={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ze=ce.Pos;ce.defineOption("autoCloseBrackets",!1,function(te,ee,he){he&&he!=ce.Init&&(te.removeKeyMap(_e),te.state.closeBrackets=null),ee&&(Ke(Ct(ee,"pairs")),te.state.closeBrackets=ee,te.addKeyMap(_e))});function Ct(te,ee){return ee=="pairs"&&typeof te=="string"?te:typeof te=="object"&&te[ee]!=null?te[ee]:De[ee]}var _e={Backspace:ct,Enter:Ze};function Ke(te){for(var ee=0;ee<te.length;ee++){var he=te.charAt(ee),se="'"+he+"'";_e[se]||(_e[se]=Be(he))}}Ke(De.pairs+"`");function Be(te){return function(ee){return ht(ee,te)}}function mt(te){var ee=te.state.closeBrackets;if(!ee||ee.override)return ee;var he=te.getModeAt(te.getCursor());return he.closeBrackets||ee}function ct(te){var ee=mt(te);if(!ee||te.getOption("disableInput"))return ce.Pass;for(var he=Ct(ee,"pairs"),se=te.listSelections(),de=0;de<se.length;de++){if(!se[de].empty())return ce.Pass;var me=dt(te,se[de].head);if(!me||he.indexOf(me)%2!=0)return ce.Pass}for(var de=se.length-1;de>=0;de--){var we=se[de].head;te.replaceRange("",ze(we.line,we.ch-1),ze(we.line,we.ch+1),"+delete")}}function Ze(te){var ee=mt(te),he=ee&&Ct(ee,"explode");if(!he||te.getOption("disableInput"))return ce.Pass;for(var se=te.listSelections(),de=0;de<se.length;de++){if(!se[de].empty())return ce.Pass;var me=dt(te,se[de].head);if(!me||he.indexOf(me)%2!=0)return ce.Pass}te.operation(function(){var we=te.lineSeparator()||`
`;te.replaceSelection(we+we,null),te.execCommand("goCharLeft"),se=te.listSelections();for(var Me=0;Me<se.length;Me++){var be=se[Me].head.line;te.indentLine(be,null,!0),te.indentLine(be+1,null,!0)}})}function Et(te){var ee=ce.cmpPos(te.anchor,te.head)>0;return{anchor:new ze(te.anchor.line,te.anchor.ch+(ee?-1:1)),head:new ze(te.head.line,te.head.ch+(ee?1:-1))}}function ht(te,ee){var he=mt(te);if(!he||te.getOption("disableInput"))return ce.Pass;var se=Ct(he,"pairs"),de=se.indexOf(ee);if(de==-1)return ce.Pass;for(var me=Ct(he,"closeBefore"),we=Ct(he,"triples"),Me=se.charAt(de+1)==ee,be=te.listSelections(),Ie=de%2==0,je,qe=0;qe<be.length;qe++){var $e=be[qe],ft=$e.head,Re,Tt=te.getRange(ft,ze(ft.line,ft.ch+1));if(Ie&&!$e.empty())Re="surround";else if((Me||!Ie)&&Tt==ee)Me&&Ae(te,ft)?Re="both":we.indexOf(ee)>=0&&te.getRange(ft,ze(ft.line,ft.ch+3))==ee+ee+ee?Re="skipThree":Re="skip";else if(Me&&ft.ch>1&&we.indexOf(ee)>=0&&te.getRange(ze(ft.line,ft.ch-2),ft)==ee+ee){if(ft.ch>2&&/\bstring/.test(te.getTokenTypeAt(ze(ft.line,ft.ch-2))))return ce.Pass;Re="addFour"}else if(Me){var et=ft.ch==0?" ":te.getRange(ze(ft.line,ft.ch-1),ft);if(!ce.isWordChar(Tt)&&et!=ee&&!ce.isWordChar(et))Re="both";else return ce.Pass}else if(Ie&&(Tt.length===0||/\s/.test(Tt)||me.indexOf(Tt)>-1))Re="both";else return ce.Pass;if(!je)je=Re;else if(je!=Re)return ce.Pass}var bt=de%2?se.charAt(de-1):ee,Bt=de%2?ee:se.charAt(de+1);te.operation(function(){if(je=="skip")te.execCommand("goCharRight");else if(je=="skipThree")for(var Nt=0;Nt<3;Nt++)te.execCommand("goCharRight");else if(je=="surround"){for(var Zt=te.getSelections(),Nt=0;Nt<Zt.length;Nt++)Zt[Nt]=bt+Zt[Nt]+Bt;te.replaceSelections(Zt,"around"),Zt=te.listSelections().slice();for(var Nt=0;Nt<Zt.length;Nt++)Zt[Nt]=Et(Zt[Nt]);te.setSelections(Zt)}else je=="both"?(te.replaceSelection(bt+Bt,null),te.triggerElectric(bt+Bt),te.execCommand("goCharLeft")):je=="addFour"&&(te.replaceSelection(bt+bt+bt+bt,"before"),te.execCommand("goCharRight"))})}function dt(te,ee){var he=te.getRange(ze(ee.line,ee.ch-1),ze(ee.line,ee.ch+1));return he.length==2?he:null}function Ae(te,ee){var he=te.getTokenAt(ze(ee.line,ee.ch+1));return/\bstring/.test(he.type)&&he.start==ee.ch&&(ee.ch==0||!/\bstring/.test(te.getTokenTypeAt(ee)))}})},6313:function(Sn,an,ve){(function(ce){ce(ve(89780),ve(32855))})(function(ce){ce.defineOption("autoCloseTags",!1,function(ct,Ze,Et){if(Et!=ce.Init&&Et&&ct.removeKeyMap("autoCloseTags"),!!Ze){var ht={name:"autoCloseTags"};(typeof Ze!="object"||Ze.whenClosing!==!1)&&(ht["'/'"]=function(dt){return Ke(dt)}),(typeof Ze!="object"||Ze.whenOpening!==!1)&&(ht["'>'"]=function(dt){return Ct(dt)}),ct.addKeyMap(ht)}});var De=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ze=["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 Ct(ct){if(ct.getOption("disableInput"))return ce.Pass;for(var Ze=ct.listSelections(),Et=[],ht=ct.getOption("autoCloseTags"),dt=0;dt<Ze.length;dt++){if(!Ze[dt].empty())return ce.Pass;var Ae=Ze[dt].head,te=ct.getTokenAt(Ae),ee=ce.innerMode(ct.getMode(),te.state),he=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(he),de=se&&se.name;if(!de)return ce.Pass;var me=ee.mode.configuration=="html",we=typeof ht=="object"&&ht.dontCloseTags||me&&De,Me=typeof ht=="object"&&ht.indentTags||me&&ze;te.end>Ae.ch&&(de=de.slice(0,de.length-te.end+Ae.ch));var be=de.toLowerCase();if(!de||te.type=="string"&&(te.end!=Ae.ch||!/[\"\']/.test(te.string.charAt(te.string.length-1))||te.string.length==1)||te.type=="tag"&&se.close||te.string.indexOf("/")==Ae.ch-te.start-1||we&&Be(we,be)>-1||mt(ct,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(he)||[],de,Ae,!0))return ce.Pass;var Ie=typeof ht=="object"&&ht.emptyTags;if(Ie&&Be(Ie,de)>-1){Et[dt]={text:"/>",newPos:ce.Pos(Ae.line,Ae.ch+2)};continue}var je=Me&&Be(Me,be)>-1;Et[dt]={indent:je,text:">"+(je?`
`:"")+"</"+de+">",newPos:je?ce.Pos(Ae.line+1,0):ce.Pos(Ae.line,Ae.ch+1)}}for(var qe=typeof ht=="object"&&ht.dontIndentOnAutoClose,dt=Ze.length-1;dt>=0;dt--){var $e=Et[dt];ct.replaceRange($e.text,Ze[dt].head,Ze[dt].anchor,"+insert");var ft=ct.listSelections().slice(0);ft[dt]={head:$e.newPos,anchor:$e.newPos},ct.setSelections(ft),!qe&&$e.indent&&(ct.indentLine($e.newPos.line,null,!0),ct.indentLine($e.newPos.line+1,null,!0))}}function _e(ct,Ze){for(var Et=ct.listSelections(),ht=[],dt=Ze?"/":"</",Ae=ct.getOption("autoCloseTags"),te=typeof Ae=="object"&&Ae.dontIndentOnSlash,ee=0;ee<Et.length;ee++){if(!Et[ee].empty())return ce.Pass;var he=Et[ee].head,se=ct.getTokenAt(he),de=ce.innerMode(ct.getMode(),se.state),me=de.state;if(Ze&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=he.ch-1))return ce.Pass;var we,Me=de.mode.name!="xml"&&ct.getMode().name=="htmlmixed";if(Me&&de.mode.name=="javascript")we=dt+"script";else if(Me&&de.mode.name=="css")we=dt+"style";else{var be=de.mode.xmlCurrentContext&&de.mode.xmlCurrentContext(me);if(!be||be.length&&mt(ct,be,be[be.length-1],he))return ce.Pass;we=dt+be[be.length-1]}ct.getLine(he.line).charAt(se.end)!=">"&&(we+=">"),ht[ee]=we}if(ct.replaceSelections(ht),Et=ct.listSelections(),!te)for(var ee=0;ee<Et.length;ee++)(ee==Et.length-1||Et[ee].head.line<Et[ee+1].head.line)&&ct.indentLine(Et[ee].head.line)}function Ke(ct){return ct.getOption("disableInput")?ce.Pass:_e(ct,!0)}ce.commands.closeTag=function(ct){return _e(ct)};function Be(ct,Ze){if(ct.indexOf)return ct.indexOf(Ze);for(var Et=0,ht=ct.length;Et<ht;++Et)if(ct[Et]==Ze)return Et;return-1}function mt(ct,Ze,Et,ht,dt){if(!ce.scanForClosingTag)return!1;var Ae=Math.min(ct.lastLine()+1,ht.line+500),te=ce.scanForClosingTag(ct,ht,null,Ae);if(!te||te.tag!=Et)return!1;for(var ee=dt?1:0,he=Ze.length-1;he>=0&&Ze[he]==Et;he--)++ee;ht=te.to;for(var he=1;he<ee;he++){var se=ce.scanForClosingTag(ct,ht,null,Ae);if(!se||se.tag!=Et)return!1;ht=se.to}return!0}})},32855:function(Sn,an,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";var De=ce.Pos;function ze(he,se){return he.line-se.line||he.ch-se.ch}var Ct="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",_e=Ct+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ke=new RegExp("<(/?)(["+Ct+"]["+_e+"]*)","g");function Be(he,se,de,me){this.line=se,this.ch=de,this.cm=he,this.text=he.getLine(se),this.min=me?Math.max(me.from,he.firstLine()):he.firstLine(),this.max=me?Math.min(me.to-1,he.lastLine()):he.lastLine()}function mt(he,se){var de=he.cm.getTokenTypeAt(De(he.line,se));return de&&/\btag\b/.test(de)}function ct(he){if(!(he.line>=he.max))return he.ch=0,he.text=he.cm.getLine(++he.line),!0}function Ze(he){if(!(he.line<=he.min))return he.text=he.cm.getLine(--he.line),he.ch=he.text.length,!0}function Et(he){for(;;){var se=he.text.indexOf(">",he.ch);if(se==-1){if(ct(he))continue;return}if(!mt(he,se+1)){he.ch=se+1;continue}var de=he.text.lastIndexOf("/",se),me=de>-1&&!/\S/.test(he.text.slice(de+1,se));return he.ch=se+1,me?"selfClose":"regular"}}function ht(he){for(;;){var se=he.ch?he.text.lastIndexOf("<",he.ch-1):-1;if(se==-1){if(Ze(he))continue;return}if(!mt(he,se+1)){he.ch=se;continue}Ke.lastIndex=se,he.ch=se;var de=Ke.exec(he.text);if(de&&de.index==se)return de}}function dt(he){for(;;){Ke.lastIndex=he.ch;var se=Ke.exec(he.text);if(!se){if(ct(he))continue;return}if(!mt(he,se.index+1)){he.ch=se.index+1;continue}return he.ch=se.index+se[0].length,se}}function Ae(he){for(;;){var se=he.ch?he.text.lastIndexOf(">",he.ch-1):-1;if(se==-1){if(Ze(he))continue;return}if(!mt(he,se+1)){he.ch=se;continue}var de=he.text.lastIndexOf("/",se),me=de>-1&&!/\S/.test(he.text.slice(de+1,se));return he.ch=se+1,me?"selfClose":"regular"}}function te(he,se){for(var de=[];;){var me=dt(he),we,Me=he.line,be=he.ch-(me?me[0].length:0);if(!me||!(we=Et(he)))return;if(we!="selfClose")if(me[1]){for(var Ie=de.length-1;Ie>=0;--Ie)if(de[Ie]==me[2]){de.length=Ie;break}if(Ie<0&&(!se||se==me[2]))return{tag:me[2],from:De(Me,be),to:De(he.line,he.ch)}}else de.push(me[2])}}function ee(he,se){for(var de=[];;){var me=Ae(he);if(!me)return;if(me=="selfClose"){ht(he);continue}var we=he.line,Me=he.ch,be=ht(he);if(!be)return;if(be[1])de.push(be[2]);else{for(var Ie=de.length-1;Ie>=0;--Ie)if(de[Ie]==be[2]){de.length=Ie;break}if(Ie<0&&(!se||se==be[2]))return{tag:be[2],from:De(he.line,he.ch),to:De(we,Me)}}}}ce.registerHelper("fold","xml",function(he,se){for(var de=new Be(he,se.line,0);;){var me=dt(de);if(!me||de.line!=se.line)return;var we=Et(de);if(!we)return;if(!me[1]&&we!="selfClose"){var Me=De(de.line,de.ch),be=te(de,me[2]);return be&&ze(be.from,Me)>0?{from:Me,to:be.from}:null}}}),ce.findMatchingTag=function(he,se,de){var me=new Be(he,se.line,se.ch,de);if(!(me.text.indexOf(">")==-1&&me.text.indexOf("<")==-1)){var we=Et(me),Me=we&&De(me.line,me.ch),be=we&&ht(me);if(!(!we||!be||ze(me,se)>0)){var Ie={from:De(me.line,me.ch),to:Me,tag:be[2]};return we=="selfClose"?{open:Ie,close:null,at:"open"}:be[1]?{open:ee(me,be[2]),close:Ie,at:"close"}:(me=new Be(he,Me.line,Me.ch,de),{open:Ie,close:te(me,be[2]),at:"open"})}}},ce.findEnclosingTag=function(he,se,de,me){for(var we=new Be(he,se.line,se.ch,de);;){var Me=ee(we,me);if(!Me)break;var be=new Be(he,se.line,se.ch,de),Ie=te(be,Me.tag);if(Ie)return{open:Me,close:Ie}}},ce.scanForClosingTag=function(he,se,de,me){var we=new Be(he,se.line,se.ch,me?{from:0,to:me}:null);return te(we,de)}})},89780:function(Sn){(function(an,ve){Sn.exports=ve()})(this,function(){"use strict";var an=navigator.userAgent,ve=navigator.platform,ce=/gecko\/\d/i.test(an),De=/MSIE \d/.test(an),ze=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(an),Ct=/Edge\/(\d+)/.exec(an),_e=De||ze||Ct,Ke=_e&&(De?document.documentMode||6:+(Ct||ze)[1]),Be=!Ct&&/WebKit\//.test(an),mt=Be&&/Qt\/\d+\.\d+/.test(an),ct=!Ct&&/Chrome\//.test(an),Ze=/Opera\//.test(an),Et=/Apple Computer/.test(navigator.vendor),ht=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(an),dt=/PhantomJS/.test(an),Ae=!Ct&&/AppleWebKit/.test(an)&&/Mobile\/\w+/.test(an),te=/Android/.test(an),ee=Ae||te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(an),he=Ae||/Mac/.test(ve),se=/\bCrOS\b/.test(an),de=/win/i.test(ve),me=Ze&&an.match(/Version\/(\d*\.\d*)/);me&&(me=Number(me[1])),me&&me>=15&&(Ze=!1,Be=!0);var we=he&&(mt||Ze&&(me==null||me<12.11)),Me=ce||_e&&Ke>=9;function be(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var Ie=function(ie,ae){var ge=ie.className,fe=be(ae).exec(ge);if(fe){var ye=ge.slice(fe.index+fe[0].length);ie.className=ge.slice(0,fe.index)+(ye?fe[1]+ye:"")}};function je(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function qe(ie,ae){return je(ie).appendChild(ae)}function $e(ie,ae,ge,fe){var ye=document.createElement(ie);if(ge&&(ye.className=ge),fe&&(ye.style.cssText=fe),typeof ae=="string")ye.appendChild(document.createTextNode(ae));else if(ae)for(var Te=0;Te<ae.length;++Te)ye.appendChild(ae[Te]);return ye}function ft(ie,ae,ge,fe){var ye=$e(ie,ae,ge,fe);return ye.setAttribute("role","presentation"),ye}var Re;document.createRange?Re=function(ie,ae,ge,fe){var ye=document.createRange();return ye.setEnd(fe||ie,ge),ye.setStart(ie,ae),ye}:Re=function(ie,ae,ge){var fe=document.body.createTextRange();try{fe.moveToElementText(ie.parentNode)}catch(ye){return fe}return fe.collapse(!0),fe.moveEnd("character",ge),fe.moveStart("character",ae),fe};function Tt(ie,ae){if(ae.nodeType==3&&(ae=ae.parentNode),ie.contains)return ie.contains(ae);do if(ae.nodeType==11&&(ae=ae.host),ae==ie)return!0;while(ae=ae.parentNode)}function et(){var ie;try{ie=document.activeElement}catch(ae){ie=document.body||null}for(;ie&&ie.shadowRoot&&ie.shadowRoot.activeElement;)ie=ie.shadowRoot.activeElement;return ie}function bt(ie,ae){var ge=ie.className;be(ae).test(ge)||(ie.className+=(ge?" ":"")+ae)}function Bt(ie,ae){for(var ge=ie.split(" "),fe=0;fe<ge.length;fe++)ge[fe]&&!be(ge[fe]).test(ae)&&(ae+=" "+ge[fe]);return ae}var Nt=function(ie){ie.select()};Ae?Nt=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:_e&&(Nt=function(ie){try{ie.select()}catch(ae){}});function Zt(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function Ut(ie,ae,ge){ae||(ae={});for(var fe in ie)ie.hasOwnProperty(fe)&&(ge!==!1||!ae.hasOwnProperty(fe))&&(ae[fe]=ie[fe]);return ae}function lt(ie,ae,ge,fe,ye){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Te=fe||0,We=ye||0;;){var ut=ie.indexOf(" ",Te);if(ut<0||ut>=ae)return We+(ae-Te);We+=ut-Te,We+=ge-We%ge,Te=ut+1}}var Ge=function(){this.id=null,this.f=null,this.time=0,this.handler=Zt(this.onTimeout,this)};Ge.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ge.prototype.set=function(ie,ae){this.f=ae;var ge=+new Date+ie;(!this.id||ge<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=ge)};function kt(ie,ae){for(var ge=0;ge<ie.length;++ge)if(ie[ge]==ae)return ge;return-1}var un=50,ln={toString:function(){return"CodeMirror.Pass"}},Ft={scroll:!1},$t={origin:"*mouse"},Qt={origin:"+move"};function Bn(ie,ae,ge){for(var fe=0,ye=0;;){var Te=ie.indexOf(" ",fe);Te==-1&&(Te=ie.length);var We=Te-fe;if(Te==ie.length||ye+We>=ae)return fe+Math.min(We,ae-ye);if(ye+=Te-fe,ye+=ge-ye%ge,fe=Te+1,ye>=ae)return fe}}var on=[""];function Cn(ie){for(;on.length<=ie;)on.push(gt(on)+" ");return on[ie]}function gt(ie){return ie[ie.length-1]}function En(ie,ae){for(var ge=[],fe=0;fe<ie.length;fe++)ge[fe]=ae(ie[fe],fe);return ge}function Vn(ie,ae,ge){for(var fe=0,ye=ge(ae);fe<ie.length&&ge(ie[fe])<=ye;)fe++;ie.splice(fe,0,ae)}function He(){}function Ce(ie,ae){var ge;return Object.create?ge=Object.create(ie):(He.prototype=ie,ge=new He),ae&&Ut(ae,ge),ge}var Pe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ne(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Pe.test(ie))}function ke(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Ne(ie)?!0:ae.test(ie):Ne(ie)}function Se(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var nt=/[\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 Pt(ie){return ie.charCodeAt(0)>=768&&nt.test(ie)}function Xe(ie,ae,ge){for(;(ge<0?ae>0:ae<ie.length)&&Pt(ie.charAt(ae));)ae+=ge;return ae}function Je(ie,ae,ge){for(var fe=ae>ge?-1:1;;){if(ae==ge)return ae;var ye=(ae+ge)/2,Te=fe<0?Math.ceil(ye):Math.floor(ye);if(Te==ae)return ie(Te)?ae:ge;ie(Te)?ge=Te:ae=Te+fe}}function yt(ie,ae,ge,fe){if(!ie)return fe(ae,ge,"ltr",0);for(var ye=!1,Te=0;Te<ie.length;++Te){var We=ie[Te];(We.from<ge&&We.to>ae||ae==ge&&We.to==ae)&&(fe(Math.max(We.from,ae),Math.min(We.to,ge),We.level==1?"rtl":"ltr",Te),ye=!0)}ye||fe(ae,ge,"ltr")}var wt=null;function ot(ie,ae,ge){var fe;wt=null;for(var ye=0;ye<ie.length;++ye){var Te=ie[ye];if(Te.from<ae&&Te.to>ae)return ye;Te.to==ae&&(Te.from!=Te.to&&ge=="before"?fe=ye:wt=ye),Te.from==ae&&(Te.from!=Te.to&&ge!="before"?fe=ye:wt=ye)}return fe!=null?fe:wt}var It=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ge(Lt){return Lt<=247?ie.charAt(Lt):1424<=Lt&&Lt<=1524?"R":1536<=Lt&&Lt<=1785?ae.charAt(Lt-1536):1774<=Lt&&Lt<=2220?"r":8192<=Lt&&Lt<=8203?"w":Lt==8204?"b":"L"}var fe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ye=/[stwN]/,Te=/[LRr]/,We=/[Lb1n]/,ut=/[1n]/;function at(Lt,dn,Rt){this.level=Lt,this.from=dn,this.to=Rt}return function(Lt,dn){var Rt=dn=="ltr"?"L":"R";if(Lt.length==0||dn=="ltr"&&!fe.test(Lt))return!1;for(var zn=Lt.length,On=[],wi=0;wi<zn;++wi)On.push(ge(Lt.charCodeAt(wi)));for(var Ti=0,Hi=Rt;Ti<zn;++Ti){var vr=On[Ti];vr=="m"?On[Ti]=Hi:Hi=vr}for(var Kr=0,kr=Rt;Kr<zn;++Kr){var ro=On[Kr];ro=="1"&&kr=="r"?On[Kr]="n":Te.test(ro)&&(kr=ro,ro=="r"&&(On[Kr]="R"))}for(var Ho=1,Fr=On[0];Ho<zn-1;++Ho){var oa=On[Ho];oa=="+"&&Fr=="1"&&On[Ho+1]=="1"?On[Ho]="1":oa==","&&Fr==On[Ho+1]&&(Fr=="1"||Fr=="n")&&(On[Ho]=Fr),Fr=oa}for(var Ss=0;Ss<zn;++Ss){var ol=On[Ss];if(ol==",")On[Ss]="N";else if(ol=="%"){var Ls=void 0;for(Ls=Ss+1;Ls<zn&&On[Ls]=="%";++Ls);for(var du=Ss&&On[Ss-1]=="!"||Ls<zn&&On[Ls]=="1"?"1":"N",Zl=Ss;Zl<Ls;++Zl)On[Zl]=du;Ss=Ls-1}}for(var qs=0,Lu=Rt;qs<zn;++qs){var Fl=On[qs];Lu=="L"&&Fl=="1"?On[qs]="L":Te.test(Fl)&&(Lu=Fl)}for(var el=0;el<zn;++el)if(ye.test(On[el])){var Da=void 0;for(Da=el+1;Da<zn&&ye.test(On[Da]);++Da);for(var Ts=(el?On[el-1]:Rt)=="L",cl=(Da<zn?On[Da]:Rt)=="L",Bl=Ts==cl?Ts?"L":"R":Rt,mh=el;mh<Da;++mh)On[mh]=Bl;el=Da-1}for(var Fs=[],ih,Zs=0;Zs<zn;)if(We.test(On[Zs])){var bf=Zs;for(++Zs;Zs<zn&&We.test(On[Zs]);++Zs);Fs.push(new at(0,bf,Zs))}else{var Wu=Zs,Fu=Fs.length,fu=dn=="rtl"?1:0;for(++Zs;Zs<zn&&On[Zs]!="L";++Zs);for(var ls=Wu;ls<Zs;)if(ut.test(On[ls])){Wu<ls&&(Fs.splice(Fu,0,new at(1,Wu,ls)),Fu+=fu);var dl=ls;for(++ls;ls<Zs&&ut.test(On[ls]);++ls);Fs.splice(Fu,0,new at(2,dl,ls)),Fu+=fu,Wu=ls}else++ls;Wu<Zs&&Fs.splice(Fu,0,new at(1,Wu,Zs))}return dn=="ltr"&&(Fs[0].level==1&&(ih=Lt.match(/^\s+/))&&(Fs[0].from=ih[0].length,Fs.unshift(new at(0,0,ih[0].length))),gt(Fs).level==1&&(ih=Lt.match(/\s+$/))&&(gt(Fs).to-=ih[0].length,Fs.push(new at(0,zn-ih[0].length,zn)))),dn=="rtl"?Fs.reverse():Fs}}();function sn(ie,ae){var ge=ie.order;return ge==null&&(ge=ie.order=It(ie.text,ae)),ge}var Xt=[],Ht=function(ie,ae,ge){if(ie.addEventListener)ie.addEventListener(ae,ge,!1);else if(ie.attachEvent)ie.attachEvent("on"+ae,ge);else{var fe=ie._handlers||(ie._handlers={});fe[ae]=(fe[ae]||Xt).concat(ge)}};function xn(ie,ae){return ie._handlers&&ie._handlers[ae]||Xt}function Dn(ie,ae,ge){if(ie.removeEventListener)ie.removeEventListener(ae,ge,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,ge);else{var fe=ie._handlers,ye=fe&&fe[ae];if(ye){var Te=kt(ye,ge);Te>-1&&(fe[ae]=ye.slice(0,Te).concat(ye.slice(Te+1)))}}}function cn(ie,ae){var ge=xn(ie,ae);if(ge.length)for(var fe=Array.prototype.slice.call(arguments,2),ye=0;ye<ge.length;++ye)ge[ye].apply(null,fe)}function Un(ie,ae,ge){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),cn(ie,ge||ae.type,ie,ae),pi(ae)||ae.codemirrorIgnore}function ti(ie){var ae=ie._handlers&&ie._handlers.cursorActivity;if(ae)for(var ge=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),fe=0;fe<ae.length;++fe)kt(ge,ae[fe])==-1&&ge.push(ae[fe])}function Wn(ie,ae){return xn(ie,ae).length>0}function Zn(ie){ie.prototype.on=function(ae,ge){Ht(this,ae,ge)},ie.prototype.off=function(ae,ge){Dn(this,ae,ge)}}function Jn(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function vi(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function pi(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function zi(ie){Jn(ie),vi(ie)}function $i(ie){return ie.target||ie.srcElement}function Yn(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),he&&ie.ctrlKey&&ae==1&&(ae=3),ae}var Gn=function(){if(_e&&Ke<9)return!1;var ie=$e("div");return"draggable"in ie||"dragDrop"in ie}(),oi;function Li(ie){if(oi==null){var ae=$e("span","\u200B");qe(ie,$e("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(oi=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(_e&&Ke<8))}var ge=oi?$e("span","\u200B"):$e("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ge.setAttribute("cm-text",""),ge}var di;function gr(ie){if(di!=null)return di;var ae=qe(ie,document.createTextNode("A\u062EA")),ge=Re(ae,0,1).getBoundingClientRect(),fe=Re(ae,1,2).getBoundingClientRect();return je(ie),!ge||ge.left==ge.right?!1:di=fe.right-ge.right<3}var Ii=`
b`.split(/\n/).length!=3?function(ie){for(var ae=0,ge=[],fe=ie.length;ae<=fe;){var ye=ie.indexOf(`
`,ae);ye==-1&&(ye=ie.length);var Te=ie.slice(ae,ie.charAt(ye-1)=="\r"?ye-1:ye),We=Te.indexOf("\r");We!=-1?(ge.push(Te.slice(0,We)),ae+=We+1):(ge.push(Te),ae=ye+1)}return ge}:function(ie){return ie.split(/\r\n?|\n/)},Le=window.getSelection?function(ie){try{return ie.selectionStart!=ie.selectionEnd}catch(ae){return!1}}:function(ie){var ae;try{ae=ie.ownerDocument.selection.createRange()}catch(ge){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},si=function(){var ie=$e("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),ji=null;function gn(ie){if(ji!=null)return ji;var ae=qe(ie,$e("span","x")),ge=ae.getBoundingClientRect(),fe=Re(ae,0,1).getBoundingClientRect();return ji=Math.abs(ge.left-fe.left)>1}var qn={},mi={};function Fi(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),qn[ie]=ae}function jn(ie,ae){mi[ie]=ae}function Tn(ie){if(typeof ie=="string"&&mi.hasOwnProperty(ie))ie=mi[ie];else if(ie&&typeof ie.name=="string"&&mi.hasOwnProperty(ie.name)){var ae=mi[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=Ce(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return Tn("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return Tn("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function At(ie,ae){ae=Tn(ae);var ge=qn[ae.name];if(!ge)return At(ie,"text/plain");var fe=ge(ie,ae);if(Dt.hasOwnProperty(ae.name)){var ye=Dt[ae.name];for(var Te in ye)ye.hasOwnProperty(Te)&&(fe.hasOwnProperty(Te)&&(fe["_"+Te]=fe[Te]),fe[Te]=ye[Te])}if(fe.name=ae.name,ae.helperType&&(fe.helperType=ae.helperType),ae.modeProps)for(var We in ae.modeProps)fe[We]=ae.modeProps[We];return fe}var Dt={};function Ve(ie,ae){var ge=Dt.hasOwnProperty(ie)?Dt[ie]:Dt[ie]={};Ut(ae,ge)}function Yt(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var ge={};for(var fe in ae){var ye=ae[fe];ye instanceof Array&&(ye=ye.concat([])),ge[fe]=ye}return ge}function tn(ie,ae){for(var ge;ie.innerMode&&(ge=ie.innerMode(ae),!(!ge||ge.mode==ie));)ae=ge.state,ie=ge.mode;return ge||{mode:ie,state:ae}}function vt(ie,ae,ge){return ie.startState?ie.startState(ae,ge):!0}var rt=function(ie,ae,ge){this.pos=this.start=0,this.string=ie,this.tabSize=ae||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ge};rt.prototype.eol=function(){return this.pos>=this.string.length},rt.prototype.sol=function(){return this.pos==this.lineStart},rt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},rt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},rt.prototype.eat=function(ie){var ae=this.string.charAt(this.pos),ge;if(typeof ie=="string"?ge=ae==ie:ge=ae&&(ie.test?ie.test(ae):ie(ae)),ge)return++this.pos,ae},rt.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},rt.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},rt.prototype.skipToEnd=function(){this.pos=this.string.length},rt.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},rt.prototype.backUp=function(ie){this.pos-=ie},rt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=lt(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},rt.prototype.indentation=function(){return lt(this.string,null,this.tabSize)-(this.lineStart?lt(this.string,this.lineStart,this.tabSize):0)},rt.prototype.match=function(ie,ae,ge){if(typeof ie=="string"){var fe=function(We){return ge?We.toLowerCase():We},ye=this.string.substr(this.pos,ie.length);if(fe(ye)==fe(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var Te=this.string.slice(this.pos).match(ie);return Te&&Te.index>0?null:(Te&&ae!==!1&&(this.pos+=Te[0].length),Te)}},rt.prototype.current=function(){return this.string.slice(this.start,this.pos)},rt.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},rt.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},rt.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function Vt(ie,ae){if(ae-=ie.first,ae<0||ae>=ie.size)throw new Error("There is no line "+(ae+ie.first)+" in the document.");for(var ge=ie;!ge.lines;)for(var fe=0;;++fe){var ye=ge.children[fe],Te=ye.chunkSize();if(ae<Te){ge=ye;break}ae-=Te}return ge.lines[ae]}function rn(ie,ae,ge){var fe=[],ye=ae.line;return ie.iter(ae.line,ge.line+1,function(Te){var We=Te.text;ye==ge.line&&(We=We.slice(0,ge.ch)),ye==ae.line&&(We=We.slice(ae.ch)),fe.push(We),++ye}),fe}function Pn(ie,ae,ge){var fe=[];return ie.iter(ae,ge,function(ye){fe.push(ye.text)}),fe}function kn(ie,ae){var ge=ae-ie.height;if(ge)for(var fe=ie;fe;fe=fe.parent)fe.height+=ge}function St(ie){if(ie.parent==null)return null;for(var ae=ie.parent,ge=kt(ae.lines,ie),fe=ae.parent;fe;ae=fe,fe=fe.parent)for(var ye=0;fe.children[ye]!=ae;++ye)ge+=fe.children[ye].chunkSize();return ge+ae.first}function hn(ie,ae){var ge=ie.first;e:do{for(var fe=0;fe<ie.children.length;++fe){var ye=ie.children[fe],Te=ye.height;if(ae<Te){ie=ye;continue e}ae-=Te,ge+=ye.chunkSize()}return ge}while(!ie.lines);for(var We=0;We<ie.lines.length;++We){var ut=ie.lines[We],at=ut.height;if(ae<at)break;ae-=at}return ge+We}function In(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function ii(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function Gt(ie,ae,ge){if(ge===void 0&&(ge=null),!(this instanceof Gt))return new Gt(ie,ae,ge);this.line=ie,this.ch=ae,this.sticky=ge}function Jt(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function hi(ie,ae){return ie.sticky==ae.sticky&&Jt(ie,ae)==0}function fi(ie){return Gt(ie.line,ie.ch)}function ui(ie,ae){return Jt(ie,ae)<0?ae:ie}function ni(ie,ae){return Jt(ie,ae)<0?ie:ae}function ci(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function li(ie,ae){if(ae.line<ie.first)return Gt(ie.first,0);var ge=ie.first+ie.size-1;return ae.line>ge?Gt(ge,Vt(ie,ge).text.length):Ni(ae,Vt(ie,ae.line).text.length)}function Ni(ie,ae){var ge=ie.ch;return ge==null||ge>ae?Gt(ie.line,ae):ge<0?Gt(ie.line,0):ie}function Qi(ie,ae){for(var ge=[],fe=0;fe<ae.length;fe++)ge[fe]=li(ie,ae[fe]);return ge}var lr=function(ie,ae){this.state=ie,this.lookAhead=ae},wn=function(ie,ae,ge,fe){this.state=ae,this.doc=ie,this.line=ge,this.maxLookAhead=fe||0,this.baseTokens=null,this.baseTokenPos=1};wn.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},wn.prototype.baseToken=function(ie){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=ie;)this.baseTokenPos+=2;var ae=this.baseTokens[this.baseTokenPos+1];return{type:ae&&ae.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-ie}},wn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wn.fromSaved=function(ie,ae,ge){return ae instanceof lr?new wn(ie,Yt(ie.mode,ae.state),ge,ae.lookAhead):new wn(ie,Yt(ie.mode,ae),ge)},wn.prototype.save=function(ie){var ae=ie!==!1?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new lr(ae,this.maxLookAhead):ae};function Pr(ie,ae,ge,fe){var ye=[ie.state.modeGen],Te={};cr(ie,ae.text,ie.doc.mode,ge,function(Lt,dn){return ye.push(Lt,dn)},Te,fe);for(var We=ge.state,ut=function(Lt){ge.baseTokens=ye;var dn=ie.state.overlays[Lt],Rt=1,zn=0;ge.state=!0,cr(ie,ae.text,dn.mode,ge,function(On,wi){for(var Ti=Rt;zn<On;){var Hi=ye[Rt];Hi>On&&ye.splice(Rt,1,On,ye[Rt+1],Hi),Rt+=2,zn=Math.min(On,Hi)}if(wi)if(dn.opaque)ye.splice(Ti,Rt-Ti,On,"overlay "+wi),Rt=Ti+2;else for(;Ti<Rt;Ti+=2){var vr=ye[Ti+1];ye[Ti+1]=(vr?vr+" ":"")+"overlay "+wi}},Te),ge.state=We,ge.baseTokens=null,ge.baseTokenPos=1},at=0;at<ie.state.overlays.length;++at)ut(at);return{styles:ye,classes:Te.bgClass||Te.textClass?Te:null}}function Or(ie,ae,ge){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var fe=ar(ie,St(ae)),ye=ae.text.length>ie.options.maxHighlightLength&&Yt(ie.doc.mode,fe.state),Te=Pr(ie,ae,fe);ye&&(fe.state=ye),ae.stateAfter=fe.save(!ye),ae.styles=Te.styles,Te.classes?ae.styleClasses=Te.classes:ae.styleClasses&&(ae.styleClasses=null),ge===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function ar(ie,ae,ge){var fe=ie.doc,ye=ie.display;if(!fe.mode.startState)return new wn(fe,!0,ae);var Te=qi(ie,ae,ge),We=Te>fe.first&&Vt(fe,Te-1).stateAfter,ut=We?wn.fromSaved(fe,We,Te):new wn(fe,vt(fe.mode),Te);return fe.iter(Te,ae,function(at){fn(ie,at.text,ut);var Lt=ut.line;at.stateAfter=Lt==ae-1||Lt%5==0||Lt>=ye.viewFrom&&Lt<ye.viewTo?ut.save():null,ut.nextLine()}),ge&&(fe.modeFrontier=ut.line),ut}function fn(ie,ae,ge,fe){var ye=ie.doc.mode,Te=new rt(ae,ie.options.tabSize,ge);for(Te.start=Te.pos=fe||0,ae==""&&Rn(ye,ge.state);!Te.eol();)Ci(ye,Te,ge.state),Te.start=Te.pos}function Rn(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var ge=tn(ie,ae);if(ge.mode.blankLine)return ge.mode.blankLine(ge.state)}}function Ci(ie,ae,ge,fe){for(var ye=0;ye<10;ye++){fe&&(fe[0]=tn(ie,ge).mode);var Te=ie.token(ae,ge);if(ae.pos>ae.start)return Te}throw new Error("Mode "+ie.name+" failed to advance stream.")}var _i=function(ie,ae,ge){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=ge};function ki(ie,ae,ge,fe){var ye=ie.doc,Te=ye.mode,We;ae=li(ye,ae);var ut=Vt(ye,ae.line),at=ar(ie,ae.line,ge),Lt=new rt(ut.text,ie.options.tabSize,at),dn;for(fe&&(dn=[]);(fe||Lt.pos<ae.ch)&&!Lt.eol();)Lt.start=Lt.pos,We=Ci(Te,Lt,at.state),fe&&dn.push(new _i(Lt,We,Yt(ye.mode,at.state)));return fe?dn:new _i(Lt,We,at.state)}function Wi(ie,ae){if(ie)for(;;){var ge=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ge)break;ie=ie.slice(0,ge.index)+ie.slice(ge.index+ge[0].length);var fe=ge[1]?"bgClass":"textClass";ae[fe]==null?ae[fe]=ge[2]:new RegExp("(?:^|\\s)"+ge[2]+"(?:$|\\s)").test(ae[fe])||(ae[fe]+=" "+ge[2])}return ie}function cr(ie,ae,ge,fe,ye,Te,We){var ut=ge.flattenSpans;ut==null&&(ut=ie.options.flattenSpans);var at=0,Lt=null,dn=new rt(ae,ie.options.tabSize,fe),Rt,zn=ie.options.addModeClass&&[null];for(ae==""&&Wi(Rn(ge,fe.state),Te);!dn.eol();){if(dn.pos>ie.options.maxHighlightLength?(ut=!1,We&&fn(ie,ae,fe,dn.pos),dn.pos=ae.length,Rt=null):Rt=Wi(Ci(ge,dn,fe.state,zn),Te),zn){var On=zn[0].name;On&&(Rt="m-"+(Rt?On+" "+Rt:On))}if(!ut||Lt!=Rt){for(;at<dn.start;)at=Math.min(dn.start,at+5e3),ye(at,Lt);Lt=Rt}dn.start=dn.pos}for(;at<dn.pos;){var wi=Math.min(dn.pos,at+5e3);ye(wi,Lt),at=wi}}function qi(ie,ae,ge){for(var fe,ye,Te=ie.doc,We=ge?-1:ae-(ie.doc.mode.innerMode?1e3:100),ut=ae;ut>We;--ut){if(ut<=Te.first)return Te.first;var at=Vt(Te,ut-1),Lt=at.stateAfter;if(Lt&&(!ge||ut+(Lt instanceof lr?Lt.lookAhead:0)<=Te.modeFrontier))return ut;var dn=lt(at.text,null,ie.options.tabSize);(ye==null||fe>dn)&&(ye=ut-1,fe=dn)}return ye}function nr(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var ge=ie.first,fe=ae-1;fe>ge;fe--){var ye=Vt(ie,fe).stateAfter;if(ye&&(!(ye instanceof lr)||fe+ye.lookAhead<ae)){ge=fe+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,ge)}}var dr=!1,Mn=!1;function to(){dr=!0}function Ln(){Mn=!0}function Hr(ie,ae,ge){this.marker=ie,this.from=ae,this.to=ge}function so(ie,ae){if(ie)for(var ge=0;ge<ie.length;++ge){var fe=ie[ge];if(fe.marker==ae)return fe}}function Bi(ie,ae){for(var ge,fe=0;fe<ie.length;++fe)ie[fe]!=ae&&(ge||(ge=[])).push(ie[fe]);return ge}function Mo(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function oo(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var Te=ie[ye],We=Te.marker,ut=Te.from==null||(We.inclusiveLeft?Te.from<=ae:Te.from<ae);if(ut||Te.from==ae&&We.type=="bookmark"&&(!ge||!Te.marker.insertLeft)){var at=Te.to==null||(We.inclusiveRight?Te.to>=ae:Te.to>ae);(fe||(fe=[])).push(new Hr(We,Te.from,at?null:Te.to))}}return fe}function Ui(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var Te=ie[ye],We=Te.marker,ut=Te.to==null||(We.inclusiveRight?Te.to>=ae:Te.to>ae);if(ut||Te.from==ae&&We.type=="bookmark"&&(!ge||Te.marker.insertLeft)){var at=Te.from==null||(We.inclusiveLeft?Te.from<=ae:Te.from<ae);(fe||(fe=[])).push(new Hr(We,at?null:Te.from-ae,Te.to==null?null:Te.to-ae))}}return fe}function er(ie,ae){if(ae.full)return null;var ge=In(ie,ae.from.line)&&Vt(ie,ae.from.line).markedSpans,fe=In(ie,ae.to.line)&&Vt(ie,ae.to.line).markedSpans;if(!ge&&!fe)return null;var ye=ae.from.ch,Te=ae.to.ch,We=Jt(ae.from,ae.to)==0,ut=oo(ge,ye,We),at=Ui(fe,Te,We),Lt=ae.text.length==1,dn=gt(ae.text).length+(Lt?ye:0);if(ut)for(var Rt=0;Rt<ut.length;++Rt){var zn=ut[Rt];if(zn.to==null){var On=so(at,zn.marker);On?Lt&&(zn.to=On.to==null?null:On.to+dn):zn.to=ye}}if(at)for(var wi=0;wi<at.length;++wi){var Ti=at[wi];if(Ti.to!=null&&(Ti.to+=dn),Ti.from==null){var Hi=so(ut,Ti.marker);Hi||(Ti.from=dn,Lt&&(ut||(ut=[])).push(Ti))}else Ti.from+=dn,Lt&&(ut||(ut=[])).push(Ti)}ut&&(ut=Wr(ut)),at&&at!=ut&&(at=Wr(at));var vr=[ut];if(!Lt){var Kr=ae.text.length-2,kr;if(Kr>0&&ut)for(var ro=0;ro<ut.length;++ro)ut[ro].to==null&&(kr||(kr=[])).push(new Hr(ut[ro].marker,null,null));for(var Ho=0;Ho<Kr;++Ho)vr.push(kr);vr.push(at)}return vr}function Wr(ie){for(var ae=0;ae<ie.length;++ae){var ge=ie[ae];ge.from!=null&&ge.from==ge.to&&ge.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function no(ie,ae,ge){var fe=null;if(ie.iter(ae.line,ge.line+1,function(On){if(On.markedSpans)for(var wi=0;wi<On.markedSpans.length;++wi){var Ti=On.markedSpans[wi].marker;Ti.readOnly&&(!fe||kt(fe,Ti)==-1)&&(fe||(fe=[])).push(Ti)}}),!fe)return null;for(var ye=[{from:ae,to:ge}],Te=0;Te<fe.length;++Te)for(var We=fe[Te],ut=We.find(0),at=0;at<ye.length;++at){var Lt=ye[at];if(!(Jt(Lt.to,ut.from)<0||Jt(Lt.from,ut.to)>0)){var dn=[at,1],Rt=Jt(Lt.from,ut.from),zn=Jt(Lt.to,ut.to);(Rt<0||!We.inclusiveLeft&&!Rt)&&dn.push({from:Lt.from,to:ut.from}),(zn>0||!We.inclusiveRight&&!zn)&&dn.push({from:ut.to,to:Lt.to}),ye.splice.apply(ye,dn),at+=dn.length-3}}return ye}function xi(ie){var ae=ie.markedSpans;if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.detachLine(ie);ie.markedSpans=null}}function tt(ie,ae){if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.attachLine(ie);ie.markedSpans=ae}}function lo(ie){return ie.inclusiveLeft?-1:0}function _o(ie){return ie.inclusiveRight?1:0}function ga(ie,ae){var ge=ie.lines.length-ae.lines.length;if(ge!=0)return ge;var fe=ie.find(),ye=ae.find(),Te=Jt(fe.from,ye.from)||lo(ie)-lo(ae);if(Te)return-Te;var We=Jt(fe.to,ye.to)||_o(ie)-_o(ae);return We||ae.id-ie.id}function Oa(ie,ae){var ge=Mn&&ie.markedSpans,fe;if(ge)for(var ye=void 0,Te=0;Te<ge.length;++Te)ye=ge[Te],ye.marker.collapsed&&(ae?ye.from:ye.to)==null&&(!fe||ga(fe,ye.marker)<0)&&(fe=ye.marker);return fe}function Xo(ie){return Oa(ie,!0)}function Fa(ie){return Oa(ie,!1)}function Gr(ie,ae){var ge=Mn&&ie.markedSpans,fe;if(ge)for(var ye=0;ye<ge.length;++ye){var Te=ge[ye];Te.marker.collapsed&&(Te.from==null||Te.from<ae)&&(Te.to==null||Te.to>ae)&&(!fe||ga(fe,Te.marker)<0)&&(fe=Te.marker)}return fe}function Br(ie,ae,ge,fe,ye){var Te=Vt(ie,ae),We=Mn&&Te.markedSpans;if(We)for(var ut=0;ut<We.length;++ut){var at=We[ut];if(at.marker.collapsed){var Lt=at.marker.find(0),dn=Jt(Lt.from,ge)||lo(at.marker)-lo(ye),Rt=Jt(Lt.to,fe)||_o(at.marker)-_o(ye);if(!(dn>=0&&Rt<=0||dn<=0&&Rt>=0)&&(dn<=0&&(at.marker.inclusiveRight&&ye.inclusiveLeft?Jt(Lt.to,ge)>=0:Jt(Lt.to,ge)>0)||dn>=0&&(at.marker.inclusiveRight&&ye.inclusiveLeft?Jt(Lt.from,fe)<=0:Jt(Lt.from,fe)<0)))return!0}}}function yr(ie){for(var ae;ae=Xo(ie);)ie=ae.find(-1,!0).line;return ie}function xo(ie){for(var ae;ae=Fa(ie);)ie=ae.find(1,!0).line;return ie}function ua(ie){for(var ae,ge;ae=Fa(ie);)ie=ae.find(1,!0).line,(ge||(ge=[])).push(ie);return ge}function Tr(ie,ae){var ge=Vt(ie,ae),fe=yr(ge);return ge==fe?ae:St(fe)}function ir(ie,ae){if(ae>ie.lastLine())return ae;var ge=Vt(ie,ae),fe;if(!Xn(ie,ge))return ae;for(;fe=Fa(ge);)ge=fe.find(1,!0).line;return St(ge)+1}function Xn(ie,ae){var ge=Mn&&ae.markedSpans;if(ge){for(var fe=void 0,ye=0;ye<ge.length;++ye)if(fe=ge[ye],!!fe.marker.collapsed){if(fe.from==null)return!0;if(!fe.marker.widgetNode&&fe.from==0&&fe.marker.inclusiveLeft&&wr(ie,ae,fe))return!0}}}function wr(ie,ae,ge){if(ge.to==null){var fe=ge.marker.find(1,!0);return wr(ie,fe.line,so(fe.line.markedSpans,ge.marker))}if(ge.marker.inclusiveRight&&ge.to==ae.text.length)return!0;for(var ye=void 0,Te=0;Te<ae.markedSpans.length;++Te)if(ye=ae.markedSpans[Te],ye.marker.collapsed&&!ye.marker.widgetNode&&ye.from==ge.to&&(ye.to==null||ye.to!=ge.from)&&(ye.marker.inclusiveLeft||ge.marker.inclusiveRight)&&wr(ie,ae,ye))return!0}function bo(ie){ie=yr(ie);for(var ae=0,ge=ie.parent,fe=0;fe<ge.lines.length;++fe){var ye=ge.lines[fe];if(ye==ie)break;ae+=ye.height}for(var Te=ge.parent;Te;ge=Te,Te=ge.parent)for(var We=0;We<Te.children.length;++We){var ut=Te.children[We];if(ut==ge)break;ae+=ut.height}return ae}function ta(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,ge,fe=ie;ge=Xo(fe);){var ye=ge.find(0,!0);fe=ye.from.line,ae+=ye.from.ch-ye.to.ch}for(fe=ie;ge=Fa(fe);){var Te=ge.find(0,!0);ae-=fe.text.length-Te.from.ch,fe=Te.to.line,ae+=fe.text.length-Te.to.ch}return ae}function No(ie){var ae=ie.display,ge=ie.doc;ae.maxLine=Vt(ge,ge.first),ae.maxLineLength=ta(ae.maxLine),ae.maxLineChanged=!0,ge.iter(function(fe){var ye=ta(fe);ye>ae.maxLineLength&&(ae.maxLineLength=ye,ae.maxLine=fe)})}var vo=function(ie,ae,ge){this.text=ie,tt(this,ae),this.height=ge?ge(this):1};vo.prototype.lineNo=function(){return St(this)},Zn(vo);function na(ie,ae,ge,fe){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),xi(ie),tt(ie,ge);var ye=fe?fe(ie):1;ye!=ie.height&&kn(ie,ye)}function ia(ie){ie.parent=null,xi(ie)}var Ba={},Na={};function is(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var ge=ae.addModeClass?Na:Ba;return ge[ie]||(ge[ie]=ie.replace(/\S+/g,"cm-$&"))}function pn(ie,ae){var ge=ft("span",null,null,Be?"padding-right: .1px":null),fe={pre:ft("pre",[ge],"CodeMirror-line"),content:ge,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ae.measure={};for(var ye=0;ye<=(ae.rest?ae.rest.length:0);ye++){var Te=ye?ae.rest[ye-1]:ae.line,We=void 0;fe.pos=0,fe.addToken=Vl,gr(ie.display.measure)&&(We=sn(Te,ie.doc.direction))&&(fe.addToken=wl(fe.addToken,We)),fe.map=[];var ut=ae!=ie.display.externalMeasured&&St(Te);yu(Te,fe,Or(ie,Te,ut)),Te.styleClasses&&(Te.styleClasses.bgClass&&(fe.bgClass=Bt(Te.styleClasses.bgClass,fe.bgClass||"")),Te.styleClasses.textClass&&(fe.textClass=Bt(Te.styleClasses.textClass,fe.textClass||""))),fe.map.length==0&&fe.map.push(0,0,fe.content.appendChild(Li(ie.display.measure))),ye==0?(ae.measure.map=fe.map,ae.measure.cache={}):((ae.measure.maps||(ae.measure.maps=[])).push(fe.map),(ae.measure.caches||(ae.measure.caches=[])).push({}))}if(Be){var at=fe.content.lastChild;(/\bcm-tab\b/.test(at.className)||at.querySelector&&at.querySelector(".cm-tab"))&&(fe.content.className="cm-tab-wrap-hack")}return cn(ie,"renderLine",ie,ae.line,fe.pre),fe.pre.className&&(fe.textClass=Bt(fe.pre.className,fe.textClass||"")),fe}function Ia(ie){var ae=$e("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function Vl(ie,ae,ge,fe,ye,Te,We){if(ae){var ut=ie.splitSpaces?Hs(ae,ie.trailingSpace):ae,at=ie.cm.state.specialChars,Lt=!1,dn;if(!at.test(ae))ie.col+=ae.length,dn=document.createTextNode(ut),ie.map.push(ie.pos,ie.pos+ae.length,dn),_e&&Ke<9&&(Lt=!0),ie.pos+=ae.length;else{dn=document.createDocumentFragment();for(var Rt=0;;){at.lastIndex=Rt;var zn=at.exec(ae),On=zn?zn.index-Rt:ae.length-Rt;if(On){var wi=document.createTextNode(ut.slice(Rt,Rt+On));_e&&Ke<9?dn.appendChild($e("span",[wi])):dn.appendChild(wi),ie.map.push(ie.pos,ie.pos+On,wi),ie.col+=On,ie.pos+=On}if(!zn)break;Rt+=On+1;var Ti=void 0;if(zn[0]==" "){var Hi=ie.cm.options.tabSize,vr=Hi-ie.col%Hi;Ti=dn.appendChild($e("span",Cn(vr),"cm-tab")),Ti.setAttribute("role","presentation"),Ti.setAttribute("cm-text"," "),ie.col+=vr}else zn[0]=="\r"||zn[0]==`
`?(Ti=dn.appendChild($e("span",zn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ti.setAttribute("cm-text",zn[0]),ie.col+=1):(Ti=ie.cm.options.specialCharPlaceholder(zn[0]),Ti.setAttribute("cm-text",zn[0]),_e&&Ke<9?dn.appendChild($e("span",[Ti])):dn.appendChild(Ti),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,Ti),ie.pos++}}if(ie.trailingSpace=ut.charCodeAt(ae.length-1)==32,ge||fe||ye||Lt||Te||We){var Kr=ge||"";fe&&(Kr+=fe),ye&&(Kr+=ye);var kr=$e("span",[dn],Kr,Te);if(We)for(var ro in We)We.hasOwnProperty(ro)&&ro!="style"&&ro!="class"&&kr.setAttribute(ro,We[ro]);return ie.content.appendChild(kr)}ie.content.appendChild(dn)}}function Hs(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var ge=ae,fe="",ye=0;ye<ie.length;ye++){var Te=ie.charAt(ye);Te==" "&&ge&&(ye==ie.length-1||ie.charCodeAt(ye+1)==32)&&(Te="\xA0"),fe+=Te,ge=Te==" "}return fe}function wl(ie,ae){return function(ge,fe,ye,Te,We,ut,at){ye=ye?ye+" cm-force-border":"cm-force-border";for(var Lt=ge.pos,dn=Lt+fe.length;;){for(var Rt=void 0,zn=0;zn<ae.length&&(Rt=ae[zn],!(Rt.to>Lt&&Rt.from<=Lt));zn++);if(Rt.to>=dn)return ie(ge,fe,ye,Te,We,ut,at);ie(ge,fe.slice(0,Rt.to-Lt),ye,Te,null,ut,at),Te=null,fe=fe.slice(Rt.to-Lt),Lt=Rt.to}}}function ka(ie,ae,ge,fe){var ye=!fe&&ge.widgetNode;ye&&ie.map.push(ie.pos,ie.pos+ae,ye),!fe&&ie.cm.display.input.needsContentAttribute&&(ye||(ye=ie.content.appendChild(document.createElement("span"))),ye.setAttribute("cm-marker",ge.id)),ye&&(ie.cm.display.input.setUneditable(ye),ie.content.appendChild(ye)),ie.pos+=ae,ie.trailingSpace=!1}function yu(ie,ae,ge){var fe=ie.markedSpans,ye=ie.text,Te=0;if(!fe){for(var We=1;We<ge.length;We+=2)ae.addToken(ae,ye.slice(Te,Te=ge[We]),is(ge[We+1],ae.cm.options));return}for(var ut=ye.length,at=0,Lt=1,dn="",Rt,zn,On=0,wi,Ti,Hi,vr,Kr;;){if(On==at){wi=Ti=Hi=zn="",Kr=null,vr=null,On=1/0;for(var kr=[],ro=void 0,Ho=0;Ho<fe.length;++Ho){var Fr=fe[Ho],oa=Fr.marker;if(oa.type=="bookmark"&&Fr.from==at&&oa.widgetNode)kr.push(oa);else if(Fr.from<=at&&(Fr.to==null||Fr.to>at||oa.collapsed&&Fr.to==at&&Fr.from==at)){if(Fr.to!=null&&Fr.to!=at&&On>Fr.to&&(On=Fr.to,Ti=""),oa.className&&(wi+=" "+oa.className),oa.css&&(zn=(zn?zn+";":"")+oa.css),oa.startStyle&&Fr.from==at&&(Hi+=" "+oa.startStyle),oa.endStyle&&Fr.to==On&&(ro||(ro=[])).push(oa.endStyle,Fr.to),oa.title&&((Kr||(Kr={})).title=oa.title),oa.attributes)for(var Ss in oa.attributes)(Kr||(Kr={}))[Ss]=oa.attributes[Ss];oa.collapsed&&(!vr||ga(vr.marker,oa)<0)&&(vr=Fr)}else Fr.from>at&&On>Fr.from&&(On=Fr.from)}if(ro)for(var ol=0;ol<ro.length;ol+=2)ro[ol+1]==On&&(Ti+=" "+ro[ol]);if(!vr||vr.from==at)for(var Ls=0;Ls<kr.length;++Ls)ka(ae,0,kr[Ls]);if(vr&&(vr.from||0)==at){if(ka(ae,(vr.to==null?ut+1:vr.to)-at,vr.marker,vr.from==null),vr.to==null)return;vr.to==at&&(vr=!1)}}if(at>=ut)break;for(var du=Math.min(ut,On);;){if(dn){var Zl=at+dn.length;if(!vr){var qs=Zl>du?dn.slice(0,du-at):dn;ae.addToken(ae,qs,Rt?Rt+wi:wi,Hi,at+qs.length==On?Ti:"",zn,Kr)}if(Zl>=du){dn=dn.slice(du-at),at=du;break}at=Zl,Hi=""}dn=ye.slice(Te,Te=ge[Lt++]),Rt=is(ge[Lt++],ae.cm.options)}}}function Cl(ie,ae,ge){this.line=ae,this.rest=ua(ae),this.size=this.rest?St(gt(this.rest))-ge+1:1,this.node=this.text=null,this.hidden=Xn(ie,ae)}function ma(ie,ae,ge){for(var fe=[],ye,Te=ae;Te<ge;Te=ye){var We=new Cl(ie.doc,Vt(ie.doc,Te),Te);ye=Te+We.size,fe.push(We)}return fe}var Fo=null;function Ul(ie){Fo?Fo.ops.push(ie):ie.ownsGroup=Fo={ops:[ie],delayedCallbacks:[]}}function $r(ie){var ae=ie.delayedCallbacks,ge=0;do{for(;ge<ae.length;ge++)ae[ge].call(null);for(var fe=0;fe<ie.ops.length;fe++){var ye=ie.ops[fe];if(ye.cursorActivityHandlers)for(;ye.cursorActivityCalled<ye.cursorActivityHandlers.length;)ye.cursorActivityHandlers[ye.cursorActivityCalled++].call(null,ye.cm)}}while(ge<ae.length)}function $o(ie,ae){var ge=ie.ownsGroup;if(ge)try{$r(ge)}finally{Fo=null,ae(ge)}}var yo=null;function Di(ie,ae){var ge=xn(ie,ae);if(ge.length){var fe=Array.prototype.slice.call(arguments,2),ye;Fo?ye=Fo.delayedCallbacks:yo?ye=yo:(ye=yo=[],setTimeout($a,0));for(var Te=function(ut){ye.push(function(){return ge[ut].apply(null,fe)})},We=0;We<ge.length;++We)Te(We)}}function $a(){var ie=yo;yo=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function Ka(ie,ae,ge,fe){for(var ye=0;ye<ae.changes.length;ye++){var Te=ae.changes[ye];Te=="text"?Ei(ie,ae):Te=="gutter"?cs(ie,ae,ge,fe):Te=="class"?Ma(ie,ae):Te=="widget"&&bl(ie,ae,fe)}ae.changes=null}function bs(ie){return ie.node==ie.text&&(ie.node=$e("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),_e&&Ke<8&&(ie.node.style.zIndex=2)),ie.node}function El(ie,ae){var ge=ae.bgClass?ae.bgClass+" "+(ae.line.bgClass||""):ae.line.bgClass;if(ge&&(ge+=" CodeMirror-linebackground"),ae.background)ge?ae.background.className=ge:(ae.background.parentNode.removeChild(ae.background),ae.background=null);else if(ge){var fe=bs(ae);ae.background=fe.insertBefore($e("div",null,ge),fe.firstChild),ie.display.input.setUneditable(ae.background)}}function Dl(ie,ae){var ge=ie.display.externalMeasured;return ge&&ge.line==ae.line?(ie.display.externalMeasured=null,ae.measure=ge.measure,ge.built):pn(ie,ae)}function Ei(ie,ae){var ge=ae.text.className,fe=Dl(ie,ae);ae.text==ae.node&&(ae.node=fe.pre),ae.text.parentNode.replaceChild(fe.pre,ae.text),ae.text=fe.pre,fe.bgClass!=ae.bgClass||fe.textClass!=ae.textClass?(ae.bgClass=fe.bgClass,ae.textClass=fe.textClass,Ma(ie,ae)):ge&&(ae.text.className=ge)}function Ma(ie,ae){El(ie,ae),ae.line.wrapClass?bs(ae).className=ae.line.wrapClass:ae.node!=ae.text&&(ae.node.className="");var ge=ae.textClass?ae.textClass+" "+(ae.line.textClass||""):ae.line.textClass;ae.text.className=ge||""}function cs(ie,ae,ge,fe){if(ae.gutter&&(ae.node.removeChild(ae.gutter),ae.gutter=null),ae.gutterBackground&&(ae.node.removeChild(ae.gutterBackground),ae.gutterBackground=null),ae.line.gutterClass){var ye=bs(ae);ae.gutterBackground=$e("div",null,"CodeMirror-gutter-background "+ae.line.gutterClass,"left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px; width: "+fe.gutterTotalWidth+"px"),ie.display.input.setUneditable(ae.gutterBackground),ye.insertBefore(ae.gutterBackground,ae.text)}var Te=ae.line.gutterMarkers;if(ie.options.lineNumbers||Te){var We=bs(ae),ut=ae.gutter=$e("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(ut),We.insertBefore(ut,ae.text),ae.line.gutterClass&&(ut.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Te||!Te["CodeMirror-linenumbers"])&&(ae.lineNumber=ut.appendChild($e("div",ii(ie.options,ge),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Te)for(var at=0;at<ie.display.gutterSpecs.length;++at){var Lt=ie.display.gutterSpecs[at].className,dn=Te.hasOwnProperty(Lt)&&Te[Lt];dn&&ut.appendChild($e("div",[dn],"CodeMirror-gutter-elt","left: "+fe.gutterLeft[Lt]+"px; width: "+fe.gutterWidth[Lt]+"px"))}}}function bl(ie,ae,ge){ae.alignable&&(ae.alignable=null);for(var fe=be("CodeMirror-linewidget"),ye=ae.node.firstChild,Te=void 0;ye;ye=Te)Te=ye.nextSibling,fe.test(ye.className)&&ae.node.removeChild(ye);Il(ie,ae,ge)}function Ol(ie,ae,ge,fe){var ye=Dl(ie,ae);return ae.text=ae.node=ye.pre,ye.bgClass&&(ae.bgClass=ye.bgClass),ye.textClass&&(ae.textClass=ye.textClass),Ma(ie,ae),cs(ie,ae,ge,fe),Il(ie,ae,fe),ae.node}function Il(ie,ae,ge){if(Jr(ie,ae.line,ae,ge,!0),ae.rest)for(var fe=0;fe<ae.rest.length;fe++)Jr(ie,ae.rest[fe],ae,ge,!1)}function Jr(ie,ae,ge,fe,ye){if(ae.widgets)for(var Te=bs(ge),We=0,ut=ae.widgets;We<ut.length;++We){var at=ut[We],Lt=$e("div",[at.node],"CodeMirror-linewidget"+(at.className?" "+at.className:""));at.handleMouseEvents||Lt.setAttribute("cm-ignore-events","true"),Ju(at,Lt,ge,fe),ie.display.input.setUneditable(Lt),ye&&at.above?Te.insertBefore(Lt,ge.gutter||ge.text):Te.appendChild(Lt),Di(at,"redraw")}}function Ju(ie,ae,ge,fe){if(ie.noHScroll){(ge.alignable||(ge.alignable=[])).push(ae);var ye=fe.wrapperWidth;ae.style.left=fe.fixedPos+"px",ie.coverGutter||(ye-=fe.gutterTotalWidth,ae.style.paddingLeft=fe.gutterTotalWidth+"px"),ae.style.width=ye+"px"}ie.coverGutter&&(ae.style.zIndex=5,ae.style.position="relative",ie.noHScroll||(ae.style.marginLeft=-fe.gutterTotalWidth+"px"))}function nl(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!Tt(document.body,ie.node)){var ge="position: relative;";ie.coverGutter&&(ge+="margin-left: -"+ae.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(ge+="width: "+ae.display.wrapper.clientWidth+"px;"),qe(ae.display.measure,$e("div",[ie.node],null,ge))}return ie.height=ie.node.parentNode.offsetHeight}function vs(ie,ae){for(var ge=$i(ae);ge!=ie.wrapper;ge=ge.parentNode)if(!ge||ge.nodeType==1&&ge.getAttribute("cm-ignore-events")=="true"||ge.parentNode==ie.sizer&&ge!=ie.mover)return!0}function ys(ie){return ie.lineSpace.offsetTop}function Su(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function Iu(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=qe(ie.measure,$e("pre","x","CodeMirror-line-like")),ge=window.getComputedStyle?window.getComputedStyle(ae):ae.currentStyle,fe={left:parseInt(ge.paddingLeft),right:parseInt(ge.paddingRight)};return!isNaN(fe.left)&&!isNaN(fe.right)&&(ie.cachedPaddingH=fe),fe}function Ys(ie){return un-ie.display.nativeBarWidth}function ul(ie){return ie.display.scroller.clientWidth-Ys(ie)-ie.display.barWidth}function Mh(ie){return ie.display.scroller.clientHeight-Ys(ie)-ie.display.barHeight}function uc(ie,ae,ge){var fe=ie.options.lineWrapping,ye=fe&&ul(ie);if(!ae.measure.heights||fe&&ae.measure.width!=ye){var Te=ae.measure.heights=[];if(fe){ae.measure.width=ye;for(var We=ae.text.firstChild.getClientRects(),ut=0;ut<We.length-1;ut++){var at=We[ut],Lt=We[ut+1];Math.abs(at.bottom-Lt.bottom)>2&&Te.push((at.bottom+Lt.top)/2-ge.top)}}Te.push(ge.bottom-ge.top)}}function Lh(ie,ae,ge){if(ie.line==ae)return{map:ie.measure.map,cache:ie.measure.cache};for(var fe=0;fe<ie.rest.length;fe++)if(ie.rest[fe]==ae)return{map:ie.measure.maps[fe],cache:ie.measure.caches[fe]};for(var ye=0;ye<ie.rest.length;ye++)if(St(ie.rest[ye])>ge)return{map:ie.measure.maps[ye],cache:ie.measure.caches[ye],before:!0}}function hc(ie,ae){ae=yr(ae);var ge=St(ae),fe=ie.display.externalMeasured=new Cl(ie.doc,ae,ge);fe.lineN=ge;var ye=fe.built=pn(ie,fe);return fe.text=ye.pre,qe(ie.display.lineMeasure,ye.pre),fe}function Fh(ie,ae,ge,fe){return Rl(ie,Qu(ie,ae),ge,fe)}function Ru(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[Dr(ie,ae)];var ge=ie.display.externalMeasured;if(ge&&ae>=ge.lineN&&ae<ge.lineN+ge.size)return ge}function Qu(ie,ae){var ge=St(ae),fe=Ru(ie,ge);fe&&!fe.text?fe=null:fe&&fe.changes&&(Ka(ie,fe,ge,fo(ie)),ie.curOp.forceUpdate=!0),fe||(fe=hc(ie,ae));var ye=Lh(fe,ae,ge);return{line:ae,view:fe,rect:null,map:ye.map,cache:ye.cache,before:ye.before,hasHeights:!1}}function Rl(ie,ae,ge,fe,ye){ae.before&&(ge=-1);var Te=ge+(fe||""),We;return ae.cache.hasOwnProperty(Te)?We=ae.cache[Te]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(uc(ie,ae.view,ae.rect),ae.hasHeights=!0),We=Po(ie,ae,ge,fe),We.bogus||(ae.cache[Te]=We)),{left:We.left,right:We.right,top:ye?We.rtop:We.top,bottom:ye?We.rbottom:We.bottom}}var Hh={left:0,right:0,top:0,bottom:0};function qu(ie,ae,ge){for(var fe,ye,Te,We,ut,at,Lt=0;Lt<ie.length;Lt+=3)if(ut=ie[Lt],at=ie[Lt+1],ae<ut?(ye=0,Te=1,We="left"):ae<at?(ye=ae-ut,Te=ye+1):(Lt==ie.length-3||ae==at&&ie[Lt+3]>ae)&&(Te=at-ut,ye=Te-1,ae>=at&&(We="right")),ye!=null){if(fe=ie[Lt+2],ut==at&&ge==(fe.insertLeft?"left":"right")&&(We=ge),ge=="left"&&ye==0)for(;Lt&&ie[Lt-2]==ie[Lt-3]&&ie[Lt-1].insertLeft;)fe=ie[(Lt-=3)+2],We="left";if(ge=="right"&&ye==at-ut)for(;Lt<ie.length-3&&ie[Lt+3]==ie[Lt+4]&&!ie[Lt+5].insertLeft;)fe=ie[(Lt+=3)+2],We="right";break}return{node:fe,start:ye,end:Te,collapse:We,coverStart:ut,coverEnd:at}}function eh(ie,ae){var ge=Hh;if(ae=="left")for(var fe=0;fe<ie.length&&(ge=ie[fe]).left==ge.right;fe++);else for(var ye=ie.length-1;ye>=0&&(ge=ie[ye]).left==ge.right;ye--);return ge}function Po(ie,ae,ge,fe){var ye=qu(ae.map,ge,fe),Te=ye.node,We=ye.start,ut=ye.end,at=ye.collapse,Lt;if(Te.nodeType==3){for(var dn=0;dn<4;dn++){for(;We&&Pt(ae.line.text.charAt(ye.coverStart+We));)--We;for(;ye.coverStart+ut<ye.coverEnd&&Pt(ae.line.text.charAt(ye.coverStart+ut));)++ut;if(_e&&Ke<9&&We==0&&ut==ye.coverEnd-ye.coverStart?Lt=Te.parentNode.getBoundingClientRect():Lt=eh(Re(Te,We,ut).getClientRects(),fe),Lt.left||Lt.right||We==0)break;ut=We,We=We-1,at="right"}_e&&Ke<11&&(Lt=Vo(ie.display.measure,Lt))}else{We>0&&(at=fe="right");var Rt;ie.options.lineWrapping&&(Rt=Te.getClientRects()).length>1?Lt=Rt[fe=="right"?Rt.length-1:0]:Lt=Te.getBoundingClientRect()}if(_e&&Ke<9&&!We&&(!Lt||!Lt.left&&!Lt.right)){var zn=Te.parentNode.getClientRects()[0];zn?Lt={left:zn.left,right:zn.left+Ro(ie.display),top:zn.top,bottom:zn.bottom}:Lt=Hh}for(var On=Lt.top-ae.rect.top,wi=Lt.bottom-ae.rect.top,Ti=(On+wi)/2,Hi=ae.view.measure.heights,vr=0;vr<Hi.length-1&&!(Ti<Hi[vr]);vr++);var Kr=vr?Hi[vr-1]:0,kr=Hi[vr],ro={left:(at=="right"?Lt.right:Lt.left)-ae.rect.left,right:(at=="left"?Lt.left:Lt.right)-ae.rect.left,top:Kr,bottom:kr};return!Lt.left&&!Lt.right&&(ro.bogus=!0),ie.options.singleCursorHeightPerLine||(ro.rtop=On,ro.rbottom=wi),ro}function Vo(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!gn(ie))return ae;var ge=screen.logicalXDPI/screen.deviceXDPI,fe=screen.logicalYDPI/screen.deviceYDPI;return{left:ae.left*ge,right:ae.right*ge,top:ae.top*fe,bottom:ae.bottom*fe}}function Ws(ie){if(ie.measure&&(ie.measure.cache={},ie.measure.heights=null,ie.rest))for(var ae=0;ae<ie.rest.length;ae++)ie.measure.caches[ae]={}}function ds(ie){ie.display.externalMeasure=null,je(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)Ws(ie.display.view[ae])}function es(ie){ds(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function Aa(){return ct&&te?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function _a(){return ct&&te?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function rs(ie){var ae=0;if(ie.widgets)for(var ge=0;ge<ie.widgets.length;++ge)ie.widgets[ge].above&&(ae+=nl(ie.widgets[ge]));return ae}function Va(ie,ae,ge,fe,ye){if(!ye){var Te=rs(ae);ge.top+=Te,ge.bottom+=Te}if(fe=="line")return ge;fe||(fe="local");var We=bo(ae);if(fe=="local"?We+=ys(ie.display):We-=ie.display.viewOffset,fe=="page"||fe=="window"){var ut=ie.display.lineSpace.getBoundingClientRect();We+=ut.top+(fe=="window"?0:_a());var at=ut.left+(fe=="window"?0:Aa());ge.left+=at,ge.right+=at}return ge.top+=We,ge.bottom+=We,ge}function Gs(ie,ae,ge){if(ge=="div")return ae;var fe=ae.left,ye=ae.top;if(ge=="page")fe-=Aa(),ye-=_a();else if(ge=="local"||!ge){var Te=ie.display.sizer.getBoundingClientRect();fe+=Te.left,ye+=Te.top}var We=ie.display.lineSpace.getBoundingClientRect();return{left:fe-We.left,top:ye-We.top}}function $s(ie,ae,ge,fe,ye){return fe||(fe=Vt(ie.doc,ae.line)),Va(ie,fe,Fh(ie,fe,ae.ch,ye),ge)}function va(ie,ae,ge,fe,ye,Te){fe=fe||Vt(ie.doc,ae.line),ye||(ye=Qu(ie,fe));function We(wi,Ti){var Hi=Rl(ie,ye,wi,Ti?"right":"left",Te);return Ti?Hi.left=Hi.right:Hi.right=Hi.left,Va(ie,fe,Hi,ge)}var ut=sn(fe,ie.doc.direction),at=ae.ch,Lt=ae.sticky;if(at>=fe.text.length?(at=fe.text.length,Lt="before"):at<=0&&(at=0,Lt="after"),!ut)return We(Lt=="before"?at-1:at,Lt=="before");function dn(wi,Ti,Hi){var vr=ut[Ti],Kr=vr.level==1;return We(Hi?wi-1:wi,Kr!=Hi)}var Rt=ot(ut,at,Lt),zn=wt,On=dn(at,Rt,Lt=="before");return zn!=null&&(On.other=dn(at,zn,Lt!="before")),On}function rd(ie,ae){var ge=0;ae=li(ie.doc,ae),ie.options.lineWrapping||(ge=Ro(ie.display)*ae.ch);var fe=Vt(ie.doc,ae.line),ye=bo(fe)+ys(ie.display);return{left:ge,right:ge,top:ye,bottom:ye+fe.height}}function Mc(ie,ae,ge,fe,ye){var Te=Gt(ie,ae,ge);return Te.xRel=ye,fe&&(Te.outside=fe),Te}function Kt(ie,ae,ge){var fe=ie.doc;if(ge+=ie.display.viewOffset,ge<0)return Mc(fe.first,0,null,-1,-1);var ye=hn(fe,ge),Te=fe.first+fe.size-1;if(ye>Te)return Mc(fe.first+fe.size-1,Vt(fe,Te).text.length,null,1,1);ae<0&&(ae=0);for(var We=Vt(fe,ye);;){var ut=vn(ie,We,ye,ae,ge),at=Gr(We,ut.ch+(ut.xRel>0||ut.outside>0?1:0));if(!at)return ut;var Lt=at.find(1);if(Lt.line==ye)return Lt;We=Vt(fe,ye=Lt.line)}}function _t(ie,ae,ge,fe){fe-=rs(ae);var ye=ae.text.length,Te=Je(function(We){return Rl(ie,ge,We-1).bottom<=fe},ye,0);return ye=Je(function(We){return Rl(ie,ge,We).top>fe},Te,ye),{begin:Te,end:ye}}function mn(ie,ae,ge,fe){ge||(ge=Qu(ie,ae));var ye=Va(ie,ae,Rl(ie,ge,fe),"line").top;return _t(ie,ae,ge,ye)}function it(ie,ae,ge,fe){return ie.bottom<=ge?!1:ie.top>ge?!0:(fe?ie.left:ie.right)>ae}function vn(ie,ae,ge,fe,ye){ye-=bo(ae);var Te=Qu(ie,ae),We=rs(ae),ut=0,at=ae.text.length,Lt=!0,dn=sn(ae,ie.doc.direction);if(dn){var Rt=(ie.options.lineWrapping?Bo:jr)(ie,ae,ge,Te,dn,fe,ye);Lt=Rt.level!=1,ut=Lt?Rt.from:Rt.to-1,at=Lt?Rt.to:Rt.from-1}var zn=null,On=null,wi=Je(function(Ho){var Fr=Rl(ie,Te,Ho);return Fr.top+=We,Fr.bottom+=We,it(Fr,fe,ye,!1)?(Fr.top<=ye&&Fr.left<=fe&&(zn=Ho,On=Fr),!0):!1},ut,at),Ti,Hi,vr=!1;if(On){var Kr=fe-On.left<On.right-fe,kr=Kr==Lt;wi=zn+(kr?0:1),Hi=kr?"after":"before",Ti=Kr?On.left:On.right}else{!Lt&&(wi==at||wi==ut)&&wi++,Hi=wi==0?"after":wi==ae.text.length?"before":Rl(ie,Te,wi-(Lt?1:0)).bottom+We<=ye==Lt?"after":"before";var ro=va(ie,Gt(ge,wi,Hi),"line",ae,Te);Ti=ro.left,vr=ye<ro.top?-1:ye>=ro.bottom?1:0}return wi=Xe(ae.text,wi,1),Mc(ge,wi,Hi,vr,fe-Ti)}function jr(ie,ae,ge,fe,ye,Te,We){var ut=Je(function(Rt){var zn=ye[Rt],On=zn.level!=1;return it(va(ie,Gt(ge,On?zn.to:zn.from,On?"before":"after"),"line",ae,fe),Te,We,!0)},0,ye.length-1),at=ye[ut];if(ut>0){var Lt=at.level!=1,dn=va(ie,Gt(ge,Lt?at.from:at.to,Lt?"after":"before"),"line",ae,fe);it(dn,Te,We,!0)&&dn.top>We&&(at=ye[ut-1])}return at}function Bo(ie,ae,ge,fe,ye,Te,We){var ut=_t(ie,ae,fe,We),at=ut.begin,Lt=ut.end;/\s/.test(ae.text.charAt(Lt-1))&&Lt--;for(var dn=null,Rt=null,zn=0;zn<ye.length;zn++){var On=ye[zn];if(!(On.from>=Lt||On.to<=at)){var wi=On.level!=1,Ti=Rl(ie,fe,wi?Math.min(Lt,On.to)-1:Math.max(at,On.from)).right,Hi=Ti<Te?Te-Ti+1e9:Ti-Te;(!dn||Rt>Hi)&&(dn=On,Rt=Hi)}}return dn||(dn=ye[ye.length-1]),dn.from<at&&(dn={from:at,to:dn.to,level:dn.level}),dn.to>Lt&&(dn={from:dn.from,to:Lt,level:dn.level}),dn}var Ir;function zr(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(Ir==null){Ir=$e("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)Ir.appendChild(document.createTextNode("x")),Ir.appendChild($e("br"));Ir.appendChild(document.createTextNode("x"))}qe(ie.measure,Ir);var ge=Ir.offsetHeight/50;return ge>3&&(ie.cachedTextHeight=ge),je(ie.measure),ge||1}function Ro(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=$e("span","xxxxxxxxxx"),ge=$e("pre",[ae],"CodeMirror-line-like");qe(ie.measure,ge);var fe=ae.getBoundingClientRect(),ye=(fe.right-fe.left)/10;return ye>2&&(ie.cachedCharWidth=ye),ye||10}function fo(ie){for(var ae=ie.display,ge={},fe={},ye=ae.gutters.clientLeft,Te=ae.gutters.firstChild,We=0;Te;Te=Te.nextSibling,++We){var ut=ie.display.gutterSpecs[We].className;ge[ut]=Te.offsetLeft+Te.clientLeft+ye,fe[ut]=Te.clientWidth}return{fixedPos:Wo(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:ge,gutterWidth:fe,wrapperWidth:ae.wrapper.clientWidth}}function Wo(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function co(ie){var ae=zr(ie.display),ge=ie.options.lineWrapping,fe=ge&&Math.max(5,ie.display.scroller.clientWidth/Ro(ie.display)-3);return function(ye){if(Xn(ie.doc,ye))return 0;var Te=0;if(ye.widgets)for(var We=0;We<ye.widgets.length;We++)ye.widgets[We].height&&(Te+=ye.widgets[We].height);return ge?Te+(Math.ceil(ye.text.length/fe)||1)*ae:Te+ae}}function Zi(ie){var ae=ie.doc,ge=co(ie);ae.iter(function(fe){var ye=ge(fe);ye!=fe.height&&kn(fe,ye)})}function Ki(ie,ae,ge,fe){var ye=ie.display;if(!ge&&$i(ae).getAttribute("cm-not-content")=="true")return null;var Te,We,ut=ye.lineSpace.getBoundingClientRect();try{Te=ae.clientX-ut.left,We=ae.clientY-ut.top}catch(Rt){return null}var at=Kt(ie,Te,We),Lt;if(fe&&at.xRel>0&&(Lt=Vt(ie.doc,at.line).text).length==at.ch){var dn=lt(Lt,Lt.length,ie.options.tabSize)-Lt.length;at=Gt(at.line,Math.max(0,Math.round((Te-Iu(ie.display).left)/Ro(ie.display))-dn))}return at}function Dr(ie,ae){if(ae>=ie.display.viewTo||(ae-=ie.display.viewFrom,ae<0))return null;for(var ge=ie.display.view,fe=0;fe<ge.length;fe++)if(ae-=ge[fe].size,ae<0)return fe}function Ar(ie,ae,ge,fe){ae==null&&(ae=ie.doc.first),ge==null&&(ge=ie.doc.first+ie.doc.size),fe||(fe=0);var ye=ie.display;if(fe&&ge<ye.viewTo&&(ye.updateLineNumbers==null||ye.updateLineNumbers>ae)&&(ye.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=ye.viewTo)Mn&&Tr(ie.doc,ae)<ye.viewTo&&br(ie);else if(ge<=ye.viewFrom)Mn&&ir(ie.doc,ge+fe)>ye.viewFrom?br(ie):(ye.viewFrom+=fe,ye.viewTo+=fe);else if(ae<=ye.viewFrom&&ge>=ye.viewTo)br(ie);else if(ae<=ye.viewFrom){var Te=Lo(ie,ge,ge+fe,1);Te?(ye.view=ye.view.slice(Te.index),ye.viewFrom=Te.lineN,ye.viewTo+=fe):br(ie)}else if(ge>=ye.viewTo){var We=Lo(ie,ae,ae,-1);We?(ye.view=ye.view.slice(0,We.index),ye.viewTo=We.lineN):br(ie)}else{var ut=Lo(ie,ae,ae,-1),at=Lo(ie,ge,ge+fe,1);ut&&at?(ye.view=ye.view.slice(0,ut.index).concat(ma(ie,ut.lineN,at.lineN)).concat(ye.view.slice(at.index)),ye.viewTo+=fe):br(ie)}var Lt=ye.externalMeasured;Lt&&(ge<Lt.lineN?Lt.lineN+=fe:ae<Lt.lineN+Lt.size&&(ye.externalMeasured=null))}function rr(ie,ae,ge){ie.curOp.viewChanged=!0;var fe=ie.display,ye=ie.display.externalMeasured;if(ye&&ae>=ye.lineN&&ae<ye.lineN+ye.size&&(fe.externalMeasured=null),!(ae<fe.viewFrom||ae>=fe.viewTo)){var Te=fe.view[Dr(ie,ae)];if(Te.node!=null){var We=Te.changes||(Te.changes=[]);kt(We,ge)==-1&&We.push(ge)}}}function br(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Lo(ie,ae,ge,fe){var ye=Dr(ie,ae),Te,We=ie.display.view;if(!Mn||ge==ie.doc.first+ie.doc.size)return{index:ye,lineN:ge};for(var ut=ie.display.viewFrom,at=0;at<ye;at++)ut+=We[at].size;if(ut!=ae){if(fe>0){if(ye==We.length-1)return null;Te=ut+We[ye].size-ae,ye++}else Te=ut-ae;ae+=Te,ge+=Te}for(;Tr(ie.doc,ge)!=ge;){if(ye==(fe<0?0:We.length-1))return null;ge+=fe*We[ye-(fe<0?1:0)].size,ye+=fe}return{index:ye,lineN:ge}}function Rr(ie,ae,ge){var fe=ie.display,ye=fe.view;ye.length==0||ae>=fe.viewTo||ge<=fe.viewFrom?(fe.view=ma(ie,ae,ge),fe.viewFrom=ae):(fe.viewFrom>ae?fe.view=ma(ie,ae,fe.viewFrom).concat(fe.view):fe.viewFrom<ae&&(fe.view=fe.view.slice(Dr(ie,ae))),fe.viewFrom=ae,fe.viewTo<ge?fe.view=fe.view.concat(ma(ie,fe.viewTo,ge)):fe.viewTo>ge&&(fe.view=fe.view.slice(0,Dr(ie,ge)))),fe.viewTo=ge}function tr(ie){for(var ae=ie.display.view,ge=0,fe=0;fe<ae.length;fe++){var ye=ae[fe];!ye.hidden&&(!ye.node||ye.changes)&&++ge}return ge}function ur(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function sr(ie,ae){ae===void 0&&(ae=!0);for(var ge=ie.doc,fe={},ye=fe.cursors=document.createDocumentFragment(),Te=fe.selection=document.createDocumentFragment(),We=0;We<ge.sel.ranges.length;We++)if(!(!ae&&We==ge.sel.primIndex)){var ut=ge.sel.ranges[We];if(!(ut.from().line>=ie.display.viewTo||ut.to().line<ie.display.viewFrom)){var at=ut.empty();(at||ie.options.showCursorWhenSelecting)&&Ri(ie,ut.head,ye),at||Yr(ie,ut,Te)}}return fe}function Ri(ie,ae,ge){var fe=va(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),ye=ge.appendChild($e("div","\xA0","CodeMirror-cursor"));if(ye.style.left=fe.left+"px",ye.style.top=fe.top+"px",ye.style.height=Math.max(0,fe.bottom-fe.top)*ie.options.cursorHeight+"px",fe.other){var Te=ge.appendChild($e("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Te.style.display="",Te.style.left=fe.other.left+"px",Te.style.top=fe.other.top+"px",Te.style.height=(fe.other.bottom-fe.other.top)*.85+"px"}}function To(ie,ae){return ie.top-ae.top||ie.left-ae.left}function Yr(ie,ae,ge){var fe=ie.display,ye=ie.doc,Te=document.createDocumentFragment(),We=Iu(ie.display),ut=We.left,at=Math.max(fe.sizerWidth,ul(ie)-fe.sizer.offsetLeft)-We.right,Lt=ye.direction=="ltr";function dn(kr,ro,Ho,Fr){ro<0&&(ro=0),ro=Math.round(ro),Fr=Math.round(Fr),Te.appendChild($e("div",null,"CodeMirror-selected","position: absolute; left: "+kr+`px;
top: `+ro+"px; width: "+(Ho==null?at-kr:Ho)+`px;
height: `+(Fr-ro)+"px"))}function Rt(kr,ro,Ho){var Fr=Vt(ye,kr),oa=Fr.text.length,Ss,ol;function Ls(qs,Lu){return $s(ie,Gt(kr,qs),"div",Fr,Lu)}function du(qs,Lu,Fl){var el=mn(ie,Fr,null,qs),Da=Lu=="ltr"==(Fl=="after")?"left":"right",Ts=Fl=="after"?el.begin:el.end-(/\s/.test(Fr.text.charAt(el.end-1))?2:1);return Ls(Ts,Da)[Da]}var Zl=sn(Fr,ye.direction);return yt(Zl,ro||0,Ho==null?oa:Ho,function(qs,Lu,Fl,el){var Da=Fl=="ltr",Ts=Ls(qs,Da?"left":"right"),cl=Ls(Lu-1,Da?"right":"left"),Bl=ro==null&&qs==0,mh=Ho==null&&Lu==oa,Fs=el==0,ih=!Zl||el==Zl.length-1;if(cl.top-Ts.top<=3){var Zs=(Lt?Bl:mh)&&Fs,bf=(Lt?mh:Bl)&&ih,Wu=Zs?ut:(Da?Ts:cl).left,Fu=bf?at:(Da?cl:Ts).right;dn(Wu,Ts.top,Fu-Wu,Ts.bottom)}else{var fu,ls,dl,Yh;Da?(fu=Lt&&Bl&&Fs?ut:Ts.left,ls=Lt?at:du(qs,Fl,"before"),dl=Lt?ut:du(Lu,Fl,"after"),Yh=Lt&&mh&&ih?at:cl.right):(fu=Lt?du(qs,Fl,"before"):ut,ls=!Lt&&Bl&&Fs?at:Ts.right,dl=!Lt&&mh&&ih?ut:cl.left,Yh=Lt?du(Lu,Fl,"after"):at),dn(fu,Ts.top,ls-fu,Ts.bottom),Ts.bottom<cl.top&&dn(ut,Ts.bottom,null,cl.top),dn(dl,cl.top,Yh-dl,cl.bottom)}(!Ss||To(Ts,Ss)<0)&&(Ss=Ts),To(cl,Ss)<0&&(Ss=cl),(!ol||To(Ts,ol)<0)&&(ol=Ts),To(cl,ol)<0&&(ol=cl)}),{start:Ss,end:ol}}var zn=ae.from(),On=ae.to();if(zn.line==On.line)Rt(zn.line,zn.ch,On.ch);else{var wi=Vt(ye,zn.line),Ti=Vt(ye,On.line),Hi=yr(wi)==yr(Ti),vr=Rt(zn.line,zn.ch,Hi?wi.text.length+1:null).end,Kr=Rt(On.line,Hi?0:null,On.ch).start;Hi&&(vr.top<Kr.top-2?(dn(vr.right,vr.top,null,vr.bottom),dn(ut,Kr.top,Kr.left,Kr.bottom)):dn(vr.right,vr.top,Kr.left-vr.right,vr.bottom)),vr.bottom<Kr.top&&dn(ut,vr.bottom,null,Kr.top)}ge.appendChild(Te)}function ko(ie){if(ie.state.focused){var ae=ie.display;clearInterval(ae.blinker);var ge=!0;ae.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ae.blinker=setInterval(function(){ie.hasFocus()||Bs(ie),ae.cursorDiv.style.visibility=(ge=!ge)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function Uo(ie){ie.state.focused||(ie.display.input.focus(),Do(ie))}function Lr(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,Bs(ie))},100)}function Do(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(cn(ie,"focus",ie,ae),ie.state.focused=!0,bt(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Be&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),ko(ie))}function Bs(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(cn(ie,"blur",ie,ae),ie.state.focused=!1,Ie(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Gi(ie){for(var ae=ie.display,ge=ae.lineDiv.offsetTop,fe=0;fe<ae.view.length;fe++){var ye=ae.view[fe],Te=ie.options.lineWrapping,We=void 0,ut=0;if(!ye.hidden){if(_e&&Ke<8){var at=ye.node.offsetTop+ye.node.offsetHeight;We=at-ge,ge=at}else{var Lt=ye.node.getBoundingClientRect();We=Lt.bottom-Lt.top,!Te&&ye.text.firstChild&&(ut=ye.text.firstChild.getBoundingClientRect().right-Lt.left-1)}var dn=ye.line.height-We;if((dn>.005||dn<-.005)&&(kn(ye.line,We),Ra(ye.line),ye.rest))for(var Rt=0;Rt<ye.rest.length;Rt++)Ra(ye.rest[Rt]);if(ut>ie.display.sizerWidth){var zn=Math.ceil(ut/Ro(ie.display));zn>ie.display.maxLineLength&&(ie.display.maxLineLength=zn,ie.display.maxLine=ye.line,ie.display.maxLineChanged=!0)}}}}function Ra(ie){if(ie.widgets)for(var ae=0;ae<ie.widgets.length;++ae){var ge=ie.widgets[ae],fe=ge.node.parentNode;fe&&(ge.height=fe.offsetHeight)}}function Vr(ie,ae,ge){var fe=ge&&ge.top!=null?Math.max(0,ge.top):ie.scroller.scrollTop;fe=Math.floor(fe-ys(ie));var ye=ge&&ge.bottom!=null?ge.bottom:fe+ie.wrapper.clientHeight,Te=hn(ae,fe),We=hn(ae,ye);if(ge&&ge.ensure){var ut=ge.ensure.from.line,at=ge.ensure.to.line;ut<Te?(Te=ut,We=hn(ae,bo(Vt(ae,ut))+ie.wrapper.clientHeight)):Math.min(at,ae.lastLine())>=We&&(Te=hn(ae,bo(Vt(ae,at))-ie.wrapper.clientHeight),We=at)}return{from:Te,to:Math.max(We,Te+1)}}function Za(ie,ae){if(!Un(ie,"scrollCursorIntoView")){var ge=ie.display,fe=ge.sizer.getBoundingClientRect(),ye=null;if(ae.top+fe.top<0?ye=!0:ae.bottom+fe.top>(window.innerHeight||document.documentElement.clientHeight)&&(ye=!1),ye!=null&&!dt){var Te=$e("div","\u200B",null,`position: absolute;
top: `+(ae.top-ge.viewOffset-ys(ie.display))+`px;
height: `+(ae.bottom-ae.top+Ys(ie)+ge.barHeight)+`px;
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Te),Te.scrollIntoView(ye),ie.display.lineSpace.removeChild(Te)}}}function Is(ie,ae,ge,fe){fe==null&&(fe=0);var ye;!ie.options.lineWrapping&&ae==ge&&(ae=ae.ch?Gt(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,ge=ae.sticky=="before"?Gt(ae.line,ae.ch+1,"before"):ae);for(var Te=0;Te<5;Te++){var We=!1,ut=va(ie,ae),at=!ge||ge==ae?ut:va(ie,ge);ye={left:Math.min(ut.left,at.left),top:Math.min(ut.top,at.top)-fe,right:Math.max(ut.left,at.left),bottom:Math.max(ut.bottom,at.bottom)+fe};var Lt=Wh(ie,ye),dn=ie.doc.scrollTop,Rt=ie.doc.scrollLeft;if(Lt.scrollTop!=null&&(Nh(ie,Lt.scrollTop),Math.abs(ie.doc.scrollTop-dn)>1&&(We=!0)),Lt.scrollLeft!=null&&(_u(ie,Lt.scrollLeft),Math.abs(ie.doc.scrollLeft-Rt)>1&&(We=!0)),!We)break}return ye}function ju(ie,ae){var ge=Wh(ie,ae);ge.scrollTop!=null&&Nh(ie,ge.scrollTop),ge.scrollLeft!=null&&_u(ie,ge.scrollLeft)}function Wh(ie,ae){var ge=ie.display,fe=zr(ie.display);ae.top<0&&(ae.top=0);var ye=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:ge.scroller.scrollTop,Te=Mh(ie),We={};ae.bottom-ae.top>Te&&(ae.bottom=ae.top+Te);var ut=ie.doc.height+Su(ge),at=ae.top<fe,Lt=ae.bottom>ut-fe;if(ae.top<ye)We.scrollTop=at?0:ae.top;else if(ae.bottom>ye+Te){var dn=Math.min(ae.top,(Lt?ut:ae.bottom)-Te);dn!=ye&&(We.scrollTop=dn)}var Rt=ie.options.fixedGutter?0:ge.gutters.offsetWidth,zn=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:ge.scroller.scrollLeft-Rt,On=ul(ie)-ge.gutters.offsetWidth,wi=ae.right-ae.left>On;return wi&&(ae.right=ae.left+On),ae.left<10?We.scrollLeft=0:ae.left<zn?We.scrollLeft=Math.max(0,ae.left+Rt-(wi?0:10)):ae.right>On+zn-3&&(We.scrollLeft=ae.right+(wi?0:10)-On),We}function Bh(ie,ae){ae!=null&&(Ml(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ae)}function ru(ie){Ml(ie);var ae=ie.getCursor();ie.curOp.scrollToPos={from:ae,to:ae,margin:ie.options.cursorScrollMargin}}function zu(ie,ae,ge){(ae!=null||ge!=null)&&Ml(ie),ae!=null&&(ie.curOp.scrollLeft=ae),ge!=null&&(ie.curOp.scrollTop=ge)}function aa(ie,ae){Ml(ie),ie.curOp.scrollToPos=ae}function Ml(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var ge=rd(ie,ae.from),fe=rd(ie,ae.to);Gh(ie,ge,fe,ae.margin)}}function Gh(ie,ae,ge,fe){var ye=Wh(ie,{left:Math.min(ae.left,ge.left),top:Math.min(ae.top,ge.top)-fe,right:Math.max(ae.right,ge.right),bottom:Math.max(ae.bottom,ge.bottom)+fe});zu(ie,ye.scrollLeft,ye.scrollTop)}function Nh(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(ce||Yi(ie,{top:ae}),Od(ie,ae,!0),ce&&Yi(ie),ei(ie,100))}function Od(ie,ae,ge){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!ge)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function _u(ie,ae,ge,fe){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((ge?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!fe)&&(ie.doc.scrollLeft=ae,uo(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function ou(ie){var ae=ie.display,ge=ae.gutters.offsetWidth,fe=Math.round(ie.doc.height+Su(ie.display));return{clientHeight:ae.scroller.clientHeight,viewHeight:ae.wrapper.clientHeight,scrollWidth:ae.scroller.scrollWidth,clientWidth:ae.scroller.clientWidth,viewWidth:ae.wrapper.clientWidth,barLeft:ie.options.fixedGutter?ge:0,docHeight:fe,scrollHeight:fe+Ys(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:ge}}var xu=function(ie,ae,ge){this.cm=ge;var fe=this.vert=$e("div",[$e("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ye=this.horiz=$e("div",[$e("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fe.tabIndex=ye.tabIndex=-1,ie(fe),ie(ye),Ht(fe,"scroll",function(){fe.clientHeight&&ae(fe.scrollTop,"vertical")}),Ht(ye,"scroll",function(){ye.clientWidth&&ae(ye.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,_e&&Ke<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};xu.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,ge=ie.scrollHeight>ie.clientHeight+1,fe=ie.nativeBarWidth;if(ge){this.vert.style.display="block",this.vert.style.bottom=ae?fe+"px":"0";var ye=ie.viewHeight-(ae?fe:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+ye)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ae){this.horiz.style.display="block",this.horiz.style.right=ge?fe+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Te=ie.viewWidth-ie.barLeft-(ge?fe:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Te)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(fe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ge?fe:0,bottom:ae?fe:0}},xu.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},xu.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},xu.prototype.zeroWidthHack=function(){var ie=he&&!ht?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ge,this.disableVert=new Ge},xu.prototype.enableZeroWidthBar=function(ie,ae,ge){ie.style.pointerEvents="auto";function fe(){var ye=ie.getBoundingClientRect(),Te=ge=="vert"?document.elementFromPoint(ye.right-1,(ye.top+ye.bottom)/2):document.elementFromPoint((ye.right+ye.left)/2,ye.bottom-1);Te!=ie?ie.style.pointerEvents="none":ae.set(1e3,fe)}ae.set(1e3,fe)},xu.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Pu=function(){};Pu.prototype.update=function(){return{bottom:0,right:0}},Pu.prototype.setScrollLeft=function(){},Pu.prototype.setScrollTop=function(){},Pu.prototype.clear=function(){};function dh(ie,ae){ae||(ae=ou(ie));var ge=ie.display.barWidth,fe=ie.display.barHeight;Lc(ie,ae);for(var ye=0;ye<4&&ge!=ie.display.barWidth||fe!=ie.display.barHeight;ye++)ge!=ie.display.barWidth&&ie.options.lineWrapping&&Gi(ie),Lc(ie,ou(ie)),ge=ie.display.barWidth,fe=ie.display.barHeight}function Lc(ie,ae){var ge=ie.display,fe=ge.scrollbars.update(ae);ge.sizer.style.paddingRight=(ge.barWidth=fe.right)+"px",ge.sizer.style.paddingBottom=(ge.barHeight=fe.bottom)+"px",ge.heightForcer.style.borderBottom=fe.bottom+"px solid transparent",fe.right&&fe.bottom?(ge.scrollbarFiller.style.display="block",ge.scrollbarFiller.style.height=fe.bottom+"px",ge.scrollbarFiller.style.width=fe.right+"px"):ge.scrollbarFiller.style.display="",fe.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(ge.gutterFiller.style.display="block",ge.gutterFiller.style.height=fe.bottom+"px",ge.gutterFiller.style.width=ae.gutterWidth+"px"):ge.gutterFiller.style.display=""}var Fc={native:xu,null:Pu};function Bc(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&Ie(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new Fc[ie.options.scrollbarStyle](function(ae){ie.display.wrapper.insertBefore(ae,ie.display.scrollbarFiller),Ht(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,ge){ge=="horizontal"?_u(ie,ae):Nh(ie,ae)},ie),ie.display.scrollbars.addClass&&bt(ie.display.wrapper,ie.display.scrollbars.addClass)}var od=0;function _n(ie){ie.curOp={cm:ie,viewChanged:!1,startHeight:ie.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:++od},Ul(ie.curOp)}function Sr(ie){var ae=ie.curOp;ae&&$o(ae,function(ge){for(var fe=0;fe<ge.ops.length;fe++)ge.ops[fe].cm.curOp=null;Jo(ge)})}function Jo(ie){for(var ae=ie.ops,ge=0;ge<ae.length;ge++)Qe(ae[ge]);for(var fe=0;fe<ae.length;fe++)Ue(ae[fe]);for(var ye=0;ye<ae.length;ye++)jt(ae[ye]);for(var Te=0;Te<ae.length;Te++)zt(ae[Te]);for(var We=0;We<ae.length;We++)nn(ae[We])}function Qe(ie){var ae=ie.cm,ge=ae.display;Ai(ae),ie.updateMaxLine&&No(ae),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<ge.viewFrom||ie.scrollToPos.to.line>=ge.viewTo)||ge.maxLineChanged&&ae.options.lineWrapping,ie.update=ie.mustUpdate&&new Qn(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function Ue(ie){ie.updatedDisplay=ie.mustUpdate&&or(ie.cm,ie.update)}function jt(ie){var ae=ie.cm,ge=ae.display;ie.updatedDisplay&&Gi(ae),ie.barMeasure=ou(ae),ge.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=Fh(ae,ge.maxLine,ge.maxLine.text.length).left+3,ae.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(ge.scroller.clientWidth,ge.sizer.offsetLeft+ie.adjustWidthTo+Ys(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,ge.sizer.offsetLeft+ie.adjustWidthTo-ul(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=ge.input.prepareSelection())}function zt(ie){var ae=ie.cm;ie.adjustWidthTo!=null&&(ae.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ae.doc.scrollLeft&&_u(ae,Math.min(ae.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ae.display.maxLineChanged=!1);var ge=ie.focus&&ie.focus==et();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,ge),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&dh(ae,ie.barMeasure),ie.updatedDisplay&&Xr(ae,ie.barMeasure),ie.selectionChanged&&ko(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),ge&&Uo(ie.cm)}function nn(ie){var ae=ie.cm,ge=ae.display,fe=ae.doc;if(ie.updatedDisplay&&bi(ae,ie.update),ge.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(ge.wheelStartX=ge.wheelStartY=null),ie.scrollTop!=null&&Od(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&_u(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var ye=Is(ae,li(fe,ie.scrollToPos.from),li(fe,ie.scrollToPos.to),ie.scrollToPos.margin);Za(ae,ye)}var Te=ie.maybeHiddenMarkers,We=ie.maybeUnhiddenMarkers;if(Te)for(var ut=0;ut<Te.length;++ut)Te[ut].lines.length||cn(Te[ut],"hide");if(We)for(var at=0;at<We.length;++at)We[at].lines.length&&cn(We[at],"unhide");ge.wrapper.offsetHeight&&(fe.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&cn(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function Wt(ie,ae){if(ie.curOp)return ae();_n(ie);try{return ae()}finally{Sr(ie)}}function bn(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);_n(ie);try{return ae.apply(ie,arguments)}finally{Sr(ie)}}}function yn(ie){return function(){if(this.curOp)return ie.apply(this,arguments);_n(this);try{return ie.apply(this,arguments)}finally{Sr(this)}}}function Fn(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);_n(ae);try{return ie.apply(this,arguments)}finally{Sr(ae)}}}function ei(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,Zt(Nn,ie))}function Nn(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var ge=+new Date+ie.options.workTime,fe=ar(ie,ae.highlightFrontier),ye=[];ae.iter(fe.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Te){if(fe.line>=ie.display.viewFrom){var We=Te.styles,ut=Te.text.length>ie.options.maxHighlightLength?Yt(ae.mode,fe.state):null,at=Pr(ie,Te,fe,!0);ut&&(fe.state=ut),Te.styles=at.styles;var Lt=Te.styleClasses,dn=at.classes;dn?Te.styleClasses=dn:Lt&&(Te.styleClasses=null);for(var Rt=!We||We.length!=Te.styles.length||Lt!=dn&&(!Lt||!dn||Lt.bgClass!=dn.bgClass||Lt.textClass!=dn.textClass),zn=0;!Rt&&zn<We.length;++zn)Rt=We[zn]!=Te.styles[zn];Rt&&ye.push(fe.line),Te.stateAfter=fe.save(),fe.nextLine()}else Te.text.length<=ie.options.maxHighlightLength&&fn(ie,Te.text,fe),Te.stateAfter=fe.line%5==0?fe.save():null,fe.nextLine();if(+new Date>ge)return ei(ie,ie.options.workDelay),!0}),ae.highlightFrontier=fe.line,ae.modeFrontier=Math.max(ae.modeFrontier,fe.line),ye.length&&Wt(ie,function(){for(var Te=0;Te<ye.length;Te++)rr(ie,ye[Te],"text")})}}var Qn=function(ie,ae,ge){var fe=ie.display;this.viewport=ae,this.visible=Vr(fe,ie.doc,ae),this.editorIsHidden=!fe.wrapper.offsetWidth,this.wrapperHeight=fe.wrapper.clientHeight,this.wrapperWidth=fe.wrapper.clientWidth,this.oldDisplayWidth=ul(ie),this.force=ge,this.dims=fo(ie),this.events=[]};Qn.prototype.signal=function(ie,ae){Wn(ie,ae)&&this.events.push(arguments)},Qn.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)cn.apply(null,this.events[ie])};function Ai(ie){var ae=ie.display;!ae.scrollbarsClipped&&ae.scroller.offsetWidth&&(ae.nativeBarWidth=ae.scroller.offsetWidth-ae.scroller.clientWidth,ae.heightForcer.style.height=Ys(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=Ys(ie)+"px",ae.scrollbarsClipped=!0)}function Pi(ie){if(ie.hasFocus())return null;var ae=et();if(!ae||!Tt(ie.display.lineDiv,ae))return null;var ge={activeElt:ae};if(window.getSelection){var fe=window.getSelection();fe.anchorNode&&fe.extend&&Tt(ie.display.lineDiv,fe.anchorNode)&&(ge.anchorNode=fe.anchorNode,ge.anchorOffset=fe.anchorOffset,ge.focusNode=fe.focusNode,ge.focusOffset=fe.focusOffset)}return ge}function yi(ie){if(!(!ie||!ie.activeElt||ie.activeElt==et())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&Tt(document.body,ie.anchorNode)&&Tt(document.body,ie.focusNode))){var ae=window.getSelection(),ge=document.createRange();ge.setEnd(ie.anchorNode,ie.anchorOffset),ge.collapse(!1),ae.removeAllRanges(),ae.addRange(ge),ae.extend(ie.focusNode,ie.focusOffset)}}function or(ie,ae){var ge=ie.display,fe=ie.doc;if(ae.editorIsHidden)return br(ie),!1;if(!ae.force&&ae.visible.from>=ge.viewFrom&&ae.visible.to<=ge.viewTo&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo)&&ge.renderedView==ge.view&&tr(ie)==0)return!1;pr(ie)&&(br(ie),ae.dims=fo(ie));var ye=fe.first+fe.size,Te=Math.max(ae.visible.from-ie.options.viewportMargin,fe.first),We=Math.min(ye,ae.visible.to+ie.options.viewportMargin);ge.viewFrom<Te&&Te-ge.viewFrom<20&&(Te=Math.max(fe.first,ge.viewFrom)),ge.viewTo>We&&ge.viewTo-We<20&&(We=Math.min(ye,ge.viewTo)),Mn&&(Te=Tr(ie.doc,Te),We=ir(ie.doc,We));var ut=Te!=ge.viewFrom||We!=ge.viewTo||ge.lastWrapHeight!=ae.wrapperHeight||ge.lastWrapWidth!=ae.wrapperWidth;Rr(ie,Te,We),ge.viewOffset=bo(Vt(ie.doc,ge.viewFrom)),ie.display.mover.style.top=ge.viewOffset+"px";var at=tr(ie);if(!ut&&at==0&&!ae.force&&ge.renderedView==ge.view&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo))return!1;var Lt=Pi(ie);return at>4&&(ge.lineDiv.style.display="none"),Xi(ie,ge.updateLineNumbers,ae.dims),at>4&&(ge.lineDiv.style.display=""),ge.renderedView=ge.view,yi(Lt),je(ge.cursorDiv),je(ge.selectionDiv),ge.gutters.style.height=ge.sizer.style.minHeight=0,ut&&(ge.lastWrapHeight=ae.wrapperHeight,ge.lastWrapWidth=ae.wrapperWidth,ei(ie,400)),ge.updateLineNumbers=null,!0}function bi(ie,ae){for(var ge=ae.viewport,fe=!0;;fe=!1){if(!fe||!ie.options.lineWrapping||ae.oldDisplayWidth==ul(ie)){if(ge&&ge.top!=null&&(ge={top:Math.min(ie.doc.height+Su(ie.display)-Mh(ie),ge.top)}),ae.visible=Vr(ie.display,ie.doc,ge),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else fe&&(ae.visible=Vr(ie.display,ie.doc,ge));if(!or(ie,ae))break;Gi(ie);var ye=ou(ie);ur(ie),dh(ie,ye),Xr(ie,ye),ae.force=!1}ae.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(ae.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function Yi(ie,ae){var ge=new Qn(ie,ae);if(or(ie,ge)){Gi(ie),bi(ie,ge);var fe=ou(ie);ur(ie),dh(ie,fe),Xr(ie,fe),ge.finish()}}function Xi(ie,ae,ge){var fe=ie.display,ye=ie.options.lineNumbers,Te=fe.lineDiv,We=Te.firstChild;function ut(wi){var Ti=wi.nextSibling;return Be&&he&&ie.display.currentWheelTarget==wi?wi.style.display="none":wi.parentNode.removeChild(wi),Ti}for(var at=fe.view,Lt=fe.viewFrom,dn=0;dn<at.length;dn++){var Rt=at[dn];if(!Rt.hidden)if(!Rt.node||Rt.node.parentNode!=Te){var zn=Ol(ie,Rt,Lt,ge);Te.insertBefore(zn,We)}else{for(;We!=Rt.node;)We=ut(We);var On=ye&&ae!=null&&ae<=Lt&&Rt.lineNumber;Rt.changes&&(kt(Rt.changes,"gutter")>-1&&(On=!1),Ka(ie,Rt,Lt,ge)),On&&(je(Rt.lineNumber),Rt.lineNumber.appendChild(document.createTextNode(ii(ie.options,Lt)))),We=Rt.node.nextSibling}Lt+=Rt.size}for(;We;)We=ut(We)}function Er(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function Xr(ie,ae){ie.display.sizer.style.minHeight=ae.docHeight+"px",ie.display.heightForcer.style.top=ae.docHeight+"px",ie.display.gutters.style.height=ae.docHeight+ie.display.barHeight+Ys(ie)+"px"}function uo(ie){var ae=ie.display,ge=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var fe=Wo(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,ye=ae.gutters.offsetWidth,Te=fe+"px",We=0;We<ge.length;We++)if(!ge[We].hidden){ie.options.fixedGutter&&(ge[We].gutter&&(ge[We].gutter.style.left=Te),ge[We].gutterBackground&&(ge[We].gutterBackground.style.left=Te));var ut=ge[We].alignable;if(ut)for(var at=0;at<ut.length;at++)ut[at].style.left=Te}ie.options.fixedGutter&&(ae.gutters.style.left=fe+ye+"px")}}function pr(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,ge=ii(ie.options,ae.first+ae.size-1),fe=ie.display;if(ge.length!=fe.lineNumChars){var ye=fe.measure.appendChild($e("div",[$e("div",ge)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Te=ye.firstChild.offsetWidth,We=ye.offsetWidth-Te;return fe.lineGutter.style.width="",fe.lineNumInnerWidth=Math.max(Te,fe.lineGutter.offsetWidth-We)+1,fe.lineNumWidth=fe.lineNumInnerWidth+We,fe.lineNumChars=fe.lineNumInnerWidth?ge.length:-1,fe.lineGutter.style.width=fe.lineNumWidth+"px",Er(ie.display),!0}return!1}function Ur(ie,ae){for(var ge=[],fe=!1,ye=0;ye<ie.length;ye++){var Te=ie[ye],We=null;if(typeof Te!="string"&&(We=Te.style,Te=Te.className),Te=="CodeMirror-linenumbers")if(ae)fe=!0;else continue;ge.push({className:Te,style:We})}return ae&&!fe&&ge.push({className:"CodeMirror-linenumbers",style:null}),ge}function jo(ie){var ae=ie.gutters,ge=ie.gutterSpecs;je(ae),ie.lineGutter=null;for(var fe=0;fe<ge.length;++fe){var ye=ge[fe],Te=ye.className,We=ye.style,ut=ae.appendChild($e("div",null,"CodeMirror-gutter "+Te));We&&(ut.style.cssText=We),Te=="CodeMirror-linenumbers"&&(ie.lineGutter=ut,ut.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=ge.length?"":"none",Er(ie)}function Cr(ie){jo(ie.display),Ar(ie),uo(ie)}function _r(ie,ae,ge,fe){var ye=this;this.input=ge,ye.scrollbarFiller=$e("div",null,"CodeMirror-scrollbar-filler"),ye.scrollbarFiller.setAttribute("cm-not-content","true"),ye.gutterFiller=$e("div",null,"CodeMirror-gutter-filler"),ye.gutterFiller.setAttribute("cm-not-content","true"),ye.lineDiv=ft("div",null,"CodeMirror-code"),ye.selectionDiv=$e("div",null,null,"position: relative; z-index: 1"),ye.cursorDiv=$e("div",null,"CodeMirror-cursors"),ye.measure=$e("div",null,"CodeMirror-measure"),ye.lineMeasure=$e("div",null,"CodeMirror-measure"),ye.lineSpace=ft("div",[ye.measure,ye.lineMeasure,ye.selectionDiv,ye.cursorDiv,ye.lineDiv],null,"position: relative; outline: none");var Te=ft("div",[ye.lineSpace],"CodeMirror-lines");ye.mover=$e("div",[Te],null,"position: relative"),ye.sizer=$e("div",[ye.mover],"CodeMirror-sizer"),ye.sizerWidth=null,ye.heightForcer=$e("div",null,null,"position: absolute; height: "+un+"px; width: 1px;"),ye.gutters=$e("div",null,"CodeMirror-gutters"),ye.lineGutter=null,ye.scroller=$e("div",[ye.sizer,ye.heightForcer,ye.gutters],"CodeMirror-scroll"),ye.scroller.setAttribute("tabIndex","-1"),ye.wrapper=$e("div",[ye.scrollbarFiller,ye.gutterFiller,ye.scroller],"CodeMirror"),_e&&Ke<8&&(ye.gutters.style.zIndex=-1,ye.scroller.style.paddingRight=0),!Be&&!(ce&&ee)&&(ye.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(ye.wrapper):ie(ye.wrapper)),ye.viewFrom=ye.viewTo=ae.first,ye.reportedViewFrom=ye.reportedViewTo=ae.first,ye.view=[],ye.renderedView=null,ye.externalMeasured=null,ye.viewOffset=0,ye.lastWrapHeight=ye.lastWrapWidth=0,ye.updateLineNumbers=null,ye.nativeBarWidth=ye.barHeight=ye.barWidth=0,ye.scrollbarsClipped=!1,ye.lineNumWidth=ye.lineNumInnerWidth=ye.lineNumChars=null,ye.alignWidgets=!1,ye.cachedCharWidth=ye.cachedTextHeight=ye.cachedPaddingH=null,ye.maxLine=null,ye.maxLineLength=0,ye.maxLineChanged=!1,ye.wheelDX=ye.wheelDY=ye.wheelStartX=ye.wheelStartY=null,ye.shift=!1,ye.selForContextMenu=null,ye.activeTouch=null,ye.gutterSpecs=Ur(fe.gutters,fe.lineNumbers),jo(ye),ge.init(ye)}var xr=0,Vi=null;_e?Vi=-.53:ce?Vi=15:ct?Vi=-.7:Et&&(Vi=-1/3);function Nr(ie){var ae=ie.wheelDeltaX,ge=ie.wheelDeltaY;return ae==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ae=ie.detail),ge==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?ge=ie.detail:ge==null&&(ge=ie.wheelDelta),{x:ae,y:ge}}function io(ie){var ae=Nr(ie);return ae.x*=Vi,ae.y*=Vi,ae}function So(ie,ae){var ge=Nr(ae),fe=ge.x,ye=ge.y,Te=ie.display,We=Te.scroller,ut=We.scrollWidth>We.clientWidth,at=We.scrollHeight>We.clientHeight;if(fe&&ut||ye&&at){if(ye&&he&&Be){e:for(var Lt=ae.target,dn=Te.view;Lt!=We;Lt=Lt.parentNode)for(var Rt=0;Rt<dn.length;Rt++)if(dn[Rt].node==Lt){ie.display.currentWheelTarget=Lt;break e}}if(fe&&!ce&&!Ze&&Vi!=null){ye&&at&&Nh(ie,Math.max(0,We.scrollTop+ye*Vi)),_u(ie,Math.max(0,We.scrollLeft+fe*Vi)),(!ye||ye&&at)&&Jn(ae),Te.wheelStartX=null;return}if(ye&&Vi!=null){var zn=ye*Vi,On=ie.doc.scrollTop,wi=On+Te.wrapper.clientHeight;zn<0?On=Math.max(0,On+zn-50):wi=Math.min(ie.doc.height,wi+zn+50),Yi(ie,{top:On,bottom:wi})}xr<20&&(Te.wheelStartX==null?(Te.wheelStartX=We.scrollLeft,Te.wheelStartY=We.scrollTop,Te.wheelDX=fe,Te.wheelDY=ye,setTimeout(function(){if(Te.wheelStartX!=null){var Ti=We.scrollLeft-Te.wheelStartX,Hi=We.scrollTop-Te.wheelStartY,vr=Hi&&Te.wheelDY&&Hi/Te.wheelDY||Ti&&Te.wheelDX&&Ti/Te.wheelDX;Te.wheelStartX=Te.wheelStartY=null,vr&&(Vi=(Vi*xr+vr)/(xr+1),++xr)}},200)):(Te.wheelDX+=fe,Te.wheelDY+=ye))}}var wo=function(ie,ae){this.ranges=ie,this.primIndex=ae};wo.prototype.primary=function(){return this.ranges[this.primIndex]},wo.prototype.equals=function(ie){if(ie==this)return!0;if(ie.primIndex!=this.primIndex||ie.ranges.length!=this.ranges.length)return!1;for(var ae=0;ae<this.ranges.length;ae++){var ge=this.ranges[ae],fe=ie.ranges[ae];if(!hi(ge.anchor,fe.anchor)||!hi(ge.head,fe.head))return!1}return!0},wo.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new mr(fi(this.ranges[ae].anchor),fi(this.ranges[ae].head));return new wo(ie,this.primIndex)},wo.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},wo.prototype.contains=function(ie,ae){ae||(ae=ie);for(var ge=0;ge<this.ranges.length;ge++){var fe=this.ranges[ge];if(Jt(ae,fe.from())>=0&&Jt(ie,fe.to())<=0)return ge}return-1};var mr=function(ie,ae){this.anchor=ie,this.head=ae};mr.prototype.from=function(){return ni(this.anchor,this.head)},mr.prototype.to=function(){return ui(this.anchor,this.head)},mr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Zo(ie,ae,ge){var fe=ie&&ie.options.selectionsMayTouch,ye=ae[ge];ae.sort(function(zn,On){return Jt(zn.from(),On.from())}),ge=kt(ae,ye);for(var Te=1;Te<ae.length;Te++){var We=ae[Te],ut=ae[Te-1],at=Jt(ut.to(),We.from());if(fe&&!We.empty()?at>0:at>=0){var Lt=ni(ut.from(),We.from()),dn=ui(ut.to(),We.to()),Rt=ut.empty()?We.from()==We.head:ut.from()==ut.head;Te<=ge&&--ge,ae.splice(--Te,2,new mr(Rt?dn:Lt,Rt?Lt:dn))}}return new wo(ae,ge)}function Ko(ie,ae){return new wo([new mr(ie,ae||ie)],0)}function Pa(ie){return ie.text?Gt(ie.from.line+ie.text.length-1,gt(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function sa(ie,ae){if(Jt(ie,ae.from)<0)return ie;if(Jt(ie,ae.to)<=0)return Pa(ae);var ge=ie.line+ae.text.length-(ae.to.line-ae.from.line)-1,fe=ie.ch;return ie.line==ae.to.line&&(fe+=Pa(ae).ch-ae.to.ch),Gt(ge,fe)}function os(ie,ae){for(var ge=[],fe=0;fe<ie.sel.ranges.length;fe++){var ye=ie.sel.ranges[fe];ge.push(new mr(sa(ye.anchor,ae),sa(ye.head,ae)))}return Zo(ie.cm,ge,ie.sel.primIndex)}function ts(ie,ae,ge){return ie.line==ae.line?Gt(ge.line,ie.ch-ae.ch+ge.ch):Gt(ge.line+(ie.line-ae.line),ie.ch)}function Go(ie,ae,ge){for(var fe=[],ye=Gt(ie.first,0),Te=ye,We=0;We<ae.length;We++){var ut=ae[We],at=ts(ut.from,ye,Te),Lt=ts(Pa(ut),ye,Te);if(ye=ut.to,Te=Lt,ge=="around"){var dn=ie.sel.ranges[We],Rt=Jt(dn.head,dn.anchor)<0;fe[We]=new mr(Rt?Lt:at,Rt?at:Lt)}else fe[We]=new mr(at,at)}return new wo(fe,ie.sel.primIndex)}function ao(ie){ie.doc.mode=At(ie.options,ie.doc.modeOption),pa(ie)}function pa(ie){ie.doc.iter(function(ae){ae.stateAfter&&(ae.stateAfter=null),ae.styles&&(ae.styles=null)}),ie.doc.modeFrontier=ie.doc.highlightFrontier=ie.doc.first,ei(ie,100),ie.state.modeGen++,ie.curOp&&Ar(ie)}function as(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&gt(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Ua(ie,ae,ge,fe){function ye(Kr){return ge?ge[Kr]:null}function Te(Kr,kr,ro){na(Kr,kr,ro,fe),Di(Kr,"change",Kr,ae)}function We(Kr,kr){for(var ro=[],Ho=Kr;Ho<kr;++Ho)ro.push(new vo(Lt[Ho],ye(Ho),fe));return ro}var ut=ae.from,at=ae.to,Lt=ae.text,dn=Vt(ie,ut.line),Rt=Vt(ie,at.line),zn=gt(Lt),On=ye(Lt.length-1),wi=at.line-ut.line;if(ae.full)ie.insert(0,We(0,Lt.length)),ie.remove(Lt.length,ie.size-Lt.length);else if(as(ie,ae)){var Ti=We(0,Lt.length-1);Te(Rt,Rt.text,On),wi&&ie.remove(ut.line,wi),Ti.length&&ie.insert(ut.line,Ti)}else if(dn==Rt)if(Lt.length==1)Te(dn,dn.text.slice(0,ut.ch)+zn+dn.text.slice(at.ch),On);else{var Hi=We(1,Lt.length-1);Hi.push(new vo(zn+dn.text.slice(at.ch),On,fe)),Te(dn,dn.text.slice(0,ut.ch)+Lt[0],ye(0)),ie.insert(ut.line+1,Hi)}else if(Lt.length==1)Te(dn,dn.text.slice(0,ut.ch)+Lt[0]+Rt.text.slice(at.ch),ye(0)),ie.remove(ut.line+1,wi);else{Te(dn,dn.text.slice(0,ut.ch)+Lt[0],ye(0)),Te(Rt,zn+Rt.text.slice(at.ch),On);var vr=We(1,Lt.length-1);wi>1&&ie.remove(ut.line+1,wi-1),ie.insert(ut.line+1,vr)}Di(ie,"change",ie,ae)}function Ms(ie,ae,ge){function fe(ye,Te,We){if(ye.linked)for(var ut=0;ut<ye.linked.length;++ut){var at=ye.linked[ut];if(at.doc!=Te){var Lt=We&&at.sharedHist;ge&&!Lt||(ae(at.doc,Lt),fe(at.doc,ye,Lt))}}}fe(ie,null,!0)}function Co(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,Zi(ie),ao(ie),po(ie),ie.options.lineWrapping||No(ie),ie.options.mode=ae.modeOption,Ar(ie)}function po(ie){(ie.doc.direction=="rtl"?bt:Ie)(ie.display.lineDiv,"CodeMirror-rtl")}function Eo(ie){Wt(ie,function(){po(ie),Ar(ie)})}function Qr(ie){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=ie||1}function ya(ie,ae){var ge={from:fi(ae.from),to:Pa(ae),text:rn(ie,ae.from,ae.to)};return hl(ie,ge,ae.from.line,ae.to.line+1),Ms(ie,function(fe){return hl(fe,ge,ae.from.line,ae.to.line+1)},!0),ge}function qr(ie){for(;ie.length;){var ae=gt(ie);if(ae.ranges)ie.pop();else break}}function zo(ie,ae){if(ae)return qr(ie.done),gt(ie.done);if(ie.done.length&&!gt(ie.done).ranges)return gt(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),gt(ie.done)}function ha(ie,ae,ge,fe){var ye=ie.history;ye.undone.length=0;var Te=+new Date,We,ut;if((ye.lastOp==fe||ye.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&ye.lastModTime>Te-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(We=zo(ye,ye.lastOp==fe)))ut=gt(We.changes),Jt(ae.from,ae.to)==0&&Jt(ae.from,ut.to)==0?ut.to=Pa(ae):We.changes.push(ya(ie,ae));else{var at=gt(ye.done);for((!at||!at.ranges)&&Ns(ie.sel,ye.done),We={changes:[ya(ie,ae)],generation:ye.generation},ye.done.push(We);ye.done.length>ye.undoDepth;)ye.done.shift(),ye.done[0].ranges||ye.done.shift()}ye.done.push(ge),ye.generation=++ye.maxGeneration,ye.lastModTime=ye.lastSelTime=Te,ye.lastOp=ye.lastSelOp=fe,ye.lastOrigin=ye.lastSelOrigin=ae.origin,ut||cn(ie,"historyAdded")}function ca(ie,ae,ge,fe){var ye=ae.charAt(0);return ye=="*"||ye=="+"&&ge.ranges.length==fe.ranges.length&&ge.somethingSelected()==fe.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Vs(ie,ae,ge,fe){var ye=ie.history,Te=fe&&fe.origin;ge==ye.lastSelOp||Te&&ye.lastSelOrigin==Te&&(ye.lastModTime==ye.lastSelTime&&ye.lastOrigin==Te||ca(ie,Te,gt(ye.done),ae))?ye.done[ye.done.length-1]=ae:Ns(ae,ye.done),ye.lastSelTime=+new Date,ye.lastSelOrigin=Te,ye.lastSelOp=ge,fe&&fe.clearRedo!==!1&&qr(ye.undone)}function Ns(ie,ae){var ge=gt(ae);ge&&ge.ranges&&ge.equals(ie)||ae.push(ie)}function hl(ie,ae,ge,fe){var ye=ae["spans_"+ie.id],Te=0;ie.iter(Math.max(ie.first,ge),Math.min(ie.first+ie.size,fe),function(We){We.markedSpans&&((ye||(ye=ae["spans_"+ie.id]={}))[Te]=We.markedSpans),++Te})}function wa(ie){if(!ie)return null;for(var ae,ge=0;ge<ie.length;++ge)ie[ge].marker.explicitlyCleared?ae||(ae=ie.slice(0,ge)):ae&&ae.push(ie[ge]);return ae?ae.length?ae:null:ie}function Us(ie,ae){var ge=ae["spans_"+ie.id];if(!ge)return null;for(var fe=[],ye=0;ye<ae.text.length;++ye)fe.push(wa(ge[ye]));return fe}function ws(ie,ae){var ge=Us(ie,ae),fe=er(ie,ae);if(!ge)return fe;if(!fe)return ge;for(var ye=0;ye<ge.length;++ye){var Te=ge[ye],We=fe[ye];if(Te&&We)e:for(var ut=0;ut<We.length;++ut){for(var at=We[ut],Lt=0;Lt<Te.length;++Lt)if(Te[Lt].marker==at.marker)continue e;Te.push(at)}else We&&(ge[ye]=We)}return ge}function Rs(ie,ae,ge){for(var fe=[],ye=0;ye<ie.length;++ye){var Te=ie[ye];if(Te.ranges){fe.push(ge?wo.prototype.deepCopy.call(Te):Te);continue}var We=Te.changes,ut=[];fe.push({changes:ut});for(var at=0;at<We.length;++at){var Lt=We[at],dn=void 0;if(ut.push({from:Lt.from,to:Lt.to,text:Lt.text}),ae)for(var Rt in Lt)(dn=Rt.match(/^spans_(\d+)$/))&&kt(ae,Number(dn[1]))>-1&&(gt(ut)[Rt]=Lt[Rt],delete Lt[Rt])}}return fe}function fh(ie,ae,ge,fe){if(fe){var ye=ie.anchor;if(ge){var Te=Jt(ae,ye)<0;Te!=Jt(ge,ye)<0?(ye=ae,ae=ge):Te!=Jt(ae,ge)<0&&(ae=ge)}return new mr(ye,ae)}else return new mr(ge||ae,ae)}function Ca(ie,ae,ge,fe,ye){ye==null&&(ye=ie.cm&&(ie.cm.display.shift||ie.extend)),Ha(ie,new wo([fh(ie.sel.primary(),ae,ge,ye)],0),fe)}function Ta(ie,ae,ge){for(var fe=[],ye=ie.cm&&(ie.cm.display.shift||ie.extend),Te=0;Te<ie.sel.ranges.length;Te++)fe[Te]=fh(ie.sel.ranges[Te],ae[Te],null,ye);var We=Zo(ie.cm,fe,ie.sel.primIndex);Ha(ie,We,ge)}function za(ie,ae,ge,fe){var ye=ie.sel.ranges.slice(0);ye[ae]=ge,Ha(ie,Zo(ie.cm,ye,ie.sel.primIndex),fe)}function ms(ie,ae,ge,fe){Ha(ie,Ko(ae,ge),fe)}function js(ie,ae,ge){var fe={ranges:ae.ranges,update:function(ye){this.ranges=[];for(var Te=0;Te<ye.length;Te++)this.ranges[Te]=new mr(li(ie,ye[Te].anchor),li(ie,ye[Te].head))},origin:ge&&ge.origin};return cn(ie,"beforeSelectionChange",ie,fe),ie.cm&&cn(ie.cm,"beforeSelectionChange",ie.cm,fe),fe.ranges!=ae.ranges?Zo(ie.cm,fe.ranges,fe.ranges.length-1):ae}function ra(ie,ae,ge){var fe=ie.history.done,ye=gt(fe);ye&&ye.ranges?(fe[fe.length-1]=ae,zs(ie,ae,ge)):Ha(ie,ae,ge)}function Ha(ie,ae,ge){zs(ie,ae,ge),Vs(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,ge)}function zs(ie,ae,ge){(Wn(ie,"beforeSelectionChange")||ie.cm&&Wn(ie.cm,"beforeSelectionChange"))&&(ae=js(ie,ae,ge));var fe=ge&&ge.bias||(Jt(ae.primary().head,ie.sel.primary().head)<0?-1:1);jl(ie,Yl(ie,ae,fe,!0)),!(ge&&ge.scroll===!1)&&ie.cm&&ru(ie.cm)}function jl(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,ti(ie.cm)),Di(ie,"cursorActivity",ie))}function au(ie){jl(ie,Yl(ie,ie.sel,null,!1))}function Yl(ie,ae,ge,fe){for(var ye,Te=0;Te<ae.ranges.length;Te++){var We=ae.ranges[Te],ut=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Te],at=Cu(ie,We.anchor,ut&&ut.anchor,ge,fe),Lt=Cu(ie,We.head,ut&&ut.head,ge,fe);(ye||at!=We.anchor||Lt!=We.head)&&(ye||(ye=ae.ranges.slice(0,Te)),ye[Te]=new mr(at,Lt))}return ye?Zo(ie.cm,ye,ae.primIndex):ae}function wu(ie,ae,ge,fe,ye){var Te=Vt(ie,ae.line);if(Te.markedSpans)for(var We=0;We<Te.markedSpans.length;++We){var ut=Te.markedSpans[We],at=ut.marker,Lt="selectLeft"in at?!at.selectLeft:at.inclusiveLeft,dn="selectRight"in at?!at.selectRight:at.inclusiveRight;if((ut.from==null||(Lt?ut.from<=ae.ch:ut.from<ae.ch))&&(ut.to==null||(dn?ut.to>=ae.ch:ut.to>ae.ch))){if(ye&&(cn(at,"beforeCursorEnter"),at.explicitlyCleared))if(Te.markedSpans){--We;continue}else break;if(!at.atomic)continue;if(ge){var Rt=at.find(fe<0?1:-1),zn=void 0;if((fe<0?dn:Lt)&&(Rt=su(ie,Rt,-fe,Rt&&Rt.line==ae.line?Te:null)),Rt&&Rt.line==ae.line&&(zn=Jt(Rt,ge))&&(fe<0?zn<0:zn>0))return wu(ie,Rt,ae,fe,ye)}var On=at.find(fe<0?-1:1);return(fe<0?Lt:dn)&&(On=su(ie,On,fe,On.line==ae.line?Te:null)),On?wu(ie,On,ae,fe,ye):null}}return ae}function Cu(ie,ae,ge,fe,ye){var Te=fe||1,We=wu(ie,ae,ge,Te,ye)||!ye&&wu(ie,ae,ge,Te,!0)||wu(ie,ae,ge,-Te,ye)||!ye&&wu(ie,ae,ge,-Te,!0);return We||(ie.cantEdit=!0,Gt(ie.first,0))}function su(ie,ae,ge,fe){return ge<0&&ae.ch==0?ae.line>ie.first?li(ie,Gt(ae.line-1)):null:ge>0&&ae.ch==(fe||Vt(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?Gt(ae.line+1,0):null:new Gt(ae.line,ae.ch+ge)}function ba(ie){ie.setSelection(Gt(ie.firstLine(),0),Gt(ie.lastLine()),Ft)}function Xs(ie,ae,ge){var fe={canceled:!1,from:ae.from,to:ae.to,text:ae.text,origin:ae.origin,cancel:function(){return fe.canceled=!0}};return ge&&(fe.update=function(ye,Te,We,ut){ye&&(fe.from=li(ie,ye)),Te&&(fe.to=li(ie,Te)),We&&(fe.text=We),ut!==void 0&&(fe.origin=ut)}),cn(ie,"beforeChange",ie,fe),ie.cm&&cn(ie.cm,"beforeChange",ie.cm,fe),fe.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:fe.from,to:fe.to,text:fe.text,origin:fe.origin}}function fs(ie,ae,ge){if(ie.cm){if(!ie.cm.curOp)return bn(ie.cm,fs)(ie,ae,ge);if(ie.cm.state.suppressEdits)return}if(!((Wn(ie,"beforeChange")||ie.cm&&Wn(ie.cm,"beforeChange"))&&(ae=Xs(ie,ae,!0),!ae))){var fe=dr&&!ge&&no(ie,ae.from,ae.to);if(fe)for(var ye=fe.length-1;ye>=0;--ye)Wa(ie,{from:fe[ye].from,to:fe[ye].to,text:ye?[""]:ae.text,origin:ae.origin});else Wa(ie,ae)}}function Wa(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&Jt(ae.from,ae.to)==0)){var ge=os(ie,ae);ha(ie,ae,ge,ie.cm?ie.cm.curOp.id:NaN),Eu(ie,ae,ge,er(ie,ae));var fe=[];Ms(ie,function(ye,Te){!Te&&kt(fe,ye.history)==-1&&(Ya(ye.history,ae),fe.push(ye.history)),Eu(ye,ae,null,er(ye,ae))})}}function lu(ie,ae,ge){var fe=ie.cm&&ie.cm.state.suppressEdits;if(!(fe&&!ge)){for(var ye=ie.history,Te,We=ie.sel,ut=ae=="undo"?ye.done:ye.undone,at=ae=="undo"?ye.undone:ye.done,Lt=0;Lt<ut.length&&(Te=ut[Lt],!(ge?Te.ranges&&!Te.equals(ie.sel):!Te.ranges));Lt++);if(Lt!=ut.length){for(ye.lastOrigin=ye.lastSelOrigin=null;;)if(Te=ut.pop(),Te.ranges){if(Ns(Te,at),ge&&!Te.equals(ie.sel)){Ha(ie,Te,{clearRedo:!1});return}We=Te}else if(fe){ut.push(Te);return}else break;var dn=[];Ns(We,at),at.push({changes:dn,generation:ye.generation}),ye.generation=Te.generation||++ye.maxGeneration;for(var Rt=Wn(ie,"beforeChange")||ie.cm&&Wn(ie.cm,"beforeChange"),zn=function(Ti){var Hi=Te.changes[Ti];if(Hi.origin=ae,Rt&&!Xs(ie,Hi,!1))return ut.length=0,{};dn.push(ya(ie,Hi));var vr=Ti?os(ie,Hi):gt(ut);Eu(ie,Hi,vr,ws(ie,Hi)),!Ti&&ie.cm&&ie.cm.scrollIntoView({from:Hi.from,to:Pa(Hi)});var Kr=[];Ms(ie,function(kr,ro){!ro&&kt(Kr,kr.history)==-1&&(Ya(kr.history,Hi),Kr.push(kr.history)),Eu(kr,Hi,null,ws(kr,Hi))})},On=Te.changes.length-1;On>=0;--On){var wi=zn(On);if(wi)return wi.v}}}}function kh(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new wo(En(ie.sel.ranges,function(ye){return new mr(Gt(ye.anchor.line+ae,ye.anchor.ch),Gt(ye.head.line+ae,ye.head.ch))}),ie.sel.primIndex),ie.cm)){Ar(ie.cm,ie.first,ie.first-ae,ae);for(var ge=ie.cm.display,fe=ge.viewFrom;fe<ge.viewTo;fe++)rr(ie.cm,fe,"gutter")}}function Eu(ie,ae,ge,fe){if(ie.cm&&!ie.cm.curOp)return bn(ie.cm,Eu)(ie,ae,ge,fe);if(ae.to.line<ie.first){kh(ie,ae.text.length-1-(ae.to.line-ae.from.line));return}if(!(ae.from.line>ie.lastLine())){if(ae.from.line<ie.first){var ye=ae.text.length-1-(ie.first-ae.from.line);kh(ie,ye),ae={from:Gt(ie.first,0),to:Gt(ae.to.line+ye,ae.to.ch),text:[gt(ae.text)],origin:ae.origin}}var Te=ie.lastLine();ae.to.line>Te&&(ae={from:ae.from,to:Gt(Te,Vt(ie,Te).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=rn(ie,ae.from,ae.to),ge||(ge=os(ie,ae)),ie.cm?th(ie.cm,ae,fe):Ua(ie,ae,fe),zs(ie,ge,Ft),ie.cantEdit&&Cu(ie,Gt(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function th(ie,ae,ge){var fe=ie.doc,ye=ie.display,Te=ae.from,We=ae.to,ut=!1,at=Te.line;ie.options.lineWrapping||(at=St(yr(Vt(fe,Te.line))),fe.iter(at,We.line+1,function(On){if(On==ye.maxLine)return ut=!0,!0})),fe.sel.contains(ae.from,ae.to)>-1&&ti(ie),Ua(fe,ae,ge,co(ie)),ie.options.lineWrapping||(fe.iter(at,Te.line+ae.text.length,function(On){var wi=ta(On);wi>ye.maxLineLength&&(ye.maxLine=On,ye.maxLineLength=wi,ye.maxLineChanged=!0,ut=!1)}),ut&&(ie.curOp.updateMaxLine=!0)),nr(fe,Te.line),ei(ie,400);var Lt=ae.text.length-(We.line-Te.line)-1;ae.full?Ar(ie):Te.line==We.line&&ae.text.length==1&&!as(ie.doc,ae)?rr(ie,Te.line,"text"):Ar(ie,Te.line,We.line+1,Lt);var dn=Wn(ie,"changes"),Rt=Wn(ie,"change");if(Rt||dn){var zn={from:Te,to:We,text:ae.text,removed:ae.removed,origin:ae.origin};Rt&&Di(ie,"change",ie,zn),dn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(zn)}ie.display.selForContextMenu=null}function gh(ie,ae,ge,fe,ye){var Te;fe||(fe=ge),Jt(fe,ge)<0&&(Te=[fe,ge],ge=Te[0],fe=Te[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),fs(ie,{from:ge,to:fe,text:ae,origin:ye})}function Xl(ie,ae,ge,fe){ge<ie.line?ie.line+=fe:ae<ie.line&&(ie.line=ae,ie.ch=0)}function Sa(ie,ae,ge,fe){for(var ye=0;ye<ie.length;++ye){var Te=ie[ye],We=!0;if(Te.ranges){Te.copied||(Te=ie[ye]=Te.deepCopy(),Te.copied=!0);for(var ut=0;ut<Te.ranges.length;ut++)Xl(Te.ranges[ut].anchor,ae,ge,fe),Xl(Te.ranges[ut].head,ae,ge,fe);continue}for(var at=0;at<Te.changes.length;++at){var Lt=Te.changes[at];if(ge<Lt.from.line)Lt.from=Gt(Lt.from.line+fe,Lt.from.ch),Lt.to=Gt(Lt.to.line+fe,Lt.to.ch);else if(ae<=Lt.to.line){We=!1;break}}We||(ie.splice(0,ye+1),ye=0)}}function Ya(ie,ae){var ge=ae.from.line,fe=ae.to.line,ye=ae.text.length-(fe-ge)-1;Sa(ie.done,ge,fe,ye),Sa(ie.undone,ge,fe,ye)}function ks(ie,ae,ge,fe){var ye=ae,Te=ae;return typeof ae=="number"?Te=Vt(ie,ci(ie,ae)):ye=St(ae),ye==null?null:(fe(Te,ye)&&ie.cm&&rr(ie.cm,ye,ge),Te)}function Xa(ie){this.lines=ie,this.parent=null;for(var ae=0,ge=0;ge<ie.length;++ge)ie[ge].parent=this,ae+=ie[ge].height;this.height=ae}Xa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var ge=ie,fe=ie+ae;ge<fe;++ge){var ye=this.lines[ge];this.height-=ye.height,ia(ye),Di(ye,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,ge){this.height+=ge,this.lines=this.lines.slice(0,ie).concat(ae).concat(this.lines.slice(ie));for(var fe=0;fe<ae.length;++fe)ae[fe].parent=this},iterN:function(ie,ae,ge){for(var fe=ie+ae;ie<fe;++ie)if(ge(this.lines[ie]))return!0}};function fa(ie){this.children=ie;for(var ae=0,ge=0,fe=0;fe<ie.length;++fe){var ye=ie[fe];ae+=ye.chunkSize(),ge+=ye.height,ye.parent=this}this.size=ae,this.height=ge,this.parent=null}fa.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var ge=0;ge<this.children.length;++ge){var fe=this.children[ge],ye=fe.chunkSize();if(ie<ye){var Te=Math.min(ae,ye-ie),We=fe.height;if(fe.removeInner(ie,Te),this.height-=We-fe.height,ye==Te&&(this.children.splice(ge--,1),fe.parent=null),(ae-=Te)==0)break;ie=0}else ie-=ye}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof Xa))){var ut=[];this.collapse(ut),this.children=[new Xa(ut)],this.children[0].parent=this}},collapse:function(ie){for(var ae=0;ae<this.children.length;++ae)this.children[ae].collapse(ie)},insertInner:function(ie,ae,ge){this.size+=ae.length,this.height+=ge;for(var fe=0;fe<this.children.length;++fe){var ye=this.children[fe],Te=ye.chunkSize();if(ie<=Te){if(ye.insertInner(ie,ae,ge),ye.lines&&ye.lines.length>50){for(var We=ye.lines.length%25+25,ut=We;ut<ye.lines.length;){var at=new Xa(ye.lines.slice(ut,ut+=25));ye.height-=at.height,this.children.splice(++fe,0,at),at.parent=this}ye.lines=ye.lines.slice(0,We),this.maybeSpill()}break}ie-=Te}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),ge=new fa(ae);if(ie.parent){ie.size-=ge.size,ie.height-=ge.height;var ye=kt(ie.parent.children,ie);ie.parent.children.splice(ye+1,0,ge)}else{var fe=new fa(ie.children);fe.parent=ie,ie.children=[fe,ge],ie=fe}ge.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,ge){for(var fe=0;fe<this.children.length;++fe){var ye=this.children[fe],Te=ye.chunkSize();if(ie<Te){var We=Math.min(ae,Te-ie);if(ye.iterN(ie,We,ge))return!0;if((ae-=We)==0)break;ie=0}else ie-=Te}}};var _s=function(ie,ae,ge){if(ge)for(var fe in ge)ge.hasOwnProperty(fe)&&(this[fe]=ge[fe]);this.doc=ie,this.node=ae};_s.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,ge=this.line,fe=St(ge);if(!(fe==null||!ae)){for(var ye=0;ye<ae.length;++ye)ae[ye]==this&&ae.splice(ye--,1);ae.length||(ge.widgets=null);var Te=nl(this);kn(ge,Math.max(0,ge.height-Te)),ie&&(Wt(ie,function(){zl(ie,ge,-Te),rr(ie,fe,"widget")}),Di(ie,"lineWidgetCleared",ie,this,fe))}},_s.prototype.changed=function(){var ie=this,ae=this.height,ge=this.doc.cm,fe=this.line;this.height=null;var ye=nl(this)-ae;ye&&(Xn(this.doc,fe)||kn(fe,fe.height+ye),ge&&Wt(ge,function(){ge.curOp.forceUpdate=!0,zl(ge,fe,ye),Di(ge,"lineWidgetChanged",ge,ie,St(fe))}))},Zn(_s);function zl(ie,ae,ge){bo(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Bh(ie,ge)}function Zu(ie,ae,ge,fe){var ye=new _s(ie,ge,fe),Te=ie.cm;return Te&&ye.noHScroll&&(Te.display.alignWidgets=!0),ks(ie,ae,"widget",function(We){var ut=We.widgets||(We.widgets=[]);if(ye.insertAt==null?ut.push(ye):ut.splice(Math.min(ut.length-1,Math.max(0,ye.insertAt)),0,ye),ye.line=We,Te&&!Xn(ie,We)){var at=bo(We)<ie.scrollTop;kn(We,We.height+nl(ye)),at&&Bh(Te,ye.height),Te.curOp.forceUpdate=!0}return!0}),Te&&Di(Te,"lineWidgetAdded",Te,ye,typeof ae=="number"?ae:St(ae)),ye}var pf=0,qt=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++pf};qt.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&_n(ie),Wn(this,"clear")){var ge=this.find();ge&&Di(this,"clear",ge.from,ge.to)}for(var fe=null,ye=null,Te=0;Te<this.lines.length;++Te){var We=this.lines[Te],ut=so(We.markedSpans,this);ie&&!this.collapsed?rr(ie,St(We),"text"):ie&&(ut.to!=null&&(ye=St(We)),ut.from!=null&&(fe=St(We))),We.markedSpans=Bi(We.markedSpans,ut),ut.from==null&&this.collapsed&&!Xn(this.doc,We)&&ie&&kn(We,zr(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var at=0;at<this.lines.length;++at){var Lt=yr(this.lines[at]),dn=ta(Lt);dn>ie.display.maxLineLength&&(ie.display.maxLine=Lt,ie.display.maxLineLength=dn,ie.display.maxLineChanged=!0)}fe!=null&&ie&&this.collapsed&&Ar(ie,fe,ye+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&au(ie.doc)),ie&&Di(ie,"markerCleared",ie,this,fe,ye),ae&&Sr(ie),this.parent&&this.parent.clear()}},qt.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var ge,fe,ye=0;ye<this.lines.length;++ye){var Te=this.lines[ye],We=so(Te.markedSpans,this);if(We.from!=null&&(ge=Gt(ae?Te:St(Te),We.from),ie==-1))return ge;if(We.to!=null&&(fe=Gt(ae?Te:St(Te),We.to),ie==1))return fe}return ge&&{from:ge,to:fe}},qt.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),ge=this,fe=this.doc.cm;!ae||!fe||Wt(fe,function(){var ye=ae.line,Te=St(ae.line),We=Ru(fe,Te);if(We&&(Ws(We),fe.curOp.selectionChanged=fe.curOp.forceUpdate=!0),fe.curOp.updateMaxLine=!0,!Xn(ge.doc,ye)&&ge.height!=null){var ut=ge.height;ge.height=null;var at=nl(ge)-ut;at&&kn(ye,ye.height+at)}Di(fe,"markerChanged",fe,ie)})},qt.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||kt(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},qt.prototype.detachLine=function(ie){if(this.lines.splice(kt(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},Zn(qt);function $h(ie,ae,ge,fe,ye){if(fe&&fe.shared)return mf(ie,ae,ge,fe,ye);if(ie.cm&&!ie.cm.curOp)return bn(ie.cm,$h)(ie,ae,ge,fe,ye);var Te=new qt(ie,ye),We=Jt(ae,ge);if(fe&&Ut(fe,Te,!1),We>0||We==0&&Te.clearWhenEmpty!==!1)return Te;if(Te.replacedWith&&(Te.collapsed=!0,Te.widgetNode=ft("span",[Te.replacedWith],"CodeMirror-widget"),fe.handleMouseEvents||Te.widgetNode.setAttribute("cm-ignore-events","true"),fe.insertLeft&&(Te.widgetNode.insertLeft=!0)),Te.collapsed){if(Br(ie,ae.line,ae,ge,Te)||ae.line!=ge.line&&Br(ie,ge.line,ae,ge,Te))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ln()}Te.addToHistory&&ha(ie,{from:ae,to:ge,origin:"markText"},ie.sel,NaN);var ut=ae.line,at=ie.cm,Lt;if(ie.iter(ut,ge.line+1,function(Rt){at&&Te.collapsed&&!at.options.lineWrapping&&yr(Rt)==at.display.maxLine&&(Lt=!0),Te.collapsed&&ut!=ae.line&&kn(Rt,0),Mo(Rt,new Hr(Te,ut==ae.line?ae.ch:null,ut==ge.line?ge.ch:null)),++ut}),Te.collapsed&&ie.iter(ae.line,ge.line+1,function(Rt){Xn(ie,Rt)&&kn(Rt,0)}),Te.clearOnEnter&&Ht(Te,"beforeCursorEnter",function(){return Te.clear()}),Te.readOnly&&(to(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Te.collapsed&&(Te.id=++pf,Te.atomic=!0),at){if(Lt&&(at.curOp.updateMaxLine=!0),Te.collapsed)Ar(at,ae.line,ge.line+1);else if(Te.className||Te.startStyle||Te.endStyle||Te.css||Te.attributes||Te.title)for(var dn=ae.line;dn<=ge.line;dn++)rr(at,dn,"text");Te.atomic&&au(at.doc),Di(at,"markerAdded",at,Te)}return Te}var ph=function(ie,ae){this.markers=ie,this.primary=ae;for(var ge=0;ge<ie.length;++ge)ie[ge].parent=this};ph.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();Di(this,"clear")}},ph.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},Zn(ph);function mf(ie,ae,ge,fe,ye){fe=Ut(fe),fe.shared=!1;var Te=[$h(ie,ae,ge,fe,ye)],We=Te[0],ut=fe.widgetNode;return Ms(ie,function(at){ut&&(fe.widgetNode=ut.cloneNode(!0)),Te.push($h(at,li(at,ae),li(at,ge),fe,ye));for(var Lt=0;Lt<at.linked.length;++Lt)if(at.linked[Lt].isParent)return;We=gt(Te)}),new ph(Te,We)}function Nc(ie){return ie.findMarks(Gt(ie.first,0),ie.clipPos(Gt(ie.lastLine())),function(ae){return ae.parent})}function cc(ie,ae){for(var ge=0;ge<ae.length;ge++){var fe=ae[ge],ye=fe.find(),Te=ie.clipPos(ye.from),We=ie.clipPos(ye.to);if(Jt(Te,We)){var ut=$h(ie,Te,We,fe.primary,fe.primary.type);fe.markers.push(ut),ut.parent=fe}}}function Id(ie){for(var ae=function(fe){var ye=ie[fe],Te=[ye.primary.doc];Ms(ye.primary.doc,function(at){return Te.push(at)});for(var We=0;We<ye.markers.length;We++){var ut=ye.markers[We];kt(Te,ut.doc)==-1&&(ut.parent=null,ye.markers.splice(We--,1))}},ge=0;ge<ie.length;ge++)ae(ge)}var $g=0,Js=function(ie,ae,ge,fe,ye){if(!(this instanceof Js))return new Js(ie,ae,ge,fe,ye);ge==null&&(ge=0),fa.call(this,[new Xa([new vo("",null)])]),this.first=ge,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ge;var Te=Gt(ge,0);this.sel=Ko(Te),this.history=new Qr(null),this.id=++$g,this.modeOption=ae,this.lineSep=fe,this.direction=ye=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Ua(this,{from:Te,to:Te,text:ie}),Ha(this,Ko(Te),Ft)};Js.prototype=Ce(fa.prototype,{constructor:Js,iter:function(ie,ae,ge){ge?this.iterN(ie-this.first,ae-ie,ge):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ae){for(var ge=0,fe=0;fe<ae.length;++fe)ge+=ae[fe].height;this.insertInner(ie-this.first,ae,ge)},remove:function(ie,ae){this.removeInner(ie-this.first,ae)},getValue:function(ie){var ae=Pn(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:Fn(function(ie){var ae=Gt(this.first,0),ge=this.first+this.size-1;fs(this,{from:ae,to:Gt(ge,Vt(this,ge).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&zu(this.cm,0,0),Ha(this,Ko(ae),Ft)}),replaceRange:function(ie,ae,ge,fe){ae=li(this,ae),ge=ge?li(this,ge):ae,gh(this,ie,ae,ge,fe)},getRange:function(ie,ae,ge){var fe=rn(this,li(this,ie),li(this,ae));return ge===!1?fe:fe.join(ge||this.lineSeparator())},getLine:function(ie){var ae=this.getLineHandle(ie);return ae&&ae.text},getLineHandle:function(ie){if(In(this,ie))return Vt(this,ie)},getLineNumber:function(ie){return St(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=Vt(this,ie)),yr(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return li(this,ie)},getCursor:function(ie){var ae=this.sel.primary(),ge;return ie==null||ie=="head"?ge=ae.head:ie=="anchor"?ge=ae.anchor:ie=="end"||ie=="to"||ie===!1?ge=ae.to():ge=ae.from(),ge},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Fn(function(ie,ae,ge){ms(this,li(this,typeof ie=="number"?Gt(ie,ae||0):ie),null,ge)}),setSelection:Fn(function(ie,ae,ge){ms(this,li(this,ie),li(this,ae||ie),ge)}),extendSelection:Fn(function(ie,ae,ge){Ca(this,li(this,ie),ae&&li(this,ae),ge)}),extendSelections:Fn(function(ie,ae){Ta(this,Qi(this,ie),ae)}),extendSelectionsBy:Fn(function(ie,ae){var ge=En(this.sel.ranges,ie);Ta(this,Qi(this,ge),ae)}),setSelections:Fn(function(ie,ae,ge){if(ie.length){for(var fe=[],ye=0;ye<ie.length;ye++)fe[ye]=new mr(li(this,ie[ye].anchor),li(this,ie[ye].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),Ha(this,Zo(this.cm,fe,ae),ge)}}),addSelection:Fn(function(ie,ae,ge){var fe=this.sel.ranges.slice(0);fe.push(new mr(li(this,ie),li(this,ae||ie))),Ha(this,Zo(this.cm,fe,fe.length-1),ge)}),getSelection:function(ie){for(var ae=this.sel.ranges,ge,fe=0;fe<ae.length;fe++){var ye=rn(this,ae[fe].from(),ae[fe].to());ge=ge?ge.concat(ye):ye}return ie===!1?ge:ge.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],ge=this.sel.ranges,fe=0;fe<ge.length;fe++){var ye=rn(this,ge[fe].from(),ge[fe].to());ie!==!1&&(ye=ye.join(ie||this.lineSeparator())),ae[fe]=ye}return ae},replaceSelection:function(ie,ae,ge){for(var fe=[],ye=0;ye<this.sel.ranges.length;ye++)fe[ye]=ie;this.replaceSelections(fe,ae,ge||"+input")},replaceSelections:Fn(function(ie,ae,ge){for(var fe=[],ye=this.sel,Te=0;Te<ye.ranges.length;Te++){var We=ye.ranges[Te];fe[Te]={from:We.from(),to:We.to(),text:this.splitLines(ie[Te]),origin:ge}}for(var ut=ae&&ae!="end"&&Go(this,fe,ae),at=fe.length-1;at>=0;at--)fs(this,fe[at]);ut?ra(this,ut):this.cm&&ru(this.cm)}),undo:Fn(function(){lu(this,"undo")}),redo:Fn(function(){lu(this,"redo")}),undoSelection:Fn(function(){lu(this,"undo",!0)}),redoSelection:Fn(function(){lu(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ae=0,ge=0,fe=0;fe<ie.done.length;fe++)ie.done[fe].ranges||++ae;for(var ye=0;ye<ie.undone.length;ye++)ie.undone[ye].ranges||++ge;return{undo:ae,redo:ge}},clearHistory:function(){var ie=this;this.history=new Qr(this.history.maxGeneration),Ms(this,function(ae){return ae.history=ie.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(ie){return ie&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(ie){return this.history.generation==(ie||this.cleanGeneration)},getHistory:function(){return{done:Rs(this.history.done),undone:Rs(this.history.undone)}},setHistory:function(ie){var ae=this.history=new Qr(this.history.maxGeneration);ae.done=Rs(ie.done.slice(0),null,!0),ae.undone=Rs(ie.undone.slice(0),null,!0)},setGutterMarker:Fn(function(ie,ae,ge){return ks(this,ie,"gutter",function(fe){var ye=fe.gutterMarkers||(fe.gutterMarkers={});return ye[ae]=ge,!ge&&Se(ye)&&(fe.gutterMarkers=null),!0})}),clearGutter:Fn(function(ie){var ae=this;this.iter(function(ge){ge.gutterMarkers&&ge.gutterMarkers[ie]&&ks(ae,ge,"gutter",function(){return ge.gutterMarkers[ie]=null,Se(ge.gutterMarkers)&&(ge.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!In(this,ie)||(ae=ie,ie=Vt(this,ie),!ie))return null}else if(ae=St(ie),ae==null)return null;return{line:ae,handle:ie,text:ie.text,gutterMarkers:ie.gutterMarkers,textClass:ie.textClass,bgClass:ie.bgClass,wrapClass:ie.wrapClass,widgets:ie.widgets}},addLineClass:Fn(function(ie,ae,ge){return ks(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!fe[ye])fe[ye]=ge;else{if(be(ge).test(fe[ye]))return!1;fe[ye]+=" "+ge}return!0})}),removeLineClass:Fn(function(ie,ae,ge){return ks(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Te=fe[ye];if(Te)if(ge==null)fe[ye]=null;else{var We=Te.match(be(ge));if(!We)return!1;var ut=We.index+We[0].length;fe[ye]=Te.slice(0,We.index)+(!We.index||ut==Te.length?"":" ")+Te.slice(ut)||null}else return!1;return!0})}),addLineWidget:Fn(function(ie,ae,ge){return Zu(this,ie,ae,ge)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,ge){return $h(this,li(this,ie),li(this,ae),ge,ge&&ge.type||"range")},setBookmark:function(ie,ae){var ge={replacedWith:ae&&(ae.nodeType==null?ae.widget:ae),insertLeft:ae&&ae.insertLeft,clearWhenEmpty:!1,shared:ae&&ae.shared,handleMouseEvents:ae&&ae.handleMouseEvents};return ie=li(this,ie),$h(this,ie,ie,ge,"bookmark")},findMarksAt:function(ie){ie=li(this,ie);var ae=[],ge=Vt(this,ie.line).markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe){var ye=ge[fe];(ye.from==null||ye.from<=ie.ch)&&(ye.to==null||ye.to>=ie.ch)&&ae.push(ye.marker.parent||ye.marker)}return ae},findMarks:function(ie,ae,ge){ie=li(this,ie),ae=li(this,ae);var fe=[],ye=ie.line;return this.iter(ie.line,ae.line+1,function(Te){var We=Te.markedSpans;if(We)for(var ut=0;ut<We.length;ut++){var at=We[ut];!(at.to!=null&&ye==ie.line&&ie.ch>=at.to||at.from==null&&ye!=ie.line||at.from!=null&&ye==ae.line&&at.from>=ae.ch)&&(!ge||ge(at.marker))&&fe.push(at.marker.parent||at.marker)}++ye}),fe},getAllMarks:function(){var ie=[];return this.iter(function(ae){var ge=ae.markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe)ge[fe].from!=null&&ie.push(ge[fe].marker)}),ie},posFromIndex:function(ie){var ae,ge=this.first,fe=this.lineSeparator().length;return this.iter(function(ye){var Te=ye.text.length+fe;if(Te>ie)return ae=ie,!0;ie-=Te,++ge}),li(this,Gt(ge,ae))},indexFromPos:function(ie){ie=li(this,ie);var ae=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var ge=this.lineSeparator().length;return this.iter(this.first,ie.line,function(fe){ae+=fe.text.length+ge}),ae},copy:function(ie){var ae=new Js(Pn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ae.scrollTop=this.scrollTop,ae.scrollLeft=this.scrollLeft,ae.sel=this.sel,ae.extend=!1,ie&&(ae.history.undoDepth=this.history.undoDepth,ae.setHistory(this.getHistory())),ae},linkedDoc:function(ie){ie||(ie={});var ae=this.first,ge=this.first+this.size;ie.from!=null&&ie.from>ae&&(ae=ie.from),ie.to!=null&&ie.to<ge&&(ge=ie.to);var fe=new Js(Pn(this,ae,ge),ie.mode||this.modeOption,ae,this.lineSep,this.direction);return ie.sharedHist&&(fe.history=this.history),(this.linked||(this.linked=[])).push({doc:fe,sharedHist:ie.sharedHist}),fe.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],cc(fe,Nc(this)),fe},unlinkDoc:function(ie){if(ie instanceof La&&(ie=ie.doc),this.linked)for(var ae=0;ae<this.linked.length;++ae){var ge=this.linked[ae];if(ge.doc==ie){this.linked.splice(ae,1),ie.unlinkDoc(this),Id(Nc(this));break}}if(ie.history==this.history){var fe=[ie.id];Ms(ie,function(ye){return fe.push(ye.id)},!0),ie.history=new Qr(null),ie.history.done=Rs(this.history.done,fe),ie.history.undone=Rs(this.history.undone,fe)}},iterLinkedDocs:function(ie){Ms(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):Ii(ie)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Fn(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&Eo(this.cm))})}),Js.prototype.eachLine=Js.prototype.iter;var ad=0;function Rd(ie){var ae=this;if(Uf(ae),!(Un(ae,ie)||vs(ae.display,ie))){Jn(ie),_e&&(ad=+new Date);var ge=Ki(ae,ie,!0),fe=ie.dataTransfer.files;if(!(!ge||ae.isReadOnly()))if(fe&&fe.length&&window.FileReader&&window.File)for(var ye=fe.length,Te=Array(ye),We=0,ut=function(){++We==ye&&bn(ae,function(){ge=li(ae.doc,ge);var On={from:ge,to:ge,text:ae.doc.splitLines(Te.filter(function(wi){return wi!=null}).join(ae.doc.lineSeparator())),origin:"paste"};fs(ae.doc,On),ra(ae.doc,Ko(li(ae.doc,ge),li(ae.doc,Pa(On))))})()},at=function(On,wi){if(ae.options.allowDropFileTypes&&kt(ae.options.allowDropFileTypes,On.type)==-1){ut();return}var Ti=new FileReader;Ti.onerror=function(){return ut()},Ti.onload=function(){var Hi=Ti.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Hi)){ut();return}Te[wi]=Hi,ut()},Ti.readAsText(On)},Lt=0;Lt<fe.length;Lt++)at(fe[Lt],Lt);else{if(ae.state.draggingText&&ae.doc.sel.contains(ge)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var dn=ie.dataTransfer.getData("Text");if(dn){var Rt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Rt=ae.listSelections()),zs(ae.doc,Ko(ge,ge)),Rt)for(var zn=0;zn<Rt.length;++zn)gh(ae.doc,"",Rt[zn].anchor,Rt[zn].head,"drag");ae.replaceSelection(dn,"around","paste"),ae.display.input.focus()}}catch(On){}}}}function sd(ie,ae){if(_e&&(!ie.state.draggingText||+new Date-ad<100)){zi(ae);return}if(!(Un(ie,ae)||vs(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!Et)){var ge=$e("img",null,null,"position: fixed; left: 0; top: 0;");ge.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ze&&(ge.width=ge.height=1,ie.display.wrapper.appendChild(ge),ge._top=ge.offsetTop),ae.dataTransfer.setDragImage(ge,0,0),Ze&&ge.parentNode.removeChild(ge)}}function vf(ie,ae){var ge=Ki(ie,ae);if(ge){var fe=document.createDocumentFragment();Ri(ie,ge,fe),ie.display.dragCursor||(ie.display.dragCursor=$e("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),qe(ie.display.dragCursor,fe)}}function Uf(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function yf(ie){if(document.getElementsByClassName){for(var ae=document.getElementsByClassName("CodeMirror"),ge=[],fe=0;fe<ae.length;fe++){var ye=ae[fe].CodeMirror;ye&&ge.push(ye)}ge.length&&ge[0].operation(function(){for(var Te=0;Te<ge.length;Te++)ie(ge[Te])})}}var jd=!1;function uu(){jd||(kc(),jd=!0)}function kc(){var ie;Ht(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,yf(Sf)},100))}),Ht(window,"blur",function(){return yf(Bs)})}function Sf(ie){var ae=ie.display;ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.scrollbarsClipped=!1,ie.setSize()}for(var nh={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"},Kh=0;Kh<10;Kh++)nh[Kh+48]=nh[Kh+96]=String(Kh);for(var Ac=65;Ac<=90;Ac++)nh[Ac]=String.fromCharCode(Ac);for(var dc=1;dc<=12;dc++)nh[dc+111]=nh[dc+63235]="F"+dc;var _l={};_l.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"},_l.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"},_l.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"},_l.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"]},_l.default=he?_l.macDefault:_l.pcDefault;function zd(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var ge,fe,ye,Te,We=0;We<ae.length-1;We++){var ut=ae[We];if(/^(cmd|meta|m)$/i.test(ut))Te=!0;else if(/^a(lt)?$/i.test(ut))ge=!0;else if(/^(c|ctrl|control)$/i.test(ut))fe=!0;else if(/^s(hift)?$/i.test(ut))ye=!0;else throw new Error("Unrecognized modifier name: "+ut)}return ge&&(ie="Alt-"+ie),fe&&(ie="Ctrl-"+ie),Te&&(ie="Cmd-"+ie),ye&&(ie="Shift-"+ie),ie}function _d(ie){var ae={};for(var ge in ie)if(ie.hasOwnProperty(ge)){var fe=ie[ge];if(/^(name|fallthrough|(de|at)tach)$/.test(ge))continue;if(fe=="..."){delete ie[ge];continue}for(var ye=En(ge.split(" "),zd),Te=0;Te<ye.length;Te++){var We=void 0,ut=void 0;Te==ye.length-1?(ut=ye.join(" "),We=fe):(ut=ye.slice(0,Te+1).join(" "),We="...");var at=ae[ut];if(!at)ae[ut]=We;else if(at!=We)throw new Error("Inconsistent bindings for "+ut)}delete ie[ge]}for(var Lt in ae)ie[Lt]=ae[Lt];return ie}function hu(ie,ae,ge,fe){ae=Vh(ae);var ye=ae.call?ae.call(ie,fe):ae[ie];if(ye===!1)return"nothing";if(ye==="...")return"multi";if(ye!=null&&ge(ye))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return hu(ie,ae.fallthrough,ge,fe);for(var Te=0;Te<ae.fallthrough.length;Te++){var We=hu(ie,ae.fallthrough[Te],ge,fe);if(We)return We}}}function Tc(ie){var ae=typeof ie=="string"?ie:nh[ie.keyCode];return ae=="Ctrl"||ae=="Alt"||ae=="Shift"||ae=="Mod"}function Zd(ie,ae,ge){var fe=ie;return ae.altKey&&fe!="Alt"&&(ie="Alt-"+ie),(we?ae.metaKey:ae.ctrlKey)&&fe!="Ctrl"&&(ie="Ctrl-"+ie),(we?ae.ctrlKey:ae.metaKey)&&fe!="Mod"&&(ie="Cmd-"+ie),!ge&&ae.shiftKey&&fe!="Shift"&&(ie="Shift-"+ie),ie}function Hd(ie,ae){if(Ze&&ie.keyCode==34&&ie.char)return!1;var ge=nh[ie.keyCode];return ge==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(ge=ie.code),Zd(ge,ie,ae))}function Vh(ie){return typeof ie=="string"?_l[ie]:ie}function Ll(ie,ae){for(var ge=ie.doc.sel.ranges,fe=[],ye=0;ye<ge.length;ye++){for(var Te=ae(ge[ye]);fe.length&&Jt(Te.from,gt(fe).to)<=0;){var We=fe.pop();if(Jt(We.from,Te.from)<0){Te.from=We.from;break}}fe.push(Te)}Wt(ie,function(){for(var ut=fe.length-1;ut>=0;ut--)gh(ie.doc,"",fe[ut].from,fe[ut].to,"+delete");ru(ie)})}function Wd(ie,ae,ge){var fe=Xe(ie.text,ae+ge,ge);return fe<0||fe>ie.text.length?null:fe}function As(ie,ae,ge){var fe=Wd(ie,ae.ch,ge);return fe==null?null:new Gt(ae.line,fe,ge<0?"after":"before")}function Ea(ie,ae,ge,fe,ye){if(ie){ae.doc.direction=="rtl"&&(ye=-ye);var Te=sn(ge,ae.doc.direction);if(Te){var We=ye<0?gt(Te):Te[0],ut=ye<0==(We.level==1),at=ut?"after":"before",Lt;if(We.level>0||ae.doc.direction=="rtl"){var dn=Qu(ae,ge);Lt=ye<0?ge.text.length-1:0;var Rt=Rl(ae,dn,Lt).top;Lt=Je(function(zn){return Rl(ae,dn,zn).top==Rt},ye<0==(We.level==1)?We.from:We.to-1,Lt),at=="before"&&(Lt=Wd(ge,Lt,1))}else Lt=ye<0?We.to:We.from;return new Gt(fe,Lt,at)}}return new Gt(fe,ye<0?ge.text.length:0,ye<0?"before":"after")}function ns(ie,ae,ge,fe){var ye=sn(ae,ie.doc.direction);if(!ye)return As(ae,ge,fe);ge.ch>=ae.text.length?(ge.ch=ae.text.length,ge.sticky="before"):ge.ch<=0&&(ge.ch=0,ge.sticky="after");var Te=ot(ye,ge.ch,ge.sticky),We=ye[Te];if(ie.doc.direction=="ltr"&&We.level%2==0&&(fe>0?We.to>ge.ch:We.from<ge.ch))return As(ae,ge,fe);var ut=function(vr,Kr){return Wd(ae,vr instanceof Gt?vr.ch:vr,Kr)},at,Lt=function(vr){return ie.options.lineWrapping?(at=at||Qu(ie,ae),mn(ie,ae,at,vr)):{begin:0,end:ae.text.length}},dn=Lt(ge.sticky=="before"?ut(ge,-1):ge.ch);if(ie.doc.direction=="rtl"||We.level==1){var Rt=We.level==1==fe<0,zn=ut(ge,Rt?1:-1);if(zn!=null&&(Rt?zn<=We.to&&zn<=dn.end:zn>=We.from&&zn>=dn.begin)){var On=Rt?"before":"after";return new Gt(ge.line,zn,On)}}var wi=function(vr,Kr,kr){for(var ro=function(Ss,ol){return ol?new Gt(ge.line,ut(Ss,1),"before"):new Gt(ge.line,Ss,"after")};vr>=0&&vr<ye.length;vr+=Kr){var Ho=ye[vr],Fr=Kr>0==(Ho.level!=1),oa=Fr?kr.begin:ut(kr.end,-1);if(Ho.from<=oa&&oa<Ho.to||(oa=Fr?Ho.from:ut(Ho.to,-1),kr.begin<=oa&&oa<kr.end))return ro(oa,Fr)}},Ti=wi(Te+fe,fe,dn);if(Ti)return Ti;var Hi=fe>0?dn.end:ut(dn.begin,-1);return Hi!=null&&!(fe>0&&Hi==ae.text.length)&&(Ti=wi(fe>0?0:ye.length-1,fe,Lt(Hi)),Ti)?Ti:null}var il={selectAll:ba,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),Ft)},killLine:function(ie){return Ll(ie,function(ae){if(ae.empty()){var ge=Vt(ie.doc,ae.head.line).text.length;return ae.head.ch==ge&&ae.head.line<ie.lastLine()?{from:ae.head,to:Gt(ae.head.line+1,0)}:{from:ae.head,to:Gt(ae.head.line,ge)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return Ll(ie,function(ae){return{from:Gt(ae.from().line,0),to:li(ie.doc,Gt(ae.to().line+1,0))}})},delLineLeft:function(ie){return Ll(ie,function(ae){return{from:Gt(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return Ll(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return{from:fe,to:ae.from()}})},delWrappedLineRight:function(ie){return Ll(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div");return{from:ae.from(),to:fe}})},undo:function(ie){return ie.undo()},redo:function(ie){return ie.redo()},undoSelection:function(ie){return ie.undoSelection()},redoSelection:function(ie){return ie.redoSelection()},goDocStart:function(ie){return ie.extendSelection(Gt(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(Gt(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return bu(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return Gd(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return Mu(ie,ae.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div")},Qt)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:ge},"div")},Qt)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return fe.ch<ie.getLine(fe.line).search(/\S/)?Gd(ie,ae.head):fe},Qt)},goLineUp:function(ie){return ie.moveV(-1,"line")},goLineDown:function(ie){return ie.moveV(1,"line")},goPageUp:function(ie){return ie.moveV(-1,"page")},goPageDown:function(ie){return ie.moveV(1,"page")},goCharLeft:function(ie){return ie.moveH(-1,"char")},goCharRight:function(ie){return ie.moveH(1,"char")},goColumnLeft:function(ie){return ie.moveH(-1,"column")},goColumnRight:function(ie){return ie.moveH(1,"column")},goWordLeft:function(ie){return ie.moveH(-1,"word")},goGroupRight:function(ie){return ie.moveH(1,"group")},goGroupLeft:function(ie){return ie.moveH(-1,"group")},goWordRight:function(ie){return ie.moveH(1,"word")},delCharBefore:function(ie){return ie.deleteH(-1,"codepoint")},delCharAfter:function(ie){return ie.deleteH(1,"char")},delWordBefore:function(ie){return ie.deleteH(-1,"word")},delWordAfter:function(ie){return ie.deleteH(1,"word")},delGroupBefore:function(ie){return ie.deleteH(-1,"group")},delGroupAfter:function(ie){return ie.deleteH(1,"group")},indentAuto:function(ie){return ie.indentSelection("smart")},indentMore:function(ie){return ie.indentSelection("add")},indentLess:function(ie){return ie.indentSelection("subtract")},insertTab:function(ie){return ie.replaceSelection(" ")},insertSoftTab:function(ie){for(var ae=[],ge=ie.listSelections(),fe=ie.options.tabSize,ye=0;ye<ge.length;ye++){var Te=ge[ye].from(),We=lt(ie.getLine(Te.line),Te.ch,fe);ae.push(Cn(fe-We%fe))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return Wt(ie,function(){for(var ae=ie.listSelections(),ge=[],fe=0;fe<ae.length;fe++)if(ae[fe].empty()){var ye=ae[fe].head,Te=Vt(ie.doc,ye.line).text;if(Te){if(ye.ch==Te.length&&(ye=new Gt(ye.line,ye.ch-1)),ye.ch>0)ye=new Gt(ye.line,ye.ch+1),ie.replaceRange(Te.charAt(ye.ch-1)+Te.charAt(ye.ch-2),Gt(ye.line,ye.ch-2),ye,"+transpose");else if(ye.line>ie.doc.first){var We=Vt(ie.doc,ye.line-1).text;We&&(ye=new Gt(ye.line,1),ie.replaceRange(Te.charAt(0)+ie.doc.lineSeparator()+We.charAt(We.length-1),Gt(ye.line-1,We.length-1),ye,"+transpose"))}}ge.push(new mr(ye,ye))}ie.setSelections(ge)})},newlineAndIndent:function(ie){return Wt(ie,function(){for(var ae=ie.listSelections(),ge=ae.length-1;ge>=0;ge--)ie.replaceRange(ie.doc.lineSeparator(),ae[ge].anchor,ae[ge].head,"+input");ae=ie.listSelections();for(var fe=0;fe<ae.length;fe++)ie.indentLine(ae[fe].from().line,null,!0);ru(ie)})},openLine:function(ie){return ie.replaceSelection(`
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function bu(ie,ae){var ge=Vt(ie.doc,ae),fe=yr(ge);return fe!=ge&&(ae=St(fe)),Ea(!0,ie,fe,ae,1)}function Mu(ie,ae){var ge=Vt(ie.doc,ae),fe=xo(ge);return fe!=ge&&(ae=St(fe)),Ea(!0,ie,ge,ae,-1)}function Gd(ie,ae){var ge=bu(ie,ae.line),fe=Vt(ie.doc,ge.line),ye=sn(fe,ie.doc.direction);if(!ye||ye[0].level==0){var Te=Math.max(ge.ch,fe.text.search(/\S/)),We=ae.line==ge.line&&ae.ch<=Te&&ae.ch;return Gt(ge.line,We?0:Te,ge.sticky)}return ge}function Uh(ie,ae,ge){if(typeof ae=="string"&&(ae=il[ae],!ae))return!1;ie.display.input.ensurePolled();var fe=ie.display.shift,ye=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ge&&(ie.display.shift=!1),ye=ae(ie)!=ln}finally{ie.display.shift=fe,ie.state.suppressEdits=!1}return ye}function ld(ie,ae,ge){for(var fe=0;fe<ie.state.keyMaps.length;fe++){var ye=hu(ae,ie.state.keyMaps[fe],ge,ie);if(ye)return ye}return ie.options.extraKeys&&hu(ae,ie.options.extraKeys,ge,ie)||hu(ae,ie.options.keyMap,ge,ie)}var Hu=new Ge;function Ah(ie,ae,ge,fe){var ye=ie.state.keySeq;if(ye){if(Tc(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Hu.set(50,function(){ie.state.keySeq==ye&&(ie.state.keySeq=null,ie.display.input.reset())}),Yf(ie,ye+" "+ae,ge,fe))return!0}return Yf(ie,ae,ge,fe)}function Yf(ie,ae,ge,fe){var ye=ld(ie,ae,fe);return ye=="multi"&&(ie.state.keySeq=ae),ye=="handled"&&Di(ie,"keyHandled",ie,ae,ge),(ye=="handled"||ye=="multi")&&(Jn(ge),ko(ie)),!!ye}function Xf(ie,ae){var ge=Hd(ae,!0);return ge?ae.shiftKey&&!ie.state.keySeq?Ah(ie,"Shift-"+ge,ae,function(fe){return Uh(ie,fe,!0)})||Ah(ie,ge,ae,function(fe){if(typeof fe=="string"?/^go[A-Z]/.test(fe):fe.motion)return Uh(ie,fe)}):Ah(ie,ge,ae,function(fe){return Uh(ie,fe)}):!1}function Jf(ie,ae,ge){return Ah(ie,"'"+ge+"'",ae,function(fe){return Uh(ie,fe,!0)})}var ud=null;function Kg(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=et(),!Un(ae,ie))){_e&&Ke<11&&ie.keyCode==27&&(ie.returnValue=!1);var ge=ie.keyCode;ae.display.shift=ge==16||ie.shiftKey;var fe=Xf(ae,ie);Ze&&(ud=fe?ge:null,!fe&&ge==88&&!si&&(he?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),ce&&!he&&!fe&&ge==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),ge==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&Vg(ae)}}function Vg(ie){var ae=ie.display.lineDiv;bt(ae,"CodeMirror-crosshair");function ge(fe){(fe.keyCode==18||!fe.altKey)&&(Ie(ae,"CodeMirror-crosshair"),Dn(document,"keyup",ge),Dn(document,"mouseover",ge))}Ht(document,"keyup",ge),Ht(document,"mouseover",ge)}function Ug(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),Un(this,ie)}function Th(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(vs(ae.display,ie)||Un(ae,ie)||ie.ctrlKey&&!ie.altKey||he&&ie.metaKey)){var ge=ie.keyCode,fe=ie.charCode;if(Ze&&ge==ud){ud=null,Jn(ie);return}if(!(Ze&&(!ie.which||ie.which<10)&&Xf(ae,ie))){var ye=String.fromCharCode(fe==null?ge:fe);ye!="\b"&&(Jf(ae,ie,ye)||ae.display.input.onKeyPress(ie))}}}var rm=400,Yg=function(ie,ae,ge){this.time=ie,this.pos=ae,this.button=ge};Yg.prototype.compare=function(ie,ae,ge){return this.time+rm>ie&&Jt(ae,this.pos)==0&&ge==this.button};var $d,hd;function Xg(ie,ae){var ge=+new Date;return hd&&hd.compare(ge,ie,ae)?($d=hd=null,"triple"):$d&&$d.compare(ge,ie,ae)?(hd=new Yg(ge,ie,ae),$d=null,"double"):($d=new Yg(ge,ie,ae),hd=null,"single")}function Dh(ie){var ae=this,ge=ae.display;if(!(Un(ae,ie)||ge.activeTouch&&ge.input.supportsTouch())){if(ge.input.ensurePolled(),ge.shift=ie.shiftKey,vs(ge,ie)){Be||(ge.scroller.draggable=!1,setTimeout(function(){return ge.scroller.draggable=!0},100));return}if(!eg(ae,ie)){var fe=Ki(ae,ie),ye=Yn(ie),Te=fe?Xg(fe,ye):"single";window.focus(),ye==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(fe&&Jg(ae,ye,fe,Te,ie))&&(ye==1?fe?om(ae,fe,Te,ie):$i(ie)==ge.scroller&&Jn(ie):ye==2?(fe&&Ca(ae.doc,fe),setTimeout(function(){return ge.input.focus()},20)):ye==3&&(Me?ae.display.input.onContextMenu(ie):Lr(ae)))}}}function Jg(ie,ae,ge,fe,ye){var Te="Click";return fe=="double"?Te="Double"+Te:fe=="triple"&&(Te="Triple"+Te),Te=(ae==1?"Left":ae==2?"Middle":"Right")+Te,Ah(ie,Zd(Te,ye),ye,function(We){if(typeof We=="string"&&(We=il[We]),!We)return!1;var ut=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ut=We(ie,ge)!=ln}finally{ie.state.suppressEdits=!1}return ut})}function Qf(ie,ae,ge){var fe=ie.getOption("configureMouse"),ye=fe?fe(ie,ae,ge):{};if(ye.unit==null){var Te=se?ge.shiftKey&&ge.metaKey:ge.altKey;ye.unit=Te?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(ye.extend==null||ie.doc.extend)&&(ye.extend=ie.doc.extend||ge.shiftKey),ye.addNew==null&&(ye.addNew=he?ge.metaKey:ge.ctrlKey),ye.moveOnDrag==null&&(ye.moveOnDrag=!(he?ge.altKey:ge.ctrlKey)),ye}function om(ie,ae,ge,fe){_e?setTimeout(Zt(Uo,ie),0):ie.curOp.focus=et();var ye=Qf(ie,ge,fe),Te=ie.doc.sel,We;ie.options.dragDrop&&Gn&&!ie.isReadOnly()&&ge=="single"&&(We=Te.contains(ae))>-1&&(Jt((We=Te.ranges[We]).from(),ae)<0||ae.xRel>0)&&(Jt(We.to(),ae)>0||ae.xRel<0)?Qg(ie,fe,ae,ye):tv(ie,fe,ae,ye)}function Qg(ie,ae,ge,fe){var ye=ie.display,Te=!1,We=bn(ie,function(Lt){Be&&(ye.scroller.draggable=!1),ie.state.draggingText=!1,Dn(ye.wrapper.ownerDocument,"mouseup",We),Dn(ye.wrapper.ownerDocument,"mousemove",ut),Dn(ye.scroller,"dragstart",at),Dn(ye.scroller,"drop",We),Te||(Jn(Lt),fe.addNew||Ca(ie.doc,ge,null,null,fe.extend),Be&&!Et||_e&&Ke==9?setTimeout(function(){ye.wrapper.ownerDocument.body.focus({preventScroll:!0}),ye.input.focus()},20):ye.input.focus())}),ut=function(Lt){Te=Te||Math.abs(ae.clientX-Lt.clientX)+Math.abs(ae.clientY-Lt.clientY)>=10},at=function(){return Te=!0};Be&&(ye.scroller.draggable=!0),ie.state.draggingText=We,We.copy=!fe.moveOnDrag,ye.scroller.dragDrop&&ye.scroller.dragDrop(),Ht(ye.wrapper.ownerDocument,"mouseup",We),Ht(ye.wrapper.ownerDocument,"mousemove",ut),Ht(ye.scroller,"dragstart",at),Ht(ye.scroller,"drop",We),Lr(ie),setTimeout(function(){return ye.input.focus()},20)}function qg(ie,ae,ge){if(ge=="char")return new mr(ae,ae);if(ge=="word")return ie.findWordAt(ae);if(ge=="line")return new mr(Gt(ae.line,0),li(ie.doc,Gt(ae.line+1,0)));var fe=ge(ie,ae);return new mr(fe.from,fe.to)}function tv(ie,ae,ge,fe){var ye=ie.display,Te=ie.doc;Jn(ae);var We,ut,at=Te.sel,Lt=at.ranges;if(fe.addNew&&!fe.extend?(ut=Te.sel.contains(ge),ut>-1?We=Lt[ut]:We=new mr(ge,ge)):(We=Te.sel.primary(),ut=Te.sel.primIndex),fe.unit=="rectangle")fe.addNew||(We=new mr(ge,ge)),ge=Ki(ie,ae,!0,!0),ut=-1;else{var dn=qg(ie,ge,fe.unit);fe.extend?We=fh(We,dn.anchor,dn.head,fe.extend):We=dn}fe.addNew?ut==-1?(ut=Lt.length,Ha(Te,Zo(ie,Lt.concat([We]),ut),{scroll:!1,origin:"*mouse"})):Lt.length>1&&Lt[ut].empty()&&fe.unit=="char"&&!fe.extend?(Ha(Te,Zo(ie,Lt.slice(0,ut).concat(Lt.slice(ut+1)),0),{scroll:!1,origin:"*mouse"}),at=Te.sel):za(Te,ut,We,$t):(ut=0,Ha(Te,new wo([We],0),$t),at=Te.sel);var Rt=ge;function zn(kr){if(Jt(Rt,kr)!=0)if(Rt=kr,fe.unit=="rectangle"){for(var ro=[],Ho=ie.options.tabSize,Fr=lt(Vt(Te,ge.line).text,ge.ch,Ho),oa=lt(Vt(Te,kr.line).text,kr.ch,Ho),Ss=Math.min(Fr,oa),ol=Math.max(Fr,oa),Ls=Math.min(ge.line,kr.line),du=Math.min(ie.lastLine(),Math.max(ge.line,kr.line));Ls<=du;Ls++){var Zl=Vt(Te,Ls).text,qs=Bn(Zl,Ss,Ho);Ss==ol?ro.push(new mr(Gt(Ls,qs),Gt(Ls,qs))):Zl.length>qs&&ro.push(new mr(Gt(Ls,qs),Gt(Ls,Bn(Zl,ol,Ho))))}ro.length||ro.push(new mr(ge,ge)),Ha(Te,Zo(ie,at.ranges.slice(0,ut).concat(ro),ut),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(kr)}else{var Lu=We,Fl=qg(ie,kr,fe.unit),el=Lu.anchor,Da;Jt(Fl.anchor,el)>0?(Da=Fl.head,el=ni(Lu.from(),Fl.anchor)):(Da=Fl.anchor,el=ui(Lu.to(),Fl.head));var Ts=at.ranges.slice(0);Ts[ut]=am(ie,new mr(li(Te,el),Da)),Ha(Te,Zo(ie,Ts,ut),$t)}}var On=ye.wrapper.getBoundingClientRect(),wi=0;function Ti(kr){var ro=++wi,Ho=Ki(ie,kr,!0,fe.unit=="rectangle");if(Ho)if(Jt(Ho,Rt)!=0){ie.curOp.focus=et(),zn(Ho);var Fr=Vr(ye,Te);(Ho.line>=Fr.to||Ho.line<Fr.from)&&setTimeout(bn(ie,function(){wi==ro&&Ti(kr)}),150)}else{var oa=kr.clientY<On.top?-20:kr.clientY>On.bottom?20:0;oa&&setTimeout(bn(ie,function(){wi==ro&&(ye.scroller.scrollTop+=oa,Ti(kr))}),50)}}function Hi(kr){ie.state.selectingText=!1,wi=1/0,kr&&(Jn(kr),ye.input.focus()),Dn(ye.wrapper.ownerDocument,"mousemove",vr),Dn(ye.wrapper.ownerDocument,"mouseup",Kr),Te.history.lastSelOrigin=null}var vr=bn(ie,function(kr){kr.buttons===0||!Yn(kr)?Hi(kr):Ti(kr)}),Kr=bn(ie,Hi);ie.state.selectingText=Kr,Ht(ye.wrapper.ownerDocument,"mousemove",vr),Ht(ye.wrapper.ownerDocument,"mouseup",Kr)}function am(ie,ae){var ge=ae.anchor,fe=ae.head,ye=Vt(ie.doc,ge.line);if(Jt(ge,fe)==0&&ge.sticky==fe.sticky)return ae;var Te=sn(ye);if(!Te)return ae;var We=ot(Te,ge.ch,ge.sticky),ut=Te[We];if(ut.from!=ge.ch&&ut.to!=ge.ch)return ae;var at=We+(ut.from==ge.ch==(ut.level!=1)?0:1);if(at==0||at==Te.length)return ae;var Lt;if(fe.line!=ge.line)Lt=(fe.line-ge.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var dn=ot(Te,fe.ch,fe.sticky),Rt=dn-We||(fe.ch-ge.ch)*(ut.level==1?-1:1);dn==at-1||dn==at?Lt=Rt<0:Lt=Rt>0}var zn=Te[at+(Lt?-1:0)],On=Lt==(zn.level==1),wi=On?zn.from:zn.to,Ti=On?"after":"before";return ge.ch==wi&&ge.sticky==Ti?ae:new mr(new Gt(ge.line,wi,Ti),fe)}function qf(ie,ae,ge,fe){var ye,Te;if(ae.touches)ye=ae.touches[0].clientX,Te=ae.touches[0].clientY;else try{ye=ae.clientX,Te=ae.clientY}catch(zn){return!1}if(ye>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;fe&&Jn(ae);var We=ie.display,ut=We.lineDiv.getBoundingClientRect();if(Te>ut.bottom||!Wn(ie,ge))return pi(ae);Te-=ut.top-We.viewOffset;for(var at=0;at<ie.display.gutterSpecs.length;++at){var Lt=We.gutters.childNodes[at];if(Lt&&Lt.getBoundingClientRect().right>=ye){var dn=hn(ie.doc,Te),Rt=ie.display.gutterSpecs[at];return cn(ie,ge,ie,dn,Rt.className,ae),pi(ae)}}}function eg(ie,ae){return qf(ie,ae,"gutterClick",!0)}function tg(ie,ae){vs(ie.display,ae)||sm(ie,ae)||Un(ie,ae,"contextmenu")||Me||ie.display.input.onContextMenu(ae)}function sm(ie,ae){return Wn(ie,"gutterContextMenu")?qf(ie,ae,"gutterContextMenu",!1):!1}function ng(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),es(ie)}var Dc={toString:function(){return"CodeMirror.Init"}},ep={},xf={};function lm(ie){var ae=ie.optionHandlers;function ge(fe,ye,Te,We){ie.defaults[fe]=ye,Te&&(ae[fe]=We?function(ut,at,Lt){Lt!=Dc&&Te(ut,at,Lt)}:Te)}ie.defineOption=ge,ie.Init=Dc,ge("value","",function(fe,ye){return fe.setValue(ye)},!0),ge("mode",null,function(fe,ye){fe.doc.modeOption=ye,ao(fe)},!0),ge("indentUnit",2,ao,!0),ge("indentWithTabs",!1),ge("smartIndent",!0),ge("tabSize",4,function(fe){pa(fe),es(fe),Ar(fe)},!0),ge("lineSeparator",null,function(fe,ye){if(fe.doc.lineSep=ye,!!ye){var Te=[],We=fe.doc.first;fe.doc.iter(function(at){for(var Lt=0;;){var dn=at.text.indexOf(ye,Lt);if(dn==-1)break;Lt=dn+ye.length,Te.push(Gt(We,dn))}We++});for(var ut=Te.length-1;ut>=0;ut--)gh(fe.doc,ye,Te[ut],Gt(Te[ut].line,Te[ut].ch+ye.length))}}),ge("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(fe,ye,Te){fe.state.specialChars=new RegExp(ye.source+(ye.test(" ")?"":"| "),"g"),Te!=Dc&&fe.refresh()}),ge("specialCharPlaceholder",Ia,function(fe){return fe.refresh()},!0),ge("electricChars",!0),ge("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ge("spellcheck",!1,function(fe,ye){return fe.getInputField().spellcheck=ye},!0),ge("autocorrect",!1,function(fe,ye){return fe.getInputField().autocorrect=ye},!0),ge("autocapitalize",!1,function(fe,ye){return fe.getInputField().autocapitalize=ye},!0),ge("rtlMoveVisually",!de),ge("wholeLineUpdateBefore",!0),ge("theme","default",function(fe){ng(fe),Cr(fe)},!0),ge("keyMap","default",function(fe,ye,Te){var We=Vh(ye),ut=Te!=Dc&&Vh(Te);ut&&ut.detach&&ut.detach(fe,We),We.attach&&We.attach(fe,ut||null)}),ge("extraKeys",null),ge("configureMouse",null),ge("lineWrapping",!1,um,!0),ge("gutters",[],function(fe,ye){fe.display.gutterSpecs=Ur(ye,fe.options.lineNumbers),Cr(fe)},!0),ge("fixedGutter",!0,function(fe,ye){fe.display.gutters.style.left=ye?Wo(fe.display)+"px":"0",fe.refresh()},!0),ge("coverGutterNextToScrollbar",!1,function(fe){return dh(fe)},!0),ge("scrollbarStyle","native",function(fe){Bc(fe),dh(fe),fe.display.scrollbars.setScrollTop(fe.doc.scrollTop),fe.display.scrollbars.setScrollLeft(fe.doc.scrollLeft)},!0),ge("lineNumbers",!1,function(fe,ye){fe.display.gutterSpecs=Ur(fe.options.gutters,ye),Cr(fe)},!0),ge("firstLineNumber",1,Cr,!0),ge("lineNumberFormatter",function(fe){return fe},Cr,!0),ge("showCursorWhenSelecting",!1,ur,!0),ge("resetSelectionOnContextMenu",!0),ge("lineWiseCopyCut",!0),ge("pasteLinesPerSelection",!0),ge("selectionsMayTouch",!1),ge("readOnly",!1,function(fe,ye){ye=="nocursor"&&(Bs(fe),fe.display.input.blur()),fe.display.input.readOnlyChanged(ye)}),ge("screenReaderLabel",null,function(fe,ye){ye=ye===""?null:ye,fe.display.input.screenReaderLabelChanged(ye)}),ge("disableInput",!1,function(fe,ye){ye||fe.display.input.reset()},!0),ge("dragDrop",!0,ig),ge("allowDropFileTypes",null),ge("cursorBlinkRate",530),ge("cursorScrollMargin",0),ge("cursorHeight",1,ur,!0),ge("singleCursorHeightPerLine",!0,ur,!0),ge("workTime",100),ge("workDelay",100),ge("flattenSpans",!0,pa,!0),ge("addModeClass",!1,pa,!0),ge("pollInterval",100),ge("undoDepth",200,function(fe,ye){return fe.doc.history.undoDepth=ye}),ge("historyEventDelay",1250),ge("viewportMargin",10,function(fe){return fe.refresh()},!0),ge("maxHighlightLength",1e4,pa,!0),ge("moveInputWithCursor",!0,function(fe,ye){ye||fe.display.input.resetPosition()}),ge("tabindex",null,function(fe,ye){return fe.display.input.getField().tabIndex=ye||""}),ge("autofocus",null),ge("direction","ltr",function(fe,ye){return fe.doc.setDirection(ye)},!0),ge("phrases",null)}function ig(ie,ae,ge){var fe=ge&&ge!=Dc;if(!ae!=!fe){var ye=ie.display.dragFunctions,Te=ae?Ht:Dn;Te(ie.display.scroller,"dragstart",ye.start),Te(ie.display.scroller,"dragenter",ye.enter),Te(ie.display.scroller,"dragover",ye.over),Te(ie.display.scroller,"dragleave",ye.leave),Te(ie.display.scroller,"drop",ye.drop)}}function um(ie){ie.options.lineWrapping?(bt(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(Ie(ie.display.wrapper,"CodeMirror-wrap"),No(ie)),Zi(ie),Ar(ie),es(ie),setTimeout(function(){return dh(ie)},100)}function La(ie,ae){var ge=this;if(!(this instanceof La))return new La(ie,ae);this.options=ae=ae?Ut(ae):{},Ut(ep,ae,!1);var fe=ae.value;typeof fe=="string"?fe=new Js(fe,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(fe.modeOption=ae.mode),this.doc=fe;var ye=new La.inputStyles[ae.inputStyle](this),Te=this.display=new _r(ie,fe,ye,ae);Te.wrapper.CodeMirror=this,ng(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bc(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 Ge,keySeq:null,specialChars:null},ae.autofocus&&!ee&&Te.input.focus(),_e&&Ke<11&&setTimeout(function(){return ge.display.input.reset(!0)},20),Kd(this),uu(),_n(this),this.curOp.forceUpdate=!0,Co(this,fe),ae.autofocus&&!ee||this.hasFocus()?setTimeout(function(){ge.hasFocus()&&!ge.state.focused&&Do(ge)},20):Bs(this);for(var We in xf)xf.hasOwnProperty(We)&&xf[We](this,ae[We],Dc);pr(this),ae.finishInit&&ae.finishInit(this);for(var ut=0;ut<cd.length;++ut)cd[ut](this);Sr(this),Be&&ae.lineWrapping&&getComputedStyle(Te.lineDiv).textRendering=="optimizelegibility"&&(Te.lineDiv.style.textRendering="auto")}La.defaults=ep,La.optionHandlers=xf;function Kd(ie){var ae=ie.display;Ht(ae.scroller,"mousedown",bn(ie,Dh)),_e&&Ke<11?Ht(ae.scroller,"dblclick",bn(ie,function(at){if(!Un(ie,at)){var Lt=Ki(ie,at);if(!(!Lt||eg(ie,at)||vs(ie.display,at))){Jn(at);var dn=ie.findWordAt(Lt);Ca(ie.doc,dn.anchor,dn.head)}}})):Ht(ae.scroller,"dblclick",function(at){return Un(ie,at)||Jn(at)}),Ht(ae.scroller,"contextmenu",function(at){return tg(ie,at)}),Ht(ae.input.getField(),"contextmenu",function(at){ae.scroller.contains(at.target)||tg(ie,at)});var ge,fe={end:0};function ye(){ae.activeTouch&&(ge=setTimeout(function(){return ae.activeTouch=null},1e3),fe=ae.activeTouch,fe.end=+new Date)}function Te(at){if(at.touches.length!=1)return!1;var Lt=at.touches[0];return Lt.radiusX<=1&&Lt.radiusY<=1}function We(at,Lt){if(Lt.left==null)return!0;var dn=Lt.left-at.left,Rt=Lt.top-at.top;return dn*dn+Rt*Rt>20*20}Ht(ae.scroller,"touchstart",function(at){if(!Un(ie,at)&&!Te(at)&&!eg(ie,at)){ae.input.ensurePolled(),clearTimeout(ge);var Lt=+new Date;ae.activeTouch={start:Lt,moved:!1,prev:Lt-fe.end<=300?fe:null},at.touches.length==1&&(ae.activeTouch.left=at.touches[0].pageX,ae.activeTouch.top=at.touches[0].pageY)}}),Ht(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),Ht(ae.scroller,"touchend",function(at){var Lt=ae.activeTouch;if(Lt&&!vs(ae,at)&&Lt.left!=null&&!Lt.moved&&new Date-Lt.start<300){var dn=ie.coordsChar(ae.activeTouch,"page"),Rt;!Lt.prev||We(Lt,Lt.prev)?Rt=new mr(dn,dn):!Lt.prev.prev||We(Lt,Lt.prev.prev)?Rt=ie.findWordAt(dn):Rt=new mr(Gt(dn.line,0),li(ie.doc,Gt(dn.line+1,0))),ie.setSelection(Rt.anchor,Rt.head),ie.focus(),Jn(at)}ye()}),Ht(ae.scroller,"touchcancel",ye),Ht(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(Nh(ie,ae.scroller.scrollTop),_u(ie,ae.scroller.scrollLeft,!0),cn(ie,"scroll",ie))}),Ht(ae.scroller,"mousewheel",function(at){return So(ie,at)}),Ht(ae.scroller,"DOMMouseScroll",function(at){return So(ie,at)}),Ht(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(at){Un(ie,at)||zi(at)},over:function(at){Un(ie,at)||(vf(ie,at),zi(at))},start:function(at){return sd(ie,at)},drop:bn(ie,Rd),leave:function(at){Un(ie,at)||Uf(ie)}};var ut=ae.input.getField();Ht(ut,"keyup",function(at){return Ug.call(ie,at)}),Ht(ut,"keydown",bn(ie,Kg)),Ht(ut,"keypress",bn(ie,Th)),Ht(ut,"focus",function(at){return Do(ie,at)}),Ht(ut,"blur",function(at){return Bs(ie,at)})}var cd=[];La.defineInitHook=function(ie){return cd.push(ie)};function rl(ie,ae,ge,fe){var ye=ie.doc,Te;ge==null&&(ge="add"),ge=="smart"&&(ye.mode.indent?Te=ar(ie,ae).state:ge="prev");var We=ie.options.tabSize,ut=Vt(ye,ae),at=lt(ut.text,null,We);ut.stateAfter&&(ut.stateAfter=null);var Lt=ut.text.match(/^\s*/)[0],dn;if(!fe&&!/\S/.test(ut.text))dn=0,ge="not";else if(ge=="smart"&&(dn=ye.mode.indent(Te,ut.text.slice(Lt.length),ut.text),dn==ln||dn>150)){if(!fe)return;ge="prev"}ge=="prev"?ae>ye.first?dn=lt(Vt(ye,ae-1).text,null,We):dn=0:ge=="add"?dn=at+ie.options.indentUnit:ge=="subtract"?dn=at-ie.options.indentUnit:typeof ge=="number"&&(dn=at+ge),dn=Math.max(0,dn);var Rt="",zn=0;if(ie.options.indentWithTabs)for(var On=Math.floor(dn/We);On;--On)zn+=We,Rt+=" ";if(zn<dn&&(Rt+=Cn(dn-zn)),Rt!=Lt)return gh(ye,Rt,Gt(ae,0),Gt(ae,Lt.length),"+input"),ut.stateAfter=null,!0;for(var wi=0;wi<ye.sel.ranges.length;wi++){var Ti=ye.sel.ranges[wi];if(Ti.head.line==ae&&Ti.head.ch<Lt.length){var Hi=Gt(ae,Lt.length);za(ye,wi,new mr(Hi,Hi));break}}}var cu=null;function dd(ie){cu=ie}function Pf(ie,ae,ge,fe,ye){var Te=ie.doc;ie.display.shift=!1,fe||(fe=Te.sel);var We=+new Date-200,ut=ye=="paste"||ie.state.pasteIncoming>We,at=Ii(ae),Lt=null;if(ut&&fe.ranges.length>1)if(cu&&cu.text.join(`
`)==ae){if(fe.ranges.length%cu.text.length==0){Lt=[];for(var dn=0;dn<cu.text.length;dn++)Lt.push(Te.splitLines(cu.text[dn]))}}else at.length==fe.ranges.length&&ie.options.pasteLinesPerSelection&&(Lt=En(at,function(vr){return[vr]}));for(var Rt=ie.curOp.updateInput,zn=fe.ranges.length-1;zn>=0;zn--){var On=fe.ranges[zn],wi=On.from(),Ti=On.to();On.empty()&&(ge&&ge>0?wi=Gt(wi.line,wi.ch-ge):ie.state.overwrite&&!ut?Ti=Gt(Ti.line,Math.min(Vt(Te,Ti.line).text.length,Ti.ch+gt(at).length)):ut&&cu&&cu.lineWise&&cu.text.join(`
`)==at.join(`
`)&&(wi=Ti=Gt(wi.line,0)));var Hi={from:wi,to:Ti,text:Lt?Lt[zn%Lt.length]:at,origin:ye||(ut?"paste":ie.state.cutIncoming>We?"cut":"+input")};fs(ie.doc,Hi),Di(ie,"inputRead",ie,Hi)}ae&&!ut&&np(ie,ae),ru(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Rt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function tp(ie,ae){var ge=ie.clipboardData&&ie.clipboardData.getData("Text");if(ge)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&Wt(ae,function(){return Pf(ae,ge,0,null,"paste")}),!0}function np(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var ge=ie.doc.sel,fe=ge.ranges.length-1;fe>=0;fe--){var ye=ge.ranges[fe];if(!(ye.head.ch>100||fe&&ge.ranges[fe-1].head.line==ye.head.line)){var Te=ie.getModeAt(ye.head),We=!1;if(Te.electricChars){for(var ut=0;ut<Te.electricChars.length;ut++)if(ae.indexOf(Te.electricChars.charAt(ut))>-1){We=rl(ie,ye.head.line,"smart");break}}else Te.electricInput&&Te.electricInput.test(Vt(ie.doc,ye.head.line).text.slice(0,ye.head.ch))&&(We=rl(ie,ye.head.line,"smart"));We&&Di(ie,"electricInput",ie,ye.head.line)}}}function ip(ie){for(var ae=[],ge=[],fe=0;fe<ie.doc.sel.ranges.length;fe++){var ye=ie.doc.sel.ranges[fe].head.line,Te={anchor:Gt(ye,0),head:Gt(ye+1,0)};ge.push(Te),ae.push(ie.getRange(Te.anchor,Te.head))}return{text:ae,ranges:ge}}function rp(ie,ae,ge,fe){ie.setAttribute("autocorrect",ge?"":"off"),ie.setAttribute("autocapitalize",fe?"":"off"),ie.setAttribute("spellcheck",!!ae)}function op(){var ie=$e("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=$e("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Be?ie.style.width="1000px":ie.setAttribute("wrap","off"),Ae&&(ie.style.border="1px solid black"),rp(ie),ae}function Oc(ie){var ae=ie.optionHandlers,ge=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(fe,ye){var Te=this.options,We=Te[fe];Te[fe]==ye&&fe!="mode"||(Te[fe]=ye,ae.hasOwnProperty(fe)&&bn(this,ae[fe])(this,ye,We),cn(this,"optionChange",this,fe))},getOption:function(fe){return this.options[fe]},getDoc:function(){return this.doc},addKeyMap:function(fe,ye){this.state.keyMaps[ye?"push":"unshift"](Vh(fe))},removeKeyMap:function(fe){for(var ye=this.state.keyMaps,Te=0;Te<ye.length;++Te)if(ye[Te]==fe||ye[Te].name==fe)return ye.splice(Te,1),!0},addOverlay:yn(function(fe,ye){var Te=fe.token?fe:ie.getMode(this.options,fe);if(Te.startState)throw new Error("Overlays may not be stateful.");Vn(this.state.overlays,{mode:Te,modeSpec:fe,opaque:ye&&ye.opaque,priority:ye&&ye.priority||0},function(We){return We.priority}),this.state.modeGen++,Ar(this)}),removeOverlay:yn(function(fe){for(var ye=this.state.overlays,Te=0;Te<ye.length;++Te){var We=ye[Te].modeSpec;if(We==fe||typeof fe=="string"&&We.name==fe){ye.splice(Te,1),this.state.modeGen++,Ar(this);return}}}),indentLine:yn(function(fe,ye,Te){typeof ye!="string"&&typeof ye!="number"&&(ye==null?ye=this.options.smartIndent?"smart":"prev":ye=ye?"add":"subtract"),In(this.doc,fe)&&rl(this,fe,ye,Te)}),indentSelection:yn(function(fe){for(var ye=this.doc.sel.ranges,Te=-1,We=0;We<ye.length;We++){var ut=ye[We];if(ut.empty())ut.head.line>Te&&(rl(this,ut.head.line,fe,!0),Te=ut.head.line,We==this.doc.sel.primIndex&&ru(this));else{var at=ut.from(),Lt=ut.to(),dn=Math.max(Te,at.line);Te=Math.min(this.lastLine(),Lt.line-(Lt.ch?0:1))+1;for(var Rt=dn;Rt<Te;++Rt)rl(this,Rt,fe);var zn=this.doc.sel.ranges;at.ch==0&&ye.length==zn.length&&zn[We].from().ch>0&&za(this.doc,We,new mr(at,zn[We].to()),Ft)}}}),getTokenAt:function(fe,ye){return ki(this,fe,ye)},getLineTokens:function(fe,ye){return ki(this,Gt(fe),ye,!0)},getTokenTypeAt:function(fe){fe=li(this.doc,fe);var ye=Or(this,Vt(this.doc,fe.line)),Te=0,We=(ye.length-1)/2,ut=fe.ch,at;if(ut==0)at=ye[2];else for(;;){var Lt=Te+We>>1;if((Lt?ye[Lt*2-1]:0)>=ut)We=Lt;else if(ye[Lt*2+1]<ut)Te=Lt+1;else{at=ye[Lt*2+2];break}}var dn=at?at.indexOf("overlay "):-1;return dn<0?at:dn==0?null:at.slice(0,dn-1)},getModeAt:function(fe){var ye=this.doc.mode;return ye.innerMode?ie.innerMode(ye,this.getTokenAt(fe).state).mode:ye},getHelper:function(fe,ye){return this.getHelpers(fe,ye)[0]},getHelpers:function(fe,ye){var Te=[];if(!ge.hasOwnProperty(ye))return Te;var We=ge[ye],ut=this.getModeAt(fe);if(typeof ut[ye]=="string")We[ut[ye]]&&Te.push(We[ut[ye]]);else if(ut[ye])for(var at=0;at<ut[ye].length;at++){var Lt=We[ut[ye][at]];Lt&&Te.push(Lt)}else ut.helperType&&We[ut.helperType]?Te.push(We[ut.helperType]):We[ut.name]&&Te.push(We[ut.name]);for(var dn=0;dn<We._global.length;dn++){var Rt=We._global[dn];Rt.pred(ut,this)&&kt(Te,Rt.val)==-1&&Te.push(Rt.val)}return Te},getStateAfter:function(fe,ye){var Te=this.doc;return fe=ci(Te,fe==null?Te.first+Te.size-1:fe),ar(this,fe+1,ye).state},cursorCoords:function(fe,ye){var Te,We=this.doc.sel.primary();return fe==null?Te=We.head:typeof fe=="object"?Te=li(this.doc,fe):Te=fe?We.from():We.to(),va(this,Te,ye||"page")},charCoords:function(fe,ye){return $s(this,li(this.doc,fe),ye||"page")},coordsChar:function(fe,ye){return fe=Gs(this,fe,ye||"page"),Kt(this,fe.left,fe.top)},lineAtHeight:function(fe,ye){return fe=Gs(this,{top:fe,left:0},ye||"page").top,hn(this.doc,fe+this.display.viewOffset)},heightAtLine:function(fe,ye,Te){var We=!1,ut;if(typeof fe=="number"){var at=this.doc.first+this.doc.size-1;fe<this.doc.first?fe=this.doc.first:fe>at&&(fe=at,We=!0),ut=Vt(this.doc,fe)}else ut=fe;return Va(this,ut,{top:0,left:0},ye||"page",Te||We).top+(We?this.doc.height-bo(ut):0)},defaultTextHeight:function(){return zr(this.display)},defaultCharWidth:function(){return Ro(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fe,ye,Te,We,ut){var at=this.display;fe=va(this,li(this.doc,fe));var Lt=fe.bottom,dn=fe.left;if(ye.style.position="absolute",ye.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ye),at.sizer.appendChild(ye),We=="over")Lt=fe.top;else if(We=="above"||We=="near"){var Rt=Math.max(at.wrapper.clientHeight,this.doc.height),zn=Math.max(at.sizer.clientWidth,at.lineSpace.clientWidth);(We=="above"||fe.bottom+ye.offsetHeight>Rt)&&fe.top>ye.offsetHeight?Lt=fe.top-ye.offsetHeight:fe.bottom+ye.offsetHeight<=Rt&&(Lt=fe.bottom),dn+ye.offsetWidth>zn&&(dn=zn-ye.offsetWidth)}ye.style.top=Lt+"px",ye.style.left=ye.style.right="",ut=="right"?(dn=at.sizer.clientWidth-ye.offsetWidth,ye.style.right="0px"):(ut=="left"?dn=0:ut=="middle"&&(dn=(at.sizer.clientWidth-ye.offsetWidth)/2),ye.style.left=dn+"px"),Te&&ju(this,{left:dn,top:Lt,right:dn+ye.offsetWidth,bottom:Lt+ye.offsetHeight})},triggerOnKeyDown:yn(Kg),triggerOnKeyPress:yn(Th),triggerOnKeyUp:Ug,triggerOnMouseDown:yn(Dh),execCommand:function(fe){if(il.hasOwnProperty(fe))return il[fe].call(null,this)},triggerElectric:yn(function(fe){np(this,fe)}),findPosH:function(fe,ye,Te,We){var ut=1;ye<0&&(ut=-1,ye=-ye);for(var at=li(this.doc,fe),Lt=0;Lt<ye&&(at=wf(this.doc,at,ut,Te,We),!at.hitSide);++Lt);return at},moveH:yn(function(fe,ye){var Te=this;this.extendSelectionsBy(function(We){return Te.display.shift||Te.doc.extend||We.empty()?wf(Te.doc,We.head,fe,ye,Te.options.rtlMoveVisually):fe<0?We.from():We.to()},Qt)}),deleteH:yn(function(fe,ye){var Te=this.doc.sel,We=this.doc;Te.somethingSelected()?We.replaceSelection("",null,"+delete"):Ll(this,function(ut){var at=wf(We,ut.head,fe,ye,!1);return fe<0?{from:at,to:ut.head}:{from:ut.head,to:at}})}),findPosV:function(fe,ye,Te,We){var ut=1,at=We;ye<0&&(ut=-1,ye=-ye);for(var Lt=li(this.doc,fe),dn=0;dn<ye;++dn){var Rt=va(this,Lt,"div");if(at==null?at=Rt.left:Rt.left=at,Lt=Ic(this,Rt,ut,Te),Lt.hitSide)break}return Lt},moveV:yn(function(fe,ye){var Te=this,We=this.doc,ut=[],at=!this.display.shift&&!We.extend&&We.sel.somethingSelected();if(We.extendSelectionsBy(function(dn){if(at)return fe<0?dn.from():dn.to();var Rt=va(Te,dn.head,"div");dn.goalColumn!=null&&(Rt.left=dn.goalColumn),ut.push(Rt.left);var zn=Ic(Te,Rt,fe,ye);return ye=="page"&&dn==We.sel.primary()&&Bh(Te,$s(Te,zn,"div").top-Rt.top),zn},Qt),ut.length)for(var Lt=0;Lt<We.sel.ranges.length;Lt++)We.sel.ranges[Lt].goalColumn=ut[Lt]}),findWordAt:function(fe){var ye=this.doc,Te=Vt(ye,fe.line).text,We=fe.ch,ut=fe.ch;if(Te){var at=this.getHelper(fe,"wordChars");(fe.sticky=="before"||ut==Te.length)&&We?--We:++ut;for(var Lt=Te.charAt(We),dn=ke(Lt,at)?function(Rt){return ke(Rt,at)}:/\s/.test(Lt)?function(Rt){return/\s/.test(Rt)}:function(Rt){return!/\s/.test(Rt)&&!ke(Rt)};We>0&&dn(Te.charAt(We-1));)--We;for(;ut<Te.length&&dn(Te.charAt(ut));)++ut}return new mr(Gt(fe.line,We),Gt(fe.line,ut))},toggleOverwrite:function(fe){fe!=null&&fe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?bt(this.display.cursorDiv,"CodeMirror-overwrite"):Ie(this.display.cursorDiv,"CodeMirror-overwrite"),cn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==et()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:yn(function(fe,ye){zu(this,fe,ye)}),getScrollInfo:function(){var fe=this.display.scroller;return{left:fe.scrollLeft,top:fe.scrollTop,height:fe.scrollHeight-Ys(this)-this.display.barHeight,width:fe.scrollWidth-Ys(this)-this.display.barWidth,clientHeight:Mh(this),clientWidth:ul(this)}},scrollIntoView:yn(function(fe,ye){fe==null?(fe={from:this.doc.sel.primary().head,to:null},ye==null&&(ye=this.options.cursorScrollMargin)):typeof fe=="number"?fe={from:Gt(fe,0),to:null}:fe.from==null&&(fe={from:fe,to:null}),fe.to||(fe.to=fe.from),fe.margin=ye||0,fe.from.line!=null?aa(this,fe):Gh(this,fe.from,fe.to,fe.margin)}),setSize:yn(function(fe,ye){var Te=this,We=function(at){return typeof at=="number"||/^\d+$/.test(String(at))?at+"px":at};fe!=null&&(this.display.wrapper.style.width=We(fe)),ye!=null&&(this.display.wrapper.style.height=We(ye)),this.options.lineWrapping&&ds(this);var ut=this.display.viewFrom;this.doc.iter(ut,this.display.viewTo,function(at){if(at.widgets){for(var Lt=0;Lt<at.widgets.length;Lt++)if(at.widgets[Lt].noHScroll){rr(Te,ut,"widget");break}}++ut}),this.curOp.forceUpdate=!0,cn(this,"refresh",this)}),operation:function(fe){return Wt(this,fe)},startOperation:function(){return _n(this)},endOperation:function(){return Sr(this)},refresh:yn(function(){var fe=this.display.cachedTextHeight;Ar(this),this.curOp.forceUpdate=!0,es(this),zu(this,this.doc.scrollLeft,this.doc.scrollTop),Er(this.display),(fe==null||Math.abs(fe-zr(this.display))>.5||this.options.lineWrapping)&&Zi(this),cn(this,"refresh",this)}),swapDoc:yn(function(fe){var ye=this.doc;return ye.cm=null,this.state.selectingText&&this.state.selectingText(),Co(this,fe),es(this),this.display.input.reset(),zu(this,fe.scrollLeft,fe.scrollTop),this.curOp.forceScroll=!0,Di(this,"swapDoc",this,ye),ye}),phrase:function(fe){var ye=this.options.phrases;return ye&&Object.prototype.hasOwnProperty.call(ye,fe)?ye[fe]:fe},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}},Zn(ie),ie.registerHelper=function(fe,ye,Te){ge.hasOwnProperty(fe)||(ge[fe]=ie[fe]={_global:[]}),ge[fe][ye]=Te},ie.registerGlobalHelper=function(fe,ye,Te,We){ie.registerHelper(fe,ye,We),ge[fe]._global.push({pred:Te,val:We})}}function wf(ie,ae,ge,fe,ye){var Te=ae,We=ge,ut=Vt(ie,ae.line),at=ye&&ie.direction=="rtl"?-ge:ge;function Lt(){var Kr=ae.line+at;return Kr<ie.first||Kr>=ie.first+ie.size?!1:(ae=new Gt(Kr,ae.ch,ae.sticky),ut=Vt(ie,Kr))}function dn(Kr){var kr;if(fe=="codepoint"){var ro=ut.text.charCodeAt(ae.ch+(fe>0?0:-1));isNaN(ro)?kr=null:kr=new Gt(ae.line,Math.max(0,Math.min(ut.text.length,ae.ch+ge*(ro>=55296&&ro<56320?2:1))),-ge)}else ye?kr=ns(ie.cm,ut,ae,ge):kr=As(ut,ae,ge);if(kr==null)if(!Kr&&Lt())ae=Ea(ye,ie.cm,ut,ae.line,at);else return!1;else ae=kr;return!0}if(fe=="char"||fe=="codepoint")dn();else if(fe=="column")dn(!0);else if(fe=="word"||fe=="group")for(var Rt=null,zn=fe=="group",On=ie.cm&&ie.cm.getHelper(ae,"wordChars"),wi=!0;!(ge<0&&!dn(!wi));wi=!1){var Ti=ut.text.charAt(ae.ch)||`
`,Hi=ke(Ti,On)?"w":zn&&Ti==`
`?"n":!zn||/\s/.test(Ti)?null:"p";if(zn&&!wi&&!Hi&&(Hi="s"),Rt&&Rt!=Hi){ge<0&&(ge=1,dn(),ae.sticky="after");break}if(Hi&&(Rt=Hi),ge>0&&!dn(!wi))break}var vr=Cu(ie,ae,Te,We,!0);return hi(Te,vr)&&(vr.hitSide=!0),vr}function Ic(ie,ae,ge,fe){var ye=ie.doc,Te=ae.left,We;if(fe=="page"){var ut=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),at=Math.max(ut-.5*zr(ie.display),3);We=(ge>0?ae.bottom:ae.top)+ge*at}else fe=="line"&&(We=ge>0?ae.bottom+3:ae.top-3);for(var Lt;Lt=Kt(ie,Te,We),!!Lt.outside;){if(ge<0?We<=0:We>=ye.height){Lt.hitSide=!0;break}We+=ge*5}return Lt}var ss=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ge,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ss.prototype.init=function(ie){var ae=this,ge=this,fe=ge.cm,ye=ge.div=ie.lineDiv;rp(ye,fe.options.spellcheck,fe.options.autocorrect,fe.options.autocapitalize);function Te(ut){for(var at=ut.target;at;at=at.parentNode){if(at==ye)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(at.className))break}return!1}Ht(ye,"paste",function(ut){!Te(ut)||Un(fe,ut)||tp(ut,fe)||Ke<=11&&setTimeout(bn(fe,function(){return ae.updateFromDOM()}),20)}),Ht(ye,"compositionstart",function(ut){ae.composing={data:ut.data,done:!1}}),Ht(ye,"compositionupdate",function(ut){ae.composing||(ae.composing={data:ut.data,done:!1})}),Ht(ye,"compositionend",function(ut){ae.composing&&(ut.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),Ht(ye,"touchstart",function(){return ge.forceCompositionEnd()}),Ht(ye,"input",function(){ae.composing||ae.readFromDOMSoon()});function We(ut){if(!(!Te(ut)||Un(fe,ut))){if(fe.somethingSelected())dd({lineWise:!1,text:fe.getSelections()}),ut.type=="cut"&&fe.replaceSelection("",null,"cut");else if(fe.options.lineWiseCopyCut){var at=ip(fe);dd({lineWise:!0,text:at.text}),ut.type=="cut"&&fe.operation(function(){fe.setSelections(at.ranges,0,Ft),fe.replaceSelection("",null,"cut")})}else return;if(ut.clipboardData){ut.clipboardData.clearData();var Lt=cu.text.join(`
`);if(ut.clipboardData.setData("Text",Lt),ut.clipboardData.getData("Text")==Lt){ut.preventDefault();return}}var dn=op(),Rt=dn.firstChild;fe.display.lineSpace.insertBefore(dn,fe.display.lineSpace.firstChild),Rt.value=cu.text.join(`
`);var zn=document.activeElement;Nt(Rt),setTimeout(function(){fe.display.lineSpace.removeChild(dn),zn.focus(),zn==ye&&ge.showPrimarySelection()},50)}}Ht(ye,"copy",We),Ht(ye,"cut",We)},ss.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},ss.prototype.prepareSelection=function(){var ie=sr(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},ss.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},ss.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ss.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,ge=ae.doc.sel.primary(),fe=ge.from(),ye=ge.to();if(ae.display.viewTo==ae.display.viewFrom||fe.line>=ae.display.viewTo||ye.line<ae.display.viewFrom){ie.removeAllRanges();return}var Te=Cf(ae,ie.anchorNode,ie.anchorOffset),We=Cf(ae,ie.focusNode,ie.focusOffset);if(!(Te&&!Te.bad&&We&&!We.bad&&Jt(ni(Te,We),fe)==0&&Jt(ui(Te,We),ye)==0)){var ut=ae.display.view,at=fe.line>=ae.display.viewFrom&&rg(ae,fe)||{node:ut[0].measure.map[2],offset:0},Lt=ye.line<ae.display.viewTo&&rg(ae,ye);if(!Lt){var dn=ut[ut.length-1].measure,Rt=dn.maps?dn.maps[dn.maps.length-1]:dn.map;Lt={node:Rt[Rt.length-1],offset:Rt[Rt.length-2]-Rt[Rt.length-3]}}if(!at||!Lt){ie.removeAllRanges();return}var zn=ie.rangeCount&&ie.getRangeAt(0),On;try{On=Re(at.node,at.offset,Lt.offset,Lt.node)}catch(wi){}On&&(!ce&&ae.state.focused?(ie.collapse(at.node,at.offset),On.collapsed||(ie.removeAllRanges(),ie.addRange(On))):(ie.removeAllRanges(),ie.addRange(On)),zn&&ie.anchorNode==null?ie.addRange(zn):ce&&this.startGracePeriod()),this.rememberSelection()}},ss.prototype.startGracePeriod=function(){var ie=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){ie.gracePeriod=!1,ie.selectionChanged()&&ie.cm.operation(function(){return ie.cm.curOp.selectionChanged=!0})},20)},ss.prototype.showMultipleSelections=function(ie){qe(this.cm.display.cursorDiv,ie.cursors),qe(this.cm.display.selectionDiv,ie.selection)},ss.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},ss.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return Tt(this.div,ae)},ss.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ss.prototype.blur=function(){this.div.blur()},ss.prototype.getField=function(){return this.div},ss.prototype.supportsTouch=function(){return!0},ss.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():Wt(this.cm,function(){return ie.cm.curOp.selectionChanged=!0});function ae(){ie.cm.state.focused&&(ie.pollSelection(),ie.polling.set(ie.cm.options.pollInterval,ae))}this.polling.set(this.cm.options.pollInterval,ae)},ss.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},ss.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(te&&ct&&this.cm.display.gutterSpecs.length&&ap(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ge=Cf(ae,ie.anchorNode,ie.anchorOffset),fe=Cf(ae,ie.focusNode,ie.focusOffset);ge&&fe&&Wt(ae,function(){Ha(ae.doc,Ko(ge,fe),Ft),(ge.bad||fe.bad)&&(ae.curOp.selectionChanged=!0)})}}},ss.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ae=ie.display,ge=ie.doc.sel.primary(),fe=ge.from(),ye=ge.to();if(fe.ch==0&&fe.line>ie.firstLine()&&(fe=Gt(fe.line-1,Vt(ie.doc,fe.line-1).length)),ye.ch==Vt(ie.doc,ye.line).text.length&&ye.line<ie.lastLine()&&(ye=Gt(ye.line+1,0)),fe.line<ae.viewFrom||ye.line>ae.viewTo-1)return!1;var Te,We,ut;fe.line==ae.viewFrom||(Te=Dr(ie,fe.line))==0?(We=St(ae.view[0].line),ut=ae.view[0].node):(We=St(ae.view[Te].line),ut=ae.view[Te-1].node.nextSibling);var at=Dr(ie,ye.line),Lt,dn;if(at==ae.view.length-1?(Lt=ae.viewTo-1,dn=ae.lineDiv.lastChild):(Lt=St(ae.view[at+1].line)-1,dn=ae.view[at+1].node.previousSibling),!ut)return!1;for(var Rt=ie.doc.splitLines(Ud(ie,ut,dn,We,Lt)),zn=rn(ie.doc,Gt(We,0),Gt(Lt,Vt(ie.doc,Lt).text.length));Rt.length>1&&zn.length>1;)if(gt(Rt)==gt(zn))Rt.pop(),zn.pop(),Lt--;else if(Rt[0]==zn[0])Rt.shift(),zn.shift(),We++;else break;for(var On=0,wi=0,Ti=Rt[0],Hi=zn[0],vr=Math.min(Ti.length,Hi.length);On<vr&&Ti.charCodeAt(On)==Hi.charCodeAt(On);)++On;for(var Kr=gt(Rt),kr=gt(zn),ro=Math.min(Kr.length-(Rt.length==1?On:0),kr.length-(zn.length==1?On:0));wi<ro&&Kr.charCodeAt(Kr.length-wi-1)==kr.charCodeAt(kr.length-wi-1);)++wi;if(Rt.length==1&&zn.length==1&&We==fe.line)for(;On&&On>fe.ch&&Kr.charCodeAt(Kr.length-wi-1)==kr.charCodeAt(kr.length-wi-1);)On--,wi++;Rt[Rt.length-1]=Kr.slice(0,Kr.length-wi).replace(/^\u200b+/,""),Rt[0]=Rt[0].slice(On).replace(/\u200b+$/,"");var Ho=Gt(We,On),Fr=Gt(Lt,zn.length?gt(zn).length-wi:0);if(Rt.length>1||Rt[0]||Jt(Ho,Fr))return gh(ie.doc,Rt,Ho,Fr,"+input"),!0},ss.prototype.ensurePolled=function(){this.forceCompositionEnd()},ss.prototype.reset=function(){this.forceCompositionEnd()},ss.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ss.prototype.readFromDOMSoon=function(){var ie=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(ie.readDOMTimeout=null,ie.composing)if(ie.composing.done)ie.composing=null;else return;ie.updateFromDOM()},80))},ss.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&Wt(this.cm,function(){return Ar(ie.cm)})},ss.prototype.setUneditable=function(ie){ie.contentEditable="false"},ss.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||bn(this.cm,Pf)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},ss.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},ss.prototype.onContextMenu=function(){},ss.prototype.resetPosition=function(){},ss.prototype.needsContentAttribute=!0;function rg(ie,ae){var ge=Ru(ie,ae.line);if(!ge||ge.hidden)return null;var fe=Vt(ie.doc,ae.line),ye=Lh(ge,fe,ae.line),Te=sn(fe,ie.doc.direction),We="left";if(Te){var ut=ot(Te,ae.ch);We=ut%2?"right":"left"}var at=qu(ye.map,ae.ch,We);return at.offset=at.collapse=="right"?at.end:at.start,at}function ap(ie){for(var ae=ie;ae;ae=ae.parentNode)if(/CodeMirror-gutter-wrapper/.test(ae.className))return!0;return!1}function Vd(ie,ae){return ae&&(ie.bad=!0),ie}function Ud(ie,ae,ge,fe,ye){var Te="",We=!1,ut=ie.doc.lineSeparator(),at=!1;function Lt(On){return function(wi){return wi.id==On}}function dn(){We&&(Te+=ut,at&&(Te+=ut),We=at=!1)}function Rt(On){On&&(dn(),Te+=On)}function zn(On){if(On.nodeType==1){var wi=On.getAttribute("cm-text");if(wi){Rt(wi);return}var Ti=On.getAttribute("cm-marker"),Hi;if(Ti){var vr=ie.findMarks(Gt(fe,0),Gt(ye+1,0),Lt(+Ti));vr.length&&(Hi=vr[0].find(0))&&Rt(rn(ie.doc,Hi.from,Hi.to).join(ut));return}if(On.getAttribute("contenteditable")=="false")return;var Kr=/^(pre|div|p|li|table|br)$/i.test(On.nodeName);if(!/^br$/i.test(On.nodeName)&&On.textContent.length==0)return;Kr&&dn();for(var kr=0;kr<On.childNodes.length;kr++)zn(On.childNodes[kr]);/^(pre|p)$/i.test(On.nodeName)&&(at=!0),Kr&&(We=!0)}else On.nodeType==3&&Rt(On.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;zn(ae),ae!=ge;)ae=ae.nextSibling,at=!1;return Te}function Cf(ie,ae,ge){var fe;if(ae==ie.display.lineDiv){if(fe=ie.display.lineDiv.childNodes[ge],!fe)return Vd(ie.clipPos(Gt(ie.display.viewTo-1)),!0);ae=null,ge=0}else for(fe=ae;;fe=fe.parentNode){if(!fe||fe==ie.display.lineDiv)return null;if(fe.parentNode&&fe.parentNode==ie.display.lineDiv)break}for(var ye=0;ye<ie.display.view.length;ye++){var Te=ie.display.view[ye];if(Te.node==fe)return hm(Te,ae,ge)}}function hm(ie,ae,ge){var fe=ie.text.firstChild,ye=!1;if(!ae||!Tt(fe,ae))return Vd(Gt(St(ie.line),0),!0);if(ae==fe&&(ye=!0,ae=fe.childNodes[ge],ge=0,!ae)){var Te=ie.rest?gt(ie.rest):ie.line;return Vd(Gt(St(Te),Te.text.length),ye)}var We=ae.nodeType==3?ae:null,ut=ae;for(!We&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(We=ae.firstChild,ge&&(ge=We.nodeValue.length));ut.parentNode!=fe;)ut=ut.parentNode;var at=ie.measure,Lt=at.maps;function dn(Hi,vr,Kr){for(var kr=-1;kr<(Lt?Lt.length:0);kr++)for(var ro=kr<0?at.map:Lt[kr],Ho=0;Ho<ro.length;Ho+=3){var Fr=ro[Ho+2];if(Fr==Hi||Fr==vr){var oa=St(kr<0?ie.line:ie.rest[kr]),Ss=ro[Ho]+Kr;return(Kr<0||Fr!=Hi)&&(Ss=ro[Ho+(Kr?1:0)]),Gt(oa,Ss)}}}var Rt=dn(We,ut,ge);if(Rt)return Vd(Rt,ye);for(var zn=ut.nextSibling,On=We?We.nodeValue.length-ge:0;zn;zn=zn.nextSibling){if(Rt=dn(zn,zn.firstChild,0),Rt)return Vd(Gt(Rt.line,Rt.ch-On),ye);On+=zn.textContent.length}for(var wi=ut.previousSibling,Ti=ge;wi;wi=wi.previousSibling){if(Rt=dn(wi,wi.firstChild,-1),Rt)return Vd(Gt(Rt.line,Rt.ch+Ti),ye);Ti+=wi.textContent.length}}var Qs=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ge,this.hasSelection=!1,this.composing=null};Qs.prototype.init=function(ie){var ae=this,ge=this,fe=this.cm;this.createField(ie);var ye=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),Ae&&(ye.style.width="0px"),Ht(ye,"input",function(){_e&&Ke>=9&&ae.hasSelection&&(ae.hasSelection=null),ge.poll()}),Ht(ye,"paste",function(We){Un(fe,We)||tp(We,fe)||(fe.state.pasteIncoming=+new Date,ge.fastPoll())});function Te(We){if(!Un(fe,We)){if(fe.somethingSelected())dd({lineWise:!1,text:fe.getSelections()});else if(fe.options.lineWiseCopyCut){var ut=ip(fe);dd({lineWise:!0,text:ut.text}),We.type=="cut"?fe.setSelections(ut.ranges,null,Ft):(ge.prevInput="",ye.value=ut.text.join(`
`),Nt(ye))}else return;We.type=="cut"&&(fe.state.cutIncoming=+new Date)}}Ht(ye,"cut",Te),Ht(ye,"copy",Te),Ht(ie.scroller,"paste",function(We){if(!(vs(ie,We)||Un(fe,We))){if(!ye.dispatchEvent){fe.state.pasteIncoming=+new Date,ge.focus();return}var ut=new Event("paste");ut.clipboardData=We.clipboardData,ye.dispatchEvent(ut)}}),Ht(ie.lineSpace,"selectstart",function(We){vs(ie,We)||Jn(We)}),Ht(ye,"compositionstart",function(){var We=fe.getCursor("from");ge.composing&&ge.composing.range.clear(),ge.composing={start:We,range:fe.markText(We,fe.getCursor("to"),{className:"CodeMirror-composing"})}}),Ht(ye,"compositionend",function(){ge.composing&&(ge.poll(),ge.composing.range.clear(),ge.composing=null)})},Qs.prototype.createField=function(ie){this.wrapper=op(),this.textarea=this.wrapper.firstChild},Qs.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},Qs.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,ge=ie.doc,fe=sr(ie);if(ie.options.moveInputWithCursor){var ye=va(ie,ge.sel.primary().head,"div"),Te=ae.wrapper.getBoundingClientRect(),We=ae.lineDiv.getBoundingClientRect();fe.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,ye.top+We.top-Te.top)),fe.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,ye.left+We.left-Te.left))}return fe},Qs.prototype.showSelection=function(ie){var ae=this.cm,ge=ae.display;qe(ge.cursorDiv,ie.cursors),qe(ge.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},Qs.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ae=this.cm;if(ae.somethingSelected()){this.prevInput="";var ge=ae.getSelection();this.textarea.value=ge,ae.state.focused&&Nt(this.textarea),_e&&Ke>=9&&(this.hasSelection=ge)}else ie||(this.prevInput=this.textarea.value="",_e&&Ke>=9&&(this.hasSelection=null))}},Qs.prototype.getField=function(){return this.textarea},Qs.prototype.supportsTouch=function(){return!1},Qs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||et()!=this.textarea))try{this.textarea.focus()}catch(ie){}},Qs.prototype.blur=function(){this.textarea.blur()},Qs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Qs.prototype.receivedFocus=function(){this.slowPoll()},Qs.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},Qs.prototype.fastPoll=function(){var ie=!1,ae=this;ae.pollingFast=!0;function ge(){var fe=ae.poll();!fe&&!ie?(ie=!0,ae.polling.set(60,ge)):(ae.pollingFast=!1,ae.slowPoll())}ae.polling.set(20,ge)},Qs.prototype.poll=function(){var ie=this,ae=this.cm,ge=this.textarea,fe=this.prevInput;if(this.contextMenuPending||!ae.state.focused||Le(ge)&&!fe&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var ye=ge.value;if(ye==fe&&!ae.somethingSelected())return!1;if(_e&&Ke>=9&&this.hasSelection===ye||he&&/[\uf700-\uf7ff]/.test(ye))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Te=ye.charCodeAt(0);if(Te==8203&&!fe&&(fe="\u200B"),Te==8666)return this.reset(),this.cm.execCommand("undo")}for(var We=0,ut=Math.min(fe.length,ye.length);We<ut&&fe.charCodeAt(We)==ye.charCodeAt(We);)++We;return Wt(ae,function(){Pf(ae,ye.slice(We),fe.length-We,null,ie.composing?"*compose":null),ye.length>1e3||ye.indexOf(`
`)>-1?ge.value=ie.prevInput="":ie.prevInput=ye,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ae.markText(ie.composing.start,ae.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Qs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Qs.prototype.onKeyPress=function(){_e&&Ke>=9&&(this.hasSelection=null),this.fastPoll()},Qs.prototype.onContextMenu=function(ie){var ae=this,ge=ae.cm,fe=ge.display,ye=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Te=Ki(ge,ie),We=fe.scroller.scrollTop;if(!Te||Ze)return;var ut=ge.options.resetSelectionOnContextMenu;ut&&ge.doc.sel.contains(Te)==-1&&bn(ge,Ha)(ge.doc,Ko(Te),Ft);var at=ye.style.cssText,Lt=ae.wrapper.style.cssText,dn=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",ye.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(ie.clientY-dn.top-5)+"px; left: "+(ie.clientX-dn.left-5)+`px;
z-index: 1000; background: `+(_e?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Rt;Be&&(Rt=window.scrollY),fe.input.focus(),Be&&window.scrollTo(null,Rt),fe.input.reset(),ge.somethingSelected()||(ye.value=ae.prevInput=" "),ae.contextMenuPending=On,fe.selForContextMenu=ge.doc.sel,clearTimeout(fe.detectingSelectAll);function zn(){if(ye.selectionStart!=null){var Ti=ge.somethingSelected(),Hi="\u200B"+(Ti?ye.value:"");ye.value="\u21DA",ye.value=Hi,ae.prevInput=Ti?"":"\u200B",ye.selectionStart=1,ye.selectionEnd=Hi.length,fe.selForContextMenu=ge.doc.sel}}function On(){if(ae.contextMenuPending==On&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=Lt,ye.style.cssText=at,_e&&Ke<9&&fe.scrollbars.setScrollTop(fe.scroller.scrollTop=We),ye.selectionStart!=null)){(!_e||_e&&Ke<9)&&zn();var Ti=0,Hi=function(){fe.selForContextMenu==ge.doc.sel&&ye.selectionStart==0&&ye.selectionEnd>0&&ae.prevInput=="\u200B"?bn(ge,ba)(ge):Ti++<10?fe.detectingSelectAll=setTimeout(Hi,500):(fe.selForContextMenu=null,fe.input.reset())};fe.detectingSelectAll=setTimeout(Hi,200)}}if(_e&&Ke>=9&&zn(),Me){zi(ie);var wi=function(){Dn(window,"mouseup",wi),setTimeout(On,20)};Ht(window,"mouseup",wi)}else setTimeout(On,50)},Qs.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},Qs.prototype.setUneditable=function(){},Qs.prototype.needsContentAttribute=!1;function cm(ie,ae){if(ae=ae?Ut(ae):{},ae.value=ie.value,!ae.tabindex&&ie.tabIndex&&(ae.tabindex=ie.tabIndex),!ae.placeholder&&ie.placeholder&&(ae.placeholder=ie.placeholder),ae.autofocus==null){var ge=et();ae.autofocus=ge==ie||ie.getAttribute("autofocus")!=null&&ge==document.body}function fe(){ie.value=ut.getValue()}var ye;if(ie.form&&(Ht(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone)){var Te=ie.form;ye=Te.submit;try{var We=Te.submit=function(){fe(),Te.submit=ye,Te.submit(),Te.submit=We}}catch(at){}}ae.finishInit=function(at){at.save=fe,at.getTextArea=function(){return ie},at.toTextArea=function(){at.toTextArea=isNaN,fe(),ie.parentNode.removeChild(at.getWrapperElement()),ie.style.display="",ie.form&&(Dn(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=ye))}},ie.style.display="none";var ut=La(function(at){return ie.parentNode.insertBefore(at,ie.nextSibling)},ae);return ut}function Yd(ie){ie.off=Dn,ie.on=Ht,ie.wheelEventPixels=io,ie.Doc=Js,ie.splitLines=Ii,ie.countColumn=lt,ie.findColumn=Bn,ie.isWordChar=Ne,ie.Pass=ln,ie.signal=cn,ie.Line=vo,ie.changeEnd=Pa,ie.scrollbarModel=Fc,ie.Pos=Gt,ie.cmpPos=Jt,ie.modes=qn,ie.mimeModes=mi,ie.resolveMode=Tn,ie.getMode=At,ie.modeExtensions=Dt,ie.extendMode=Ve,ie.copyState=Yt,ie.startState=vt,ie.innerMode=tn,ie.commands=il,ie.keyMap=_l,ie.keyName=Hd,ie.isModifierKey=Tc,ie.lookupKey=hu,ie.normalizeKeyMap=_d,ie.StringStream=rt,ie.SharedTextMarker=ph,ie.TextMarker=qt,ie.LineWidget=_s,ie.e_preventDefault=Jn,ie.e_stopPropagation=vi,ie.e_stop=zi,ie.addClass=bt,ie.contains=Tt,ie.rmClass=Ie,ie.keyNames=nh}lm(La),Oc(La);var fc="iter insert remove copy getEditor constructor".split(" ");for(var Ef in Js.prototype)Js.prototype.hasOwnProperty(Ef)&&kt(fc,Ef)<0&&(La.prototype[Ef]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Js.prototype[Ef]));return Zn(Js),La.inputStyles={textarea:Qs,contenteditable:ss},La.defineMode=function(ie){!La.defaults.mode&&ie!="null"&&(La.defaults.mode=ie),Fi.apply(this,arguments)},La.defineMIME=jn,La.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),La.defineMIME("text/plain","null"),La.defineExtension=function(ie,ae){La.prototype[ie]=ae},La.defineDocExtension=function(ie,ae){Js.prototype[ie]=ae},La.fromTextArea=cm,Yd(La),La.version="5.58.2",La})},25419:function(Sn,an,ve){(function(ce){ce(ve(89780),ve(15525),ve(98101))})(function(ce){"use strict";ce.defineMode("markdown",function(De,ze){var Ct=ce.getMode(De,"text/html"),_e=Ct.name=="null";function Ke(lt){if(ce.findModeByName){var Ge=ce.findModeByName(lt);Ge&&(lt=Ge.mime||Ge.mimes[0])}var kt=ce.getMode(De,lt);return kt.name=="null"?null:kt}ze.highlightFormatting===void 0&&(ze.highlightFormatting=!1),ze.maxBlockquoteDepth===void 0&&(ze.maxBlockquoteDepth=0),ze.taskLists===void 0&&(ze.taskLists=!1),ze.strikethrough===void 0&&(ze.strikethrough=!1),ze.emoji===void 0&&(ze.emoji=!1),ze.fencedCodeBlockHighlighting===void 0&&(ze.fencedCodeBlockHighlighting=!0),ze.fencedCodeBlockDefaultMode===void 0&&(ze.fencedCodeBlockDefaultMode="text/plain"),ze.xml===void 0&&(ze.xml=!0),ze.tokenTypeOverrides===void 0&&(ze.tokenTypeOverrides={});var Be={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 mt in Be)Be.hasOwnProperty(mt)&&ze.tokenTypeOverrides[mt]&&(Be[mt]=ze.tokenTypeOverrides[mt]);var ct=/^([*\-_])(?:\s*\1){2,}\s*$/,Ze=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Et=/^\[(x| )\](?=\s)/i,ht=ze.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,dt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ae=/^[^#!\[\]*_\\<>` "'(~:]+/,te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,he=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,se=" ";function de(lt,Ge,kt){return Ge.f=Ge.inline=kt,kt(lt,Ge)}function me(lt,Ge,kt){return Ge.f=Ge.block=kt,kt(lt,Ge)}function we(lt){return!lt||!/\S/.test(lt.string)}function Me(lt){if(lt.linkTitle=!1,lt.linkHref=!1,lt.linkText=!1,lt.em=!1,lt.strong=!1,lt.strikethrough=!1,lt.quote=0,lt.indentedCode=!1,lt.f==Ie){var Ge=_e;if(!Ge){var kt=ce.innerMode(Ct,lt.htmlState);Ge=kt.mode.name=="xml"&&kt.state.tagStart===null&&!kt.state.context&&kt.state.tokenize.isInText}Ge&&(lt.f=ft,lt.block=be,lt.htmlState=null)}return lt.trailingSpace=0,lt.trailingSpaceNewLine=!1,lt.prevLine=lt.thisLine,lt.thisLine={stream:null},null}function be(lt,Ge){var kt=lt.column()===Ge.indentation,un=we(Ge.prevLine.stream),ln=Ge.indentedCode,Ft=Ge.prevLine.hr,$t=Ge.list!==!1,Qt=(Ge.listStack[Ge.listStack.length-1]||0)+3;Ge.indentedCode=!1;var Bn=Ge.indentation;if(Ge.indentationDiff===null&&(Ge.indentationDiff=Ge.indentation,$t)){for(Ge.list=null;Bn<Ge.listStack[Ge.listStack.length-1];)Ge.listStack.pop(),Ge.listStack.length?Ge.indentation=Ge.listStack[Ge.listStack.length-1]:Ge.list=!1;Ge.list!==!1&&(Ge.indentationDiff=Bn-Ge.listStack[Ge.listStack.length-1])}var on=!un&&!Ft&&!Ge.prevLine.header&&(!$t||!ln)&&!Ge.prevLine.fencedCodeEnd,Cn=(Ge.list===!1||Ft||un)&&Ge.indentation<=Qt&&lt.match(ct),gt=null;if(Ge.indentationDiff>=4&&(ln||Ge.prevLine.fencedCodeEnd||Ge.prevLine.header||un))return lt.skipToEnd(),Ge.indentedCode=!0,Be.code;if(lt.eatSpace())return null;if(kt&&Ge.indentation<=Qt&&(gt=lt.match(ht))&&gt[1].length<=6)return Ge.quote=0,Ge.header=gt[1].length,Ge.thisLine.header=!0,ze.highlightFormatting&&(Ge.formatting="header"),Ge.f=Ge.inline,qe(Ge);if(Ge.indentation<=Qt&&lt.eat(">"))return Ge.quote=kt?1:Ge.quote+1,ze.highlightFormatting&&(Ge.formatting="quote"),lt.eatSpace(),qe(Ge);if(!Cn&&!Ge.setext&&kt&&Ge.indentation<=Qt&&(gt=lt.match(Ze))){var En=gt[1]?"ol":"ul";return Ge.indentation=Bn+lt.current().length,Ge.list=!0,Ge.quote=0,Ge.listStack.push(Ge.indentation),Ge.em=!1,Ge.strong=!1,Ge.code=!1,Ge.strikethrough=!1,ze.taskLists&&lt.match(Et,!1)&&(Ge.taskList=!0),Ge.f=Ge.inline,ze.highlightFormatting&&(Ge.formatting=["list","list-"+En]),qe(Ge)}else{if(kt&&Ge.indentation<=Qt&&(gt=lt.match(te,!0)))return Ge.quote=0,Ge.fencedEndRE=new RegExp(gt[1]+"+ *$"),Ge.localMode=ze.fencedCodeBlockHighlighting&&Ke(gt[2]||ze.fencedCodeBlockDefaultMode),Ge.localMode&&(Ge.localState=ce.startState(Ge.localMode)),Ge.f=Ge.block=je,ze.highlightFormatting&&(Ge.formatting="code-block"),Ge.code=-1,qe(Ge);if(Ge.setext||(!on||!$t)&&!Ge.quote&&Ge.list===!1&&!Ge.code&&!Cn&&!ee.test(lt.string)&&(gt=lt.lookAhead(1))&&(gt=gt.match(dt)))return Ge.setext?(Ge.header=Ge.setext,Ge.setext=0,lt.skipToEnd(),ze.highlightFormatting&&(Ge.formatting="header")):(Ge.header=gt[0].charAt(0)=="="?1:2,Ge.setext=Ge.header),Ge.thisLine.header=!0,Ge.f=Ge.inline,qe(Ge);if(Cn)return lt.skipToEnd(),Ge.hr=!0,Ge.thisLine.hr=!0,Be.hr;if(lt.peek()==="[")return de(lt,Ge,Bt)}return de(lt,Ge,Ge.inline)}function Ie(lt,Ge){var kt=Ct.token(lt,Ge.htmlState);if(!_e){var un=ce.innerMode(Ct,Ge.htmlState);(un.mode.name=="xml"&&un.state.tagStart===null&&!un.state.context&&un.state.tokenize.isInText||Ge.md_inside&&lt.current().indexOf(">")>-1)&&(Ge.f=ft,Ge.block=be,Ge.htmlState=null)}return kt}function je(lt,Ge){var kt=Ge.listStack[Ge.listStack.length-1]||0,un=Ge.indentation<kt,ln=kt+3;if(Ge.fencedEndRE&&Ge.indentation<=ln&&(un||lt.match(Ge.fencedEndRE))){ze.highlightFormatting&&(Ge.formatting="code-block");var Ft;return un||(Ft=qe(Ge)),Ge.localMode=Ge.localState=null,Ge.block=be,Ge.f=ft,Ge.fencedEndRE=null,Ge.code=0,Ge.thisLine.fencedCodeEnd=!0,un?me(lt,Ge,Ge.block):Ft}else return Ge.localMode?Ge.localMode.token(lt,Ge.localState):(lt.skipToEnd(),Be.code)}function qe(lt){var Ge=[];if(lt.formatting){Ge.push(Be.formatting),typeof lt.formatting=="string"&&(lt.formatting=[lt.formatting]);for(var kt=0;kt<lt.formatting.length;kt++)Ge.push(Be.formatting+"-"+lt.formatting[kt]),lt.formatting[kt]==="header"&&Ge.push(Be.formatting+"-"+lt.formatting[kt]+"-"+lt.header),lt.formatting[kt]==="quote"&&(!ze.maxBlockquoteDepth||ze.maxBlockquoteDepth>=lt.quote?Ge.push(Be.formatting+"-"+lt.formatting[kt]+"-"+lt.quote):Ge.push("error"))}if(lt.taskOpen)return Ge.push("meta"),Ge.length?Ge.join(" "):null;if(lt.taskClosed)return Ge.push("property"),Ge.length?Ge.join(" "):null;if(lt.linkHref?Ge.push(Be.linkHref,"url"):(lt.strong&&Ge.push(Be.strong),lt.em&&Ge.push(Be.em),lt.strikethrough&&Ge.push(Be.strikethrough),lt.emoji&&Ge.push(Be.emoji),lt.linkText&&Ge.push(Be.linkText),lt.code&&Ge.push(Be.code),lt.image&&Ge.push(Be.image),lt.imageAltText&&Ge.push(Be.imageAltText,"link"),lt.imageMarker&&Ge.push(Be.imageMarker)),lt.header&&Ge.push(Be.header,Be.header+"-"+lt.header),lt.quote&&(Ge.push(Be.quote),!ze.maxBlockquoteDepth||ze.maxBlockquoteDepth>=lt.quote?Ge.push(Be.quote+"-"+lt.quote):Ge.push(Be.quote+"-"+ze.maxBlockquoteDepth)),lt.list!==!1){var un=(lt.listStack.length-1)%3;un?un===1?Ge.push(Be.list2):Ge.push(Be.list3):Ge.push(Be.list1)}return lt.trailingSpaceNewLine?Ge.push("trailing-space-new-line"):lt.trailingSpace&&Ge.push("trailing-space-"+(lt.trailingSpace%2?"a":"b")),Ge.length?Ge.join(" "):null}function $e(lt,Ge){if(lt.match(Ae,!0))return qe(Ge)}function ft(lt,Ge){var kt=Ge.text(lt,Ge);if(typeof kt!="undefined")return kt;if(Ge.list)return Ge.list=null,qe(Ge);if(Ge.taskList){var un=lt.match(Et,!0)[1]===" ";return un?Ge.taskOpen=!0:Ge.taskClosed=!0,ze.highlightFormatting&&(Ge.formatting="task"),Ge.taskList=!1,qe(Ge)}if(Ge.taskOpen=!1,Ge.taskClosed=!1,Ge.header&&lt.match(/^#+$/,!0))return ze.highlightFormatting&&(Ge.formatting="header"),qe(Ge);var ln=lt.next();if(Ge.linkTitle){Ge.linkTitle=!1;var Ft=ln;ln==="("&&(Ft=")"),Ft=(Ft+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var $t="^\\s*(?:[^"+Ft+"\\\\]+|\\\\\\\\|\\\\.)"+Ft;if(lt.match(new RegExp($t),!0))return Be.linkHref}if(ln==="`"){var Qt=Ge.formatting;ze.highlightFormatting&&(Ge.formatting="code"),lt.eatWhile("`");var Bn=lt.current().length;if(Ge.code==0&&(!Ge.quote||Bn==1))return Ge.code=Bn,qe(Ge);if(Bn==Ge.code){var on=qe(Ge);return Ge.code=0,on}else return Ge.formatting=Qt,qe(Ge)}else if(Ge.code)return qe(Ge);if(ln==="\\"&&(lt.next(),ze.highlightFormatting)){var Cn=qe(Ge),gt=Be.formatting+"-escape";return Cn?Cn+" "+gt:gt}if(ln==="!"&&lt.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ge.imageMarker=!0,Ge.image=!0,ze.highlightFormatting&&(Ge.formatting="image"),qe(Ge);if(ln==="["&&Ge.imageMarker&&lt.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ge.imageMarker=!1,Ge.imageAltText=!0,ze.highlightFormatting&&(Ge.formatting="image"),qe(Ge);if(ln==="]"&&Ge.imageAltText){ze.highlightFormatting&&(Ge.formatting="image");var Cn=qe(Ge);return Ge.imageAltText=!1,Ge.image=!1,Ge.inline=Ge.f=Tt,Cn}if(ln==="["&&!Ge.image)return Ge.linkText&&lt.match(/^.*?\]/)||(Ge.linkText=!0,ze.highlightFormatting&&(Ge.formatting="link")),qe(Ge);if(ln==="]"&&Ge.linkText){ze.highlightFormatting&&(Ge.formatting="link");var Cn=qe(Ge);return Ge.linkText=!1,Ge.inline=Ge.f=lt.match(/\(.*?\)| ?\[.*?\]/,!1)?Tt:ft,Cn}if(ln==="<"&&lt.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ge.f=Ge.inline=Re,ze.highlightFormatting&&(Ge.formatting="link");var Cn=qe(Ge);return Cn?Cn+=" ":Cn="",Cn+Be.linkInline}if(ln==="<"&&lt.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ge.f=Ge.inline=Re,ze.highlightFormatting&&(Ge.formatting="link");var Cn=qe(Ge);return Cn?Cn+=" ":Cn="",Cn+Be.linkEmail}if(ze.xml&&ln==="<"&&lt.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var En=lt.string.indexOf(">",lt.pos);if(En!=-1){var Vn=lt.string.substring(lt.start,En);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Vn)&&(Ge.md_inside=!0)}return lt.backUp(1),Ge.htmlState=ce.startState(Ct),me(lt,Ge,Ie)}if(ze.xml&&ln==="<"&&lt.match(/^\/\w*?>/))return Ge.md_inside=!1,"tag";if(ln==="*"||ln==="_"){for(var He=1,Ce=lt.pos==1?" ":lt.string.charAt(lt.pos-2);He<3&&lt.eat(ln);)He++;var Pe=lt.peek()||" ",Ne=!/\s/.test(Pe)&&(!he.test(Pe)||/\s/.test(Ce)||he.test(Ce)),ke=!/\s/.test(Ce)&&(!he.test(Ce)||/\s/.test(Pe)||he.test(Pe)),Se=null,nt=null;if(He%2&&(!Ge.em&&Ne&&(ln==="*"||!ke||he.test(Ce))?Se=!0:Ge.em==ln&&ke&&(ln==="*"||!Ne||he.test(Pe))&&(Se=!1)),He>1&&(!Ge.strong&&Ne&&(ln==="*"||!ke||he.test(Ce))?nt=!0:Ge.strong==ln&&ke&&(ln==="*"||!Ne||he.test(Pe))&&(nt=!1)),nt!=null||Se!=null){ze.highlightFormatting&&(Ge.formatting=Se==null?"strong":nt==null?"em":"strong em"),Se===!0&&(Ge.em=ln),nt===!0&&(Ge.strong=ln);var on=qe(Ge);return Se===!1&&(Ge.em=!1),nt===!1&&(Ge.strong=!1),on}}else if(ln===" "&&(lt.eat("*")||lt.eat("_"))){if(lt.peek()===" ")return qe(Ge);lt.backUp(1)}if(ze.strikethrough){if(ln==="~"&&lt.eatWhile(ln)){if(Ge.strikethrough){ze.highlightFormatting&&(Ge.formatting="strikethrough");var on=qe(Ge);return Ge.strikethrough=!1,on}else if(lt.match(/^[^\s]/,!1))return Ge.strikethrough=!0,ze.highlightFormatting&&(Ge.formatting="strikethrough"),qe(Ge)}else if(ln===" "&&lt.match(/^~~/,!0)){if(lt.peek()===" ")return qe(Ge);lt.backUp(2)}}if(ze.emoji&&ln===":"&&lt.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ge.emoji=!0,ze.highlightFormatting&&(Ge.formatting="emoji");var Pt=qe(Ge);return Ge.emoji=!1,Pt}return ln===" "&&(lt.match(/^ +$/,!1)?Ge.trailingSpace++:Ge.trailingSpace&&(Ge.trailingSpaceNewLine=!0)),qe(Ge)}function Re(lt,Ge){var kt=lt.next();if(kt===">"){Ge.f=Ge.inline=ft,ze.highlightFormatting&&(Ge.formatting="link");var un=qe(Ge);return un?un+=" ":un="",un+Be.linkInline}return lt.match(/^[^>]+/,!0),Be.linkInline}function Tt(lt,Ge){if(lt.eatSpace())return null;var kt=lt.next();return kt==="("||kt==="["?(Ge.f=Ge.inline=bt(kt==="("?")":"]"),ze.highlightFormatting&&(Ge.formatting="link-string"),Ge.linkHref=!0,qe(Ge)):"error"}var et={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function bt(lt){return function(Ge,kt){var un=Ge.next();if(un===lt){kt.f=kt.inline=ft,ze.highlightFormatting&&(kt.formatting="link-string");var ln=qe(kt);return kt.linkHref=!1,ln}return Ge.match(et[lt]),kt.linkHref=!0,qe(kt)}}function Bt(lt,Ge){return lt.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ge.f=Nt,lt.next(),ze.highlightFormatting&&(Ge.formatting="link"),Ge.linkText=!0,qe(Ge)):de(lt,Ge,ft)}function Nt(lt,Ge){if(lt.match(/^\]:/,!0)){Ge.f=Ge.inline=Zt,ze.highlightFormatting&&(Ge.formatting="link");var kt=qe(Ge);return Ge.linkText=!1,kt}return lt.match(/^([^\]\\]|\\.)+/,!0),Be.linkText}function Zt(lt,Ge){return lt.eatSpace()?null:(lt.match(/^[^\s]+/,!0),lt.peek()===void 0?Ge.linkTitle=!0:lt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ge.f=Ge.inline=ft,Be.linkHref+" url")}var Ut={startState:function(){return{f:be,prevLine:{stream:null},thisLine:{stream:null},block:be,htmlState:null,indentation:0,inline:ft,text:$e,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(lt){return{f:lt.f,prevLine:lt.prevLine,thisLine:lt.thisLine,block:lt.block,htmlState:lt.htmlState&&ce.copyState(Ct,lt.htmlState),indentation:lt.indentation,localMode:lt.localMode,localState:lt.localMode?ce.copyState(lt.localMode,lt.localState):null,inline:lt.inline,text:lt.text,formatting:!1,linkText:lt.linkText,linkTitle:lt.linkTitle,linkHref:lt.linkHref,code:lt.code,em:lt.em,strong:lt.strong,strikethrough:lt.strikethrough,emoji:lt.emoji,header:lt.header,setext:lt.setext,hr:lt.hr,taskList:lt.taskList,list:lt.list,listStack:lt.listStack.slice(0),quote:lt.quote,indentedCode:lt.indentedCode,trailingSpace:lt.trailingSpace,trailingSpaceNewLine:lt.trailingSpaceNewLine,md_inside:lt.md_inside,fencedEndRE:lt.fencedEndRE}},token:function(lt,Ge){if(Ge.formatting=!1,lt!=Ge.thisLine.stream){if(Ge.header=0,Ge.hr=!1,lt.match(/^\s*$/,!0))return Me(Ge),null;if(Ge.prevLine=Ge.thisLine,Ge.thisLine={stream:lt},Ge.taskList=!1,Ge.trailingSpace=0,Ge.trailingSpaceNewLine=!1,!Ge.localState&&(Ge.f=Ge.block,Ge.f!=Ie)){var kt=lt.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ge.indentation=kt,Ge.indentationDiff=null,kt>0)return null}}return Ge.f(lt,Ge)},innerMode:function(lt){return lt.block==Ie?{state:lt.htmlState,mode:Ct}:lt.localState?{state:lt.localState,mode:lt.localMode}:{state:lt,mode:Ut}},indent:function(lt,Ge,kt){return lt.block==Ie&&Ct.indent?Ct.indent(lt.htmlState,Ge,kt):lt.localState&&lt.localMode.indent?lt.localMode.indent(lt.localState,Ge,kt):ce.Pass},blankLine:Me,getType:qe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ut},"xml"),ce.defineMIME("text/markdown","markdown"),ce.defineMIME("text/x-markdown","markdown")})},98101:function(Sn,an,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";ce.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 De=0;De<ce.modeInfo.length;De++){var ze=ce.modeInfo[De];ze.mimes&&(ze.mime=ze.mimes[0])}ce.findModeByMIME=function(Ct){Ct=Ct.toLowerCase();for(var _e=0;_e<ce.modeInfo.length;_e++){var Ke=ce.modeInfo[_e];if(Ke.mime==Ct)return Ke;if(Ke.mimes){for(var Be=0;Be<Ke.mimes.length;Be++)if(Ke.mimes[Be]==Ct)return Ke}}if(/\+xml$/.test(Ct))return ce.findModeByMIME("application/xml");if(/\+json$/.test(Ct))return ce.findModeByMIME("application/json")},ce.findModeByExtension=function(Ct){Ct=Ct.toLowerCase();for(var _e=0;_e<ce.modeInfo.length;_e++){var Ke=ce.modeInfo[_e];if(Ke.ext){for(var Be=0;Be<Ke.ext.length;Be++)if(Ke.ext[Be]==Ct)return Ke}}},ce.findModeByFileName=function(Ct){for(var _e=0;_e<ce.modeInfo.length;_e++){var Ke=ce.modeInfo[_e];if(Ke.file&&Ke.file.test(Ct))return Ke}var Be=Ct.lastIndexOf("."),mt=Be>-1&&Ct.substring(Be+1,Ct.length);if(mt)return ce.findModeByExtension(mt)},ce.findModeByName=function(Ct){Ct=Ct.toLowerCase();for(var _e=0;_e<ce.modeInfo.length;_e++){var Ke=ce.modeInfo[_e];if(Ke.name.toLowerCase()==Ct)return Ke;if(Ke.alias){for(var Be=0;Be<Ke.alias.length;Be++)if(Ke.alias[Be].toLowerCase()==Ct)return Ke}}}})},67549:function(Sn,an,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";ce.defineMode("stex",function(De,ze){"use strict";function Ct(Ae,te){Ae.cmdState.push(te)}function _e(Ae){return Ae.cmdState.length>0?Ae.cmdState[Ae.cmdState.length-1]:null}function Ke(Ae){var te=Ae.cmdState.pop();te&&te.closeBracket()}function Be(Ae){for(var te=Ae.cmdState,ee=te.length-1;ee>=0;ee--){var he=te[ee];if(he.name!="DEFAULT")return he}return{styleIdentifier:function(){return null}}}function mt(Ae,te,ee){return function(){this.name=Ae,this.bracketNo=0,this.style=te,this.styles=ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ct={};ct.importmodule=mt("importmodule","tag",["string","builtin"]),ct.documentclass=mt("documentclass","tag",["","atom"]),ct.usepackage=mt("usepackage","tag",["atom"]),ct.begin=mt("begin","tag",["atom"]),ct.end=mt("end","tag",["atom"]),ct.label=mt("label","tag",["atom"]),ct.ref=mt("ref","tag",["atom"]),ct.eqref=mt("eqref","tag",["atom"]),ct.cite=mt("cite","tag",["atom"]),ct.bibitem=mt("bibitem","tag",["atom"]),ct.Bibitem=mt("Bibitem","tag",["atom"]),ct.RBibitem=mt("RBibitem","tag",["atom"]),ct.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Ze(Ae,te){Ae.f=te}function Et(Ae,te){var ee;if(Ae.match(/^\\[a-zA-Z@]+/)){var he=Ae.current().slice(1);return ee=ct.hasOwnProperty(he)?ct[he]:ct.DEFAULT,ee=new ee,Ct(te,ee),Ze(te,dt),ee.style}if(Ae.match(/^\\[$&%#{}_]/)||Ae.match(/^\\[,;!\/\\]/))return"tag";if(Ae.match("\\["))return Ze(te,function(de,me){return ht(de,me,"\\]")}),"keyword";if(Ae.match("\\("))return Ze(te,function(de,me){return ht(de,me,"\\)")}),"keyword";if(Ae.match("$$"))return Ze(te,function(de,me){return ht(de,me,"$$")}),"keyword";if(Ae.match("$"))return Ze(te,function(de,me){return ht(de,me,"$")}),"keyword";var se=Ae.next();if(se=="%")return Ae.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=_e(te),ee)ee.closeBracket(se),Ze(te,dt);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=ct.DEFAULT,ee=new ee,Ct(te,ee),"bracket"):/\d/.test(se)?(Ae.eatWhile(/[\w.%]/),"atom"):(Ae.eatWhile(/[\w\-_]/),ee=Be(te),ee.name=="begin"&&(ee.argument=Ae.current()),ee.styleIdentifier())}function ht(Ae,te,ee){if(Ae.eatSpace())return null;if(ee&&Ae.match(ee))return Ze(te,Et),"keyword";if(Ae.match(/^\\[a-zA-Z@]+/))return"tag";if(Ae.match(/^[a-zA-Z]+/))return"variable-2";if(Ae.match(/^\\[$&%#{}_]/)||Ae.match(/^\\[,;!\/]/)||Ae.match(/^[\^_&]/))return"tag";if(Ae.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ae.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var he=Ae.next();return he=="{"||he=="}"||he=="["||he=="]"||he=="("||he==")"?"bracket":he=="%"?(Ae.skipToEnd(),"comment"):"error"}function dt(Ae,te){var ee=Ae.peek(),he;return ee=="{"||ee=="["?(he=_e(te),he.openBracket(ee),Ae.eat(ee),Ze(te,Et),"bracket"):/[ \t\r]/.test(ee)?(Ae.eat(ee),null):(Ze(te,Et),Ke(te),Et(Ae,te))}return{startState:function(){var Ae=ze.inMathMode?function(te,ee){return ht(te,ee)}:Et;return{cmdState:[],f:Ae}},copyState:function(Ae){return{cmdState:Ae.cmdState.slice(),f:Ae.f}},token:function(Ae,te){return te.f(Ae,te)},blankLine:function(Ae){Ae.f=Et,Ae.cmdState.length=0},lineComment:"%"}}),ce.defineMIME("text/x-stex","stex"),ce.defineMIME("text/x-latex","stex")})},15525:function(Sn,an,ve){(function(ce){ce(ve(89780))})(function(ce){"use strict";var De={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},ze={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ce.defineMode("xml",function(Ct,_e){var Ke=Ct.indentUnit,Be={},mt=_e.htmlMode?De:ze;for(var ct in mt)Be[ct]=mt[ct];for(var ct in _e)Be[ct]=_e[ct];var Ze,Et;function ht(Re,Tt){function et(Nt){return Tt.tokenize=Nt,Nt(Re,Tt)}var bt=Re.next();if(bt=="<")return Re.eat("!")?Re.eat("[")?Re.match("CDATA[")?et(te("atom","]]>")):null:Re.match("--")?et(te("comment","-->")):Re.match("DOCTYPE",!0,!0)?(Re.eatWhile(/[\w\._\-]/),et(ee(1))):null:Re.eat("?")?(Re.eatWhile(/[\w\._\-]/),Tt.tokenize=te("meta","?>"),"meta"):(Ze=Re.eat("/")?"closeTag":"openTag",Tt.tokenize=dt,"tag bracket");if(bt=="&"){var Bt;return Re.eat("#")?Re.eat("x")?Bt=Re.eatWhile(/[a-fA-F\d]/)&&Re.eat(";"):Bt=Re.eatWhile(/[\d]/)&&Re.eat(";"):Bt=Re.eatWhile(/[\w\.\-:]/)&&Re.eat(";"),Bt?"atom":"error"}else return Re.eatWhile(/[^&<]/),null}ht.isInText=!0;function dt(Re,Tt){var et=Re.next();if(et==">"||et=="/"&&Re.eat(">"))return Tt.tokenize=ht,Ze=et==">"?"endTag":"selfcloseTag","tag bracket";if(et=="=")return Ze="equals",null;if(et=="<"){Tt.tokenize=ht,Tt.state=me,Tt.tagName=Tt.tagStart=null;var bt=Tt.tokenize(Re,Tt);return bt?bt+" tag error":"tag error"}else return/[\'\"]/.test(et)?(Tt.tokenize=Ae(et),Tt.stringStartCol=Re.column(),Tt.tokenize(Re,Tt)):(Re.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ae(Re){var Tt=function(et,bt){for(;!et.eol();)if(et.next()==Re){bt.tokenize=dt;break}return"string"};return Tt.isInAttribute=!0,Tt}function te(Re,Tt){return function(et,bt){for(;!et.eol();){if(et.match(Tt)){bt.tokenize=ht;break}et.next()}return Re}}function ee(Re){return function(Tt,et){for(var bt;(bt=Tt.next())!=null;){if(bt=="<")return et.tokenize=ee(Re+1),et.tokenize(Tt,et);if(bt==">")if(Re==1){et.tokenize=ht;break}else return et.tokenize=ee(Re-1),et.tokenize(Tt,et)}return"meta"}}function he(Re,Tt,et){this.prev=Re.context,this.tagName=Tt,this.indent=Re.indented,this.startOfLine=et,(Be.doNotIndent.hasOwnProperty(Tt)||Re.context&&Re.context.noIndent)&&(this.noIndent=!0)}function se(Re){Re.context&&(Re.context=Re.context.prev)}function de(Re,Tt){for(var et;;){if(!Re.context||(et=Re.context.tagName,!Be.contextGrabbers.hasOwnProperty(et)||!Be.contextGrabbers[et].hasOwnProperty(Tt)))return;se(Re)}}function me(Re,Tt,et){return Re=="openTag"?(et.tagStart=Tt.column(),we):Re=="closeTag"?Me:me}function we(Re,Tt,et){return Re=="word"?(et.tagName=Tt.current(),Et="tag",je):Be.allowMissingTagName&&Re=="endTag"?(Et="tag bracket",je(Re,Tt,et)):(Et="error",we)}function Me(Re,Tt,et){if(Re=="word"){var bt=Tt.current();return et.context&&et.context.tagName!=bt&&Be.implicitlyClosed.hasOwnProperty(et.context.tagName)&&se(et),et.context&&et.context.tagName==bt||Be.matchClosing===!1?(Et="tag",be):(Et="tag error",Ie)}else return Be.allowMissingTagName&&Re=="endTag"?(Et="tag bracket",be(Re,Tt,et)):(Et="error",Ie)}function be(Re,Tt,et){return Re!="endTag"?(Et="error",be):(se(et),me)}function Ie(Re,Tt,et){return Et="error",be(Re,Tt,et)}function je(Re,Tt,et){if(Re=="word")return Et="attribute",qe;if(Re=="endTag"||Re=="selfcloseTag"){var bt=et.tagName,Bt=et.tagStart;return et.tagName=et.tagStart=null,Re=="selfcloseTag"||Be.autoSelfClosers.hasOwnProperty(bt)?de(et,bt):(de(et,bt),et.context=new he(et,bt,Bt==et.indented)),me}return Et="error",je}function qe(Re,Tt,et){return Re=="equals"?$e:(Be.allowMissing||(Et="error"),je(Re,Tt,et))}function $e(Re,Tt,et){return Re=="string"?ft:Re=="word"&&Be.allowUnquoted?(Et="string",je):(Et="error",je(Re,Tt,et))}function ft(Re,Tt,et){return Re=="string"?ft:je(Re,Tt,et)}return{startState:function(Re){var Tt={tokenize:ht,state:me,indented:Re||0,tagName:null,tagStart:null,context:null};return Re!=null&&(Tt.baseIndent=Re),Tt},token:function(Re,Tt){if(!Tt.tagName&&Re.sol()&&(Tt.indented=Re.indentation()),Re.eatSpace())return null;Ze=null;var et=Tt.tokenize(Re,Tt);return(et||Ze)&&et!="comment"&&(Et=null,Tt.state=Tt.state(Ze||et,Re,Tt),Et&&(et=Et=="error"?et+" error":Et)),et},indent:function(Re,Tt,et){var bt=Re.context;if(Re.tokenize.isInAttribute)return Re.tagStart==Re.indented?Re.stringStartCol+1:Re.indented+Ke;if(bt&&bt.noIndent)return ce.Pass;if(Re.tokenize!=dt&&Re.tokenize!=ht)return et?et.match(/^(\s*)/)[0].length:0;if(Re.tagName)return Be.multilineTagIndentPastTag!==!1?Re.tagStart+Re.tagName.length+2:Re.tagStart+Ke*(Be.multilineTagIndentFactor||1);if(Be.alignCDATA&&/<!\[CDATA\[/.test(Tt))return 0;var Bt=Tt&&/^<(\/)?([\w_:\.-]*)/.exec(Tt);if(Bt&&Bt[1])for(;bt;)if(bt.tagName==Bt[2]){bt=bt.prev;break}else if(Be.implicitlyClosed.hasOwnProperty(bt.tagName))bt=bt.prev;else break;else if(Bt)for(;bt;){var Nt=Be.contextGrabbers[bt.tagName];if(Nt&&Nt.hasOwnProperty(Bt[2]))bt=bt.prev;else break}for(;bt&&bt.prev&&!bt.startOfLine;)bt=bt.prev;return bt?bt.indent+Ke:Re.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Be.htmlMode?"html":"xml",helperType:Be.htmlMode?"html":"xml",skipAttribute:function(Re){Re.state==$e&&(Re.state=je)},xmlCurrentTag:function(Re){return Re.tagName?{name:Re.tagName,close:Re.type=="closeTag"}:null},xmlCurrentContext:function(Re){for(var Tt=[],et=Re.context;et;et=et.prev)et.tagName&&Tt.push(et.tagName);return Tt.reverse()}}}),ce.defineMIME("text/xml","xml"),ce.defineMIME("application/xml","xml"),ce.mimeModes.hasOwnProperty("text/html")||ce.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Sn,an,ve){"use strict";ve.d(an,{$u:function(){return ct},BD:function(){return He},E9:function(){return mt},FF:function(){return oi},FJ:function(){return me},Hn:function(){return de},KX:function(){return Me},NB:function(){return yt},S0:function(){return gt},UL:function(){return Ze},Vk:function(){return se},Vm:function(){return ot},YI:function(){return En},ZA:function(){return ze},Zt:function(){return Et},al:function(){return Se},bn:function(){return ke},bx:function(){return Ce},g2:function(){return Vn},h1:function(){return $e},hD:function(){return Zn},l4:function(){return Ke},rU:function(){return wt},s_:function(){return Pe},uz:function(){return Je},z6:function(){return ht}}),Sn=ve.hmd(Sn),function(){var Le;function si(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function ji(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:si(a)}}function gn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var qn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},mi;if(typeof Object.setPrototypeOf=="function")mi=Object.setPrototypeOf;else{var Fi;e:{var jn={a:!0},Tn={};try{Tn.__proto__=jn,Fi=Tn.a;break e}catch(a){}Fi=!1}mi=Fi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var At=mi;function Dt(a,y){if(a.prototype=qn(y.prototype),a.prototype.constructor=a,At)At(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var Ve=typeof ve.g!="undefined"&&ve.g!=null?ve.g:self,Yt=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},tn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function vt(a,y){if(y){var x=Ve;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&tn(x,a,{writable:!0,value:y})}}vt("Object.assign",function(a){return a||Yt}),vt("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x<E;x++)this[x]=y;return this}});var rt=typeof globalThis=="object"&&globalThis||typeof ve.g=="object"&&ve.g.global===ve.g&&ve.g||typeof self=="object"&&self.self===self&&self||{};rt.requestAnimationFrame===void 0&&(rt.setImmediate===void 0?rt.requestAnimationFrame=function(a){rt.setTimeout(a,0)}:rt.requestAnimationFrame=rt.setImmediate);function Vt(){}function rn(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&rt.clearTimeout(x),x=Pn(function(){x=-1,a.apply(E,b)},y)}}function Pn(a,y){return rt.setTimeout(a,y)}function kn(a){return rt.document.createElement(a)}function St(a){throw Error(a)}function hn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),St(a)}function In(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),St(x+" is not in the range "+y+": "+a)}function ii(a){rt.console&&rt.console.log(a)}function Gt(a){return typeof a=="object"&&a!==null}function Jt(a){return Array.isArray(a)||rt.NodeList&&a instanceof rt.NodeList||rt.HTMLCollection&&a instanceof rt.HTMLCollection}function hi(a){return Array.prototype.slice.call(a)}function fi(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):St("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function ui(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):St("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function ni(){var a=ar.pop();return a===void 0?[]:a}function ci(a){a.length=0,ar.push(a)}function li(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(Gt(a)&&a.constructor)return li(a.constructor);return typeof a}function Ni(a){var y=a;return Gt(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 Qi(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 lr(a,y,x){Object.defineProperty(Vr.prototype,a,{get:y,set:x})}function wn(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",ne=0;ne<a.length;ne++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var Pr=rt.navigator!==void 0&&0<rt.navigator.userAgent.indexOf("Trident/7"),Or=rt.navigator!==void 0&&rt.navigator.platform!==void 0&&rt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,ar=[];Object.freeze([]),Vt.className="Util",Vt.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Vt.adym="gojs.net",Vt.vfo="28e645fdb266",Vt.className="Util";function fn(a,y,x){Hr(this),this.j=a,this.xa=y,this.o=x}fn.prototype.toString=function(){return"EnumValue."+this.xa};function Rn(a,y){return y==null||y===""?null:a[y]}Ve.Object.defineProperties(fn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),fn.className="EnumValue";function Ci(){this.ew=[]}Ci.prototype.toString=function(){return this.ew.join("")},Ci.prototype.add=function(a){a!==""&&this.ew.push(a)},Ci.className="StringBuilder";function _i(){}_i.className="PropertyCollection";var ki={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){rt.console&&rt.console.log(a)},HA:function(a,y,x,E){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(ne,re){return function(){throw Error("Property "+ne.Zl[re.Tj]+" of "+ne.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function Wi(){}Wi.prototype.reset=function(){},Wi.prototype.next=function(){return!1},Wi.prototype.Ad=function(){return!1},Wi.prototype.first=function(){return null},Wi.prototype.any=function(){return!1},Wi.prototype.all=function(){return!0},Wi.prototype.each=function(){return this},Wi.prototype.map=function(){return this},Wi.prototype.filter=function(){return this},Wi.prototype.de=function(){},Wi.prototype.toString=function(){return"EmptyIterator"},Ve.Object.defineProperties(Wi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Wi.prototype.first=Wi.prototype.first,Wi.prototype.hasNext=Wi.prototype.Ad,Wi.prototype.next=Wi.prototype.next,Wi.prototype.reset=Wi.prototype.reset;var cr=null;Wi.className="EmptyIterator",cr=new Wi;function qi(a){this.key=-1,this.value=a}qi.prototype.reset=function(){this.key=-1},qi.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},qi.prototype.Ad=function(){return this.next()},qi.prototype.first=function(){return this.key=0,this.value},qi.prototype.any=function(a){return this.key=-1,a(this.value)},qi.prototype.all=function(a){return this.key=-1,a(this.value)},qi.prototype.each=function(a){return this.key=-1,a(this.value),this},qi.prototype.map=function(a){return new qi(a(this.value))},qi.prototype.filter=function(a){return a(this.value)?new qi(this.value):cr},qi.prototype.de=function(){this.value=null},qi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ve.Object.defineProperties(qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),qi.prototype.first=qi.prototype.first,qi.prototype.hasNext=qi.prototype.Ad,qi.prototype.next=qi.prototype.next,qi.prototype.reset=qi.prototype.reset,qi.className="SingletonIterator";function nr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}nr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},nr.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},nr.prototype.Ad=function(){return this.next()},nr.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},nr.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},nr.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},nr.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},nr.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var ne=y[z];(b===null||b(ne))&&x.push(a(ne))}return a=new Mn,a.s=x,a.xb(),a.iterator},nr.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var ne=y[z];(b===null||b(ne))&&a(ne)&&x.push(ne)}return a=new Mn,a.s=x,a.xb(),a.iterator},nr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},nr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ve.Object.defineProperties(nr.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),nr.prototype.first=nr.prototype.first,nr.prototype.hasNext=nr.prototype.Ad,nr.prototype.next=nr.prototype.next,nr.prototype.reset=nr.prototype.reset,nr.className="ListIterator";function dr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}dr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},dr.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)},dr.prototype.Ad=function(){return this.next()},dr.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},dr.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},dr.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},dr.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},dr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new Mn,a.s=x,a.xb(),a.iterator},dr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new Mn,a.s=x,a.xb(),a.iterator},dr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},dr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ve.Object.defineProperties(dr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),dr.prototype.first=dr.prototype.first,dr.prototype.hasNext=dr.prototype.Ad,dr.prototype.next=dr.prototype.next,dr.prototype.reset=dr.prototype.reset,dr.className="ListIteratorBackwards";function Mn(a){Hr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=Mn.prototype,Le.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.toString=function(){return"List()#"+Bi(this)},Le.add=function(a){return a===null?this:(this._isFrozen&&hn(this,a),this.s.push(a),this.xb(),this)},Le.push=function(a){this.add(a)},Le.addAll=function(a){if(a===null)return this;this._isFrozen&&hn(this);var y=this.s;if(Jt(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Le.clear=function(){this._isFrozen&&hn(this),this.s.length=0,this.xb()},Le.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Le.has=function(a){return this.contains(a)},Le.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Le.M=function(a){var y=this.s;return(0>a||a>=y.length)&&In(a,"0 <= i < length",Mn,"elt:i"),y[a]},Le.get=function(a){return this.M(a)},Le.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&In(a,"0 <= i < length",Mn,"setElt:i"),this._isFrozen&&hn(this,a),x[a]=y},Le.set=function(a,y){this.cd(a,y)},Le.first=function(){var a=this.s;return a.length===0?null:a[0]},Le.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Le.pop=function(){this._isFrozen&&hn(this);var a=this.s;return 0<a.length?a.pop():null},Mn.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},Mn.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},Mn.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},Mn.prototype.map=function(a){for(var y=new Mn,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},Mn.prototype.filter=function(a){for(var y=new Mn,x=[],E=this.s,b=E.length,z=0;z<b;z++){var ne=E[z];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},Le=Mn.prototype,Le.Gb=function(a,y){0>a&&In(a,">= 0",Mn,"insertAt:i"),this._isFrozen&&hn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Le.remove=function(a){if(a===null)return!1;this._isFrozen&&hn(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)},Le.delete=function(a){return this.remove(a)},Le.mb=function(a){var y=this.s;(0>a||a>=y.length)&&In(a,"0 <= i < length",Mn,"removeAt:i"),this._isFrozen&&hn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Le.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&hn(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},Mn.prototype.copy=function(){var a=new Mn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Le=Mn.prototype,Le.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Le.Iv=function(){for(var a=new Ln,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Le.sort=function(a){return this._isFrozen&&hn(this),this.s.sort(a),this.xb(),this},Le.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&hn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&In(y,"0 <= from < length",Mn,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Le.reverse=function(){return this._isFrozen&&hn(this),this.s.reverse(),this.xb(),this},Ve.Object.defineProperties(Mn.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 cr;var a=this.Sa;return a!==null?(a.reset(),a):new nr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return cr;var a=this.Hg;return a!==null?(a.reset(),a):new dr(this)}}}),Mn.prototype.reverse=Mn.prototype.reverse,Mn.prototype.sortRange=Mn.prototype.zi,Mn.prototype.sort=Mn.prototype.sort,Mn.prototype.toSet=Mn.prototype.Iv,Mn.prototype.toArray=Mn.prototype.Fa,Mn.prototype.removeRange=Mn.prototype.removeRange,Mn.prototype.removeAt=Mn.prototype.mb,Mn.prototype.delete=Mn.prototype.delete,Mn.prototype.remove=Mn.prototype.remove,Mn.prototype.insertAt=Mn.prototype.Gb,Mn.prototype.pop=Mn.prototype.pop,Mn.prototype.last=Mn.prototype.jc,Mn.prototype.first=Mn.prototype.first,Mn.prototype.set=Mn.prototype.set,Mn.prototype.setElt=Mn.prototype.cd,Mn.prototype.get=Mn.prototype.get,Mn.prototype.elt=Mn.prototype.M,Mn.prototype.indexOf=Mn.prototype.indexOf,Mn.prototype.has=Mn.prototype.has,Mn.prototype.contains=Mn.prototype.contains,Mn.prototype.clear=Mn.prototype.clear,Mn.prototype.addAll=Mn.prototype.addAll,Mn.prototype.push=Mn.prototype.push,Mn.prototype.add=Mn.prototype.add,Mn.prototype.thaw=Mn.prototype.ka,Mn.prototype.freeze=Mn.prototype.freeze,Mn.className="List";function to(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}to.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},to.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)},to.prototype.Ad=function(){return this.next()},to.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},to.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},to.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},to.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},to.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Mn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},to.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Mn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},to.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},to.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ve.Object.defineProperties(to.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),to.prototype.first=to.prototype.first,to.prototype.hasNext=to.prototype.Ad,to.prototype.next=to.prototype.next,to.prototype.reset=to.prototype.reset,to.className="SetIterator";function Ln(a){Hr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=Ln.prototype,Le.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.toString=function(){return"Set()#"+Bi(this)},Le.add=function(a){if(a===null)return this;this._isFrozen&&hn(this,a);var y=a;return Gt(a)&&(y=so(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Wr(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},Le.addAll=function(a){if(a===null)return this;if(this._isFrozen&&hn(this),Jt(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},Le.contains=function(a){if(a===null)return!1;var y=a;return Gt(a)&&(y=Bi(a),y===void 0)?!1:this.Tb[y]!==void 0},Le.has=function(a){return this.contains(a)},Le.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Le.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Le.first=function(){var a=this.ea;return a===null?null:a.value},Ln.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Ln.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Ln.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Ln.prototype.map=function(a){for(var y=new Ln,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Ln.prototype.filter=function(a){for(var y=new Ln,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Le=Ln.prototype,Le.remove=function(a){if(a===null)return!1;this._isFrozen&&hn(this,a);var y=a;if(Gt(a)&&(y=Bi(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Le.delete=function(a){return this.remove(a)},Le.hp=function(a){if(a===null)return this;if(this._isFrozen&&hn(this),Jt(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},Le.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&hn(this);var y=new Ln;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Le.clear=function(){this._isFrozen&&hn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Ln.prototype.copy=function(){var a=new Ln,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Ln.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},Ln.prototype.Hv=function(){var a=new Mn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Hr(a){a.__gohashid=Mo++}function so(a){var y=a.__gohashid;return y===void 0&&(y=Mo++,a.__gohashid=y),y}function Bi(a){return a.__gohashid}Ve.Object.defineProperties(Ln.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return cr;var a=this.Sa;return a!==null?(a.reset(),a):new to(this)}}}),Ln.prototype.toList=Ln.prototype.Hv,Ln.prototype.toArray=Ln.prototype.Fa,Ln.prototype.clear=Ln.prototype.clear,Ln.prototype.retainAll=Ln.prototype.pA,Ln.prototype.removeAll=Ln.prototype.hp,Ln.prototype.delete=Ln.prototype.delete,Ln.prototype.remove=Ln.prototype.remove,Ln.prototype.first=Ln.prototype.first,Ln.prototype.containsAny=Ln.prototype.Ty,Ln.prototype.containsAll=Ln.prototype.Sy,Ln.prototype.has=Ln.prototype.has,Ln.prototype.contains=Ln.prototype.contains,Ln.prototype.addAll=Ln.prototype.addAll,Ln.prototype.add=Ln.prototype.add,Ln.prototype.thaw=Ln.prototype.ka,Ln.prototype.freeze=Ln.prototype.freeze;var Mo=1;Ln.className="Set",Ln.uniqueHash=Hr,Ln.hashIdUnique=so,Ln.hashId=Bi;function oo(a){this.ma=a,this.qa=a.Ja,this.sa=null}oo.prototype.reset=function(){this.qa=this.ma.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.value=this.key=a=y.key,!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.value=this.key=a=a.key):null},oo.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},oo.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},oo.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},oo.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Mn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},oo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Mn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},oo.prototype.de=function(){this.value=this.key=null,this.qa=-1},oo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ve.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="MapKeySetIterator";function Ui(a){Ln.call(this),Hr(this),this._isFrozen=!0,this.ma=a}Dt(Ui,Ln),Le=Ui.prototype,Le.freeze=function(){return this},Le.ka=function(){return this},Le.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Le.add=function(){St("This Set is read-only: "+this.toString())},Le.contains=function(a){return this.ma.contains(a)},Le.has=function(a){return this.contains(a)},Le.remove=function(){St("This Set is read-only: "+this.toString())},Le.delete=function(a){return this.remove(a)},Le.clear=function(){St("This Set is read-only: "+this.toString())},Le.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Ui.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Ui.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Ui.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Ui.prototype.map=function(a){for(var y=new Ln,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Ui.prototype.filter=function(a){for(var y=new Ln,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Ui.prototype.copy=function(){return new Ui(this.ma)},Ui.prototype.Iv=function(){var a=new Ln,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ui.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},Ui.prototype.Hv=function(){var a=new Mn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ve.Object.defineProperties(Ui.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?cr:new oo(this.ma)}}}),Ui.prototype.toList=Ui.prototype.Hv,Ui.prototype.toArray=Ui.prototype.Fa,Ui.prototype.toSet=Ui.prototype.Iv,Ui.prototype.first=Ui.prototype.first,Ui.prototype.clear=Ui.prototype.clear,Ui.prototype.delete=Ui.prototype.delete,Ui.prototype.remove=Ui.prototype.remove,Ui.prototype.has=Ui.prototype.has,Ui.prototype.contains=Ui.prototype.contains,Ui.prototype.add=Ui.prototype.add,Ui.prototype.thaw=Ui.prototype.ka,Ui.prototype.freeze=Ui.prototype.freeze,Ui.className="MapKeySet";function er(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}er.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},er.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)},er.prototype.Ad=function(){return this.next()},er.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},er.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},er.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},er.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},er.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Mn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},er.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Mn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},er.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},er.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ve.Object.defineProperties(er.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),er.prototype.first=er.prototype.first,er.prototype.hasNext=er.prototype.Ad,er.prototype.next=er.prototype.next,er.prototype.reset=er.prototype.reset,er.className="MapValueSetIterator";function Wr(a,y){this.key=a,this.value=y,this.ll=this.va=null}Wr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Wr.className="KeyValuePair";function no(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}no.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},no.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)},no.prototype.Ad=function(){return this.next()},no.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},no.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},no.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},no.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},no.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Mn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},no.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Mn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},no.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},no.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ve.Object.defineProperties(no.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),no.prototype.first=no.prototype.first,no.prototype.hasNext=no.prototype.Ad,no.prototype.next=no.prototype.next,no.prototype.reset=no.prototype.reset,no.className="MapIterator";function xi(a){Hr(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"&&St("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Le=xi.prototype,Le.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.toString=function(){return"Map()#"+Bi(this)},Le.add=function(a,y){this._isFrozen&&hn(this,a);var x=a;Gt(a)&&(x=so(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Wr(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Le.set=function(a,y){return this.add(a,y)},Le.addAll=function(a){if(a===null)return this;if(Jt(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof xi)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},Le.first=function(){return this.ea},xi.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},xi.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},xi.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},xi.prototype.map=function(a){for(var y=new xi,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},xi.prototype.filter=function(a){for(var y=new xi,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Le=xi.prototype,Le.contains=function(a){var y=a;return Gt(a)&&(y=Bi(a),y===void 0)?!1:this.Tb[y]!==void 0},Le.has=function(a){return this.contains(a)},Le.I=function(a){var y=a;return Gt(a)&&(y=Bi(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Le.get=function(a){return this.I(a)},Le.remove=function(a){if(a===null)return!1;this._isFrozen&&hn(this,a);var y=a;if(Gt(a)&&(y=Bi(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Le.delete=function(a){return this.remove(a)},Le.clear=function(){this._isFrozen&&hn(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()},xi.prototype.copy=function(){var a=new xi,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},xi.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new Wr(b.key,b.value),x++}return y},xi.prototype.Lf=function(){return new Ui(this)},Ve.Object.defineProperties(xi.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return cr;var a=this.Sa;return a!==null?(a.reset(),a):new no(this)}},iteratorKeys:{get:function(){return 0>=this.count?cr:new oo(this)}},iteratorValues:{get:function(){if(0>=this.count)return cr;var a=this.jf;return a!==null?(a.reset(),a):new er(this)}}}),xi.prototype.toKeySet=xi.prototype.Lf,xi.prototype.toArray=xi.prototype.Fa,xi.prototype.clear=xi.prototype.clear,xi.prototype.delete=xi.prototype.delete,xi.prototype.remove=xi.prototype.remove,xi.prototype.get=xi.prototype.get,xi.prototype.getValue=xi.prototype.I,xi.prototype.has=xi.prototype.has,xi.prototype.contains=xi.prototype.contains,xi.prototype.first=xi.prototype.first,xi.prototype.addAll=xi.prototype.addAll,xi.prototype.set=xi.prototype.set,xi.prototype.add=xi.prototype.add,xi.prototype.thaw=xi.prototype.ka,xi.prototype.freeze=xi.prototype.freeze,xi.className="Map";function tt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):St("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var lo,_o,ga,Oa,Xo;tt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},tt.prototype.h=function(a,y){return this.x=a,this.y=y,this},tt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},tt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},tt.prototype.copy=function(){var a=new tt;return a.x=this.x,a.y=this.y,a},Le=tt.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Fa(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new tt(x,b)}return new tt}function Gr(a){return a.x.toString()+" "+a.y.toString()}Le.toString=function(){return"Point("+this.x+","+this.y+")"},Le.D=function(a){return a instanceof tt?this.x===a.x&&this.y===a.y:!1},Le.hi=function(a,y){return this.x===a&&this.y===y},Le.Xa=function(a){return it.B(this.x,a.x)&&it.B(this.y,a.y)},Le.add=function(a){return this.x+=a.x,this.y+=a.y,this},Le.re=function(a){return this.x-=a.x,this.y-=a.y,this},Le.offset=function(a,y){return this.x+=a,this.y+=y,this},tt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Le=tt.prototype,Le.scale=function(a,y){return this.x*=a,this.y*=y,this},Le.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Le.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Le.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},Le.ab=function(a){return Br(a.x-this.x,a.y-this.y)},Le.direction=function(a,y){return Br(a-this.x,y-this.y)};function Br(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}Le.Ry=function(a,y){return it.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Le.fA=function(a,y,x,E){return it.qh(a,y,x,E,this.x,this.y,this),this},Le.gA=function(a,y){return it.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Le.uA=function(a,y,x,E){return it.No(this.x,this.y,a,y,x,E,this),this},Le.vA=function(a,y){return it.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Le.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},Le.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Le.transform=function(a){return a.Ga(this),this};function yr(a,y){return y.Cd(a),a}function xo(a,y,x,E,b,z){var ne=b-x,re=z-E,oe=ne*ne+re*re;x-=a,E-=y;var le=-x*ne-E*re;return 0>=le||le>=oe?(ne=b-a,re=z-y,Math.min(x*x+E*E,ne*ne+re*re)):(a=ne*E-re*x,a*a/oe)}function ua(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Tr(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Le.w=function(){return isFinite(this.x)&&isFinite(this.y)},tt.alloc=function(){var a=ir.pop();return a===void 0?new tt:a},tt.allocAt=function(a,y){var x=ir.pop();return x===void 0?new tt(a,y):(x.x=a,x.y=y,x)},tt.free=function(a){ir.push(a)},tt.prototype.isReal=tt.prototype.w,tt.prototype.setSpot=tt.prototype.yi,tt.prototype.setRectSpot=tt.prototype.xi,tt.prototype.snapToGridPoint=tt.prototype.vA,tt.prototype.snapToGrid=tt.prototype.uA,tt.prototype.projectOntoLineSegmentPoint=tt.prototype.gA,tt.prototype.projectOntoLineSegment=tt.prototype.fA,tt.intersectingLineSegments=function(a,y,x,E,b,z,ne,re){return it.Rl(a,y,x,E,b,z,ne,re)},tt.prototype.compareWithLineSegmentPoint=tt.prototype.Ry,tt.compareWithLineSegment=function(a,y,x,E,b,z){return it.Fl(a,y,x,E,b,z)},tt.prototype.direction=tt.prototype.direction,tt.prototype.directionPoint=tt.prototype.ab,tt.prototype.normalize=tt.prototype.normalize,tt.prototype.distanceSquared=tt.prototype.zd,tt.prototype.distanceSquaredPoint=tt.prototype.Bf,tt.prototype.scale=tt.prototype.scale,tt.prototype.rotate=tt.prototype.rotate,tt.prototype.offset=tt.prototype.offset,tt.prototype.subtract=tt.prototype.re,tt.prototype.add=tt.prototype.add,tt.prototype.equalsApprox=tt.prototype.Xa,tt.prototype.equalTo=tt.prototype.hi,tt.prototype.equals=tt.prototype.D,tt.prototype.set=tt.prototype.set,tt.prototype.setTo=tt.prototype.sg;var ir=[];tt.className="Point",tt.parse=Fa,tt.stringify=Gr,tt.distanceLineSegmentSquared=xo,tt.distanceSquared=ua,tt.direction=Tr,tt.Origin=lo=new tt(0,0).ja(),tt.InfiniteTopLeft=_o=new tt(-1/0,-1/0).ja(),tt.InfiniteBottomRight=ga=new tt(1/0,1/0).ja(),tt.SixPoint=Oa=new tt(6,6).ja(),tt.NoPoint=Xo=new tt(NaN,NaN).ja(),tt.parse=Fa,tt.stringify=Gr,tt.distanceLineSegmentSquared=xo,tt.distanceSquared=ua,tt.direction=Tr;function Xn(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):St("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var wr,bo,ta,No,vo,na,ia;Xn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Xn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Xn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Xn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Xn.prototype.copy=function(){var a=new Xn;return a.width=this.width,a.height=this.height,a},Le=Xn.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ba(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Xn(x,b)}return new Xn}function Na(a){return a.width.toString()+" "+a.height.toString()}Le.toString=function(){return"Size("+this.width+","+this.height+")"},Le.D=function(a){return a instanceof Xn?this.width===a.width&&this.height===a.height:!1},Le.hi=function(a,y){return this.width===a&&this.height===y},Le.Xa=function(a){return it.B(this.width,a.width)&&it.B(this.height,a.height)},Le.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},Le.w=function(){return isFinite(this.width)&&isFinite(this.height)},Xn.alloc=function(){var a=is.pop();return a===void 0?new Xn:a},Xn.free=function(a){is.push(a)},Xn.prototype.isReal=Xn.prototype.w,Xn.prototype.inflate=Xn.prototype.Bc,Xn.prototype.equalsApprox=Xn.prototype.Xa,Xn.prototype.equalTo=Xn.prototype.hi,Xn.prototype.equals=Xn.prototype.D,Xn.prototype.set=Xn.prototype.set,Xn.prototype.setTo=Xn.prototype.sg;var is=[];Xn.className="Size",Xn.parse=Ba,Xn.stringify=Na,Xn.ZeroSize=wr=new Xn(0,0).ja(),Xn.OneSize=bo=new Xn(1,1).ja(),Xn.SixSize=ta=new Xn(6,6).ja(),Xn.EightSize=No=new Xn(8,8).ja(),Xn.TenSize=vo=new Xn(10,10).ja(),Xn.InfiniteSize=na=new Xn(1/0,1/0).ja(),Xn.NoSize=ia=new Xn(NaN,NaN).ja(),Xn.parse=Ba,Xn.stringify=Na;function pn(a,y,x,E){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof tt?(x=a.x,a=a.y,y instanceof tt?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof Xn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):St("Incorrect second argument supplied to Rect constructor "+y)):St("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Le=pn.prototype,Le.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Le.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Ia(a,y,x){a.width=y,a.height=x}Le.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Le.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Le.dd=function(a){return this.x=a.x,this.y=a.y,this},Le.tA=function(a){return this.width=a.width,this.height=a.height,this},pn.prototype.copy=function(){var a=new pn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Le=pn.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function Vl(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var ne=0;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),new pn(x,b,z,ne)}return new pn}function Hs(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Le.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Le.D=function(a){return a instanceof pn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Le.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Le.Xa=function(a){return it.B(this.x,a.x)&&it.B(this.y,a.y)&&it.B(this.width,a.width)&&it.B(this.height,a.height)};function wl(a,y){return it.$(a.x,y.x)&&it.$(a.y,y.y)&&it.$(a.width,y.width)&&it.$(a.height,y.height)}Le.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Le.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},Le.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Le.offset=function(a,y){return this.x+=a,this.y+=y,this},Le.Bc=function(a,y){return ka(this,y,a,y,a)},Le.Co=function(a){return ka(this,a.top,a.right,a.bottom,a.left)},Le.Fv=function(a){return ka(this,-a.top,-a.right,-a.bottom,-a.left)},Le.Hz=function(a,y,x,E){return ka(this,a,y,x,E)};function ka(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Le.Ex=function(a){return yu(this,a.x,a.y,a.width,a.height)},Le.Uu=function(a,y,x,E){return yu(this,a,y,x,E)};function yu(a,y,x,E,b){var z=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=ne,a.width=Math.max(0,y-z),a.height=Math.max(0,x-ne),a}Le.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Le.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function Cl(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Le.Ye=function(a){return ma(this,a.x,a.y,0,0)},Le.ed=function(a){return ma(this,a.x,a.y,a.width,a.height)},Le.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),ma(this,a,y,x,E)};function ma(a,y,x,E,b){var z=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=ne,a.width=y-z,a.height=x-ne,a}Le.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 Fo(a,y,x,E,b,z,ne,re){return ne===void 0&&(ne=0),re===void 0&&(re=0),a<=b&&b+ne<=a+x&&y<=z&&z+re<=y+E}function Ul(a,y,x,E,b,z,ne,re){return a>ne+b||b>x+a?!1:!(y>re+z||z>E+y)}Le.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Le.Mz=function(){return this.width===0&&this.height===0},pn.alloc=function(){var a=yo.pop();return a===void 0?new pn:a},pn.allocAt=function(a,y,x,E){var b=yo.pop();return b===void 0?new pn(a,y,x,E):b.h(a,y,x,E)},pn.free=function(a){yo.push(a)},Ve.Object.defineProperties(pn.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 tt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Xn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new tt(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}}}),pn.prototype.isEmpty=pn.prototype.Mz,pn.prototype.isReal=pn.prototype.w,pn.intersectsLineSegment=function(a,y,x,E,b,z,ne,re){return it.Fx(a,y,x,E,b,z,ne,re)},pn.prototype.setSpot=pn.prototype.yi,pn.prototype.union=pn.prototype.Kv,pn.prototype.unionRect=pn.prototype.ed,pn.prototype.unionPoint=pn.prototype.Ye,pn.prototype.intersects=pn.prototype.Vu,pn.prototype.intersectsRect=pn.prototype.Yc,pn.prototype.intersect=pn.prototype.Uu,pn.prototype.intersectRect=pn.prototype.Ex,pn.prototype.grow=pn.prototype.Hz,pn.prototype.subtractMargin=pn.prototype.Fv,pn.prototype.addMargin=pn.prototype.Co,pn.prototype.inflate=pn.prototype.Bc,pn.prototype.offset=pn.prototype.offset,pn.prototype.contains=pn.prototype.contains,pn.prototype.containsRect=pn.prototype.Re,pn.prototype.containsPoint=pn.prototype.ca,pn.prototype.equalsApprox=pn.prototype.Xa,pn.prototype.equalTo=pn.prototype.hi,pn.prototype.equals=pn.prototype.D,pn.prototype.setSize=pn.prototype.tA,pn.prototype.setPoint=pn.prototype.dd,pn.prototype.set=pn.prototype.set,pn.prototype.setTo=pn.prototype.sg;var $r=null,$o=null,yo=[];pn.className="Rect",pn.parse=Vl,pn.stringify=Hs,pn.contains=Fo,pn.intersects=Ul,pn.ZeroRect=$r=new pn(0,0,0,0).ja(),pn.NoRect=$o=new pn(NaN,NaN,NaN,NaN).ja(),pn.parse=Vl,pn.stringify=Hs,pn.contains=Fo,pn.intersects=Ul;function Di(a,y,x,E){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):St("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Di.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Di.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Di.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Di.prototype.copy=function(){var a=new Di;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Le=Di.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function $a(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new Di;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Di(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Di(x,b);for(var ne=NaN;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),isNaN(ne)?new Di(x,b):new Di(x,b,z,ne)}return new Di}function Ka(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Le.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Le.D=function(a){return a instanceof Di?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Le.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Le.Xa=function(a){return it.B(this.top,a.top)&&it.B(this.right,a.right)&&it.B(this.bottom,a.bottom)&&it.B(this.left,a.left)},Le.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Di.alloc=function(){var a=Dl.pop();return a===void 0?new Di:a},Di.free=function(a){Dl.push(a)},Di.prototype.isReal=Di.prototype.w,Di.prototype.equalsApprox=Di.prototype.Xa,Di.prototype.equalTo=Di.prototype.hi,Di.prototype.equals=Di.prototype.D,Di.prototype.set=Di.prototype.set,Di.prototype.setTo=Di.prototype.sg;var bs=null,El=null,Dl=[];Di.className="Margin",Di.parse=$a,Di.stringify=Ka,Di.ZeroMargin=bs=new Di(0,0,0,0).ja(),Di.TwoMargin=El=new Di(2,2,2,2).ja(),Di.parse=$a,Di.stringify=Ka;function Ei(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var Ma,cs,bl,Ol,Il,Jr,Ju,nl,vs,ys,Su,Iu,Ys,ul,Mh,uc,Lh,hc,Fh,Ru,Qu,Rl,Hh,qu,eh,Po,Vo,Ws,ds,es,Aa,_a,rs,Va,Gs,$s;Ei.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ei.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Ei.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ei.prototype.copy=function(){var a=new Ei;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Le=Ei.prototype,Le.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Le.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this};function va(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function rd(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Ma;if(a==="TopLeft")return cs;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return bl;if(a==="TopRight")return Ol;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Il;if(a==="Center")return Jr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Ju;if(a==="BottomLeft")return nl;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return vs;if(a==="BottomRight")return ys;if(a==="TopSide")return Su;if(a==="LeftSide")return Iu;if(a==="RightSide")return Ys;if(a==="BottomSide")return ul;if(a==="TopBottomSides")return Mh;if(a==="LeftRightSides")return uc;if(a==="TopLeftSides")return Lh;if(a==="TopRightSides")return hc;if(a==="BottomLeftSides")return Fh;if(a==="BottomRightSides")return Ru;if(a==="NotTopSide")return Qu;if(a==="NotLeftSide")return Rl;if(a==="NotRightSide")return Hh;if(a==="NotBottomSide")return qu;if(a==="AllSides")return eh;if(a==="Default")return Po;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var ne=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(ne=parseFloat(E)),new Ei(x,b,z,ne)}return new Ei}function Mc(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Le.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(Ma)?"None":this.D(cs)?"TopLeft":this.D(bl)?"Top":this.D(Ol)?"TopRight":this.D(Il)?"Left":this.D(Jr)?"Center":this.D(Ju)?"Right":this.D(nl)?"BottomLeft":this.D(vs)?"Bottom":this.D(ys)?"BottomRight":this.D(Su)?"TopSide":this.D(Iu)?"LeftSide":this.D(Ys)?"RightSide":this.D(ul)?"BottomSide":this.D(Mh)?"TopBottomSides":this.D(uc)?"LeftRightSides":this.D(Lh)?"TopLeftSides":this.D(hc)?"TopRightSides":this.D(Fh)?"BottomLeftSides":this.D(Ru)?"BottomRightSides":this.D(Qu)?"NotTopSide":this.D(Rl)?"NotLeftSide":this.D(Hh)?"NotRightSide":this.D(qu)?"NotBottomSide":this.D(eh)?"AllSides":this.D(Po)?"Default":"None"},Le.D=function(a){return a instanceof Ei?(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},Le.gv=function(){return new Ei(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Le.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Vo))a=Iu;else if(a.D(Ws))a=Ys;else if(a.D(ds))a=Su;else if(a.D(es))a=ul;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Le.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Le.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Le.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Le.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Le.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Ei.alloc=function(){var a=Kt.pop();return a===void 0?new Ei:a},Ei.free=function(a){Kt.push(a)},Ei.prototype.isDefault=Ei.prototype.Xb,Ei.prototype.isNone=Ei.prototype.ys,Ei.prototype.isSide=Ei.prototype.$c,Ei.prototype.isNoSpot=Ei.prototype.Mc,Ei.prototype.isSpot=Ei.prototype.sb,Ei.prototype.includesSide=Ei.prototype.Hf,Ei.prototype.opposite=Ei.prototype.gv,Ei.prototype.equals=Ei.prototype.D,Ei.prototype.set=Ei.prototype.set,Ei.prototype.setTo=Ei.prototype.sg;var Kt=[];Ei.className="Spot",Ei.parse=rd,Ei.stringify=Mc,Ei.None=Ma=va(new Ei(0,0,0,0),0).ja(),Ei.Default=Po=va(new Ei(0,0,-1,0),-1).ja(),Ei.TopLeft=cs=new Ei(0,0,0,0).ja(),Ei.TopCenter=bl=new Ei(.5,0,0,0).ja(),Ei.TopRight=Ol=new Ei(1,0,0,0).ja(),Ei.LeftCenter=Il=new Ei(0,.5,0,0).ja(),Ei.Center=Jr=new Ei(.5,.5,0,0).ja(),Ei.RightCenter=Ju=new Ei(1,.5,0,0).ja(),Ei.BottomLeft=nl=new Ei(0,1,0,0).ja(),Ei.BottomCenter=vs=new Ei(.5,1,0,0).ja(),Ei.BottomRight=ys=new Ei(1,1,0,0).ja(),Ei.MiddleTop=Aa=bl,Ei.MiddleLeft=_a=Il,Ei.MiddleRight=rs=Ju,Ei.MiddleBottom=Va=vs,Ei.Top=ds=bl,Ei.Left=Vo=Il,Ei.Right=Ws=Ju,Ei.Bottom=es=vs,Ei.TopSide=Su=va(new Ei(0,0,1,1),1).ja(),Ei.LeftSide=Iu=va(new Ei(0,0,1,2),1).ja(),Ei.RightSide=Ys=va(new Ei(0,0,1,4),1).ja(),Ei.BottomSide=ul=va(new Ei(0,0,1,8),1).ja(),Ei.TopBottomSides=Mh=va(new Ei(0,0,1,9),1).ja(),Ei.LeftRightSides=uc=va(new Ei(0,0,1,6),1).ja(),Ei.TopLeftSides=Lh=va(new Ei(0,0,1,3),1).ja(),Ei.TopRightSides=hc=va(new Ei(0,0,1,5),1).ja(),Ei.BottomLeftSides=Fh=va(new Ei(0,0,1,10),1).ja(),Ei.BottomRightSides=Ru=va(new Ei(0,0,1,12),1).ja(),Ei.NotTopSide=Qu=va(new Ei(0,0,1,14),1).ja(),Ei.NotLeftSide=Rl=va(new Ei(0,0,1,13),1).ja(),Ei.NotRightSide=Hh=va(new Ei(0,0,1,11),1).ja(),Ei.NotBottomSide=qu=va(new Ei(0,0,1,7),1).ja(),Ei.AllSides=eh=va(new Ei(0,0,1,15),1).ja(),Gs=new Ei(.156,.156).ja(),$s=new Ei(.844,.844).ja(),Ei.parse=rd,Ei.stringify=Mc;function _t(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}_t.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},_t.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},_t.prototype.copy=function(){var a=new _t;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},_t.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},_t.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},_t.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},_t.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},_t.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},_t.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},_t.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},_t.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,ne=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=ne,this.translate(-y,-x),this},Le=_t.prototype,Le.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Le.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Le.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)},Le.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Le.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Le.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,ne=this.m12,re=this.m21,oe=this.m22,le=this.dx,ue=this.dy,pe=y*z+x*re+le,xe=y*ne+x*oe+ue,Ee=E*z+x*re+le,Fe=E*ne+x*oe+ue;return x=y*z+b*re+le,y=y*ne+b*oe+ue,z=E*z+b*re+le,E=E*ne+b*oe+ue,b=Math.min(pe,Ee),pe=Math.max(pe,Ee),Ee=Math.min(xe,Fe),xe=Math.max(xe,Fe),b=Math.min(b,x),pe=Math.max(pe,x),Ee=Math.min(Ee,y),xe=Math.max(xe,y),b=Math.min(b,z),pe=Math.max(pe,z),Ee=Math.min(Ee,E),xe=Math.max(xe,E),a.h(b,Ee,pe-b,xe-Ee),a},_t.alloc=function(){var a=mn.pop();return a===void 0?new _t:a},_t.free=function(a){mn.push(a)},_t.prototype.transformRect=_t.prototype.pp,_t.prototype.transformPoint=_t.prototype.Ga,_t.prototype.scale=_t.prototype.scale,_t.prototype.translate=_t.prototype.translate,_t.prototype.rotate=_t.prototype.rotate,_t.prototype.invert=_t.prototype.Vj,_t.prototype.multiplyInverted=_t.prototype.bv,_t.prototype.multiply=_t.prototype.multiply,_t.prototype.reset=_t.prototype.reset,_t.prototype.isIdentity=_t.prototype.ws,_t.prototype.equals=_t.prototype.D,_t.prototype.setTransform=_t.prototype.setTransform,_t.prototype.set=_t.prototype.set;var mn=[];_t.className="Transform",_t.xF="54a702f3e53909c447824c6706603faf4c";var it={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=it.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);it.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,ne){if(0>=b&&(b=1e-6),a<x)var re=a,oe=x;else re=x,oe=a;if(y<E)var le=y,ue=E;else le=E,ue=y;if(a===x)return le<=ne&&ne<=ue&&a-b<=z&&z<=a+b;if(y===E)return re<=z&&z<=oe&&y-b<=ne&&ne<=y+b;if(oe+=b,re-=b,re<=z&&z<=oe&&(ue+=b,le-=b,le<=ne&&ne<=ue))if(oe-re>ue-le)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=ne&&ne<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(ne=(x-a)/(E-y)*(ne-y)+a,ne-b<=z&&z<=ne+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,ne,re,oe,le,ue,pe){if(it.Yb(a,y,ne,re,pe,x,E)&&it.Yb(a,y,ne,re,pe,b,z))return it.Yb(a,y,ne,re,pe,le,ue);var xe=(a+x)/2,Ee=(y+E)/2,Fe=(x+b)/2,Oe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(xe+Fe)/2,x=(Ee+Oe)/2,Fe=(Fe+b)/2,Oe=(Oe+z)/2;var st=(E+Fe)/2,Ye=(x+Oe)/2;return it.cs(a,y,xe,Ee,E,x,st,Ye,oe,le,ue,pe)||it.cs(st,Ye,Fe,Oe,b,z,ne,re,oe,le,ue,pe)},ax:function(a,y,x,E,b,z,ne,re,oe){var le=(x+b)/2,ue=(E+z)/2;return oe.h((((a+x)/2+le)/2+(le+(b+ne)/2)/2)/2,(((y+E)/2+ue)/2+(ue+(z+re)/2)/2)/2),oe},My:function(a,y,x,E,b,z,ne,re){var oe=(x+b)/2,le=(E+z)/2;return Tr(((a+x)/2+oe)/2,((y+E)/2+le)/2,(oe+(b+ne)/2)/2,(le+(z+re)/2)/2)},Dl:function(a,y,x,E,b,z,ne,re,oe,le){if(it.Yb(a,y,ne,re,oe,x,E)&&it.Yb(a,y,ne,re,oe,b,z))ma(le,a,y,0,0),ma(le,ne,re,0,0);else{var ue=(a+x)/2,pe=(y+E)/2,xe=(x+b)/2,Ee=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ue+xe)/2,x=(pe+Ee)/2,xe=(xe+b)/2,Ee=(Ee+z)/2;var Fe=(E+xe)/2,Oe=(x+Ee)/2;it.Dl(a,y,ue,pe,E,x,Fe,Oe,oe,le),it.Dl(Fe,Oe,xe,Ee,b,z,ne,re,oe,le)}return le},Qe:function(a,y,x,E,b,z,ne,re,oe,le){if(it.Yb(a,y,ne,re,oe,x,E)&&it.Yb(a,y,ne,re,oe,b,z))le.length===0&&(le.push(a),le.push(y)),le.push(ne),le.push(re);else{var ue=(a+x)/2,pe=(y+E)/2,xe=(x+b)/2,Ee=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ue+xe)/2,x=(pe+Ee)/2,xe=(xe+b)/2,Ee=(Ee+z)/2;var Fe=(E+xe)/2,Oe=(x+Ee)/2;it.Qe(a,y,ue,pe,E,x,Fe,Oe,oe,le),it.Qe(Fe,Oe,xe,Ee,b,z,ne,re,oe,le)}return le},jv:function(a,y,x,E,b,z,ne,re,oe,le){if(it.Yb(a,y,b,z,le,x,E))return it.Yb(a,y,b,z,le,re,oe);var ue=(a+x)/2,pe=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var xe=(ue+x)/2,Ee=(pe+E)/2;return it.jv(a,y,ue,pe,xe,Ee,ne,re,oe,le)||it.jv(xe,Ee,x,E,b,z,ne,re,oe,le)},OA:function(a,y,x,E,b,z,ne){return ne.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),ne},iv:function(a,y,x,E,b,z,ne,re){if(it.Yb(a,y,b,z,ne,x,E))ma(re,a,y,0,0),ma(re,b,z,0,0);else{var oe=(a+x)/2,le=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ue=(oe+x)/2,pe=(le+E)/2;it.iv(a,y,oe,le,ue,pe,ne,re),it.iv(ue,pe,x,E,b,z,ne,re)}return re},ep:function(a,y,x,E,b,z,ne,re){if(it.Yb(a,y,b,z,ne,x,E))re.length===0&&(re.push(a),re.push(y)),re.push(b),re.push(z);else{var oe=(a+x)/2,le=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ue=(oe+x)/2,pe=(le+E)/2;it.ep(a,y,oe,le,ue,pe,ne,re),it.ep(ue,pe,x,E,b,z,ne,re)}return re},Eo:function(a,y,x,E,b,z,ne,re,oe,le,ue,pe,xe,Ee){if(it.Yb(a,y,ne,re,xe,x,E)&&it.Yb(a,y,ne,re,xe,b,z))return!it.Rl(a,y,ne,re,oe,le,ue,pe)||(xe=(a-ne)*(le-pe)-(y-re)*(oe-ue),xe===0)?!1:(Ee.h(((a*re-y*ne)*(oe-ue)-(a-ne)*(oe*pe-le*ue))/xe,((a*re-y*ne)*(le-pe)-(y-re)*(oe*pe-le*ue))/xe),!0);var Fe=(a+x)/2,Oe=(y+E)/2,st=(x+b)/2,Ye=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Fe+st)/2,x=(Oe+Ye)/2,st=(st+b)/2,Ye=(Ye+z)/2;var pt=(E+st)/2,xt=(x+Ye)/2,Mt=1/0,Ot=!1,en=0,ri=0;return it.Eo(a,y,Fe,Oe,E,x,pt,xt,oe,le,ue,pe,xe,Ee)&&(a=(Ee.x-oe)*(Ee.x-oe)+(Ee.y-le)*(Ee.y-le),a<Mt&&(Mt=a,Ot=!0,en=Ee.x,ri=Ee.y)),it.Eo(pt,xt,st,Ye,b,z,ne,re,oe,le,ue,pe,xe,Ee)&&(Ee.x-oe)*(Ee.x-oe)+(Ee.y-le)*(Ee.y-le)<Mt&&(Ot=!0,en=Ee.x,ri=Ee.y),Ot&&(Ee.x=en,Ee.y=ri),Ot},Fo:function(a,y,x,E,b,z,ne,re,oe,le,ue,pe,xe){var Ee=0;if(it.Yb(a,y,ne,re,xe,x,E)&&it.Yb(a,y,ne,re,xe,b,z)){if(xe=(a-ne)*(le-pe)-(y-re)*(oe-ue),xe===0)return Ee;var Fe=((a*re-y*ne)*(oe-ue)-(a-ne)*(oe*pe-le*ue))/xe,Oe=((a*re-y*ne)*(le-pe)-(y-re)*(oe*pe-le*ue))/xe;if(Fe>=ue)return Ee;if((oe>ue?oe-ue:ue-oe)<(le>pe?le-pe:pe-le)){if(y<re?(oe=y,a=re):(oe=re,a=y),Oe<oe||Oe>a)return Ee}else if(a<ne?(oe=a,a=ne):oe=ne,Fe<oe||Fe>a)return Ee;0<xe?Ee++:0>xe&&Ee--}else{Fe=(a+x)/2,Oe=(y+E)/2;var st=(x+b)/2,Ye=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Fe+st)/2,x=(Oe+Ye)/2,st=(st+b)/2,Ye=(Ye+z)/2;var pt=(E+st)/2,xt=(x+Ye)/2;Ee+=it.Fo(a,y,Fe,Oe,E,x,pt,xt,oe,le,ue,pe,xe),Ee+=it.Fo(pt,xt,st,Ye,b,z,ne,re,oe,le,ue,pe,xe)}return Ee},qh:function(a,y,x,E,b,z,ne){return it.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(ne.h(a,x),!1):z>y?(ne.h(a,y),!1):(ne.h(a,z),!0)):it.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(ne.h(E,y),!1):b>a?(ne.h(a,y),!1):(ne.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(ne.h(a,y),!1):1.000005<b?(ne.h(x,E),!1):(ne.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,ne,re,oe){return it.B(a,x)&&it.B(y,E)?(oe.h(a,y),!1):it.$(b,ne)?it.$(a,x)?(it.qh(a,y,x,E,b,z,oe),!1):it.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,oe):(re=(re-z)/(ne-b),it.$(a,x)?(x=re*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(oe.h(a,b),!1):x>y?(oe.h(a,y),!1):(oe.h(a,x),!0)):(ne=(E-y)/(x-a),it.$(re,ne)?(it.qh(a,y,x,E,b,z,oe),!1):(b=(ne*a-re*b+z-y)/(ne-re),it.$(ne,0)?(a<x?(E=a,a=x):E=x,b<E?(oe.h(E,y),!1):b>a?(oe.h(a,y),!1):(oe.h(b,y),!0)):it.qh(a,y,x,E,b,ne*(b-a)+y,oe))))},MA:function(a,y,x,E,b){return it.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,ne,re,oe,le){function ue(st,Ye){var pt=(st-a)*(st-a)+(Ye-y)*(Ye-y);pt<pe&&(pe=pt,oe.h(st,Ye))}var pe=1/0;ue(oe.x,oe.y);var xe=0,Ee=0,Fe=0,Oe=0;if(b<ne?(xe=b,Ee=ne):(xe=ne,Ee=b),z<re?(Fe=b,Oe=ne):(Fe=ne,Oe=b),xe=(Ee-xe)/2+le,le=(Oe-Fe)/2+le,b=(b+ne)/2,z=(z+re)/2,xe===0||le===0)return oe;if(.5>(x>a?x-a:a-x)){if(xe=1-(x-b)*(x-b)/(xe*xe),0>xe)return oe;xe=Math.sqrt(xe),E=-le*xe+z,ue(x,le*xe+z),ue(x,E)}else{if(x=(E-y)/(x-a),E=1/(xe*xe)+x*x/(le*le),re=2*x*(y-x*a)/(le*le)-2*x*z/(le*le)-2*b/(xe*xe),xe=re*re-4*E*(2*x*a*z/(le*le)-2*y*z/(le*le)+z*z/(le*le)+b*b/(xe*xe)-1+(y-x*a)*(y-x*a)/(le*le)),0>xe)return oe;xe=Math.sqrt(xe),le=(-re+xe)/(2*E),ue(le,x*le-x*a+y),xe=(-re-xe)/(2*E),ue(xe,x*xe-x*a+y)}return oe},Ff:function(a,y,x,E,b,z,ne,re,oe){var le=1e21,ue=a,pe=y;if(it.Ve(a,y,a,E,b,z,ne,re,oe)){var xe=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z);xe<le&&(le=xe,ue=oe.x,pe=oe.y)}return it.Ve(x,y,x,E,b,z,ne,re,oe)&&(xe=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),xe<le&&(le=xe,ue=oe.x,pe=oe.y)),it.Ve(a,y,x,y,b,z,ne,re,oe)&&(y=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),y<le&&(le=y,ue=oe.x,pe=oe.y)),it.Ve(a,E,x,E,b,z,ne,re,oe)&&(a=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),a<le&&(le=a,ue=oe.x,pe=oe.y)),oe.h(ue,pe),1e21>le},us:function(a,y,x){return it.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,ne,re){var oe=a+x,le=y+E;return b===ne?(z<re?(ne=z,z=re):ne=re,a<=b&&b<=oe&&ne<=le&&z>=y):z===re?(b<ne?(re=b,b=ne):re=ne,y<=z&&z<=le&&re<=oe&&b>=a):!!(Fo(a,y,x,E,b,z)||Fo(a,y,x,E,ne,re)||it.Rl(a,y,oe,y,b,z,ne,re)||it.Rl(oe,y,oe,le,b,z,ne,re)||it.Rl(oe,le,a,le,b,z,ne,re)||it.Rl(a,le,a,y,b,z,ne,re))},Rl:function(a,y,x,E,b,z,ne,re){return a===x&&y===E&&b===ne&&z===re?a===b&&y===z:0>=it.Fl(a,y,x,E,b,z)*it.Fl(a,y,x,E,ne,re)&&0>=it.Fl(b,z,ne,re,a,y)*it.Fl(b,z,ne,re,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var ne=Math.PI;z||(E*=ne/180,b*=ne/180);var re=E>b?-1:1;z=[];var oe=ne/2,le=E;if(E=Math.min(2*ne,Math.abs(b-E)),1e-5>E)return oe=le+re*Math.min(E,oe),re=a+x*Math.cos(le),le=y+x*Math.sin(le),a+=x*Math.cos(oe),y+=x*Math.sin(oe),x=(re+a)/2,oe=(le+y)/2,z.push([re,le,x,oe,x,oe,a,y]),z;for(;1e-5<E;)b=le+re*Math.min(E,oe),z.push(it.Vy(x,le,b,a,y)),E-=Math.abs(b-le),le=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,ne=a*Math.cos(z),re=a*Math.sin(z),oe=-re,le=ne*ne+oe*oe,ue=le+ne*ne+oe*re;return le=4/3*(Math.sqrt(2*le*ue)-ue)/(ne*re-oe*ne),re=ne-le*oe,ne=oe+le*ne,oe=-ne,le=z+y,z=Math.cos(le),le=Math.sin(le),[E+a*Math.cos(y),b+a*Math.sin(y),E+re*z-ne*le,b+re*le+ne*z,E+re*z-oe*le,b+re*le+oe*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,ne){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var re=x;return x+b-a<b/2&&(re=x+b),a=E,E+z-y<z/2&&(a=E+z),ne.h(re,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var ne=1,re=0;else ne=0,re=1;var oe=ne===0?a:y,le=ne===0?x:E;return(ne===0?b:z)&&(le=-le),ne=re,x=ne===0?x:E,(ne===0?b:z)&&(x=-x),it.az(oe,ne===0?a:y,le,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var ne=y*E,re=-z+ne,oe=-z+Math.sqrt(a*a+ne*ne);y=re;for(var le=0;9999999999>le&&(y=.5*(re+oe),!(y===re||y===oe));++le){var ue=a/(y+b),pe=ne/(y+z);if(ue=ue*ue+pe*pe-1,0<ue)re=y;else if(0>ue)oe=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new _i,um:new _i,Mf:new _i,Nf:0,vm:100};it.za=it.AA;function vn(a){Hr(this),this.l=2,a===void 0&&(a=vn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===vn.o?this.ee=new Mn:(vn.V===null&&(vn.V=new Mn().freeze()),this.ee=vn.V),this.aq=this.ee.Ja,this.Ip=new pn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=cs,this.gg=ys,this.Rk=this.Sk=NaN,this.Uf=zn}vn.prototype.copy=function(){var a=new vn;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===vn.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},vn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},vn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==vn.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},vn.prototype.ka=function(){if(Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==vn.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},vn.prototype.Xa=function(a){if(!(a instanceof vn))return!1;if(this.type!==a.type)return this.type===vn.j&&a.type===vn.o?jr(this,a):a.type===vn.j&&this.type===vn.o?jr(a,this):!1;if(this.type===vn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return it.B(this.startX,a.startX)&&it.B(this.startY,a.startY)&&it.B(this.endX,a.endX)&&it.B(this.endY,a.endY)};function jr(a,y){return a.type!==vn.j||y.type!==vn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&it.B(a.startX,y.startX)&&it.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===rr&&it.B(a.endX,y.endX)&&it.B(a.endY,y.endY))))}vn.ia=function(a){return a.toString()},vn.prototype.qb=function(a){a.classType===vn&&(this.type=a)},vn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case vn.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 vn.u:var y=new pn(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 vn.F:if(y=new pn(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 vn.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},vn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},vn.parse=function(a,y){function x(){return Oe>=Mt-1?!0:le[Oe+1].match(Ot)!==null}function E(){return Oe++,le[Oe]}function b(hr){var Ji=parseFloat(E()),mo=parseFloat(E());st===st.toLowerCase()&&(Ji=xt.x+Ji,mo=xt.y+mo),hr.h(Ji,mo)}function z(){return b(xt),xt}function ne(){return b(pt),pt}function re(){var hr=Ye.toLowerCase();return hr!=="c"&&hr!=="s"&&hr!=="q"&&hr!=="t"?xt:new tt(2*xt.x-pt.x,2*xt.y-pt.y)}y===void 0&&(y=!1);var oe=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(oe,"$1 $2"),a=a.replace(oe,"$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 le=a.split(" ");for(a=0;a<le.length;a++){var ue=le[a];if(ue.match(/(\.[0-9]*)(\.)/gm)!==null){oe=ni();for(var pe="",xe=!1,Ee=0;Ee<ue.length;Ee++){var Fe=ue[Ee];Fe!=="."||xe?Fe==="."?(oe.push(pe),pe="."):pe+=Fe:(xe=!0,pe+=Fe)}for(oe.push(pe),le.splice(a,1),ue=0;ue<oe.length;ue++)le.splice(a+ue,0,oe[ue]);a+=oe.length-1,ci(oe)}}var Oe=-1,st="",Ye="";oe=new tt(0,0);var pt=new tt(0,0),xt=new tt(0,0),Mt=le.length;a=N1(null),xe=pe=ue=!1,Ee=!0,Fe=null;for(var Ot=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Oe>=Mt-1);)if(Ye=st,st=E(),st!=="")switch(st.toUpperCase()){case"X":Ee=!0,pe=ue=!1;break;case"M":for(Fe=z(),a.mc===null||Ee===!0?(yg(a,Fe.x,Fe.y,ue,!pe,xe),Ee=!1):a.moveTo(Fe.x,Fe.y),oe.assign(xt);!x();)Fe=z(),a.lineTo(Fe.x,Fe.y);break;case"L":for(;!x();)Fe=z(),a.lineTo(Fe.x,Fe.y);break;case"H":for(;!x();)xt=new tt((st===st.toLowerCase()?xt.x:0)+parseFloat(E()),xt.y),a.lineTo(xt.x,xt.y);break;case"V":for(;!x();)xt=new tt(xt.x,(st===st.toLowerCase()?xt.y:0)+parseFloat(E())),a.lineTo(xt.x,xt.y);break;case"C":for(;!x();){Fe=new tt,b(Fe);var en=ne(),ri=z();_c(a,Fe.x,Fe.y,en.x,en.y,ri.x,ri.y)}break;case"S":for(;!x();)Fe=re(),en=ne(),ri=z(),_c(a,Fe.x,Fe.y,en.x,en.y,ri.x,ri.y);break;case"Q":for(;!x();)Fe=ne(),en=z(),Zm(a,Fe.x,Fe.y,en.x,en.y);break;case"T":for(;!x();)pt=Fe=re(),en=z(),Zm(a,Fe.x,Fe.y,en.x,en.y);break;case"B":for(;!x();){Fe=parseFloat(E()),en=parseFloat(E()),ri=parseFloat(E());var Si=parseFloat(E()),gi=parseFloat(E()),$n=gi,An=!1;x()||($n=parseFloat(E()),x()||(An=parseFloat(E())!==0)),st===st.toLowerCase()&&(ri+=xt.x,Si+=xt.y),a.arcTo(Fe,en,ri,Si,gi,$n,An)}break;case"A":for(;!x();)Fe=Math.abs(parseFloat(E())),en=Math.abs(parseFloat(E())),ri=parseFloat(E()),gi=Si=!1,An=$n=0,$n=E(),$n.length===1?(Si=!!parseFloat($n),gi=!!parseFloat(E()),$n=parseFloat(E())):$n.length===2?(Si=!!parseFloat($n[0]),gi=!!parseFloat($n[1]),$n=parseFloat(E())):(Si=!!parseFloat($n[0]),gi=!!parseFloat($n[1]),$n=parseFloat($n.slice(2))),An=parseFloat(E()),st===st.toLowerCase()&&($n=xt.x+$n,An=xt.y+An),xt.h($n,An),wx(a,Fe,en,ri,Si,gi,$n,An);break;case"Z":Px(a),xt.assign(oe);break;case"F":for(Fe="",en=1;le[Oe+en];)if(le[Oe+en]==="0")xe=!0,en++;else if(le[Oe+en].match(/[Uu]/)!==null)en++;else if(le[Oe+en].match(Ot)===null)en++;else{Fe=le[Oe+en];break}Fe.match(/[Mm]/)?ue=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Fe="",en=1;le[Oe+en];)if(le[Oe+en].match(/[Ff]/)!==null)en++;else if(le[Oe+en].match(Ot)===null)en++;else{Fe=le[Oe+en];break}Fe.match(/[Mm]/)?pe=!0:a.mc.isShadowed=!1}if(oe=a.os,Hm=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},vn.Ha=function(a,y){for(var x=a.length,E=tt.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}tt.free(E)},vn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===vn.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},vn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===vn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var ne=E[z];ne._isInvalidBounds=!1,ne.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Bo(this,a,!1),ma(a,0,0,0,0),a.freeze()},vn.prototype.ix=function(){var a=new pn;return Bo(this,a,!0),a};function Bo(a,y,x){switch(a.type){case vn.j:case vn.u:case vn.F:x?y.h(a.od,a.pd,0,0):ma(y,a.od,a.pd,0,0),ma(y,a.Dc,a.Ec,0,0);break;case vn.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):ma(y,z.startX,z.startY,0,0);for(var ne=z.segments.s,re=ne.length,oe=z.startX,le=z.startY,ue=0;ue<re;ue++){var pe=ne[ue];switch(pe.type){case rr:case Ar:oe=pe.endX,le=pe.endY,ma(y,oe,le,0,0);break;case br:it.Dl(oe,le,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.5,y),oe=pe.endX,le=pe.endY;break;case Lo:it.iv(oe,le,pe.point1X,pe.point1Y,pe.endX,pe.endY,.5,y),oe=pe.endX,le=pe.endY;break;case Rr:case tr:var xe=pe.type===Rr?Ki(pe,z):Dr(pe,z,oe,le),Ee=xe.length;if(Ee===0){oe=pe.type===Rr?pe.centerX:pe.endX,le=pe.type===Rr?pe.centerY:pe.endY,ma(y,oe,le,0,0);break}pe=null;for(var Fe=0;Fe<Ee;Fe++)pe=xe[Fe],it.Dl(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.5,y);pe!==null&&(oe=pe[6],le=pe[7]);break;default:St("Unknown Segment type: "+pe.type)}}}break;default:St("Unknown Geometry type: "+a.type)}}vn.prototype.normalize=function(){this._isFrozen&&hn(this);var a=this.ix();return this.offset(-a.x,-a.y),new tt(-a.x,-a.y)},vn.prototype.offset=function(a,y){return this._isFrozen&&hn(this),this.transform(1,0,0,1,a,y),this},vn.prototype.scale=function(a,y){return this._isFrozen&&hn(this),this.transform(a,0,0,y,0,0),this},vn.prototype.rotate=function(a,y,x){this._isFrozen&&hn(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=_t.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),_t.free(E),this},Le=vn.prototype,Le.transform=function(a,y,x,E,b,z){switch(this.type){case vn.j:case vn.u:case vn.F:var ne=this.od,re=this.pd;this.od=ne*a+re*x+b,this.pd=ne*y+re*E+z,ne=this.Dc,re=this.Ec,this.Dc=ne*a+re*x+b,this.Ec=ne*y+re*E+z;break;case vn.o:for(var oe=this.figures.s,le=oe.length,ue=0;ue<le;ue++){var pe=oe[ue];ne=pe.startX,re=pe.startY,pe.startX=ne*a+re*x+b,pe.startY=ne*y+re*E+z,pe=pe.segments.s;for(var xe=pe.length,Ee=0;Ee<xe;Ee++){var Fe=pe[Ee];switch(Fe.type){case rr:case Ar:ne=Fe.endX,re=Fe.endY,Fe.endX=ne*a+re*x+b,Fe.endY=ne*y+re*E+z;break;case br:ne=Fe.point1X,re=Fe.point1Y,Fe.point1X=ne*a+re*x+b,Fe.point1Y=ne*y+re*E+z,ne=Fe.point2X,re=Fe.point2Y,Fe.point2X=ne*a+re*x+b,Fe.point2Y=ne*y+re*E+z,ne=Fe.endX,re=Fe.endY,Fe.endX=ne*a+re*x+b,Fe.endY=ne*y+re*E+z;break;case Lo:ne=Fe.point1X,re=Fe.point1Y,Fe.point1X=ne*a+re*x+b,Fe.point1Y=ne*y+re*E+z,ne=Fe.endX,re=Fe.endY,Fe.endX=ne*a+re*x+b,Fe.endY=ne*y+re*E+z;break;case Rr:ne=Fe.centerX,re=Fe.centerY,Fe.centerX=ne*a+re*x+b,Fe.centerY=ne*y+re*E+z,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Fe.startAngle+=ne),0>a&&(Fe.startAngle=180-Fe.startAngle,Fe.sweepAngle=-Fe.sweepAngle),0>E&&(Fe.startAngle=-Fe.startAngle,Fe.sweepAngle=-Fe.sweepAngle),Fe.radiusX*=Math.sqrt(a*a+x*x),Fe.radiusY!==void 0&&(Fe.radiusY*=Math.sqrt(y*y+E*E));break;case tr:if(ne=Fe.endX,re=Fe.endY,Fe.endX=ne*a+re*x+b,Fe.endY=ne*y+re*E+z,Fe.radiusX===0||Fe.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Fe.xAxisRotation+=ne),0>a&&(Fe.xAxisRotation=180-Fe.xAxisRotation,Fe.isClockwiseArc=!Fe.isClockwiseArc),0>E&&(Fe.xAxisRotation=-Fe.xAxisRotation,Fe.isClockwiseArc=!Fe.isClockwiseArc),Fe.radiusX*=Math.sqrt(a*a+x*x),Fe.radiusY*=Math.sqrt(y*y+E*E);break;default:St("Unknown Segment type: "+Fe.type)}}}}return this._isInvalidBounds=!0,this},Le.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case vn.j:return it.Yb(x,E,b,z,y,a.x,a.y);case vn.u:var ne=pn.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=ne.ca(a),pn.free(ne),a;case vn.F:ne=Math.min(x,b)-y;var re=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),re=a.y-(re+y),1>=ne*ne/(x*x)+re*re/(y*y));case vn.o:return Ir(this,a,y,!0,!1);default:return!1}};function Ir(a,y,x,E,b){var z=y.x;y=y.y;for(var ne=a.bounds.x-20,re=0,oe,le,ue,pe,xe=a.figures.s,Ee=xe.length,Fe=0;Fe<Ee;Fe++){var Oe=xe[Fe],st=!Oe.isEvenOdd;if(Oe.isFilled){if(E&&Oe.ca(z,y,x))return!0;var Ye=Oe.segments;oe=Oe.startX,le=Oe.startY;for(var pt=oe,xt=le,Mt=Ye.s,Ot=0;Ot<=Ye.length;Ot++){var en=void 0;if(Ot!==Ye.length){en=Mt[Ot];var ri=en.type;a=en.endX,pe=en.endY}else ri=rr,a=pt,pe=xt;switch(ri){case Ar:if(pt=zr(z,y,ne,y,oe,le,pt,xt),isNaN(pt))return!0;re+=pt,pt=a,xt=pe;break;case rr:if(oe=zr(z,y,ne,y,oe,le,a,pe),isNaN(oe))return!0;re+=oe;break;case br:ue=it.Fo(oe,le,en.point1X,en.point1Y,en.point2X,en.point2Y,a,pe,ne,y,z,y,.5),re+=ue;break;case Lo:ue=it.Fo(oe,le,(oe+2*en.point1X)/3,(le+2*en.point1Y)/3,(2*en.point1X+a)/3,(2*en.point1Y+pe)/3,a,pe,ne,y,z,y,.5),re+=ue;break;case Rr:case tr:ri=en.type===Rr?Ki(en,Oe):Dr(en,Oe,oe,le);var Si=ri.length;if(Si===0){if(oe=zr(z,y,ne,y,oe,le,en.type===Rr?en.centerX:en.endX,en.type===Rr?en.centerY:en.endY),isNaN(oe))return!0;re+=oe;break}en=null;for(var gi=0;gi<Si;gi++){if(en=ri[gi],gi===0){if(ue=zr(z,y,ne,y,oe,le,en[0],en[1]),isNaN(ue))return!0;re+=ue}ue=it.Fo(en[0],en[1],en[2],en[3],en[4],en[5],en[6],en[7],ne,y,z,y,.5),re+=ue}en!==null&&(a=en[6],pe=en[7]);break;default:St("Unknown Segment type: "+en.type)}oe=a,le=pe}if(st){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(Oe.ca(z,y,b?x:x+2))return!0}return!1}function zr(a,y,x,E,b,z,ne,re){if(it.Yb(b,z,ne,re,.05,a,y))return NaN;var oe=(a-x)*(z-re);if(oe===0)return 0;var le=((a*E-y*x)*(b-ne)-(a-x)*(b*re-z*ne))/oe;if(y=(a*E-y*x)*(z-re)/oe,le>=a)return 0;if((b>ne?b-ne:ne-b)<(z>re?z-re:re-z)){if(z<re){if(y<z||y>re)return 0}else if(y<re||y>z)return 0}else if(b<ne){if(le<b||le>ne)return 0}else if(le<ne||le>b)return 0;return 0<oe?1:-1}function Ro(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))return!0;return!1}Le.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new tt),this.type===vn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,ne=0,re=0;re<b;re++){var oe=E[re],le=oe.length;for(a=0;a<le;a++){var ue=oe[a];if(ne+ue>=z)return E=z-ne,E=ue===0?0:E/ue,x=x[re],re=x[2*a],b=x[2*a+1],y.h(re+(x[2*a+2]-re)*E,b+(x[2*a+3]-b)*E),y;ne+=ue}}return y},Le.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===vn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,ne=0;ne<E;ne++){var re=x[ne],oe=re.length;for(a=0;a<oe;a++){var le=re[a];if(z+le>=b)return b=y[ne],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=le}}return NaN},Le.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===vn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,ne=0,re=0;re<b;re++){var oe=E[re],le=oe.length;for(a=0;a<le;a++){var ue=oe[a];if(ne+ue>=z)return E=z-ne,E=ue===0?0:E/ue,ue=x[re],x=ue[2*a],re=ue[2*a+1],b=ue[2*a+2],a=ue[2*a+3],y[0]=x+(b-x)*E,y[1]=re+(a-re)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-re)?0:1>Math.abs(b-x)?0<=a-re?90:270:1>Math.abs(a-re)?0<=b-x?0:180:180*Math.atan2(a-re,b-x)/Math.PI,y;ne+=ue}}return y},Le.xx=function(a){if(this.type===vn.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var ne=x;E=b}else ne=b,E=x;return a<=ne?ne===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-ne)}if(x===b)return y<E?ne=y:(ne=E,E=y),z<=ne?ne===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-ne);ne=(E-y)*(E-y)+(b-x)*(b-x);var re=tt.alloc();return it.qh(y,x,E,b,z,a,re),a=re.x,z=re.y,tt.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ne)}}else if(this.type===vn.u){ne=this.startX,re=this.startY;var oe=this.endX;if(b=this.endY,ne!==oe||re!==b){y=oe-ne,x=b-re,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,ne),oe),a=Math.min(Math.max(a,re),b),ne=Math.abs(E-ne),oe=Math.abs(E-oe),re=Math.abs(a-re),b=Math.abs(a-b);var le=Math.min(ne,oe,re,b);if(le===re)return E/z;if(le===oe)return(y+a)/z;if(le===b)return(2*y+x-E)/z;if(le===ne)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=tt.alloc(),b=1/0,re=ne=0,oe=y.length;for(var ue=le=0,pe=0;pe<oe;pe++)for(var xe=y[pe],Ee=x[pe],Fe=xe.length,Oe=0;Oe<Fe;Oe+=2){var st=xe[Oe],Ye=xe[Oe+1];if(Oe!==0){it.qh(le,ue,st,Ye,a.x,a.y,E);var pt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);pt<b&&(b=pt,ne=re,ne+=Math.sqrt((E.x-le)*(E.x-le)+(E.y-ue)*(E.y-ue))),re+=Ee[(Oe-2)/2]}le=st,ue=Ye}return tt.free(E),a=ne/z,0>a?0:1<a?1:a}return 0};function fo(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===vn.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===vn.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===vn.F){var z=new co;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var ne=new Zi(Rr);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,z.add(ne),a=Ki(ne,z),b=a.length,b===0)E.push(ne.centerX),E.push(ne.centerY);else{ne=z.startX,z=z.startY;for(var re=0;re<b;re++){var oe=a[re];it.Qe(ne,z,oe[2],oe[3],oe[4],oe[5],oe[6],oe[7],.5,E),ne=oe[6],z=oe[7]}}y.push(E),x.push(Wo(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),ne=b.startX,z=b.startY,re=ne,oe=z;for(var le=b.segments.s,ue=le.length,pe=0;pe<ue;pe++){var xe=le[pe];switch(xe.type){case Ar:4<=E.length&&(y.push(E),x.push(Wo(E))),E=[],E.push(xe.endX),E.push(xe.endY),ne=xe.endX,z=xe.endY,re=ne,oe=z;break;case rr:E.push(xe.endX),E.push(xe.endY),ne=xe.endX,z=xe.endY;break;case br:it.Qe(ne,z,xe.point1X,xe.point1Y,xe.point2X,xe.point2Y,xe.endX,xe.endY,.5,E),ne=xe.endX,z=xe.endY;break;case Lo:it.ep(ne,z,xe.point1X,xe.point1Y,xe.endX,xe.endY,.5,E),ne=xe.endX,z=xe.endY;break;case Rr:var Ee=Ki(xe,b),Fe=Ee.length;if(Fe===0){E.push(xe.centerX),E.push(xe.centerY),ne=xe.centerX,z=xe.centerY;break}for(var Oe=0;Oe<Fe;Oe++){var st=Ee[Oe];it.Qe(ne,z,st[2],st[3],st[4],st[5],st[6],st[7],.5,E),ne=st[6],z=st[7]}break;case tr:if(Ee=Dr(xe,b,ne,z),Fe=Ee.length,Oe=xe.endX,st=xe.endY,Fe===0){E.push(Oe),E.push(st),ne=Oe,z=st;break}for(Oe=0;Oe<Fe;Oe++)st=Ee[Oe],it.Qe(ne,z,st[2],st[3],st[4],st[5],st[6],st[7],.5,E),ne=st[6],z=st[7];break;default:St("Segment not of valid type: "+xe.type)}xe.isClosed&&(E.push(re),E.push(oe))}4<=E.length&&(y.push(E),x.push(Wo(E)))}}}function Wo(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var ne=a[z],re=a[z+1];z!==0&&y.push(Math.sqrt(ua(x,E,ne,re))),x=ne,E=re}return y}Le.add=function(a){return this.ee.add(a),this},Le.pm=function(a,y,x,E,b,z,ne,re){return this._isFrozen&&hn(this),this.fg=new Ei(a,y,b,z).freeze(),this.gg=new Ei(x,E,ne,re).freeze(),this},Ve.Object.defineProperties(vn.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 fo(this),this.tk}},flattenedLengths:{get:function(){return fo(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===vn.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===vn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,E=a=0;E<x;E++)for(var b=y[E],z=b.length,ne=0;ne<z;ne++)a+=b[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&hn(this,a),this.na=a,a===vn.o?this.ee=new Mn:(vn.V===null&&(vn.V=new Mn().freeze()),this.ee=vn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&hn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&hn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&hn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&hn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&hn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&hn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&hn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&hn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),vn.prototype.setSpots=vn.prototype.pm,vn.prototype.add=vn.prototype.add,vn.prototype.getFractionForPoint=vn.prototype.xx,vn.prototype.getPointAndAngleAlongPath=vn.prototype.Qu,vn.prototype.getAngleAlongPath=vn.prototype.wx,vn.prototype.getPointAlongPath=vn.prototype.Pu,vn.prototype.containsPoint=vn.prototype.ca,vn.prototype.transform=vn.prototype.transform,vn.prototype.rotate=vn.prototype.rotate,vn.prototype.scale=vn.prototype.scale,vn.prototype.offset=vn.prototype.offset,vn.prototype.normalize=vn.prototype.normalize,vn.prototype.computeBoundsWithoutOrigin=vn.prototype.ix,vn.prototype.equalsApprox=vn.prototype.Xa,vn.className="Geometry",vn.j=new fn(vn,"Line",0),vn.u=new fn(vn,"Rectangle",1),vn.F=new fn(vn,"Ellipse",2),vn.o=new fn(vn,"Path",3),vn.V=null,vn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",vn.className="Geometry",vn.stringify=vn.ia,vn.fillPath=vn.nb,vn.parse=vn.parse,vn.Line=vn.j,vn.Rectangle=vn.u,vn.Ellipse=vn.F,vn.Path=vn.o;function co(a,y,x,E,b){Hr(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Mn,this.sr=this.pl.Ja,this.fw=null}co.prototype.copy=function(){var a=new co;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Le=co.prototype,Le.Xa=function(a){if(!(a instanceof co&&it.B(this.startX,a.startX)&&it.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Le.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,E=x.length,b=0;b<E;b++)y+=" "+x[b].toString(a);return y},Le.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},Le.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},Le.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},Le.add=function(a){return this.pl.add(a),this},Le.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,ne=b,re=this.segments.s,oe=re.length,le=0;le<oe;le++){var ue=re[le];switch(ue.type){case Ar:z=ue.endX,ne=ue.endY,E=ue.endX,b=ue.endY;break;case rr:if(it.Yb(E,b,ue.endX,ue.endY,x,a,y))return!0;E=ue.endX,b=ue.endY;break;case br:if(it.cs(E,b,ue.point1X,ue.point1Y,ue.point2X,ue.point2Y,ue.endX,ue.endY,.5,a,y,x))return!0;E=ue.endX,b=ue.endY;break;case Lo:if(it.jv(E,b,ue.point1X,ue.point1Y,ue.endX,ue.endY,.5,a,y,x))return!0;E=ue.endX,b=ue.endY;break;case Rr:case tr:var pe=ue.type===Rr?Ki(ue,this):Dr(ue,this,E,b),xe=pe.length,Ee=ue.type===Rr?ue.centerX:ue.endX,Fe=ue.type===Rr?ue.centerY:ue.endY;if(xe===0){if(it.Yb(E,b,Ee,Fe,x,a,y))return!0;E=Ee,b=Fe;break}for(Ee=null,Fe=0;Fe<xe;Fe++)if(Ee=pe[Fe],Fe===0&&it.Yb(E,b,Ee[0],Ee[1],x,a,y)||it.cs(Ee[0],Ee[1],Ee[2],Ee[3],Ee[4],Ee[5],Ee[6],Ee[7],.5,a,y,x))return!0;Ee!==null&&(E=Ee[6],b=Ee[7]);break;default:St("Unknown Segment type: "+ue.type)}if(ue.isClosed&&(E!==z||b!==ne)&&it.Yb(E,b,z,ne,x,a,y))return!0}return!1},Ve.Object.defineProperties(co.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&&hn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&hn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&hn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&hn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&hn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&hn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),co.prototype.add=co.prototype.add,co.prototype.equalsApprox=co.prototype.Xa,co.className="PathFigure";function Zi(a,y,x,E,b,z,ne,re){Hr(this),a===void 0&&(a=rr),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),ne===void 0&&(ne=0),a===tr?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),re&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===Rr&&(z=Math.max(z,0)),this.Wh=z,typeof ne=="number"?(a===Rr&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Zi.prototype.copy=function(){var a=new Zi;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},Le=Zi.prototype,Le.Xa=function(a){if(!(a instanceof Zi)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ar:case rr:return it.B(this.endX,a.endX)&&it.B(this.endY,a.endY);case br:return it.B(this.endX,a.endX)&&it.B(this.endY,a.endY)&&it.B(this.point1X,a.point1X)&&it.B(this.point1Y,a.point1Y)&&it.B(this.point2X,a.point2X)&&it.B(this.point2Y,a.point2Y);case Lo:return it.B(this.endX,a.endX)&&it.B(this.endY,a.endY)&&it.B(this.point1X,a.point1X)&&it.B(this.point1Y,a.point1Y);case Rr:return it.B(this.startAngle,a.startAngle)&&it.B(this.sweepAngle,a.sweepAngle)&&it.B(this.centerX,a.centerX)&&it.B(this.centerY,a.centerY)&&it.B(this.radiusX,a.radiusX)&&it.B(this.radiusY,a.radiusY);case tr:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&it.B(this.xAxisRotation,a.xAxisRotation)&&it.B(this.endX,a.endX)&&it.B(this.endY,a.endY)&&it.B(this.radiusX,a.radiusX)&&it.B(this.radiusY,a.radiusY);default:return!1}},Le.qb=function(a){a.classType===Zi&&(this.type=a)},Le.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ar:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case rr:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case br: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 Lo: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 Rr: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 tr: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":"")},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.close=function(){return this.isClosed=!0,this};function Ki(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=it.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var ne=_t.alloc();ne.reset(),x<E?ne.scale(1,E/x):ne.scale(x/E,1),vn.Ha(z,ne),_t.free(ne)}for(x=z.length,E=0;E<x;E++)ne=z[E],ne[0]+=y,ne[1]+=b,ne[2]+=y,ne[3]+=b,ne[4]+=y,ne[5]+=b,ne[6]+=y,ne[7]+=b;return a.ae=z,a.ae}function Dr(a,y,x,E){function b(Oe,st,Ye,pt){return(Oe*pt<st*Ye?-1:1)*Math.acos((Oe*Ye+st*pt)/(Math.sqrt(Oe*Oe+st*st)*Math.sqrt(Ye*Ye+pt*pt)))}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 ne=Math.PI/180*a.Ne,re=a.isLargeArc,oe=a.isClockwiseArc,le=a.Dc,ue=a.Ec,pe=Math.cos(ne),xe=Math.sin(ne),Ee=pe*(x-le)/2+xe*(E-ue)/2;ne=-xe*(x-le)/2+pe*(E-ue)/2;var Fe=Ee*Ee/(y*y)+ne*ne/(z*z);return 1<Fe&&(y*=Math.sqrt(Fe),z*=Math.sqrt(Fe)),Fe=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*ne*ne-z*z*Ee*Ee)/(y*y*ne*ne+z*z*Ee*Ee)),isNaN(Fe)&&(Fe=0),re=Fe*y*ne/z,Fe=Fe*-z*Ee/y,isNaN(re)&&(re=0),isNaN(Fe)&&(Fe=0),x=(x+le)/2+pe*re-xe*Fe,E=(E+ue)/2+xe*re+pe*Fe,ue=b(1,0,(Ee-re)/y,(ne-Fe)/z),pe=(Ee-re)/y,le=(ne-Fe)/z,Ee=(-Ee-re)/y,re=(-ne-Fe)/z,ne=b(pe,le,Ee,re),Ee=(pe*Ee+le*re)/(Math.sqrt(pe*pe+le*le)*Math.sqrt(Ee*Ee+re*re)),-1>=Ee?ne=Math.PI:1<=Ee&&(ne=0),!oe&&0<ne&&(ne-=2*Math.PI),oe&&0>ne&&(ne+=2*Math.PI),oe=y>z?1:y/z,Ee=y>z?z/y:1,y=it.jx(0,0,y>z?y:z,ue,ue+ne,!0),z=_t.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(oe,Ee),vn.Ha(y,z),_t.free(z),a.ae=y,a.ae}Ve.Object.defineProperties(Zi.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&&hn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&hn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&hn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&hn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&hn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&hn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&hn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&hn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&hn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&In(a,">= zero",Zi,"radiusX"),this._isFrozen&&hn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&In(a,">= zero",Zi,"radiusY"),this._isFrozen&&hn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&hn(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&&hn(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&&hn(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&&hn(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&&hn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Zi.prototype.equalsApprox=Zi.prototype.Xa;var Ar=new fn(Zi,"Move",0),rr=new fn(Zi,"Line",1),br=new fn(Zi,"Bezier",2),Lo=new fn(Zi,"QuadraticBezier",3),Rr=new fn(Zi,"Arc",4),tr=new fn(Zi,"SvgArc",4);Zi.className="PathSegment",Zi.Move=Ar,Zi.Line=rr,Zi.Bezier=br,Zi.QuadraticBezier=Lo,Zi.Arc=Rr,Zi.SvgArc=tr;function ur(){this.H=null,this.xu=new tt(0,0).freeze(),this.mt=new tt(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}ur.prototype.copy=function(){var a=new ur;return this.clone(a)},ur.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},ur.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},ur.prototype.So=function(a,y){var x=this.diagram;return x===null||Zd(x,a,y),y},ur.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Zd(x,a,y),y.assign(x.Ps(y))),y},Ve.Object.defineProperties(ur.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}}}),ur.prototype.getMultiTouchDocumentPoint=ur.prototype.Bz,ur.prototype.getMultiTouchViewPoint=ur.prototype.So,ur.className="InputEvent";function sr(){this.H=null,this.xa="",this.ar=this.Lr=null}sr.prototype.copy=function(){var a=new sr;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},sr.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ve.Object.defineProperties(sr.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}}}),sr.className="DiagramEvent";function Ri(){this.Fm=Yr,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Ri.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Ri.prototype.copy=function(){var a=new Ri;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=Gt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Gt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Gt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Gt(y)&&typeof y.J=="function"?y.J():y,a},Ri.prototype.qb=function(a){a.classType===Ri&&(this.change=a)},Ri.prototype.toString=function(){var a="";return a=this.change===To?a+"* ":this.change===Yr?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===To?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Ni(this.object)),this.oldValue!==null&&(a+=" old: "+Ni(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Ni(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Ri.prototype.I=function(a){return a?this.oldValue:this.newValue},Ri.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Ri.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Ri.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Ri.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Ri.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ve.Object.defineProperties(Ri.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===To&&(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}}}),Ri.prototype.redo=Ri.prototype.redo,Ri.prototype.canRedo=Ri.prototype.canRedo,Ri.prototype.undo=Ri.prototype.undo,Ri.prototype.canUndo=Ri.prototype.canUndo,Ri.prototype.getParam=Ri.prototype.Dz,Ri.prototype.getValue=Ri.prototype.I,Ri.prototype.clear=Ri.prototype.clear;var To=new fn(Ri,"Transaction",-1),Yr=new fn(Ri,"Property",0),ko=new fn(Ri,"Insert",1),Uo=new fn(Ri,"Remove",2);Ri.className="ChangedEvent",Ri.Transaction=To,Ri.Property=Yr,Ri.Insert=ko,Ri.Remove=Uo;function Lr(){this.o=new Mn().freeze(),this.xa="",this.j=!1}Lr.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var E=this.changes.M(x);E!==null&&(y+=`
`+E.toString())}}return y},Lr.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()},Lr.prototype.canUndo=function(){return this.isComplete},Lr.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()}},Lr.prototype.canRedo=function(){return this.isComplete},Lr.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()}},Lr.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new xi,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===Yr&&E.object){var b=y.get(E.object);b||(b=new xi,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},Ve.Object.defineProperties(Lr.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}}}),Lr.prototype.optimize=Lr.prototype.ak,Lr.prototype.redo=Lr.prototype.redo,Lr.prototype.canRedo=Lr.prototype.canRedo,Lr.prototype.undo=Lr.prototype.undo,Lr.prototype.canUndo=Lr.prototype.canUndo,Lr.prototype.clear=Lr.prototype.clear,Lr.className="Transaction";function Do(){this.Pt=new Ln,this.Jd=!1,this.u=new Mn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Mn().freeze(),this.hl=new Mn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Do.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
`+this.history.M(E).toString(a-1);return y},Do.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},Do.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Le=Do.prototype,Le.Xw=function(a){this.Pt.add(a)},Le.Rx=function(a){this.Pt.remove(a)},Le.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},Le.eb=function(a){return a===void 0&&(a=""),Bs(this,!0,a)},Le.Kf=function(){return Bs(this,!1,"")};function Bs(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&ii("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(z=a.hl.M(ne-1),a.hl.mb(ne-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}Le.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()}},Do.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Do.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){ii("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Do.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Do.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){ii("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Do.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Ri;for(E.change=To,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Do.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Lr);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||ii("Change not within a transaction: "+x.toString()))}},Do.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},Ve.Object.defineProperties(Do.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}}}),Do.prototype.handleChanged=Do.prototype.Tu,Do.prototype.redo=Do.prototype.redo,Do.prototype.undo=Do.prototype.undo,Do.prototype.canUndo=Do.prototype.canUndo,Do.prototype.discardHistoryAfterIndex=Do.prototype.lx,Do.prototype.rollbackTransaction=Do.prototype.Kf,Do.prototype.commitTransaction=Do.prototype.eb,Do.prototype.startTransaction=Do.prototype.Ea,Do.prototype.removeModel=Do.prototype.Rx,Do.prototype.addModel=Do.prototype.Xw,Do.prototype.clear=Do.prototype.clear,Do.className="UndoManager";function Gi(){Hr(this),this.H=ph,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ur,this.Zr=-1}Gi.prototype.toString=function(){return this.name!==""?this.name+" Tool":li(this.constructor)},Gi.prototype.updateAdornments=function(){},Gi.prototype.canStart=function(){return this.isEnabled},Gi.prototype.doStart=function(){},Gi.prototype.doActivate=function(){this.isActive=!0},Gi.prototype.doDeactivate=function(){this.isActive=!1},Gi.prototype.doStop=function(){},Gi.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Gi.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Gi.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Gi.prototype.doMouseMove=function(){},Gi.prototype.doMouseUp=function(){this.stopTool()},Gi.prototype.doMouseWheel=function(){},Gi.prototype.canStartMultiTouch=function(){return!0},Gi.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,tt.allocAt(NaN,NaN)),E=y.So(1,tt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}tt.free(x),tt.free(E)},Gi.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,tt.allocAt(NaN,NaN)),E=y.So(1,tt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new tt((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var ne=a.commandHandler;if(z!==a.scale&&ne.canResetZoom(z)){var re=a.zoomPoint;a.zoomPoint=b,ne.resetZoom(z),a.zoomPoint=re}y.bubbles=!1}tt.free(x),tt.free(E)},Gi.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Gi.prototype.doKeyUp=function(){},Gi.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Gi.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Gi.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Or?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||(Or?y.meta:y.control)||y.shift||a.clearSelection()}},Gi.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,Ra(a,E,x),E.handled};function Ra(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,E){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}Gi.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,ne=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var re=z.mouseLeave;if(re!==null&&(E===z||E!==null&&E.rg(z)||(re(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=ne,y.handled=!1;E!==null&&(ne=E.mouseEnter,!(ne!==null&&(z===E||z!==null&&z.rg(E)||(ne(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,ne="";z!==null&&(ne=z.cursor,ne==="");)z=z.panel;for(a.currentCursor=ne,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},Gi.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Gi.prototype.doCurrentObjectChanged=function(){},Gi.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===ju&&!y.shift||b===Is&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===ju&&y.shift||b===Is&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var ne=z.deltaX;z=z.deltaY;var re="pixel";if(ne===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(re,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(re,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:re="pixel";break;case 1:re="line";break;case 2:re="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(re,0<ne?"right":"left",Math.abs(ne))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(re,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},Gi.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Gi.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=Pn(function(){x.doWaitAfter(E)},a)},Gi.prototype.cancelWaitAfter=function(){this.Zr!==-1&&rt.clearTimeout(this.Zr),this.Zr=-1},Gi.prototype.doWaitAfter=function(){},Gi.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof ho);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Gi.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},Ve.Object.defineProperties(Gi.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof qt&&(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}}}),Gi.prototype.startTransaction=Gi.prototype.Ea,Gi.className="Tool";function Vr(){Gi.call(this),this.name="ToolManager",this.hb=new Mn,this.ob=new Mn,this.Hb=new Mn,this.F=this.V=850,this.o=new Xn(2,2).ja(),this.Ha=5e3,this.ia=Is,this.u=Bh,this.Mp=this.j=null,this.zj=-1}Dt(Vr,Gi),Vr.prototype.initializeStandardTools=function(){},Vr.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof ho&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Vr.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ru&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===zu){y.bubbles=!0;return}if(this.gestureBehavior===ru)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===Is?this.mouseWheelBehavior=ju:this.mouseWheelBehavior===ju&&(this.mouseWheelBehavior=Is)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Vr.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===zu){y.bubbles=!0;return}if(this.gestureBehavior===ru)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}Za(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Za(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Vr.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof ho&&(y===a||y.rg(a))||this.hideToolTip()},Vr.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()))},Vr.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)},Vr.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 ho)||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()},Vr.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof ho){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Nr&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(rt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=Pn(function(){b.hideToolTip()},a)}},Vr.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},Vr.prototype.hideToolTip=function(){this.zj!==-1&&(rt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof ho?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Nr&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Vr.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Vr.prototype.doMouseWheel=function(){this.standardMouseWheel()},Vr.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Vr.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Vr.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},Vr.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},Vr.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)},Ve.Object.defineProperties(Vr.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 ho?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}}}),Vr.prototype.replaceStandardTool=Vr.prototype.gb;var Is=new fn(Vr,"WheelScroll",0),ju=new fn(Vr,"WheelZoom",1),Wh=new fn(Vr,"WheelNone",2),Bh=new fn(Vr,"GestureZoom",3),ru=new fn(Vr,"GestureCancel",4),zu=new fn(Vr,"GestureNone",5);Vr.className="ToolManager",Vr.WheelScroll=Is,Vr.WheelZoom=ju,Vr.WheelNone=Wh,Vr.GestureZoom=Bh,Vr.GestureCancel=ru,Vr.GestureNone=zu;function aa(){Gi.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 tt(NaN,NaN),this.Fr=new tt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Ln().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Ml;Dt(aa,Gi),aa.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},aa.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},aa.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,(Or?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},aa.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),zt=null,this.isActive=!0,this.tl.set(a.position),Gh(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&&Js(a),Jf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,zt=this,nn=this.diagram,this.doSimulatedDragOut()))};function Gh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Kn?(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 yi,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}aa.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},aa.prototype.Pd=function(a){return a===void 0?new fc(lo):this.isGridSnapEnabled?new fc(new tt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new fc(a.copy())},aa.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Nh(this),ud(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Ml.count){for(var y=Ml,x=y.length,E=0;E<x;E++){var b=y.M(E);xu(b),ou(b),Nh(b),b.diagram.ug()}y.clear()}xu(this),this.tl.h(NaN,NaN),nn!==null&&(nn.currentCursor=""),zt=nn=null,ou(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),ad(a,!0)},aa.prototype.stopTransaction=function(){var a=this.diagram,y=Gi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Nh(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Fc(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Od(){var a=zt;ou(a),dh(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}aa.prototype.doCancel=function(){ou(this),dh(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},aa.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},aa.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function _u(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):dh(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 xi,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof Kn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,Gh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Wc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function ou(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 Kn&&(x.value.point=new tt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function xu(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 Pu(a,y,x){var E=a.diagram,b=a.startPoint,z=tt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),tt.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Js(E),E.hk())}aa.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&Ah(E,a,y,this.dragOptions,x)};function dh(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof Kn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Wc(E,-b.x,-b.y)}y.bd()}}function Lc(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),_n(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=Fc(a,b,E),!a.isActive&&zt===null)return;var re=E!==null?E.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof fr)){var oe=x.mouseDragOver;oe!==null&&(oe(b),ne=!0)}if(!a.isActive&&zt===null||(a.doDragOver(y,E),!a.isActive&&zt===null))return}finally{x.skipsUndoManager=z,ne&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}aa.prototype.findDragOverObject=function(a){var y=this;return nh(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof ho||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},aa.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 Fc(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var ne=0;ne<b;ne++){var re=a.Cg[ne],oe=re.mouseDragLeave;if(oe!==null&&(oe(y,re,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&zt===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=Bc(b);for(b=a.Cg.length,x=0;x<b&&(ne=a.Cg[x],re=ne.mouseDragEnter,re===null||(re(y,ne,z),E=!0,!y.handled));x++);return E}function Bc(a){var y=a.panel;return y!==null?y:a instanceof Oi&&!(a instanceof fr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function od(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(le){return E.findValidLinkablePort(le,x)});a=tt.alloc();var z=1/0,ne=null;for(b=b.iterator;b.next();){var re=b.value;if(re.part!==null){var oe=re.ga(Jr,a);oe=y.Bf(oe),oe<z&&(ne=re,z=oe)}}return tt.free(a),ne}function _n(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,ne=null;x.fromNode===null&&(z=od(a,x.i(0),!1),z!==null&&(ne=z.part));var re=null,oe=null;x.toNode===null&&(re=od(a,x.i(x.pointsCount-1),!0),re!==null&&(oe=re.part)),b.isValidLink(ne,z,oe,re)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,z!==null&&(x.fromPortId=z.portId),x.toNode=oe,re!==null&&(x.toPortId=re.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):or(b,ne,z,oe,re):or(b,null,null,null,null)}}}}aa.prototype.doDragOver=function(){};function Sr(a,y){var x=a.diagram;a.dragsLink&&_n(a,!0),Nh(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var ne=z.mouseDrop;if(ne!==null&&(ne(b,z),b.handled))break;Jo(a,b,z),z=Bc(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||zt!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof ai&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||zt!==null){for(a=pn.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof ai&&Qe(x,E,a);pn.free(a)}}}function Jo(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof fr||(x=a.mouseDrop,x!==null&&x(y))}function Qe(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof Kn},!0,function(b){return b instanceof Kn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}aa.prototype.doDropOnto=function(){},aa.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()?(_u(this,!1),Jf(a,this.copiedParts),Pu(this,this.copiedParts,!1),ud(a,this.copiedParts)):this.mayMove()?(ou(this),Pu(this,this.draggedParts,!0)):this.mayDragOut()?(_u(this,!1),Pu(this,this.copiedParts,!1)):ou(this),Lc(this,a.lastInput.documentPoint))}},aa.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?(ou(this),_u(this,!0),Jf(a,this.copiedParts),Pu(this,this.copiedParts,!1),ud(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,ou(this),this.mayMove()&&(Pu(this,this.draggedParts,!0),Lc(this,a.lastInput.documentPoint))),this.Ym=!0,Sr(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Ue(this),a.Ya(),ud(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},aa.prototype.simulatedMouseMove=function(a,y,x){if(zt===null)return!1;var E=zt.diagram;x instanceof qt||(x=null);var b=nn;return x!==b&&(b!==null&&b!==E&&(b.ug(),zt.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),nn=x,x!==null&&x!==E&&(Od(),b=x.toolManager.findTool("Dragging"),b!==null&&(Ml.contains(b)||Ml.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,E.doSimulatedDragOver()),!0)},aa.prototype.simulatedMouseUp=function(a,y,x){if(zt===null)return!1;var E=nn,b=zt.diagram;if(x===null)return zt.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),zt.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;nn=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Od(),Ml.contains(E)||Ml.add(E),E.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new tt),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=zt,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function Ue(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof ai&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}aa.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Or?!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())},aa.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())},aa.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())},aa.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},aa.prototype.Az=function(){return zt},aa.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=zt;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},aa.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ll(a),a.animationManager.Cc(),a=zt,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},aa.prototype.doSimulatedDragLeave=function(){var a=zt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},aa.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=zt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;jt(this,y.draggedParts.Lf(),!1,a.firstInput),Pu(this,this.copiedParts,!1),Lc(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},aa.prototype.doSimulatedDrop=function(){var a=this.diagram,y=zt;if(y!==null){var x=y.diagram;if(y.Ym=!0,ou(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),jt(this,y.draggedParts.Lf(),!0,a.lastInput),Pu(this,this.copiedParts,!1);var E=new Ln;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),Sr(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function jt(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=pn.alloc();b=E=1/0;for(var ne=-1/0,re=-1/0,oe=y.iterator;oe.next();){var le=oe.value;if(le.isVisible()){var ue=le.location;le=ue.x,ue=ue.y,isNaN(le)||isNaN(ue)||(le<E&&(E=le),ue<b&&(b=ue),le>ne&&(ne=le),ue>re&&(re=ue))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,ne-E,re-b),E=z.x+z.width/2,b=z.y+z.height/2,pn.free(z),z=a.Fr,ne=new xi,re=tt.alloc(),oe=y.iterator;oe.next();)le=oe.value,le instanceof Kn&&le.canCopy()&&(ue=x.I(le),ue!==null&&(ue.points=le.points,Wc(ue,z.x-E,z.y-b),ue.suspendsRouting=!0,ne.add(ue,a.Pd())));for(y=y.iterator;y.next();)le=y.value,le.Zc()&&le.canCopy()&&(oe=x.I(le),oe!==null&&(le=le.location,re.h(z.x-(E-le.x),z.y-(b-le.y)),oe.location=re,oe.Va(),ne.add(oe,a.Pd(re))));tt.free(re),a.copiedParts=ne,Gh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Wc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}aa.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},aa.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new tt},Ve.Object.defineProperties(aa.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}}}),aa.prototype.getDraggingSource=aa.prototype.Az;var zt=null,nn=null;aa.className="DraggingTool",Ml=new Mn,lr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Vr.prototype.doCancel=function(){zt!==null&&zt.doCancel(),Gi.prototype.doCancel.call(this)};function Wt(){Gi.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Kn,y=new Mr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Mr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new ai,y=new Mr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=bo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new ai,y=new Mr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=bo,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 xi,this.Of=this.gj=this.Pf=null}Dt(Wt,Gi),Wt.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Wt.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),ne=Xn.alloc();ne.width=y.naturalBounds.width*z,ne.height=y.naturalBounds.height*z,E.desiredSize=ne,Xn.free(ne),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Jr,z=tt.alloc(),x.location=y.ga(Jr,z),tt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Wt.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=bo,y.fromSpot=Ma,y.toSpot=Ma),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Wt.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Wt.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof ai){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)}},Wt.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof ai))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof ai)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Wt.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(pe){return b.findValidLinkablePort(pe,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var ne=z.value,re=ne.part;if(re instanceof ai){var oe=ne.ga(Jr,tt.alloc()),le=x.x-oe.x,ue=x.y-oe.y;tt.free(oe),oe=le*le+ue*ue,oe<E&&(le=this.validPortsCache.I(ne),le!==null?le&&(y=ne,E=oe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,re,ne)||!a&&this.isValidLink(re,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,E=oe):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof ai&&(x.layer===null||x.layer.allowLink))?y:null},Wt.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},Wt.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},Wt.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Wt.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof ai))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof ai))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},Wt.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},Wt.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var E=new Ln;return E.add(a),bn(this,x,y,E)};function bn(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),bn(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),bn(a,y.labeledLink,x,E))))}Wt.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==Pf){if(E===rp){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!yn(this,a,y,x,!0)}if(E===op){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!yn(this,a,y,x,!0)}if(E===tp)return a===y?a=!0:(E=new Ln,E.add(y),a=Fn(this,E,a,y,x)),!a;if(E===np)return!yn(this,a,y,x,!1);if(E===ip)return a===y?a=!0:(E=new Ln,E.add(y),a=ei(this,E,a,y,x)),!a}return!0};function yn(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var ne=z.value;if(ne!==E&&(!b||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&yn(a,ne,x,E,b)))return!0}return!1}function Fn(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var ne=z.value;if(ne!==b&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&Fn(a,y,ne,E,b)))return!0}return!1}function ei(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var ne=z.value;if(ne!==b){var re=ne.fromNode;if(ne=ne.toNode,re=re===x?ne:re,re!==x&&ei(a,y,re,E,b))return!0}}return!1}Ve.Object.defineProperties(Wt.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}}}),Wt.className="LinkingBaseTool";function Nn(){Wt.call(this),this.name="Linking",this.V={},this.F=null,this.K=Qn,this.Xd=null}Dt(Nn,Wt),Nn.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},Nn.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 ai)))return null;var x=this.direction;if(x===Qn||x===Ai){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===Qn||x===Pi)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Nn.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 ai&&(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 ai&&(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)},Nn.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()},Nn.prototype.doStop=function(){Wt.prototype.doStop.call(this),this.startObject=null},Nn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var re=ne.part;re instanceof ai&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=re,b=ne):(y=re,x=ne,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(ne===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Nn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Kn)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)},Nn.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Nn.prototype.doNoLink=function(){},Ve.Object.defineProperties(Nn.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 Qn=new fn(Nn,"Either",0),Ai=new fn(Nn,"ForwardsOnly",0),Pi=new fn(Nn,"BackwardsOnly",0);Nn.className="LinkingTool",Nn.Either=Qn,Nn.ForwardsOnly=Ai,Nn.BackwardsOnly=Pi;function yi(){Wt.call(this),this.name="Relinking";var a=new Mr;a.figure="Diamond",a.desiredSize=No,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Mr,a.figure="Diamond",a.desiredSize=No,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new pn}Dt(yi,Wt),yi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Kn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},yi.prototype.makeAdornment=function(a,y){var x=new ho;return x.type=Hn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},yi.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},yi.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 ho&&x.adornedPart instanceof Kn))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=wr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=wr),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},yi.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Pg||x===Gc)&&(x=pl),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}},yi.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()},yi.prototype.doStop=function(){Wt.prototype.doStop.call(this),this.handle=null},yi.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof ai&&(this.isForwards?(E=ne,b=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},yi.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},yi.prototype.doNoRelink=function(){};function or(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Ve.Object.defineProperties(yi.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 ho))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),yi.className="RelinkingTool",lr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),lr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function bi(){Gi.call(this),this.name="LinkReshaping";var a=new Mr;a.figure="Rectangle",a.desiredSize=ta,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Mr,a.figure="Diamond",a.desiredSize=No,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new tt,this.Yq=new Mn}Dt(bi,Gi),bi.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Xi},bi.prototype.om=function(a,y){a.reshapingBehavior=y},bi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Kn){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)}},bi.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new ho,b.type=Hn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,ne=E?1:0;if(y.resegmentable&&y.computeCurve()!==pu)for(var re=x+ne;re<z-ne;re++){var oe=this.makeResegmentHandle(a,re);oe!==null&&(oe.segmentIndex=re,oe.segmentFraction=.5,oe.fromMaxLinks=999,b.add(oe))}for(ne=x+1;ne<z;ne++)if(re=this.makeHandle(a,ne),re!==null){if(re.segmentIndex=ne,ne!==x)if(ne===x+1&&E){oe=y.i(x);var le=y.i(x+1);it.B(oe.x,le.x)&&it.B(oe.y,le.y)&&(le=y.i(x-1)),it.B(oe.x,le.x)?(this.om(re,Xr),re.cursor="n-resize"):it.B(oe.y,le.y)&&(this.om(re,Er),re.cursor="w-resize")}else ne===z-1&&E?(oe=y.i(z-1),le=y.i(z),it.B(oe.x,le.x)&&it.B(oe.y,le.y)&&(oe=y.i(z+1)),it.B(oe.x,le.x)?(this.om(re,Xr),re.cursor="n-resize"):it.B(oe.y,le.y)&&(this.om(re,Er),re.cursor="w-resize")):ne!==z&&(this.om(re,uo),re.cursor="move");b.add(re)}b.adornedObject=a}return b},bi.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},bi.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},bi.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},bi.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 Kn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},bi.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},bi.prototype.stopTransaction=function(){var a=this.diagram,y=Gi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},bi.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},bi.prototype.getResegmentingPoint=function(){return this.handle.ga(Jr)},bi.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},bi.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(Yi(this,ne,E,b,z,!0)||Yi(this,ne,E,b,z,!1))){var re=y.points.copy();Yi(this,ne,E,b,z,!0)?(re.cd(x-2,new tt(ne.x,(z.y+ne.y)/2)),re.cd(x+1,new tt(z.x,(z.y+ne.y)/2))):(re.cd(x-2,new tt((z.x+ne.x)/2,ne.y)),re.cd(x+1,new tt((z.x+ne.x)/2,z.y))),re.mb(x),re.mb(x-1),y.points=re,y.Wb()}else ne=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(Yi(this,E,b,z,ne,!0)||Yi(this,E,b,z,ne,!1))&&(re=y.points.copy(),Yi(this,E,b,z,ne,!0)?(re.cd(x-1,new tt(E.x,(E.y+ne.y)/2)),re.cd(x+2,new tt(ne.x,(E.y+ne.y)/2))):(re.cd(x-1,new tt((E.x+ne.x)/2,E.y)),re.cd(x+2,new tt((E.x+ne.x)/2,ne.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else ne=tt.alloc(),it.qh(E.x,E.y,z.x,z.y,b.x,b.y,ne)&&ne.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),tt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Yi(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}bi.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===Xr?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===Er&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,E===Xr?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===Er&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),ne=y.i(E+1);it.B(z.x,b.x)&&it.B(b.y,ne.y)?(it.B(z.x,y.i(E-2).x)&&!it.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),it.B(ne.y,y.i(E+2).y)&&!it.B(ne.x,y.i(E+2).x)?y.m(E+1,ne.x,a.y):y.L(E+1,ne.x,a.y)):it.B(z.y,b.y)&&it.B(b.x,ne.x)?(it.B(z.y,y.i(E-2).y)&&!it.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),it.B(ne.x,y.i(E+2).x)&&!it.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):it.B(z.x,b.x)&&it.B(b.x,ne.x)?(it.B(z.x,y.i(E-2).x)&&!it.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),it.B(ne.x,y.i(E+2).x)&&!it.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):it.B(z.y,b.y)&&it.B(b.y,ne.y)&&(it.B(z.y,y.i(E-2).y)&&!it.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),it.B(ne.y,y.i(E+2).y)&&!it.B(ne.x,y.i(E+2).x)?y.m(E+1,ne.x,a.y):y.L(E+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(Jr,tt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,tt.alloc()),y.L(0,E.x,E.y),tt.free(z),tt.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(Jr,tt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,tt.alloc()),y.L(y.pointsCount-1,a.x,a.y),tt.free(x),tt.free(a));y.zf()},bi.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case uo:return a;case Xr:return new tt(y.i(x).x,a.y);case Er:return new tt(a.x,y.i(x).y);default:case Xi:return y.i(x)}},Ve.Object.defineProperties(bi.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 ho))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}}}),bi.prototype.setReshapingBehavior=bi.prototype.om,bi.prototype.getReshapingBehavior=bi.prototype.Ru;var Xi=new fn(bi,"None",0),Er=new fn(bi,"Horizontal",1),Xr=new fn(bi,"Vertical",2),uo=new fn(bi,"All",3);bi.className="LinkReshapingTool",bi.None=Xi,bi.Horizontal=Er,bi.Vertical=Xr,bi.All=uo,lr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function pr(){Gi.call(this),this.name="Resizing",this.o=new Xn(1,1).freeze(),this.j=new Xn(9999,9999).freeze(),this.yg=new Xn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Mr;a.alignmentFocus=Jr,a.figure="Rectangle",a.desiredSize=ta,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new tt,this.Dw=new Xn,this.Tn=new tt,this.rt=new Xn(0,0),this.qt=new Xn(1/0,1/0),this.pt=new Xn(1,1)}Dt(pr,Gi),pr.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Kn)){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(),pd(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},pr.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new ho,y.type=Hn.Spot,y.locationSpot=Jr;var x=new gl;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,cs)),y.add(this.makeHandle(a,Ol)),y.add(this.makeHandle(a,ys)),y.add(this.makeHandle(a,nl)),y.add(this.makeHandle(a,Aa)),y.add(this.makeHandle(a,rs)),y.add(this.makeHandle(a,Va)),y.add(this.makeHandle(a,_a))}else if($u(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},pr.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},pr.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=Jr),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break e;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Hn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},pr.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},pr.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))},pr.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},pr.prototype.stopTransaction=function(){var a=this.diagram,y=Gi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},pr.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},pr.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,tt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),tt.free(b)}},pr.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,tt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),tt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},pr.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 fr){var E=new Mn;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new ae;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},pr.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Jr);var ne=this.adornedObject.naturalBounds,re=ne.x,oe=ne.y,le=ne.x+ne.width,ue=ne.y+ne.height,pe=1;if(!z){pe=ne.width;var xe=ne.height;0>=pe&&(pe=1),0>=xe&&(xe=1),pe=xe/pe}return xe=tt.alloc(),it.No(a.x,a.y,re,oe,b.width,b.height,xe),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(xe.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.y=Math.max(xe.y,ue-E.height),a.y=Math.min(a.y,ue-x.height),a.height=Math.max(ue-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.x=le-a.width,a.y=ue-a.height)):1<=y.y?(a.x=Math.max(xe.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.height=Math.max(Math.min(xe.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.x=le-a.width)):(a.x=Math.max(xe.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=le-a.x,z||(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe,a.y=oe+.5*(ue-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(xe.x-re,E.width),x.width),a.y=Math.max(xe.y,ue-E.height),a.y=Math.min(a.y,ue-x.height),a.height=Math.max(ue-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.y=ue-a.height)):1<=y.y?(a.width=Math.max(Math.min(xe.x-re,E.width),x.width),a.height=Math.max(Math.min(xe.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width))):(a.width=Math.max(Math.min(xe.x-re,E.width),x.width),z||(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe,a.y=oe+.5*(ue-oe-a.height))):0>=y.y?(a.y=Math.max(xe.y,ue-E.height),a.y=Math.min(a.y,ue-x.height),a.height=ue-a.y,z||(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width,a.x=re+.5*(le-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(xe.y-oe,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width,a.x=re+.5*(le-re-a.width))),tt.free(xe),a},pr.prototype.computeReshape=function(){var a=On;return this.adornedObject instanceof Mr&&(a=Ev(this.adornedObject)),!(a===wi||this.diagram.lastInput.shift)},pr.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},pr.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},pr.prototype.computeCellSize=function(){var a=new Xn(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},Ve.Object.defineProperties(pr.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 ho))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 ho)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}}}),pr.className="ResizingTool",lr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ur(){Gi.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new tt,this.ue=null;var a=new Mr;a.figure="Ellipse",a.desiredSize=No,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new tt(NaN,NaN),this.u=0,this.F=50}Dt(Ur,Gi),Ur.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)}},Ur.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new ho,y.type=Hn.Position,y.locationSpot=Jr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if($u(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ur.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},Ur.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)},Ur.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(Jr)},Ur.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},Ur.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new tt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ur.prototype.stopTransaction=function(){var a=this.diagram,y=Gi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ur.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ur.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ur.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()},Ur.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Ur.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},Ve.Object.defineProperties(Ur.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 ho))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 ho)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}}}),Ur.className="RotatingTool",lr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function jo(){Gi.call(this),this.name="ClickSelecting"}Dt(jo,Gi),jo.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},jo.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},jo.className="ClickSelectingTool";function Cr(){Gi.call(this),this.name="Action",this.pk=null}Dt(Cr,Gi),Cr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},Cr.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()},Cr.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))}},Cr.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()},Cr.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())},Cr.prototype.doStop=function(){this.pk=null},Cr.className="ActionTool";function _r(){Gi.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new tt(0,0)}Dt(_r,Gi),_r.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)},_r.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},_r.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Oi)x.Zc()&&($u(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);Gt(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=tt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Xf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),tt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Ve.Object.defineProperties(_r.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}}}),_r.className="ClickCreatingTool";function xr(){Gi.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Oi;a.layerName="Tool",a.selectable=!1;var y=new Mr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Dt(xr,Gi),xr.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))},xr.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},xr.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},xr.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var E=Xn.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),Xn.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},xr.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()},xr.prototype.computeBoxBounds=function(){var a=this.diagram;return new pn(a.firstInput.documentPoint,a.lastInput.documentPoint)},xr.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Or?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 Mn,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Ve.Object.defineProperties(xr.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}}}),xr.className="DragSelectingTool";function Vi(){Gi.call(this),this.name="Panning",this.Xt=new tt,this.xy=new tt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(rt.document,"scroll",a.Kw,!1),a.stopTool()}}Dt(Vi,Gi),Vi.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())},Vi.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(rt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Vi.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Vi.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Vi.prototype.doMouseMove=function(){this.move()},Vi.prototype.doMouseUp=function(){this.move(),this.stopTool()},Vi.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},Ve.Object.defineProperties(Vi.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Vi.className="PanningTool",lr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),lr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),lr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),lr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),lr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Nr(){this.F=this.u=this.j=this.o=null}Ve.Object.defineProperties(Nr.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}}}),Nr.className="HTMLInfo";function io(a,y,x){this.text=a,this.hx=y,this.visible=x}io.className="ContextMenuButtonInfo";function So(){Gi.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new tt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Dt(So,Gi);function wo(a){var y=new Nr;y.show=function(b,z,ne){ne.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},sa=y,a.tu=function(){a.stopTool()},y=kn("div");var x=kn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var E=kn("style");rt.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",mr,!1),E.addEventListener(y,"selectstart",mr,!1),E.addEventListener(x,"contextmenu",mr,!1)),y.className="goCXforeground",x.className="goCXbackground",rt.document.body&&(rt.document.body.appendChild(y),rt.document.body.appendChild(x)),Go=y,ts=x,os=!0}function mr(a){return a.preventDefault(),!1}So.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)},So.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},So.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},So.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof qt||(a instanceof Rt?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},So.prototype.doActivate=function(){},So.prototype.doMouseDown=function(){if(Gi.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof ho){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Zo(this)},So.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof ho){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Zo(this)};function Zo(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof Nr||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(Ko(a,!0),a.isActive||a.stopTool())}So.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Ko(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=sa,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof Rt?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof ho&&!a.currentContextMenu.visible&&a.stopTool()}}So.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},So.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof ho){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Nr&&a.show(y,x,this);this.currentContextMenu=a},So.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},So.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof ho?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Nr&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Pa(a){var y=new Mn;return y.add(new io("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new io("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new io("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new io("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new io("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new io("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new io("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new io("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new io("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new io("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new io("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new io("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new io("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}So.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Pa(this)),Go.innerHTML="",ts.addEventListener("pointerdown",this.tu,!1);var y=this,x=kn("ul");x.className="goCXul",Go.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=kn("li"),z.className="goCXli";var ne=kn("a");ne.className="goCXa",ne.href="#",ne.ky=b.hx,ne.addEventListener("pointerdown",function(re){return this.ky(a),y.stopTool(),re.preventDefault(),!1},!1),ne.textContent=b.text,z.appendChild(ne),x.appendChild(z)}}Go.style.display="block",ts.style.display="block"},So.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===sa){Go.style.display="none",ts.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ts,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ve.Object.defineProperties(So.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof ho?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return os===!1&&sa===null&&La&&wo(this),sa},set:function(a){a===null&&(os=!0),sa=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var sa=null,os=!1,ts=null,Go=null;So.className="ContextMenuTool",lr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function ao(){Gi.call(this),this.name="TextEditing",this.Zh=new Qo,this.ia=null,this.V=Qr,this.vj=null,this.qa=qr,this.u=1,this.F=!0,this.o=null,this.j=new Nr,this.kt=null,pa(this,this.j)}Dt(ao,Gi);function pa(a,y){if(La){var x=kn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(po)):b==="Tab"?(a.acceptText(Co),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==qr){var E=a.kt;a.qa===zo&&(a.qa=ha),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==qr){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof Qo&&z instanceof ao)if(z.state===Vs)x.style.border="3px solid red",x.focus();else{var ne=E.ga(Jr),re=b.position,oe=b.scale,le=E.Df()*oe;le<z.minimumEditorScale&&(le=z.minimumEditorScale);var ue=E.naturalBounds.width*le+6,pe=E.naturalBounds.height*le+2,xe=(ne.x-re.x)*oe;ne=(ne.y-re.y)*oe,re=E.verticalAlignment,oe=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*le,pe=re.y*pe-re.y*oe+re.offsetY-(.5*pe-.5*oe)-oe/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*le+"%",x.style.lineHeight="normal",x.style.width=ue+"px",x.style.left=(xe-ue/2|0)-1+"px",x.style.top=(ne+pe|0)-1+"px",x.style.textAlign=E.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=E.lineCount,x.wA=le,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}ao.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||hl&&hl!==this&&(hl.acceptText(Ms),hl&&hl!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Qo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Qr&&!y.isSelected||this.starting===ya&&2>a.lastInput.clickCount)):!1},ao.prototype.doStart=function(){hl=this,this.textBlock!==null&&this.doActivate()},ao.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 Qo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=zo;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new pn(this.textBlock.ga(cs),this.textBlock.ga(ys));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},ao.prototype.doCancel=function(){this.stopTool()},ao.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},ao.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Ms)},ao.prototype.acceptText=function(a){switch(a){case Ms:this.qa===Ns?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===zo||this.qa===Vs||this.qa===ha)&&(this.qa=ca,as(this));break;case Ua:case po:case Co:(po!==a||this.textBlock.isMultiline!==!0)&&(this.qa===zo||this.qa===Vs||this.qa===ha)&&(this.qa=ca,as(this))}};function as(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=Ns,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Vs,a.doError(b,z))}}ao.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)},ao.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},ao.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=qr,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},ao.prototype.doStop=function(){hl=null},ao.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},ao.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ve.Object.defineProperties(ao.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)}}}),ao.prototype.measureTemporaryTextBlock=ao.prototype.Lx;var Ua=new fn(ao,"LostFocus",0),Ms=new fn(ao,"MouseDown",1),Co=new fn(ao,"Tab",2),po=new fn(ao,"Enter",3),Eo=new fn(ao,"SingleClick",0),Qr=new fn(ao,"SingleClickSelected",1),ya=new fn(ao,"DoubleClick",2),qr=new fn(ao,"StateNone",0),zo=new fn(ao,"StateActive",1),ha=new fn(ao,"StateEditing",2),ca=new fn(ao,"StateValidating",3),Vs=new fn(ao,"StateInvalid",4),Ns=new fn(ao,"StateValidated",5),hl=null;ao.className="TextEditingTool",ao.LostFocus=Ua,ao.MouseDown=Ms,ao.Tab=Co,ao.Enter=po,ao.SingleClick=Eo,ao.SingleClickSelected=Qr,ao.DoubleClick=ya,ao.StateNone=qr,ao.StateActive=zo,ao.StateEditing=ha,ao.StateValidating=ca,ao.StateInvalid=Vs,ao.StateValidated=Ns,lr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function wa(a){Yl||(jl(),Yl=!0),this.H=ph,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=wu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Ln,this.ce=new ba,this.ce.Yd=this,this.Ei=new Ln,this.pu=new Ln,this.Sr=new Ln,this.pr=new Ln,a&&Object.assign(this,a)}wa.prototype.Xe=function(a){this.H=a},wa.prototype.canStart=function(){return!0};function Us(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),As(a.H),a.zb=!0)}function ws(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===wu?(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===su&&y.vc.clear(),a.Qw=!!(a.Pk===Cu&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),Xs(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==rl&&E!==null&&(delete E.start.scale,delete E.end.scale),rt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Js(x),Rd(x),a.zb=!1,y.start(),y.bc&&(za(a),x.Ya(),kh(y,0),Ll(x,!0),ms(a),x.R("AnimationStarting",a)))}))}}function Rs(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function fh(a,y,x,E){a.isTicking||Rs(a)||y instanceof Kn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Le=wa.prototype,Le.fv=function(a){return this.ce.fv(a)},Le.Xu=function(a){return this.ce.Xu(a)};function Ca(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var ne=z.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var re=!0;else{for(re=ne.vc.iterator;re.next();){var oe=re.key;if(oe instanceof Rt&&oe.diagram!==null||oe instanceof qt){re=!0;break e}}re=!1}re?lu(ne,!1):ne.Xk=!0}}b.pu.clear(),b.bc!==!1&&(za(b),Ll(b.H),ms(b)),rt.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),rt.requestAnimationFrame(function(){x()}))}function Ta(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function za(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 ms(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Le.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(),Xs(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Xs(y,this.H)},Le.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))},Le.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Ha(this,a))},Le.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),fs(this.ce,y,"position",y.position,y.position),Ha(this,a))};function js(a,y,x){!a.zb||y.D(x)||Rs(a)||(a.H.pi||(y=x.copy()),fs(a.ce,a.H,"position",y,x))}function ra(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Ha(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function zs(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],ne=a[1],re=a[2];a=a[3];var oe=y[0],le=y[1],ue=y[2];return y=y[3],re===0||re===100?(z=oe,ne=le):(ue===0||ue===100)&&(oe=z,le=ne),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=b(x,z,oe-z,E)%360,ne=b(x,ne,le-ne,E),re=b(x,re,ue-re,E),x=b(x,a,y-a,E),"hsla("+z+", "+ne+"%, "+re+"%, "+x+")"}function jl(){function a(x,E,b,z,ne,re){x.position=new tt(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}var y=new xi;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!1):x.position=new tt(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("location",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!0):x.location=new tt(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("position:placeholder",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!1):x.position=new tt(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("position:nodeCollapse",function(x,E,b,z,ne,re){var oe=x.actualBounds,le=b.actualBounds;b=le.x+le.width/2-oe.width/2,oe=le.y+le.height/2-oe.height/2,ne<re?x.mm(z(ne,E.x,b-E.x,re),z(ne,E.y,oe-E.y,re),!1):x.position=new tt(z(ne,E.x,b-E.x,re),z(ne,E.y,oe-E.y,re))}),y.add("desiredSize",function(x,E,b,z,ne,re){x.desiredSize=new pn(z(ne,E.width,b.width-E.width,re),z(ne,E.height,b.height-E.height,re))}),y.add("width",function(x,E,b,z,ne,re){x.width=z(ne,E,b-E,re)}),y.add("height",function(x,E,b,z,ne,re){x.height=z(ne,E,b-E,re)}),y.add("fill",function(x,E,b,z,ne,re){x.fill=zs(E,b,ne,re,z)}),y.add("stroke",function(x,E,b,z,ne,re){x.stroke=zs(E,b,ne,re,z)}),y.add("strokeWidth",function(x,E,b,z,ne,re){x.strokeWidth=z(ne,E,b-E,re)}),y.add("strokeDashOffset",function(x,E,b,z,ne,re){x.strokeDashOffset=z(ne,E,b-E,re)}),y.add("background",function(x,E,b,z,ne,re){x.background=zs(E,b,ne,re,z)}),y.add("areaBackground",function(x,E,b,z,ne,re){x.areaBackground=zs(E,b,ne,re,z)}),y.add("opacity",function(x,E,b,z,ne,re){x.opacity=z(ne,E,b-E,re)}),y.add("scale",function(x,E,b,z,ne,re){x.scale=z(ne,E,b-E,re)}),y.add("angle",function(x,E,b,z,ne,re){x.angle=z(ne,E,b-E,re)}),au=y}Ve.Object.defineProperties(wa.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&&In(a,">= 1",wa,"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}}}),wa.prototype.stopAnimation=wa.prototype.Cc;var au=null,Yl=!1,wu=new fn(wa,"Default",1),Cu=new fn(wa,"AnimateLocations",2),su=new fn(wa,"None",3);wa.className="AnimationManager",wa.defineAnimationEffect=function(a,y){Yl||(jl(),Yl=!0),au.add(a,y)},wa.Default=wu,wa.AnimateLocations=Cu,wa.None=su;function ba(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=Eu,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=lo,this.vc=new xi,this.Tt=new xi,this.yl=new Ln,this.Ut=new Ln,this.dw=Oc,a&&Object.assign(this,a)}ba.prototype.suspend=function(){this.Xk=!0},ba.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,lu(this,!0),za(this.Yd),Ll(this.H),ms(this.Yd),this.H.redraw()};function Xs(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}Le=ba.prototype,Le.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 qt?a=x:x instanceof Rt&&(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===wu&&this===y.defaultAnimation&&(this.Lp=th,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=wf),za(y),this.yl.each(function(E){E.data=null,a.add(E)}),ms(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Ca(y,this),this)},Le.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Le.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof qt?this.H=a:a instanceof Rt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Oi){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return fs(this,a,y,x,E,b),this};function fs(a,y,x,E,b,z){var ne=a.vc;if(y instanceof qt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(pc(E),av(),E=[gu.j,gu.u,gu.o,gu.F],pc(b),av(),b=[gu.j,gu.u,gu.o,gu.F]),ne.contains(y)){var re=ne.I(y),oe=re.start,le=re.end;oe[x]===void 0&&(oe[x]=Wa(E)),le[x]=Wa(b)}else oe={},le={},oe[x]=Wa(E),le[x]=Wa(b),re=oe.position,y instanceof Rt&&re instanceof tt&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(le.position),re=new gh(oe,le,z),ne.add(y,re);ne=oe[x],ne instanceof tt&&!ne.w()&&ne.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Oi?re.Ku.location=Wa(y.location):z&&(re.Ku[x]=Wa(E))}function Wa(a){return a instanceof tt||a instanceof Xn?a.copy():a}Le.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Le.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function lu(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),za(x),kh(a,b),Ll(a.H,!0),ms(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function kh(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Rt&&z.diagram===null)){var ne=E.value,re=b?ne.end:ne.start;ne=b?ne.start:ne.end;var oe=au,le;for(le in ne)le==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||oe.get(le)===null||oe.get(le)(z,re[le],ne[le],a.Lp,y,x,a)}}}Le.stop=function(){return this.bc?(this.Ml(!0),this):this},Le.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,za(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=au;E.next();){var ne=E.key,re=E.value,oe=b?re.end:re.start,le=b?re.start:re.end,ue=re.Ku,pe;for(pe in le)if(z.get(pe)!==null){var xe=pe;!re.Hu||xe!=="position:nodeCollapse"&&xe!=="position:placeholder"||(xe="position"),z.get(xe)(ne,oe[pe],ue[pe]!==void 0?ue[pe]:re.Hu?oe[pe]:le[pe],this.Lp,this.Gd,this.Gd,this)}re.Hu&&ue.location!==void 0&&ne instanceof Oi&&(ne.location=ue.location),re.nv&&ne instanceof Oi&&ne.Zb(!1)}if(y.As.clear(),ad(y,!1),y.Ya(),y.N(),Ll(y,!0),x.defaultAnimation===this){for(pe=x.pr.iterator;pe.next();)b=pe.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Ll(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),ms(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Xs(this,null),x.Ml(this),y.$b())}},Le.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof fr&&(E=y.placeholder),E!==null?(x=E.ga(cs),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new tt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof fr)for(a=a.memberParts;a.next();)E=a.value,E instanceof ai&&this.Cj(E,y)},Le.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof fr&&(x=y.placeholder),x!==null){var E=x.ga(cs);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof fr)for(a=a.memberParts;a.next();)E=a.value,E instanceof ai&&this.Aj(E,y)}},Le.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ve.Object.defineProperties(ba.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&In(a,">= 1",ba,"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:St("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}}}),ba.prototype.getTemporaryState=ba.prototype.Ez,ba.prototype.stop=ba.prototype.stop,ba.prototype.add=ba.prototype.add,ba.prototype.addTemporaryPart=ba.prototype.Iy;function Eu(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function th(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}ba.className="Animation",ba.EaseLinear=function(a,y,x,E){return x*a/E+y},ba.EaseInOutQuad=Eu,ba.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},ba.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},ba.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},ba.EaseOutExpo=th;function gh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}gh.className="AnimationState";function Xl(a,y,x){this.xd=null,this.rf=a,this.so=x||Ya,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=ks))}Xl.prototype.copy=function(){var a=new Xl(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 Sa(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))}Ve.Object.defineProperties(Xl.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 Ya=new fn(Xl,"Default",1),ks=new fn(Xl,"Immediate",2),Xa=new fn(Xl,"Bundled",3);Xl.className="AnimationTrigger",Xl.Default=Ya,Xl.Immediate=ks,Xl.Bundled=Xa;function fa(a){Hr(this),this.H=null,this.Pa=new Mn,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)}Le=fa.prototype,Le.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,el(x)}a.clear(),this.Zq.length=0},Le.Xe=function(a){this.H=a},Le.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,ne=0,re=this.Pa.iterator;re.next();){var oe=re.value;oe instanceof fr?b++:oe instanceof ai?E++:oe instanceof Kn?z++:oe instanceof ho?ne++:x++}if(re="",0<x&&(re+=x+" Parts "),0<E&&(re+=E+" Nodes "),0<b&&(re+=b+" Groups "),0<z&&(re+=z+" Links "),0<ne&&(re+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,re+=`
`+x.toString(),E=x.data,E!==null&&Bi(E)&&(re+=" #"+Bi(E)),x instanceof ai?re+=" "+Ni(E):x instanceof Kn&&(re+=" "+Ni(x.fromNode)+" "+Ni(x.toNode));return y+" "+this.Pa.count+": "+re},Le.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=tt.alloc(),z=this.Pa.s,ne=z.length;ne--;){var re=z[ne];if((E!==!0||pd(re)!==!1)&&re.isVisible()&&(b.assign(a),yr(b,re.oe),re=re.ic(b,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return tt.free(b),re}return tt.free(b),null},Le.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Mn||E instanceof Ln||(E=new Ln),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=tt.alloc(),ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((b!==!0||pd(oe)!==!1)&&oe.isVisible()){z.assign(a),yr(z,oe.oe);var le=oe;oe.ji(z,y,x,E)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||E.add(le))}}return tt.free(z),E},Le.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Mn||b instanceof Ln||(b=new Ln),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((z!==!0||pd(oe)!==!1)&&oe.isVisible()){var le=oe;oe.Cf(a,y,x,E,b)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||b.add(le))}}return b},Le.Nu=function(a,y,x,E,b,z,ne){if(this.Uh===!1)return b;for(var re=this.Pa.s,oe=re.length;oe--;){var le=re[oe];if((ne!==!0||pd(le)!==!1)&&z(le)&&le.isVisible()){var ue=le;le.Cf(a,y,x,E,b)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||b.add(ue))}}return b},Le.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Mn||b instanceof Ln)&&(z=b),b=!0),z instanceof Mn||z instanceof Ln||(z=new Ln),this.Uh===!1)return z;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var re=tt.alloc(),oe=tt.alloc(),le=this.Pa.s,ue=le.length;ue--;){var pe=le[ue];if((ne!==!0||pd(pe)!==!1)&&pe.isVisible()){re.assign(a),yr(re,pe.oe),oe.h(a.x+y,a.y),yr(oe,pe.oe);var xe=pe;pe.og(re,oe,x,E,b,z)&&(x!==null&&(xe=x(xe)),xe===null||E!==null&&!E(xe)||z.add(xe))}}return tt.free(re),tt.free(oe),z},Le.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=ni();for(var b=ni(),z=0;z<E;z++){var ne=x[z];if(ne.vw=z,ne instanceof Kn){if(ne.fd===!1)continue}else if(ne instanceof ho&&ne.adornedPart!==null)continue;var re=ne.actualBounds;ne.isVisible()&&Cl(re,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&b.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],Ov(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)Ov(b[y]);ci(a),ci(b)}}};function _s(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Le.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=_s(this,a);var z=this.Zq;z.length=0;for(var ne=y.scale,re=pn.alloc(),oe=0;oe<E;oe++)this.Oj(a,x[oe],y,z,ne,re,!0);if(pn.free(re),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function zl(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var ne=_s(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,le=pn.alloc(),ue=0;ue<z;ue++){var pe=b[ue];E.contains(pe)&&a.Oj(y,pe,x,re,oe,le,!1)}pn.free(le),y.globalAlpha=ne}}}Le.Oj=function(a,y,x,E,b,z,ne){if(ne&&!pd(y))a.Hs(y);else{if(E!==null&&y instanceof Kn&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,E=y.containingGroup;E!==null;)ne?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(ne=!0,z.assign(E.tb)),E=E.containingGroup;var re=y.actualBounds;if(E=!1,ne&&y.isVisible()){if(!z.Yc(re)){a.Hs(y);return}E=!z.Re(re)}E&&(a.save(),a instanceof Jl?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),re.width*b>x.Oq||re.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Da(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Da(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),Da(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),E&&(a.restore(),a.Vc(!0))}},Le.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(Yr,a,this,y,x,E,b)},Le.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&el(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),Zu(this,a,y),a},Le.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,el(y),a};function Zu(a,y,x){if(y=pf(a,y,x),x instanceof fr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];if(re===x&&(y=ne,0<=E)||0>E&&re.containingGroup===x&&(E=ne,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&Zu(a,-1,y)}x.svg!==null&&x.svg.remove()}function pf(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,ne=NaN;0<=z&&(ne=a.M(z).zOrder,!!isNaN(ne));)z--;for(var re=y+1,oe=NaN;re<b&&(oe=a.M(re).zOrder,!!isNaN(oe));)re++;if(!isNaN(ne)&&ne>E)for(;;){if(z===-1||ne<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(ne=NaN;0<=--z&&(ne=a.M(z).zOrder,isNaN(ne)););}else if(!isNaN(oe)&&oe<E)for(;;){if(re===b||oe>=E){if(re--,re===y)break;return a.mb(y),a.Gb(re,x),re}for(oe=NaN;++re<b&&(oe=a.M(re).zOrder,isNaN(oe)););}return y}Ve.Object.defineProperties(fa.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===""&&St("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&St("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)&&In(a,"0 <= value <= 1",fa,"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))}}}),fa.prototype.findObjectsNear=fa.prototype.og,fa.prototype.findObjectsIn=fa.prototype.Cf,fa.prototype.findObjectsAt=fa.prototype.ji,fa.prototype.findObjectAt=fa.prototype.ic,fa.className="Layer";function qt(a,y){if(hm||(Qs(),hm=!0),Hr(this),ph=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,La){var x=this,E=function(){x.removeEventListener(rt.document,"DOMContentLoaded",E,!1),x.setRTL()};rt.document.body!==null?this.setRTL():x.addEventListener(rt.document,"DOMContentLoaded",E,!1)}this.ol=null,ig.add("Model",Oo);var b=this;return this.Hb=function(z){var ne=b.partManager;if(z.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var re=z.change;z.modelChange===""&&re===Yr&&ne.updateDataBindings(z.object,z.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,mf(this),this.model=hy(),this.Wg=!0,sd(this),this.layout=new da,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 cm,a!==void 0&&(typeof a=="string"||rt.Element&&a instanceof Element?Id(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var $h,ph;function mf(a){a.Yd=new wa,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Mn,a.pj=new xi,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new tt(NaN,NaN).freeze(),a.du=new tt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new tt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new _t,a.zu=new tt(NaN,NaN).freeze(),a.ut=new pn(NaN,NaN,NaN,NaN).freeze(),a.rj=new Di(0,0,0,0).freeze(),a.sj=Oc,a.nu=!1,a.Zt=null,a.fu=null,a.yh=rl,a.zk=Po,a.Fg=rl,a.pq=Po,a.yt=cs,a.Bt=cs,a.Fc=!0,a.pn=!1,a.De=new Ln,a.Eh=new xi,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Di(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new ur,a.bq.diagram=a,a.Qg=new ur,a.Qg.diagram=a,a.cj=new ur,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,tv(a),a.ai=new Ln,a.Ht=!0,a.uu=Ic,a.pw=!1,a.wu=Pf,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 xi,a.Xn=new Mn,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 Di(5).freeze(),a.Hw=new Ln().freeze(),a.Nt=999999999,a.nw=new Ln().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 Ln,a.ow=new Ln,a.Xh=null,a.aw=new Xn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new tt,bounds:new pn,Py:new Xn,bA:new Xn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new pn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Xn(NaN,NaN).freeze(),a.Sp=new pn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new xi;var y=new ai,x=new Qo;x.bind(new Ja("text","",Ni)),y.add(x),a.ny=y,a.Lg.add("",y),y=new ai,x=new Qo,x.stroke="brown",x.bind(new Ja("text","",Ni)),y.add(x),a.Lg.add("Comment",y),y=new ai,y.selectable=!1,y.avoidable=!1,x=new Mr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Xn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new xi,y=new fr,y.selectionObjectName="GROUPPANEL",y.type=Hn.Vertical,x=new Qo,x.font="bold 12pt sans-serif",x.bind(new Ja("text","",Ni)),y.add(x),x=new Hn(Hn.Auto),x.name="GROUPPANEL";var E=new Mr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new gl,E.padding=new Di(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new xi,y=new Kn,x=new Mr,x.isPanelMain=!0,y.add(x),x=new Mr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Kn,x=new Mr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new ho,y.type=Hn.Auto,x=new Mr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new gl,x.margin=new Di(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new ho,y.type=Hn.Link,x=new Mr,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 Vr,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ae,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=cc(),a.eq=null,a.fq=Xo,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 tt,a.zy=500,a.wp=new tt,a.wq=!1}qt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Kd=null,cd="",Nc(this,!1),this.Xn.clear(),mg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Nc(a,y){a.animationManager.Cc(!0),a.Hw=new Ln().freeze(),a.nw=new Ln().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var re=a.Wa.s[y].parts;re.next();){var oe=re.value;oe!==b&&oe.data===null&&z.push(oe)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<ne;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),mg(),a.Og.clear(),ar=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function cc(){return null}qt.prototype.reset=function(){this.clear(),this.vb=!0,mf(this),Dh(this),this.Wg=!0,sd(this),this.layout=new da,this.Wg=!1,this.model=hy(),this.model.undoManager=new Do,this.vb=this.rn=!1,this.N()},qt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=rt.document.body);var y=kn("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},qt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=rt.document.body);var y=0;if(La){var x=um;y=$h,x===null&&(x=um=kn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=$h=kn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||Or||(y=11)}this.Db=y,this.Gw=!0},qt.prototype.qb=function(a){a.classType===qt&&(this.autoScale=a)},qt.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 Id(a,y){if(La){if(y!=null||St("Diagram setup requires an argument DIV."),a.Ka!==null&&St("Diagram has already completed setup."),typeof y=="string"?a.Ka=rt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:St("No DIV or DIV id supplied: "+y),a.Ka===null&&St("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&St("Invalid div id; div already has a Diagram associated with it."),!a.ol&&rt.ResizeObserver){var x=rn(function(){a.$b()},250);a.ol=new rt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}rt.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=rt.go;var b=new Gu(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",rt.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Gd(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Gu(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,La){b=kn("div");var z=kn("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=Uf,b.addEventListener("pointerdown",yf),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=rn(function(){a.Yh=null,a.N()},300),a.Ov=rn(function(){Rd(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var re=_l(a,ne,!0);re.bubbles=!0;var oe=0,le=0;re.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(oe=0<ne.deltaX?1:-1),ne.deltaY!==0&&(le=0<ne.deltaY?1:-1),re.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-oe:-le):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(oe=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(le=0<ne.wheelDeltaY?-1:1),re.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-oe:-le):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(re.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),hu(re,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,_l(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var re=a.Yt;re[ne.pointerId]===void 0&&(re[ne.pointerId]=ne),re=a.oj;var oe=!1;if(re[0]===null||re[0].pointerId!==ne.pointerId&&re[0].pointerType===ne.pointerType)if(re[1]!==null&&re[1].pointerId===ne.pointerId)re[1]=ne,oe=!0;else if(re[0]===null)re[0]=ne;else if(re[1]===null)re[1]=ne,oe=!0;else{ne.preventDefault();return}else re[0]=ne;(re=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var le=oe;oe=_d(a,ne,!0,!1,!0,le),Tc(a,ne,oe),oe.targetDiagram=zd(ne,ne.target),oe.targetObject=null,le||oe.clone(a.bq),le=a.uw,re=re?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(le.x-ne.screenX)>re||Math.abs(le.y-ne.screenY)>re)?a.yq++:a.yq=1,oe.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():hu(oe,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var re=a.oj;if(re[0]===null||re[0].pointerId!==ne.pointerId&&re[0].pointerType===ne.pointerType){if(re[1]!==null&&re[1].pointerId===ne.pointerId){re[1]=ne;return}if(re[0]===null)re[0]=ne;else return}else re[0]=ne;if(re[0].pointerId===ne.pointerId){re=_d(a,ne,!1,!1,!1,re[1]!==null);var oe=rt.document.elementFromPoint(ne.clientX,ne.clientY)||null;oe!==null&&oe.shadowRoot!==void 0&&oe.shadowRoot!==null&&(oe=oe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var le=a,ue=ne;oe&&oe.H&&(ue=ne,le=oe.H),re.targetDiagram=le,Tc(a,ue,re),re.targetObject=null,a.doMouseMove(),hu(re,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var re=ne.pointerType==="touch"||ne.pointerType==="pen",oe=a.Yt;if(re&&a.qu)delete oe[ne.pointerId],ne.preventDefault();else if(oe=a.oj,oe[0]===null||oe[0].pointerId!==ne.pointerId&&oe[0].pointerType===ne.pointerType)oe[1]!==null&&oe[1].pointerId===ne.pointerId&&(oe[1]=null);else{oe[0]=null,oe=_d(a,ne,!1,!0,!0,!1);var le=rt.document.elementFromPoint(ne.clientX,ne.clientY)||null;le!==null&&le.shadowRoot!==void 0&&le.shadowRoot!==null&&(le=le.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),le!==null&&le.H instanceof qt&&le.H!==a&&Tc(le.H,ne,oe),le===null&&(le=ne.target),Tc(a,ne,oe),oe.clickCount=a.yq,oe.targetDiagram=zd(ne,le),oe.targetObject=null,a.doMouseUp(),hu(oe,ne),re&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var re=a.Yt;re[ne.pointerId]&&delete re[ne.pointerId],re=a.oj,re[0]!==null&&re[0].pointerId===ne.pointerId&&(re[0]=null),re[1]!==null&&re[1].pointerId===ne.pointerId&&(re[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var re=a.oj;re[0]!==null&&re[0].pointerId===ne.pointerId?(re[0]=null,a.wq=!1):re[1]!==null&&re[1].pointerId===ne.pointerId&&(re[1]=null)},a.Vp=E.Z["d"+Ef[1]+Ef[2]+"wI"+Ud.slice(1,5)]["b"+Ax.slice(1,y)](E.Z,Cf,y,y),E.Vc(!0),$g(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}qt.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},qt.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function $g(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(rt,"resize",a.Ov,!1)}function Js(a){30<a.Sq&&(a.Yh=1)}function ad(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),ki&&ki.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}qt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:rt.devicePixelRatio||1},qt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},qt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},qt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},qt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},qt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},qt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},qt.prototype.doFocus=function(){this.focus()},qt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=rt.scrollX||rt.pageXOffset,y=rt.scrollY||rt.pageYOffset;this.ta.focus(),rt.scrollTo(a,y)}},qt.prototype.Oy=function(){this.H.R("GainedFocus")},qt.prototype.Ny=function(){this.H.R("LostFocus")};function Rd(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===rl&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function sd(a){var y=new fa;y.name="Background",a.Al(y),y=new fa,y.name="",a.Al(y),y=new fa,y.name="Foreground",a.Al(y),y=new fa,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new fa,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new fa,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function vf(a){var y=new Hn(Hn.Grid);y.name="GRID";var x=new Mr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Mr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Mr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Mr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Mr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Mr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Oi,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 Uf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Uh(this.H)}function yf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Uh(this.H)}qt.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,ne=E.x-z.left,re=E.y-z.top,oe=E.width+z.left+z.right,le=E.height+z.top+z.bottom,ue=E.right+z.right;z=E.bottom+z.bottom;var pe=b.x;E=b.y;var xe=b.width,Ee=b.height,Fe=b.right,Oe=b.bottom;b=this.scale;var st=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":st=st+a.scrollWidth-a.clientWidth;break;case"reverse":st=a.scrollWidth-st-a.clientWidth}var Ye=st;xe<oe||Ee<le?(st=tt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Ye&&(st.x=Ye/b+ne,this.ju=Ye),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(st.y=a.scrollTop/b+re,this.lu=a.scrollTop),this.position=st,tt.free(st),this.Ee=this.qr=!1):(st=tt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<pe&&(this.position=st.h(Ye+ne,this.position.y)),ue>Fe&&(this.position=st.h(-(y.scrollWidth-this.Aa)+Ye-this.Aa/b+ue,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<E&&(this.position=st.h(this.position.x,a.scrollTop+re)),z>Oe&&(this.position=st.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),tt.free(st),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ue=E.right,Fe=b.right,z=E.bottom,Oe=b.bottom,ne=E.x,pe=b.x,re=E.y,E=b.y,xe>=oe&&ne>=pe&&ue<=Fe&&(x.style.width="1px"),Ee>=le&&re>=E&&z<=Oe&&(x.style.height="1px"))}},qt.prototype.computeBounds=function(a){return a===void 0&&(a=new pn),As(this),jd(this,a)};function jd(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var ne=E[z];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var re=ne.length,oe=0;oe<re;oe++){var le=ne[oe];le.isInDocumentBounds&&le.isVisible()&&(le=le.actualBounds,le.w()&&(x?(x=!1,y.assign(le)):y.ed(le)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}qt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Jt(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Kn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof Kn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new pn(NaN,NaN,0,0):x};function uu(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=tt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=pn.allocAt(0,0,E.width,E.height);var b=tt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,pn.free(E),tt.free(b),tt.free(x)}x=a.yh,y&&a.Fg!==rl&&(x=a.Fg);var z=x!==rl?kc(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var ne=a.ya/z,re=a.zk,oe=a.pq;y&&!re.sb()&&(oe.sb()||oe.Xb())&&(re=oe.Xb()?Jr:oe),Sf(a,a.documentBounds,b,ne,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,it.B(z.x,x)&&it.B(z.y,E)&&it.B(z.width,b)&&it.B(z.height,ne)||a.onViewportBoundsChanged(new pn(x,E,b,ne),z,y,!1)}}function kc(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),re=z/b,oe=ne/E;return y===cu?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===dd?(y=oe>re?(ne-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}qt.prototype.zoomToFit=function(){var a=this.sj;this.sj=Oc,this.scale=kc(this,cu),a!==Oc&&(uu(this,!1),Sf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Le=qt.prototype,Le.BA=function(a,y){y===void 0&&(y=cu);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===cu||y===dd)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===dd?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new tt(a.x,a.y)}},Le.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new tt(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Le.zz=function(a){if(a instanceof Rt){this.eq=a;var y=tt.alloc();this.fq=this.op(a.ga(cs,y)),tt.free(y)}else this.eq=null,this.fq=Xo};function Sf(a,y,x,E,b,z){var ne=tt.allocAt(a.pa.x,a.pa.y),re=ne.x,oe=ne.y;if(a.eq!==null){var le=tt.alloc();le=a.eq.ga(cs,le),re=le.x-a.fq.x/a.scale,oe=le.y-a.fq.y/a.scale,b=Ma,tt.free(le)}(z||a.scrollMode===Oc)&&(b.sb()&&(x>y.width&&(re=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(oe=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(re=Math.min(re+x/2,y.right+Math.max(z,b.right)-x/2),re=Math.max(re,y.left-Math.max(z,b.left)+x/2),re-=x/2):re>y.left?re=y.left:re<y.right-x&&(re=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(oe=Math.min(oe+E/2,y.bottom+Math.max(x,b.bottom)-E/2),oe=Math.max(oe,y.top-Math.max(x,b.top)+E/2),oe-=E/2):oe>y.top?oe=y.top:oe<y.bottom-E&&(oe=y.bottom-E)),ne.x=isFinite(re)?re:-a.yb.left,ne.y=isFinite(oe)?oe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),js(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Dh(a),tt.free(ne)}Le.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=nh(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Oi)return a}else if(a=nh(this,a,function(x){return x.part}),a instanceof Oi)return a;return null},Le.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),As(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function nh(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),As(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Le.lz=function(a,y,x){return y===void 0&&(y=!0),Kh(this,a,function(E){return E.part},y?function(E){return E instanceof Oi&&E.canSelect()}:null,x)};function Kh(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof Mn||b instanceof Ln||(b=new Ln),As(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Le.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Mn||E instanceof Ln||(E=new Ln),As(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Le.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Ac(this,a,function(b){return b instanceof Oi&&(!x||b.canSelect())},y,E)},Le.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Mn||b instanceof Ln||(b=new Ln),As(this);for(var z=this.Wa.iteratorBackwards;z.next();){var ne=z.value;ne.visible&&ne.Cf(a,y,x,E,b)}return b},Le.Nu=function(a,y,x,E,b,z){var ne=new Ln;As(this);for(var re=this.Wa.iteratorBackwards;re.next();){var oe=re.value;oe.visible&&oe.Nu(a,y,x,E,ne,b,z)}return ne};function Ac(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Mn||b instanceof Ln||(b=new Ln),As(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,z,x,E,b)}return b}Le.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),dc(this,a,y,function(z){return z instanceof Oi&&(!E||z.canSelect())},x,b)},Le.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Mn||b instanceof Ln)&&(z=b),b=!0),z instanceof Mn||z instanceof Ln||(z=new Ln),As(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var re=ne.value;re.visible&&re.og(a,y,x,E,b,z)}return z};function dc(a,y,x,E,b,z){var ne=null;for(ne===void 0&&(ne=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof Mn||b instanceof Ln)&&(z=b),b=!0),z instanceof Mn||z instanceof Ln||(z=new Ln),As(a),a=a.Wa.iteratorBackwards;a.next();){var re=a.value;re.visible&&!re.isTemporary&&re.og(y,x,ne,E,b,z)}return z}qt.prototype.acceptEvent=function(a){return _l(this,a,a instanceof MouseEvent)};function _l(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Tc(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),Or&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=zd(y,y.target),E.targetObject=null,E}function zd(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 _d(a,y,x,E,b,z){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,Or&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=E,ne.handled=!1,ne.bubbles=b,ne.isMultiTouch=z,ne}function hu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}qt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=_l(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(),hu(x,a)},qt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=_l(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(),hu(x,a)},qt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=_l(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),hu(x,a)},qt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=_l(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),hu(x,a)},qt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new tt(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?yr(new tt(y,a),this.Ab):new tt(y,a)};function Tc(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,ne=0,re=0;E!==null&&(E=E.getBoundingClientRect(),ne=y.clientX-b/E.width*E.left,re=y.clientY-z/E.height*E.top),x.viewPoint.h(ne,re),a.Ab!==null?(y=tt.allocAt(ne,re),a.Ab.Cd(y),x.documentPoint.assign(y),tt.free(y)):x.documentPoint.h(ne,re)}function Zd(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}qt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Hd(a){a.ld||As(a),a.Va()}qt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Le=qt.prototype,Le.Pz=function(){return this.kg},Le.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ll(this),this.hf=!1,this.du=new tt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&Pn(function(){E.ld=!1,Us(y,"Model"),a(E)},1)},Le.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;rt.requestAnimationFrame(function(){y.kg&&y.bd()})}},Le.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ll(this))};function Vh(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Uh(a)||(y&&As(a),x&&uu(a,!1))}function Ll(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];ls(re,!1),re.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(oe){oe.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Rd(a),Vh(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Th(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),As(a),z=!1,(!a.hf||a.xh)&&(a.hf?Qg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Qg(a,!1)),z=!0),a.Jk=!1,As(a),a.ou||Hd(a),Vh(a,!0,!1),ne=!1,z?(x=pn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Wd(a)),a.R("LayoutCompleted"),Vh(a,!0,!1),pn.free(x)):x.Ok&&x.Qw&&(a.Fg!==rl?a.scale=kc(a,a.Fg):a.yh!==rl?a.scale=kc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),uu(a,!0)),z&&ne&&a.eb("Initial Layout"),As(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Wd(a){if(a.Fg!==rl)a.scale=kc(a,a.Fg);else if(a.yh!==rl)a.scale=kc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}uu(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Th(a)}function As(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 Ln,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof fr&&E.U&65536&&(E.U=E.U^65536)})}}Le.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof fr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof fr&&x.isVisible()&&Ea(this,x);for(a.reset();a.next();)x=a.value,x instanceof Kn&&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 ho&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Ea(a,y){for(var x=ni(),E=ni(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof fr?(fu(z)||dl(z)||gd(z))&&Ea(a,z):z instanceof Kn?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(ci(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();ci(E)}Le.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Le.gc=function(a){if(this.Ka!==null){if(this.ta===null&&St("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Mu(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,ne=Math.round(y.y*b)/b,re=this.Ab;for(re.reset(),b!==1&&re.scale(b),y.x===0&&y.y===0||re.translate(-z,-ne),a.ti=null,Uy(a,re.m11,re.m12,re.m21,re.m22,re.dx,re.dy),this.pb!==1&&(a.globalAlpha=this.pb),il(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<E;y++)x[y].gc(a,this);a=!1,this.Yf?Yd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(_t.prototype.Cd=_t.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Mu(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break e;z=this.Ab,z.reset(),ne=this.Mb,re=this.pa;var oe=this.Ca,le=Math.round(re.x*oe)/oe,ue=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-le,-ue),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),il(this,a),re=0;re<b;re++)a.setTransform(ne,0,0,ne,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[re].gc(a,this);if(y=!1,this.Yf?Yd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(_t.prototype.Cd=_t.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=ki&&ki.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function ns(a,y,x,E,b,z,ne,re,oe,le){if(a.Ka!==null){a.ta===null&&St("No canvas specified"),ne===void 0&&(ne=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),le===void 0&&(le=!1),Mu(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ue=a.Ca;a.Ca=b;var pe=a.Wa.s,xe=pe.length;try{var Ee=new pn(z.x,z.y,E.width/b,E.height/b),Fe=Ee.copy();Fe.Co(x),Th(a,Fe),As(a),a.Fd(pe,xe,a,Ee),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),re!==null&&re!==""&&(y.fillStyle=re,y.ox(0,0,E.width,E.height));var Oe=a.Mb;y.scale(Oe,Oe);var st=_t.alloc();st.reset(),st.translate(x.left,x.top),st.scale(b),z.x===0&&z.y===0||st.translate(-z.x,-z.y),y.setTransform(st.m11,st.m12,st.m21,st.m22,st.dx,st.dy),y.yc(),y instanceof Jl&&Uy(y,st.m11,st.m12,st.m21,st.m22,st.dx,st.dy),_t.free(st),il(a,y),y.globalAlpha=a.pb;var Ye=a.Qj("Grid");if(ne){var pt=new Ln,xt=ne.iterator;for(xt.reset();xt.next();){var Mt=xt.value;Mt instanceof Oi&&(le||Mt.layer!==Ye)&&(Mt.Gj(),pt.add(Mt))}for(le=0;le<xe;le++)zl(pe[le],y,a,pt,oe);pt.each(function(en){return en.Gj()})}else for(pt=0;pt<xe;pt++){var Ot=pe[pt];Ot===Ye?le&&Ot.gc(y,a,!0):Ot.gc(y,a,oe)}a.$i=!1,a.Yf&&Yd(a.Yf,a)&&a.Vp()}finally{a.Ca=ue,a.ib.Vc(!0),a.vd=!0,a.Fd(pe,xe,a,a.viewportBounds),Th(a),a.ib instanceof Jl&&(a.ib.Nj.PA(),a.redraw())}}}Le.Gf=function(a){return this.Rg[a]},Le.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Le.Tx=function(){this.Rg=new _i,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Or||Pr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function il(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Le.Ql=function(a){return this.on[a]},Le.sA=function(a,y){this.on[a]=y},Le.Sx=function(){this.on=new _i,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Le.set=function(a){return Object.assign(this,a),this},Le.Du=function(a){return this.nm(a)},Le.nm=function(a){return bu(this,a),this};function bu(a,y){var x=a instanceof Hn,E=a instanceof qt,b;for(b in y){b===""&&St("Setting properties requires non-empty property names");var z=a,ne=b;if(x||E){var re=b.indexOf(".");if(0<re){var oe=b.substring(0,re);x?z=a.fb(oe):(z=a[oe],z==null&&(z=a.toolManager[oe])),Gt(z)?ne=b.substr(re+1):St("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+b)}}if(ne[0]!=="_"&&!Qi(z,ne))if(E&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(E&&ne==="Changed"){a.Pe(y[ne]);continue}else if(E&&Qi(a.toolManager,ne))z=a.toolManager;else if(E&&am(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof Mi&&ne==="Changed"){a.Pe(y[ne]);continue}else St('Trying to set undefined property "'+ne+'" on object: '+z.toString());z[ne]=y[b],ne[0]==="_"&&z instanceof Rt&&z.Vw(ne)}}Le.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new xi,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Le.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")},qt.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!==wf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=Math.max(a.y,y.y),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=pn.alloc(),Jg(this,this.computeBounds(E)),pn.free(E)),E=this.ta,E===null||E instanceof Oh)))){var ne=this.Mb;b=this.Aa*ne;var re=this.ya*ne,oe=this.scale*ne;z=Math.round(Math.round(y.x*oe)-Math.round(a.x*oe)),y=Math.round(Math.round(y.y*oe)-Math.round(a.y*oe)),oe=this.jw,a=this.oy,oe.width!==b&&(oe.width=b),oe.height!==re&&(oe.height=re),a.clearRect(0,0,b,re),oe=190*ne;var le=70*ne,ue=Math.max(z,0),pe=Math.max(y,0),xe=Math.floor(b-ue),Ee=Math.floor(re-pe);a.drawImage(E.Oa,ue,pe,xe,Ee,0,0,xe,Ee),Yd(this.Yf,this)&&a.clearRect(0,0,oe,le),E=ni(),a=ni(),Ee=Math.abs(z),xe=Math.abs(y);var Fe=ue===0?0:b-Ee;ue=tt.allocAt(Fe,0),Ee=tt.allocAt(Ee+Fe,re),a.push(new pn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y)));var Oe=this.Ab;if(Oe.reset(),Oe.scale(ne,ne),this.Ca!==1&&Oe.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&Oe.translate(-ne.x,-ne.y),yr(ue,Oe),yr(Ee,Oe),E.push(new pn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),Fe=pe===0?0:re-xe,ue.h(0,Fe),Ee.h(b,xe+Fe),a.push(new pn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),yr(ue,Oe),yr(Ee,Oe),E.push(new pn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),Yd(this.Yf,this)&&(b=0<z?0:-z,re=0<y?0:-y,ue.h(b,re),Ee.h(oe+b,le+re),a.push(new pn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y))),yr(ue,Oe),yr(Ee,Oe),E.push(new pn(Math.min(ue.x,Ee.x),Math.min(ue.y,Ee.y),Math.abs(ue.x-Ee.x),Math.abs(ue.y-Ee.y)))),tt.free(ue),tt.free(Ee),Vh(this,!1,!0),this.Ka===null&&St("No div specified"),this.ta===null&&St("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(Mu(this),re=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*re,this.ya*re),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,ne=this.Ca,oe=Math.round(z.x*ne)/ne,le=Math.round(z.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),z.x===0&&z.y===0||y.translate(-oe,-le),b.save(),b.beginPath(),z=a.length,ne=0;ne<z;ne++)oe=a[ne],oe.width!==0&&oe.height!==0&&b.rect(Math.floor(oe.x),Math.floor(oe.y),Math.ceil(oe.width),Math.ceil(oe.height));for(b.clip(),b.setTransform(re,0,0,re,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),il(this,b),b.globalAlpha=this.pb,re=0;re<z;re++)if(ne=y[re],oe=E,ne.visible&&ne.pb!==0){le=_s(ne,b),pe=ne.Zq,pe.length=0,ue=this.scale,xe=pn.alloc(),Ee=ne.Pa.s,Oe=Ee.length,Fe=oe.length;for(var st=0;st<Oe;st++){var Ye=Ee[st],pt=nf(Ye,Ye.actualBounds);e:{for(var xt=2/ue,Mt=4/ue,Ot=0;Ot<Fe;Ot++){var en=oe[Ot];if(en.width!==0&&en.height!==0&&pt.Vu(en.x-xt,en.y-xt,en.width+Mt,en.height+Mt)){pt=!0;break e}}pt=!1}pt&&ne.Oj(b,Ye,this,pe,ue,xe,!0)}pn.free(xe),b.globalAlpha=le}b.restore(),b.Vc(!0),this.Yf&&Yd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}ci(E),ci(a),this.ld=!1}}else this.bd();x&&(Js(this),this.bd(),ad(this,!0))}else x?(Js(this),this.bd(),ad(this,!0)):this.bd()}};function Mu(a){a.pn!==!1&&(a.pn=!1,Gd(a,a.Aa,a.ya))}function Gd(a,y,x){Dh(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Uh(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,ne=a.gf?a.Db:0,re=a.Be?a.Db:0,oe=b.clientWidth||x+ne,le=b.clientHeight||E+re,ue=a.viewportBounds;b=ue.x;var pe=ue.y,xe=ue.width,Ee=ue.height;if((oe!==x+ne||le!==E+re)&&(a.gf=!1,a.Be=!1,re=ne=0,a.Aa=oe,a.ya=le,z=a.pn=!0,Dh(a)),!a.hf||!a.viewportBounds.w())return!0;var Fe=a.ku,Oe=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var st=a.documentBounds,Ye=0,pt=0,xt=0,Mt=0,Ot=ue.width,en=ue.height,ri=a.rj;a.contentAlignment.sb()?(st.width>Ot&&(Ye=ri.left,pt=ri.right),st.height>en&&(xt=ri.top,Mt=ri.bottom)):(Ye=ri.left,pt=ri.right,xt=ri.top,Mt=ri.bottom);var Si=st.width+Ye+pt,gi=st.height+xt+Mt;ri=a.scale;var $n=Si>oe/ri,An=gi>le/ri;if(!(z||a.gf||a.Be||$n||An))return!0;Ye=st.x-Ye,oe=ue.x,pt=st.right+pt,le=ue.right+ne,xt=st.y-xt;var hr=ue.y;st=st.bottom+Mt,ue=ue.bottom+re;var Ji="1px";if(Mt="1px",a.scrollMode===Oc&&($n||An)&&($n&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&($n=1,Ye+1<oe&&($n=Math.max((oe-Ye)*ri+a.Aa,$n)),pt>le+1&&($n=Math.max((pt-le)*ri+a.Aa,$n)),Ot+ne+1<Si&&($n=Math.max((Si-Ot)*ri+a.Aa,$n)),Ji=$n.toString()+"px"),An&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&($n=1,xt+1<hr&&($n=Math.max((hr-xt)*ri+a.ya,$n)),st>ue+1&&($n=Math.max((st-ue)*ri+a.ya,$n)),en+re+1<gi&&($n=Math.max((gi-en)*ri+a.ya,$n)),Mt=$n.toString()+"px")),$n=Ji!=="1px",An=Mt!=="1px",$n&&An||!$n&&!An||(An&&(le-=a.Db),$n&&(ue-=a.Db),Si<Ot+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Ye+1<oe&&(ne=Math.max((oe-Ye)*ri+a.Aa,ne)),pt>le+1&&(ne=Math.max((pt-le)*ri+a.Aa,ne)),Ot+1<Si&&(ne=Math.max((Si-Ot)*ri+a.Aa,ne)),Ji=ne.toString()+"px"),$n=Ji!=="1px",ne=a.ya,$n!==a.Be&&(ne=$n?a.ya-a.Db:a.ya+a.Db),gi<en+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,xt+1<hr&&(re=Math.max((hr-xt)*ri+ne,re)),st>ue+1&&(re=Math.max((st-ue)*ri+ne,re)),en+1<gi&&(re=Math.max((gi-en)*ri+ne,re)),Mt=re.toString()+"px"),An=Mt!=="1px"),a.qr&&$n===a.Be&&An===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if($n!==a.Be&&(Ji==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=$n,Oe.style.width=Ji,An!==a.gf&&(Mt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=tt.alloc(),An?(y.style.left=a.Db+"px",a.position=re.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=re.h(a.pa.x-a.Db/a.scale,a.pa.y)),tt.free(re))),z&&Dh(a),a.gf=An,Oe.style.height=Mt,a.gu=!0,z&&(a.pn=!0),y=Fe.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Ot+1<Si?y=(a.position.x-Ye)*ri:Ye+1<oe?y=Fe.scrollWidth-Fe.clientWidth:pt>le+1&&(y=a.position.x*ri)),a.tn)switch(a.bu){case"negative":y=-(Fe.scrollWidth-y-Fe.clientWidth);break;case"reverse":y=Fe.scrollWidth-y-Fe.clientWidth}return Fe.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(en+1<gi?Fe.scrollTop=(a.position.y-xt)*ri:xt+1<hr?Fe.scrollTop=Fe.scrollHeight-Fe.clientHeight:st>ue+1&&(Fe.scrollTop=a.position.y*ri)),oe=a.Aa,le=a.ya,Fe.style.width=oe+(a.gf?a.Db:0)+"px",Fe.style.height=le+(a.Be?a.Db:0)+"px",x!==oe||E!==le||a.animationManager.zb?(x=pn.allocAt(b,pe,xe,Ee),a.onViewportBoundsChanged(x,a.viewportBounds,ri,z),pn.free(x),!1):!0}Le=qt.prototype,Le.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&St("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&&St('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(ko,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Le.oi=function(a){this.partManager.oi(a);var y=this;qd(a,function(x){$d(y,x)}),(a instanceof ho||a instanceof fr&&a.placeholder!==null)&&a.v(),a.data!==null&&qd(a,function(x){sy(y.partManager,x)}),dl(a)!==!0&&gd(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.$b()},Le.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&qd(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(nf(a,a.actualBounds)),this.$b()},Le.remove=function(a){ld(this,a,!0)};function ld(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(Uo,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Le.Is=function(a,y){if(y===void 0&&(y=!1),Jt(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new Ln,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Le.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},qt.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Yf(this)),this.toolManager!==null){var b=new xi;if(a!==null)if(Jt(a))for(var z=0;z<a.length;z++)Hu(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Hu(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Hu(this,b,a.value,x,E);for(a=this.nodes;a.next();)Hu(this,b,a.value,x,E);for(a=this.links;a.next();)Hu(this,b,a.value,x,E)}Ah(this,b,y,E,x)}};function Hu(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=Yf(a)),x instanceof ai){if(y.add(x,a.Pd(b,x,x.location)),x instanceof fr&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Hu(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var ne=z.value;if(!y.contains(ne)){var re=ne.fromNode,oe=ne.toNode;re!==null&&y.contains(re)&&oe!==null&&y.contains(oe)&&Hu(a,y,ne,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Hu(a,y,x.value,E,b)}else if(x instanceof Kn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Hu(a,y,x.value,E,b);else x instanceof ho||y.add(x,a.Pd(b,x,x.location))}function Ah(a,y,x,E,b){if(y!==null&&y.count!==0){var z=tt.alloc(),ne=tt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||Jf(a,y);for(var re=ni(),oe=ni(),le=y.iterator,ue=tt.alloc();le.next();){var pe=le.key,xe=le.value;if(pe.Zc()){var Ee=Kg(a,pe,y);Ee!==null?re.push(new ie(pe,xe,Ee)):(!b||pe.canMove())&&(Ee=xe.point,z.assign(Ee),a.computeMove(pe,z.add(ne),E,ue),pe.location=ue,xe.shifted===void 0&&(xe.shifted=new tt),xe.shifted.assign(ue.re(Ee)))}else le.key instanceof Kn&&oe.push(le.sa)}for(tt.free(ue),b=re.length,le=0;le<b;le++)pe=re[le],z.assign(pe.info.point),pe.Su.shifted===void 0&&(pe.Su.shifted=new tt),pe.node.location=z.add(pe.Su.shifted);for(b=tt.alloc(),le=tt.alloc(),pe=oe.length,xe=0;xe<pe;xe++){var Fe=oe[xe];if(Ee=Fe.key,Ee instanceof Kn)if(Ee.suspendsRouting){Ee.Tg=null,ue=Ee.fromNode;var Oe=Ee.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Oe=Fe.value.point,Ee.dragComputation===null)y.add(Ee,a.Pd(E,Ee,ne)),Wc(Ee,ne.x-Oe.x,ne.y-Oe.y);else{Fe=tt.allocAt(0,0),(ue=Ee.i(0))&&ue.w()&&Fe.assign(ue);var st=ue=tt.alloc().assign(Fe).add(ne);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(st=tt.alloc(),Xf(a,Ee,ue,st,E)),ue.assign(Ee.dragComputation(Ee,ue,st)).re(Fe),y.add(Ee,a.Pd(E,Ee,ue)),Wc(Ee,ue.x-Oe.x,ue.y-Oe.y),tt.free(Fe),tt.free(ue),st!==ue&&tt.free(st)}else ue!==null&&(b.assign(ue.location),st=y.I(ue),st!==null&&b.re(st.point)),Oe!==null&&(le.assign(Oe.location),st=y.I(Oe),st!==null&&le.re(st.point)),ue!==null&&Oe!==null?b.Xa(le)?(ue=Fe.value.point,Oe=z,Oe.assign(b),Oe.re(ue),y.add(Ee,a.Pd(E,Ee,b)),Wc(Ee,Oe.x,Oe.y)):(Ee.suspendsRouting=!1,Ee.bb()):(Fe=Fe.value.point,ue=ue!==null?b:Oe!==null?le:ne,y.add(Ee,a.Pd(E,Ee,ue)),Wc(Ee,ue.x-Fe.x,ue.y-Fe.y))}else(Ee.fromNode===null||Ee.toNode===null)&&(ue=Fe.value.point,y.add(Ee,a.Pd(E,Ee,ne)),Wc(Ee,ne.x-ue.x,ne.y-ue.y))}tt.free(z),tt.free(ne),tt.free(b),tt.free(le),ci(re),ci(oe),x||(As(a),ud(a,y))}}qt.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new tt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=tt.alloc(),Xf(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var ne=a.minLocation,re=ne.x;isNaN(re)&&(re=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var oe=a.maxLocation,le=oe.x;return isNaN(le)&&(le=z?Math.round(1e3*a.location.x)/1e3:a.location.x),oe=oe.y,isNaN(oe)&&(oe=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(re,Math.min(x.x,le)),Math.max(ne,Math.min(x.y,oe))),b!==y&&tt.free(b),E};function Yf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Xf(a,y,x,E,b){if(b===void 0&&(b=Yf(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var ne=b.gridSnapOrigin,re=ne.x;if(ne=ne.y,b=b.gridSnapCellSpot,z!==null){var oe=z.gridCellSize;isNaN(a)&&(a=oe.width),isNaN(y)&&(y=oe.height),z=z.gridOrigin,isNaN(re)&&(re=z.x),isNaN(ne)&&(ne=z.y)}z=tt.allocAt(0,0),z.yi(0,0,a,y,b),it.No(x.x,x.y,re+z.x,ne+z.y,a,y,E),tt.free(z)}}function Jf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Kn&&(y.suspendsRouting=!0)}function ud(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Kn&&(x.suspendsRouting=!1,Vv(x)&&x.bb())}a.Mr=!1}}function Kg(a,y,x){return y=y.containingGroup,y!==null&&(a=Kg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Le=qt.prototype,Le.Pd=function(a,y,x){if(x===void 0)return new fc(lo);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new fc(new tt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new fc(x.copy())};function Vg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&St("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&St("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&St("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&St("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&St("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Le.Al=function(a){Vg(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(ko,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Le.Ww=function(a,y){Vg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Uo,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(ko,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Le.Cy=function(a,y){Vg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Uo,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(ko,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Le.kA=function(a){if(a.diagram!==this&&St("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(Uo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Le.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Le.Yw=function(a){return this.pf===null&&(this.pf=new Mn),this.pf.add(a),this.model.Pe(a),this},Le.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Le.Pe=function(a){return this.zg===null&&(this.zg=new Mn),this.zg.add(a),this},Le.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Le.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==To&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Le.cb=function(a,y,x,E,b,z,ne){z===void 0&&(z=null),ne===void 0&&(ne=null);var re=new Ri;re.diagram=this,re.change=a,re.propertyName=y,re.object=x,re.oldValue=E,re.oldParam=z,re.newValue=b,re.newParam=ne,this.ds(re)},Le.g=function(a,y,x,E,b){this.cb(Yr,a,this,y,x,E,b)},qt.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===Yr){var b=a.object;if(la(b,a.propertyName,a.I(y)),b instanceof Rt){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===ko){var ne=a.object,re=a.newParam,oe=a.newValue;if(ne instanceof Hn)if(typeof re=="number"&&oe instanceof Rt){y?ne.pc(re):ne.Gb(re,oe);var le=ne.part;le!==null&&le.Wb()}else typeof re=="number"&&oe instanceof us&&(oe.isRow?h1(ne,re,y?void 0:oe):c1(ne,re,y?void 0:oe));else if(ne instanceof fa){var ue=a.oldParam===!0;typeof re=="number"&&oe instanceof Oi&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),ne.pc(ue?re:-1,oe,ue)):ne.oi(re,oe,ue))}else ne instanceof qt?typeof re=="number"&&oe instanceof fa&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):St("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Uo){var pe=a.object,xe=a.oldParam,Ee=a.oldValue;if(pe instanceof Hn)typeof xe=="number"&&Ee instanceof Rt?y?pe.Gb(xe,Ee):pe.pc(xe):typeof xe=="number"&&Ee instanceof us&&(Ee.isRow?h1(pe,xe,y?Ee:void 0):c1(pe,xe,y?Ee:void 0));else if(pe instanceof fa){var Fe=a.newParam===!0;typeof xe=="number"&&Ee instanceof Oi&&(y?0>pe.Pa.indexOf(Ee)&&pe.oi(xe,Ee,Fe):(Ee.isSelected=!1,Ee.isHighlighted=!1,Ee.Wb(),pe.pc(Fe?xe:-1,Ee,Fe)))}else pe instanceof qt?typeof xe=="number"&&Ee instanceof fa&&(y?(Ee.Xe(this),this.Wa.Gb(xe,Ee)):this.Wa.mb(xe)):St("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==To&&St("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},qt.prototype.Ea=function(a){return this.undoManager.Ea(a)},qt.prototype.eb=function(a){return this.undoManager.eb(a)},qt.prototype.Kf=function(){return this.undoManager.Kf()},qt.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},qt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},qt.prototype.rp=function(){this.partManager.rp()};function Ug(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Dh(a),a.N(),a.Ee=!0,E.zb&&(Rs(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Dh(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,ne=a.ya,re=a.zoomPoint.x,oe=a.zoomPoint.y,le=a.contentAlignment;isNaN(re)&&(le.$c()?le.Hf(Iu)?re=0:le.Hf(Ys)&&(re=z-1):re=le.sb()?le.x*(z-1):z/2),isNaN(oe)&&(le.$c()?le.Hf(Su)?oe=0:le.Hf(ul)&&(oe=ne-1):oe=le.sb()?le.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=tt.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,tt.free(z),a.Ca=x,Dh(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),uu(a,!1),E.zb&&(Rs(E)||E.ce.add(E.H,"scale",y,a.Ca))}}qt.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==rl||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Vr&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Za(b,this)),this.vb||this.invalidateViewport(a,y),Th(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Th(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=Xn.alloc(),b=1,z=1,ne=x.O.s,re=ne.length,oe=0;oe<re;oe++){var le=ne[oe],ue=Math.abs(le.interval);2>ue||(pv(le.figure)?z=z*ue/it.vx(z,ue):b=b*ue/it.vx(b,ue))}if(ne=x.gridCellSize,E.h(z*ne.width,b*ne.height),y!==void 0)b=y.width,z=y.height,a=y.x,ne=y.y;else{if(y=pn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){pn.free(y);return}b=y.width,z=y.height,a=y.x,ne=y.y,pn.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=tt.alloc(),it.No(a,ne,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),Xn.free(E),x.part.location=y,tt.free(y)}}qt.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},qt.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))},qt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Jt(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Oi||St("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Oi||St("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},qt.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Le=qt.prototype,Le.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Le.Jz=function(a){a=new Ln().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 Oi||St("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Le.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=tt.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),tt.free(z);return}St("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):St("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),tt.free(z)},Le.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)},Le.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Le.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)},Le.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,ne=y.m11,re=y.m12,oe=y.m21,le=y.m22,ue=y.dx,pe=y.dy,xe=x*ne+E*oe+ue;y=x*re+E*le+pe;var Ee=b*ne+E*oe+ue;return a=b*re+E*le+pe,E=x*ne+z*oe+ue,x=x*re+z*le+pe,ne=b*ne+z*oe+ue,b=b*re+z*le+pe,z=Math.min(xe,Ee),xe=Math.max(xe,Ee),Ee=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),xe=Math.max(xe,E),Ee=Math.min(Ee,x),y=Math.max(y,x),z=Math.min(z,ne),xe=Math.max(xe,ne),Ee=Math.min(Ee,b),y=Math.max(y,b),new pn(z,Ee,xe-z,y-Ee)},Le.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),yr(a.copy(),this.Ab)};function rm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Yg(a){return a=ig.get(a),a!==null?new a:new Oo}qt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===To&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(oe){return oe.diagram=b}),a.mouseMoveTools.each(function(oe){return oe.diagram=b}),a.mouseUpTools.each(function(oe){return oe.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===To){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),As(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||ws(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(rm(this),this.As.clear(),Ta(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;Pn(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function $d(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)hd(a,y[E])}function hd(a,y){if(y instanceof kl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Ln&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function Xg(a,y){if(y instanceof kl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof Ln&&x.Bg.remove(a),mg(E));break}}}}}qt.prototype.Wd=function(){this.partManager.Wd()},qt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},qt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},qt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},qt.prototype.Vb=function(a){return this.partManager.Vb(a)},qt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Le=qt.prototype,Le.Lc=function(a){return this.partManager.Lc(a)},Le.ii=function(a){return this.partManager.ii(a)},Le.Kc=function(a){return this.partManager.Kc(a)},Le.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:gn(ji(y)))},Le.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:gn(ji(y)))};function Dh(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 Jg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),uu(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Le.Va=function(){if(this.Zi){var a=pn.alloc();Jg(this,this.computeBounds(a)),pn.free(a)}},Le.rz=function(){for(var a=new Ln,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},Le.qz=function(){return this.ai.iterator},Le.Uz=function(a){As(this),a&&Qf(this,!0),this.ld?Qg(this,!1):(this.Jk=!0,Ll(this))};function Qf(a,y){for(var x=a.ai.iterator;x.next();)om(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function om(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)om(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Qg(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Us(z,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)qg(a,ne.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),As(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||ws(z),a.aa=x}}}function qg(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)qg(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),Ea(a,y),b.isValidLayout=!0):a.xh=!0)}}Le.yz=function(){for(var a=new Mn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function tv(a){function y(b){var z=b.toLowerCase(),ne=new Mn;x.add(b,ne),x.add(z,ne),E.add(b,b),E.add(z,b)}var x=new xi,E=new xi;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function am(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function qf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;St("Unknown DiagramEvent name: "+y)}Le.Bj=function(a,y){return a=qf(this,a),a!==null&&a.add(y),this},Le.am=function(a,y){a=qf(this,a),a!==null&&a.remove(y)},Le.R=function(a,y,x){var E=qf(this,a),b=new sr;if(b.diagram=this,a=am(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function eg(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Le.Yj=function(a,y){return tg(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},qt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?jd(this,a):a.assign(this.documentBounds)};function tg(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new Fp(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=sm(a,x)),x===null){y=pn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var ne=z.value,re=ne.layer;re!==null&&re.visible&&!re.isTemporary&&ng(a,ne,E,y)}pn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=pn.alloc(),z=x.memberParts;z.next();)ne=z.value,ne instanceof ai&&ng(a,ne,E,y);pn.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&rS(b);return b}function sm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?sm(a,y.containingGroup):null}function ng(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(wg(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill($c,x,y+1);else for(var ne=x;ne<=y;ne++)z[ne]=$c}else if(y instanceof fr)for(y=y.memberParts;y.next();)b=y.value,b instanceof ai&&ng(a,b,x,E)}}function Dc(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}qt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():ep(this)};function ep(a){a.vk===-1&&(a.vk=Pn(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=pn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Jg(a,y),pn.free(y),a.Fc=!0,a.bd(),ep(a))}},a.vp))}qt.prototype.ug=function(){this.vk!==-1&&(rt.clearTimeout(this.vk),this.vk=-1)},qt.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=pn.allocAt(0,0,E.width*b,E.height*b);var z=tt.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,z.x-=ne,a.x<E.x+x.left/2&&(z.x-=ne),a.x<E.x+x.left/4&&(z.x-=4*ne)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,z.x+=ne,a.x>E.x+E.width-x.right/2&&(z.x+=ne),a.x>E.x+E.width-x.right/4&&(z.x+=4*ne));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y-=ne,a.y<E.y+x.top/2&&(z.y-=ne),a.y<E.y+x.top/4&&(z.y-=4*ne)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y+=ne,a.y>E.y+E.height-x.bottom/2&&(z.y+=ne),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*ne)),z.Xa(lo)||(y=new tt(y.x+z.x/b,y.y+z.y/b)),pn.free(E),tt.free(z),y},Le=qt.prototype,Le.Cs=function(){return null},Le.av=function(){return null},Le.bs=function(a,y){this.pj.add(a,y)},Le.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof fr&&(y.$p=null)})};function xf(a,y,x){function E(){var ue=+new Date;for(z=!0,ne.reset();ne.next();)if(!ne.value[0].al){z=!1;break}z||ue-le>oe?y(x,b,re):rt.requestAnimationFrame(E)}for(var b=x.callback,z=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var re=a,oe=x.callbackTimeout||300,le=+new Date;return rt.requestAnimationFrame(function(){E()}),null}Le.Wz=function(a){return La?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Le.Jx=function(a){return a===void 0&&(a={}),xf(this,this.Xz,a)},Le.Xz=function(a,y,x){var E=lm(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case Ud+"data":b=E.getImageData(0,0,x.width,x.height);break;case Ud:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&St('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function lm(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&St("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new Xn(1/0,1/0):new Xn(2e3,2e3));var re=y.position||null,oe=y.parts||null,le=y.padding===void 0?1:y.padding,ue=y.background||null,pe=y.omitTemporary;pe===void 0&&(pe=!0);var xe=y.document||document,Ee=y.elementFinished||null,Fe=y.showTemporary;Fe===void 0&&(Fe=!pe),y=y.showGrid,y===void 0&&(y=Fe),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof le=="number"?le=new Di(le):le instanceof Di||St("MakeImage padding must be a Margin or a number."),le.left=Math.max(le.left,0),le.right=Math.max(le.right,0),le.top=Math.max(le.top,0),le.bottom=Math.max(le.bottom,0),a.ib.Vc(!0),pe=new Gu(null,xe,void 0,!0);var Oe=pe.context;if(!(b||z||oe||re))return pe.width=a.Aa+Math.ceil(le.left+le.right),pe.height=a.ya+Math.ceil(le.top+le.bottom),x==="SVG"?E===null?null:(E.resize(pe.width,pe.height,pe.width,pe.height),E.ownerDocument=xe,E.hs=Ee,ns(a,E.context,le,new Xn(pe.width,pe.height),a.Ca,a.pa,oe,ue,Fe,y),E.context):(a.Xm=!1,ns(a,Oe,le,new Xn(pe.width,pe.height),a.Ca,a.pa,oe,ue,Fe,y),a.Xm=!0,pe.context);var st=a.Pp,Ye=a.documentBounds.copy();if(Ye.Fv(a.yb),Fe)for(var pt=a.Wa.s,xt=pt.length,Mt=0;Mt<xt;Mt++){var Ot=pt[Mt];if(Ot.visible&&Ot.isTemporary){Ot=Ot.Pa.s;for(var en=Ot.length,ri=0;ri<en;ri++){var Si=Ot[ri];Si.isInDocumentBounds&&Si.isVisible()&&(Si=Si.actualBounds,Si.w()&&Ye.ed(Si))}}}if(pt=new tt(Ye.x,Ye.y),oe!==null){for(xt=new pn(0,0,0,0),Mt=!0,Ot=oe.iterator,Ot.reset();Ot.next();)en=Ot.value,en instanceof Oi&&(ri=en.layer,ri!==null&&!ri.visible||ri!==null&&!Fe&&ri.isTemporary||!en.isVisible()||(en=en.actualBounds,en.w()&&(Mt?(Mt=!1,xt.assign(en)):xt.ed(en))));Ye.width=xt.width,Ye.height=xt.height,pt.x=xt.x,pt.y=xt.y}return re!==null&&re.w()&&(pt=re,z||(z=st)),xt=re=0,le!==null&&(re=le.left+le.right,xt=le.top+le.bottom),Mt=Ot=0,b!==null&&(Ot=b.width,Mt=b.height,isFinite(Ot)&&(Ot=Math.max(0,Ot-re)),isFinite(Mt)&&(Mt=Math.max(0,Mt-xt))),b!==null&&z!==null?(z==="NaN"&&(z=st),b.w()?(b=Ot,Ye=Mt):isNaN(Mt)?(b=Ot,Ye=Ye.height*z):(b=Ye.width*z,Ye=Mt)):b!==null?b.w()?(z=Math.min(Ot/Ye.width,Mt/Ye.height),b=Ot,Ye=Mt):isNaN(Mt)?(z=Ot/Ye.width,b=Ot,Ye=Ye.height*z):(z=Mt/Ye.height,b=Ye.width*z,Ye=Mt):z!==null?z==="NaN"&&ne.w()?(z=Math.min((ne.width-re)/Ye.width,(ne.height-xt)/Ye.height),z>st?(z=st,b=Ye.width,Ye=Ye.height):(b=ne.width,Ye=ne.height)):(b=Ye.width*z,Ye=Ye.height*z):(z=st,b=Ye.width,Ye=Ye.height),le!==null?(b+=re,Ye+=xt):le=new Di(0),ne!==null&&(st=ne.width,ne=ne.height,isNaN(st)&&(st=2e3),isNaN(ne)&&(ne=2e3),isFinite(st)&&(b=Math.min(b,st)),isFinite(ne)&&(Ye=Math.min(Ye,ne))),pe.width=Math.ceil(b),pe.height=Math.ceil(Ye),x==="SVG"?E===null?null:(E.resize(pe.width,pe.height,pe.width,pe.height),E.ownerDocument=xe,E.hs=Ee,ns(a,E.context,le,new Xn(Math.ceil(b),Math.ceil(Ye)),z,pt,oe,ue,Fe,y),E.context):(a.Xm=!1,ns(a,Oe,le,new Xn(Math.ceil(b),Math.ceil(Ye)),z,pt,oe,ue,Fe,y),a.Xm=!0,pe.context)}Ve.Object.defineProperties(qt.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof ye||(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 Oh(this,rt.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 Oh(this,rt.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(rt,"resize",this.Ov,!1),this.removeEventListener(rt,"wheel",this.$j,!0),ph===this&&(ph=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Id(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)&&In(a,"0 <= value <= 1",qt,"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),uu(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),uu(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),uu(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),uu(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&In(a,">= 0",qt,"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&&In(a,">= 0",qt,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else In(a,">= 0",qt,"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||rm(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&&St("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Nc(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Us(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=Yg(this.cc.type);for(var b=0;b<x.length;b++)this.add(x[b]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=E,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(rt,"pointermove",this.dk,!0),this.addEventListener(rt,"pointerdown",this.ui,!0),this.addEventListener(rt,"pointerup",this.fk,!0),this.addEventListener(rt,"pointerout",this.ek,!0),this.addEventListener(rt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(rt,"wheel",this.$j,!0),this.addEventListener(rt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(rt,"pointermove",this.dk,!0),this.removeEventListener(rt,"pointerdown",this.ui,!0),this.removeEventListener(rt,"pointerup",this.fk,!0),this.removeEventListener(rt,"pointerout",this.ek,!0),this.removeEventListener(rt,"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(rt,"wheel",this.$j,!0),this.removeEventListener(rt,"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=tt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),js(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Dh(this):(this.vb=!0,a=this.scale,Sf(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)}tt.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=vf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=vf(this)),a.type!==Hn.Grid&&St("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),Th(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),Dh(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||St("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 Di(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===Oc&&uu(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,uu(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,Ug(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&&Ug(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!==rl&&uu(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()||St("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()||St("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)):In(a,"> 0",qt,"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)):In(a,"> 0",qt,"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),uu(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 Di(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&&St("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();)yp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Ic&&a!==ss&&a!==rg&&St("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 Xn(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 Di(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ve.Object.defineProperties(qt,{licenseKey:{get:function(){return ap.jc()},set:function(a){ap.add(a.replace(/\s/g,""))}},version:{get:function(){return Vd}}}),qt.prototype.makeImageData=qt.prototype.Jx,qt.prototype.makeImage=qt.prototype.Wz,qt.prototype.cacheGroupExternalLinks=qt.prototype.Fu,qt.prototype.addRenderer=qt.prototype.bs,qt.prototype.makeSVG=qt.prototype.av,qt.prototype.makeSvg=qt.prototype.Cs,qt.prototype.stopAutoScroll=qt.prototype.ug,qt.prototype.doAutoScroll=qt.prototype.gs,qt.prototype.isUnoccupied=qt.prototype.Yj,qt.prototype.raiseDiagramEvent=qt.prototype.R,qt.prototype.removeDiagramListener=qt.prototype.am,qt.prototype.addDiagramListener=qt.prototype.Bj,qt.prototype.findTreeRoots=qt.prototype.yz,qt.prototype.layoutDiagram=qt.prototype.Uz,qt.prototype.findTopLevelGroups=qt.prototype.qz,qt.prototype.findTopLevelNodesAndLinks=qt.prototype.rz,qt.prototype.ensureBounds=qt.prototype.Va,qt.prototype.findLinksByExample=qt.prototype.ls,qt.prototype.findNodesByExample=qt.prototype.ms,qt.prototype.findLinkForData=qt.prototype.Kc,qt.prototype.findNodeForData=qt.prototype.ii,qt.prototype.findPartForData=qt.prototype.Lc,qt.prototype.findLinkForKey=qt.prototype.findLinkForKey,qt.prototype.findNodeForKey=qt.prototype.Vb,qt.prototype.findPartForKey=qt.prototype.findPartForKey,qt.prototype.rebuildParts=qt.prototype.Wd,qt.prototype.transformViewToDoc=qt.prototype.Ps,qt.prototype.transformRectDocToView=qt.prototype.zA,qt.prototype.transformDocToView=qt.prototype.op,qt.prototype.centerRect=qt.prototype.es,qt.prototype.scrollToRect=qt.prototype.tv,qt.prototype.scroll=qt.prototype.scroll,qt.prototype.highlightCollection=qt.prototype.Jz,qt.prototype.highlight=qt.prototype.Iz,qt.prototype.selectCollection=qt.prototype.rA,qt.prototype.select=qt.prototype.select,qt.prototype.updateAllRelationshipsFromData=qt.prototype.rp,qt.prototype.updateAllTargetBindings=qt.prototype.updateAllTargetBindings,qt.prototype.commit=qt.prototype.commit,qt.prototype.rollbackTransaction=qt.prototype.Kf,qt.prototype.commitTransaction=qt.prototype.eb,qt.prototype.startTransaction=qt.prototype.Ea,qt.prototype.raiseChanged=qt.prototype.g,qt.prototype.raiseChangedEvent=qt.prototype.cb,qt.prototype.removeChangedListener=qt.prototype.ik,qt.prototype.addChangedListener=qt.prototype.Pe,qt.prototype.removeModelChangedListener=qt.prototype.mA,qt.prototype.addModelChangedListener=qt.prototype.Yw,qt.prototype.findLayer=qt.prototype.Qj,qt.prototype.removeLayer=qt.prototype.kA,qt.prototype.addLayerAfter=qt.prototype.Cy,qt.prototype.addLayerBefore=qt.prototype.Ww,qt.prototype.addLayer=qt.prototype.Al,qt.prototype.moveParts=qt.prototype.moveParts,qt.prototype.copyParts=qt.prototype.Kj,qt.prototype.removeParts=qt.prototype.Is,qt.prototype.remove=qt.prototype.remove,qt.prototype.add=qt.prototype.add,qt.prototype.clearDelayedGeometries=qt.prototype.bx,qt.prototype.setProperties=qt.prototype.nm,qt.prototype.attach=qt.prototype.Du,qt.prototype.set=qt.prototype.set,qt.prototype.resetInputOptions=qt.prototype.Sx,qt.prototype.setInputOption=qt.prototype.sA,qt.prototype.getInputOption=qt.prototype.Ql,qt.prototype.resetRenderingHints=qt.prototype.Tx,qt.prototype.setRenderingHint=qt.prototype.Xx,qt.prototype.getRenderingHint=qt.prototype.Gf,qt.prototype.maybeUpdate=qt.prototype.bd,qt.prototype.requestUpdate=qt.prototype.$b,qt.prototype.delayInitialization=qt.prototype.Xy,qt.prototype.isUpdateRequested=qt.prototype.Pz,qt.prototype.invalidateDocumentBounds=qt.prototype.Ya,qt.prototype.findObjectsNear=qt.prototype.og,qt.prototype.findPartsNear=qt.prototype.mz,qt.prototype.findObjectsIn=qt.prototype.Cf,qt.prototype.findPartsIn=qt.prototype.ux,qt.prototype.findObjectsAt=qt.prototype.ji,qt.prototype.findPartsAt=qt.prototype.lz,qt.prototype.findObjectAt=qt.prototype.ic,qt.prototype.findPartAt=qt.prototype.Ol,qt.prototype.focusObject=qt.prototype.zz,qt.prototype.alignDocument=qt.prototype.Jy,qt.prototype.zoomToRect=qt.prototype.BA,qt.prototype.zoomToFit=qt.prototype.zoomToFit,qt.prototype.diagramScroll=qt.prototype.kx,qt.prototype.focus=qt.prototype.focus;var ig=new xi,um=null,La=rt.document!==void 0,Kd=null,cd="",rl=new fn(qt,"None",0),cu=new fn(qt,"Uniform",1),dd=new fn(qt,"UniformToFill",2),Pf=new fn(qt,"CycleAll",10),tp=new fn(qt,"CycleNotDirected",11),np=new fn(qt,"CycleNotDirectedFast",12),ip=new fn(qt,"CycleNotUndirected",13),rp=new fn(qt,"CycleDestinationTree",14),op=new fn(qt,"CycleSourceTree",15),Oc=new fn(qt,"DocumentScroll",1),wf=new fn(qt,"InfiniteScroll",2),Ic=new fn(qt,"TreeParentCollapsed",21),ss=new fn(qt,"AllParentsCollapsed",22),rg=new fn(qt,"AnyParentsCollapsed",23),ap=new Mn,Vd="2.3.10",Ud="image",Cf=null,hm=!1;function Qs(){if(La){var a=rt.document.createElement("canvas"),y=a.getContext("2d"),x=wn("7ca11abfd022028846");y[x]=wn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Vt.Dx+"4ae6247590da4bb21c324ba3a84e385776",_t.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",it.za],b=1;5>b;b++)y[wn("7ca11abfd7330390")](wn(E[b-1]),10,15*b);for(y[x]=wn("39f046ebb36e4b"),x=1;5>x;x++)y[wn("7ca11abfd7330390")](wn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(_t.prototype.Cd=_t.prototype.Eu),Cf=a}}qt.className="Diagram",qt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=rt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof qt?y.H:null},qt.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},qt.useDOM=function(a){La=a?rt.document!==void 0:!1},qt.isUsingDOM=function(){return La},qt.None=rl,qt.Uniform=cu,qt.UniformToFill=dd,qt.CycleAll=Pf,qt.CycleNotDirected=tp,qt.CycleNotDirectedFast=np,qt.CycleNotUndirected=ip,qt.CycleDestinationTree=rp,qt.CycleSourceTree=op,qt.DocumentScroll=Oc,qt.InfiniteScroll=wf,qt.TreeParentCollapsed=Ic,qt.AllParentsCollapsed=ss,qt.AnyParentsCollapsed=rg;function cm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Yd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=rt[wn("76a715b2f73f148a")][wn("72ba13b5")]||"";if(a.Rc=!0,La){var E=qt[wn("76a115b6ed251eaf4692")];if(E)for(var b=ap.iterator;b.next()&&(E=b.value,E=wn(E).split(wn("39e9")),!(6>E.length));){var z=wn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var ne=wn(Vt[wn("6cae19")]).split(".");if(z[0]>ne[0]||z[0]===ne[0]&&z[1]>=ne[1]){var re=rt[wn("74a900bae4370f8b51")][wn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=re[wn("73a612b6fb191d")](wn("3aad1ab6e022098b4dc4")),z=wn(E[2]),-1<ne&&(re=re[wn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<ne),!a.Rc))break;for(ne=x[wn("76ad18b4f73e")],re=x[wn("73a612b6fb191d")](wn("35e7"))+2;re<ne;re++)y+=x[re];if(ne=y[wn("73a612b6fb191d")](z),0>ne&&z!==wn("7da71ca0ad381e90")&&(ne=y[wn("73a612b6fb191d")](wn("76a715b2ef3e149757"))),0>ne&&(ne=y[wn("73a612b6fb191d")](wn("76a715b2ef3e149757"))),0>ne&&(ne=y[wn("73a612b6fb191d")](wn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[wn("73a612b6fb191d")](wn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[wn("73a612b6fb191d")](wn("35"))||y[wn("73a612b6fb191d")](wn("35"))===-1),!a.Rc||x[wn("73a612b6fb191d")](wn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[wn("73a612b6fb191d")](z)),!a.Rc)||(ne=rt[wn("76a715b2f73f148a")][wn("69ad17a1e03e")],re=ne[wn("73a612b6fb191d")](wn("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(ne[wn("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){ne=rt.document.createElement("div");for(var oe=E[0].replace(/[A-Za-z]/g,"");4>oe.length;)oe+="9";if(re=oe,oe=oe.substr(oe.length-4),E="",E+=["gsh","gsf"][parseInt(oe.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(oe.substr(0,1),10)%4],ne[wn("79a417a0f0181a8946")]=E,rt.document[wn("78a712aa")]){rt.document[wn("78a712aa")][wn("7bb806b6ed32388c4a875b")](ne),oe=rt.getComputedStyle(ne).getPropertyValue(wn("78a704b7e62456904c9b12701b6532a8"));var le=rt.getComputedStyle(ne).getPropertyValue(wn("75b817b0ea2202"));if(rt.document[wn("78a712aa")][wn("68ad1bbcf533388c4a875b")](ne),oe){if(ne=rt[wn("77a902b0eb1b1e804a8a")],le==="0."+parseInt(re,10)%100||oe.indexOf(parseInt(z[1]+z[2],16))!==-1&&oe.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(wn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){ne=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ue in ne)if(E===ne[ue].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ue=x[wn("76ad18b4f73e")],b=x[wn("73a612b6fb191d")](wn("35e7"))+2;b<ue;b++)y+=x[b];x=y[wn("73a612b6fb191d")](wn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[wn("73a612b6fb191d")](wn("35")))}}}return 0<a.Rc&&a!==a.wy}cm.className="DiagramHelper";function fc(a){this.j=a===void 0?new tt:a,this.o=new tt}Ve.Object.defineProperties(fc.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 Ef="DraggingInfo";fc.className="DraggingInfo";function ie(a,y,x){this.node=a,this.info=y,this.Su=x}ie.className="DraggingNodeInfoPair";function ae(){this.reset()}ae.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Xn(NaN,NaN).freeze(),this.gridSnapCellSpot=cs,this.gridSnapOrigin=new tt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function ge(a,y){if(typeof a=="string"||rt.Element&&a instanceof Element)var x=qt.call(this,a)||this;else x=qt.call(this)||this,y=a;return fe(x),y&&x.nm(y),x}Dt(ge,qt);function fe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=bl,a.layout=new Ds}ge.prototype.reset=function(){qt.prototype.reset.call(this),fe(this)},ge.className="Palette";function ye(a,y){if(typeof a=="string"||rt.Element&&a instanceof Element)var x=qt.call(this,a)||this;else x=qt.call(this)||this,y=a;var E=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new Oi;var b=new Mr;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Di(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new ut,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var ne=z.viewportBounds,re=E.lastInput.documentPoint;z.position=new tt(re.x-ne.width/2,re.y-ne.height/2)}},x.Pf=function(){E.Ya(),We(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&We(E)},x.autoScale=cu,x.vb=!1,y&&Object.assign(x,y),x}Dt(ye,qt),ye.prototype.computePixelRatio=function(){return 1},ye.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(Mu(this),this.ql===null){var x=new Gu(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),Te(this)}finally{this.ta=a,this.ib=y}}}qt.prototype.redraw.call(this)},ye.prototype.gc=function(){if(this.Ka===null&&St("No div specified"),this.ta===null&&St("No canvas specified"),!(this.ta instanceof Oh)&&(Ov(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Mu(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?Te(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Te(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=pn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Th(y,b),pn.free(b),As(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var ne=0;ne<z;ne++){var re=y[ne],oe=a;if(re.visible&&re.opacity!==0){var le=re.diagram.grid.part;if(!x&&re.isTemporary)E&&le.layer===re&&(re=_s(re,b),le.gc(b,oe),b.globalAlpha=re);else{for(var ue=_s(re,b),pe=oe.scale,xe=pn.alloc(),Ee=re.Pa.s,Fe=Ee.length,Oe=0;Oe<Fe;Oe++){var st=Ee[Oe];(E||st!==le)&&re.Oj(b,st,oe,null,pe,xe,!1)}pn.free(xe),b.globalAlpha=ue}}}}}function We(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=Xn.alloc();b.h(x.width,x.height),E.desiredSize=b,Xn.free(b),a=2/a.scale,E instanceof Mr&&(E.strokeWidth=a),y.location=new tt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}ye.prototype.computeBounds=function(){var a=this.observed;if(a===null)return $r;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},ye.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},ye.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),We(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},Ve.Object.defineProperties(ye.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof ye&&St("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),We(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),We(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)}}}),ye.className="Overview";function ut(){aa.call(this),this.j=null}Dt(ut,aa),ut.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 tt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new tt(a.x-this.j.x,a.y-this.j.y)),!0)},ut.prototype.doActivate=function(){this.j=null,aa.prototype.doActivate.call(this)},ut.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},ut.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var E=a.firstInput.documentPoint;x=x.location,this.j=new tt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new tt(a.x-this.j.x,a.y-this.j.y)}}},ut.className="OverviewDraggingTool";function at(){Hr(this),this.H=ph,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=$r,this.hb=!0,this.cg=null,this.ob=200}at.prototype.toString=function(){return"CommandHandler"},at.prototype.Xe=function(a){this.H=a},at.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Or?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},at.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},at.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Vr&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},at.prototype.canStopCommand=function(){return!0},at.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},at.prototype.canSelectAll=function(){return this.diagram.allowSelect},at.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 Ln,x=a.selection.iterator;x.next();)md(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},at.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},at.prototype.copySelection=function(){var a=this.diagram,y=new Ln;for(a=a.selection.iterator;a.next();)md(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},at.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},at.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},at.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},at.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Kd=null,cd="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new Mn,x.addAll(z),Kd=x,cd=y.model.dataFormat}}y.R("ClipboardChanged",x)},at.prototype.pasteFromClipboard=function(){var a=new Ln,y=Kd;if(y===null)return a;var x=this.diagram;if(cd!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,ne=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=ne.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},at.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);Ah(y,z,new tt(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},at.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Kd===null||Kd.count===0||cd!==a.model.dataFormat)},at.prototype.undo=function(){this.diagram.undoManager.undo()},at.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},at.prototype.redo=function(){this.diagram.undoManager.redo()},at.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},at.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===rl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},at.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==rl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},at.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===rl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},at.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==rl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},at.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},at.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},at.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Us(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=$r):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),ws(y)},at.prototype.canZoomToFit=function(){return this.diagram.allowZoom},at.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(oe){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;Us(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=Lt(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var oe=b.pop();0<b.length&&oe instanceof ai&&oe.isTreeExpanded&&(!(oe instanceof fr)||oe.isSubGraphExpanded);)oe=b.pop();0<b.length?(oe instanceof Oi&&y.tv(oe.actualBounds),oe instanceof ai&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof fr&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof Oi&&y.es(oe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Pn(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",ne),z()}}else{var re=y.position.copy();y.es(a.actualBounds),re.Xa(y.position)&&x.Cc()}}};function Lt(a,y,x){if(y.isVisible())return x;if(y instanceof ho)Lt(a,y.adornedPart,x);else if(y instanceof Kn){var E=y.fromNode;E!==null&&Lt(a,E,x),y=y.toNode,y!==null&&Lt(a,y,x)}else y instanceof ai&&(E=y.labeledLink,E!==null&&Lt(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),Lt(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Lt(a,y,x));return x}at.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Oi)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},at.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Us(y.animationManager,"Collapse Tree");var x=new Mn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof ai&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},at.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ai&&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 ai&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},at.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Us(y.animationManager,"Expand Tree");var x=new Mn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof ai&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},at.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ai)||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 ai&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},at.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new Mn,z=a.selection.iterator;z.next();){var ne=z.value;ne.Zc()&&ne.canGroup()&&b.add(ne)}for(var re=new Mn,oe=b.iterator;oe.next();){var le=oe.value;z=!1;for(var ue=b.iterator;ue.next();)if(le.Td(ue.value)){z=!0;break}z||re.add(le)}if(0<re.count){var pe=re.first().containingGroup;if(pe!==null)for(;pe!==null;){b=!1;for(var xe=re.iterator;xe.next();)if(!xe.value.Td(pe)){b=!0;break}if(b)pe=pe.containingGroup;else break}if(x instanceof fr)$u(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Ee=y.copyNodeData(x);Gt(Ee)&&(y.xf(Ee),E=a.ii(Ee))}if(E!==null){pe!==null&&this.isValidMember(pe,E)&&(E.containingGroup=pe);for(var Fe=re.iterator;Fe.next();){var Oe=Fe.value;this.isValidMember(E,Oe)&&(Oe.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},at.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 dn(a){var y=ni();for(a=a.iterator;a.next();){var x=a.value;x instanceof Kn||y.push(x)}a=new Ln,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,ne=0;ne<x;ne++)if(b.Td(y[ne])){z=!1;break}z&&a.add(b)}return ci(y),a}at.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Kn)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},at.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var E=new Mn;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof fr&&z.canUngroup()&&E.add(z)}var ne=new Mn;if(0<E.count){y.clearSelection(!0);for(var re=E.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var le=oe.containingGroup,ue=le!==null&&le.data!==null?x.wa(le.data):void 0;ne.addAll(oe.memberParts);for(var pe=ne.iterator;pe.next();){var xe=pe.value;if(xe.isSelected=!0,!(xe instanceof Kn)){var Ee=xe.data;Ee!==null?x.mp(Ee,ue):xe.containingGroup=le}}y.remove(oe)}}y.R("SelectionUngrouped",E,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},at.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 fr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof fr&&y.canUngroup())return!0;return!1},at.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=dn(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},at.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Us(y.animationManager,"Collapse SubGraph");var x=new Mn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof fr&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},at.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof fr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof fr&&y.isSubGraphExpanded)return!0;return!1},at.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Us(y.animationManager,"Expand SubGraph");var x=new Mn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof fr&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},at.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof fr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof fr&&!y.isSubGraphExpanded)return!0;return!1},at.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof Qo&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},at.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 Qo))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 Qo&&x.editable}),a!==null))return!0;return!1},at.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var E=y.lastInput,b=null;a instanceof Rt?b=a.ga(Jr):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new tt(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,Ko(x,!1,a)}},at.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)},at.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new xi,a===null)return E;for(var z=a.iterator;z.next();)Hu(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof Kn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Ve.Object.defineProperties(at.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||St("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}}}),at.className="CommandHandler",cc=function(){return new at};function Rt(){Hr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new tt(NaN,NaN).freeze(),this.jd=ia,this.Ab=new _t,this.wh=new _t,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=bs,this.uc=new pn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new pn(NaN,NaN,NaN,NaN).freeze(),this.dc=new pn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Po,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 zn,On,wi,Ti,Hi,vr,Kr,kr,ro,Ho;Rt.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=hi(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Rt.prototype.Vw=function(a){var y=this.Dh;if(Jt(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Rt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Rt.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},Rt.prototype.copy=function(){return this.clone()},Le=Rt.prototype,Le.qb=function(a){a.classType===Kn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:St("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Rt&&(this.stretch=a)},Le.toString=function(){return li(this.constructor)+"#"+Bi(this)},Le.th=function(){this.A!==null&&(this.A.nc=!0)};function Fr(a){a.A===null?a.A=new Mf:a.A.nc&&(a.A=a.A.copy())}Le.Xc=function(){if(this.ba===null){var a=new sp;a.Xi=Ma,a.yj=Ma,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Le.cb=function(a,y,x,E,b,z,ne){var re=this.part;if(re!==null&&(re.gk(a,y,x,E,b,z,ne),x===this&&a===Yr&&Zs(this)&&oa(this,re,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 xi),ne=z.undoManager.transactionLevel===0,a.startCondition===ks?ne=!0:a.startCondition===Xa&&(ne=!1),ne?(z=new ba,Sa(a,z),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(Us(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof Hn&&x===re&&(re.l&16777216)!==0&&re.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)re=x[b],re instanceof Hn&&qd(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function oa(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,ne=null;if(z.sourceName!==null){if(ne=MS(z,E,a),ne===null)continue;z.sp(a,ne,x,null)}else if(z.isToModel){var re=y.diagram;re===null||re.skipsModelSourceBindings||z.sp(a,re.model.modelData,x,E)}else{if(re=E.data,re===null)continue;var oe=y.diagram;oe===null||oe.skipsModelSourceBindings||z.sp(a,re,x,E)}ne===a&&(re=E.ks(z.Ai),re!==null&&z.Mv(re,ne,x))}}Le.ks=function(a){return this.bindingId===a?this:null},Le.g=function(a,y,x){this.cb(Yr,a,this,y,x)},Le.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new _t);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Ss(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Le.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?xo(a.x,a.y,0,0,0,E.height)<=y||xo(a.x,a.y,0,E.height,E.width,E.height)<=y||xo(a.x,a.y,E.width,E.height,E.width,0)<=y||xo(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Le.se=function(){return!0},Le.ca=function(a){var y=tt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return tt.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),ne=z/2,re=this.naturalBounds;E=this.Df()*E.scale;var oe=1/E;if(re.width*E<b&&re.height*E<b)return a=Fo(x.x-ne*oe,x.y-ne*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),tt.free(y),a}return b=!1,(this instanceof ho||this instanceof Mr?Fo(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),tt.free(y),b},Le.gh=function(a){var y=this.naturalBounds;return Fo(0,0,y.width,y.height,a.x,a.y)},Le.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=pn.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=tt.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),tt.free(b),pn.free(y),E},Le.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=tt.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),tt.free(b),E},Le.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=tt.allocAt(0,0),b=tt.allocAt(0,x.height),z=tt.allocAt(x.width,x.height),ne=tt.allocAt(x.width,0),re=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(ne)))re=!0;else{x=pn.allocAt(0,0,x.width,x.height);var oe=tt.allocAt(a.x,a.y);x.ca(y.Cd(oe))?re=!0:(oe.h(a.x,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.y),x.ca(y.Cd(oe))&&(re=!0)))),tt.free(oe),pn.free(x),!re&&(it.us(a,E,b)||it.us(a,b,z)||it.us(a,z,ne)||it.us(a,ne,E))&&(re=!0)}return tt.free(E),tt.free(b),tt.free(z),tt.free(ne),re},Le.ga=function(a,y){if(y===void 0&&(y=new tt),a instanceof Ei){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},Le.mi=function(a){a===void 0&&(a=new pn);var y=this.naturalBounds,x=this.oe,E=tt.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),ma(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),ma(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),ma(a,E.x,E.y,0,0),tt.free(E),a},Le.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},Le.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Le.qs=function(a,y){return y===void 0&&(y=new tt),y.assign(a),this.oe.Cd(y),y},Le.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Le.Sj=function(a,y,x,E,b){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,le=-z.m21*ne,ue=z.m11*ne,pe=ne*(z.m21*z.dy-z.m22*z.dx),xe=ne*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,it.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(ne=a*re+y*le+pe,a=a*oe+y*ue+xe,y=x*re+E*le+pe,x=x*oe+E*ue+xe,b.h(0,0),E=this.naturalBounds,x=it.Ff(0,0,E.width,E.height,ne,a,y,x,b),b.transform(z),x)},Rt.prototype.measure=function(a,y,x,E){if(fu(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var ne=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+ne:a,y=isFinite(b.width)?b.width+ne:y):(a=isFinite(b.width)?b.width+ne:a,y=isFinite(b.height)?b.height+ne:y),b=x||0,ne=E||0;var re=this instanceof Hn;switch(Bl(this,!0)){case On:ne=b=0,re&&(y=a=1/0);break;case zn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(ne=y);break;case Ti:isFinite(a)&&a>x&&(b=a),ne=0,re&&(y=1/0);break;case Hi:isFinite(y)&&y>E&&(ne=y),b=0,re&&(a=1/0)}re=this.maxSize;var oe=this.minSize;b>re.width&&oe.width<re.width&&(b=re.width),ne>re.height&&oe.height<re.height&&(ne=re.height),x=Math.max(b,oe.width),E=Math.max(ne,oe.height),re.width<x&&(x=Math.min(oe.width,x)),re.height<E&&(E=Math.min(oe.height,E)),a=Math.min(re.width,a),y=Math.min(re.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||St("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),ls(this,!1)}},Rt.prototype.Wl=function(){},Rt.prototype.Dd=function(){return!1},Rt.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=pn.alloc();z.assign(this.Ib),this.Ib.ka(),dl(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&zc(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof Qo&&(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()||St("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Yh(this,!1),pn.free(z)},Le=Rt.prototype,Le.eh=function(){};function ol(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=z.width+y,z=z.height+ne,E+=y,b+=ne,y=Bl(a,!0),x===E&&z===b&&(y=On),y){case On:(x>E||z>b)&&(ls(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case zn:ls(a,!0),a.measure(E,b,0,0);break;case Ti:ls(a,!0),a.measure(E,z,0,0);break;case Hi:ls(a,!0),a.measure(x,b,0,0)}}}Le.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||jv(x,!0),this.N(),wl(a,y)||(x.oh(),this.Pn(x)))},Le.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof ai&&W1(a,this))},Le.gc=function(a,y){if(!Lu(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof Hn&&zc(this),ne=this.Ib;if(z){var re=this.Ib,oe=this.dc,le=this.areaBackground,ue=this.Ma;le===null&&ue===null||a.yc(),le!==null&&(Da(this,a,le,!0,!0,oe,re),le instanceof Ao&&le.type===Nu?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(le)):a.fillRect(re.x,re.y,re.width,re.height)),ue!==null&&(Da(this,a,ue,!0,!1,oe,re),ue instanceof Ao&&ue.type===Nu?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ue)):a.fillRect(re.x,re.y,re.width,re.height)),this.hh(a,y)}if(!z&&(z||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){z=this.transform,re=this.panel,this.l&4096&&Ts(this),le=this.part,oe=!1;var pe=0;le&&y.Gf("drawShadows")&&(oe=le.isShadowed)&&(ue=le.shadowOffset,pe=Math.max(ue.y,ue.x)*y.scale*y.Mb),ue=this.Dd();var xe;if(!(xe=y.$i||!ue)){var Ee=this.naturalBounds;xe=this.wh;var Fe=xe.m11,Oe=xe.m21,st=xe.dx,Ye=xe.m12,pt=xe.m22,xt=xe.dy,Mt,Ot=Mt=0;xe=Mt*Fe+Ot*Oe+st;var en=Mt*Ye+Ot*pt+xt;Mt=Ee.width+pe,Ot=0;var ri=Mt*Fe+Ot*Oe+st;Mt=Mt*Ye+Ot*pt+xt,Ot=Math.min(xe,ri);var Si=Math.min(en,Mt),gi=Math.max(xe+0,ri)-Ot,$n=Math.max(en+0,Mt)-Si;xe=Ot,en=Si,Mt=Ee.width+pe,Ot=Ee.height+pe,ri=Mt*Fe+Ot*Oe+st,Mt=Mt*Ye+Ot*pt+xt,Ot=Math.min(xe,ri),Si=Math.min(en,Mt),gi=Math.max(xe+gi,ri)-Ot,$n=Math.max(en+$n,Mt)-Si,xe=Ot,en=Si,Mt=0,Ot=Ee.height+pe,ri=Mt*Fe+Ot*Oe+st,Mt=Mt*Ye+Ot*pt+xt,Ot=Math.min(xe,ri),Si=Math.min(en,Mt),gi=Math.max(xe+gi,ri)-Ot,$n=Math.max(en+$n,Mt)-Si,xe=Ot,en=Si,pe=y.viewportBounds,Ee=pe.x,Fe=pe.y,xe=!(xe>pe.width+Ee||Ee>gi+xe||en>pe.height+Fe||Fe>$n+en)}if(xe){if(xe=(this.l&256)!==0,a.clipInsteadOfFill&&(xe=!1),this instanceof Qo&&(a.font=this.font),xe){if(en=re.se()?re.naturalBounds:re.actualBounds,gi=Math.max(ne.x,en.x),$n=Math.max(ne.y,en.y),pe=Math.min(ne.right,en.right)-gi,Ee=Math.min(ne.bottom,en.bottom)-$n,Fe=this.tb,Fe!==null&&(gi=Fe.x,$n=Fe.y,pe=Fe.width,Ee=Fe.height),gi>ne.width+ne.x||ne.x>en.width+en.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(gi,$n,pe,Ee),a.clip()}if(ue){if(!le.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}oe&&(en=le.shadowOffset,a.Ev(en.x*y.scale*this.scale*y.Mb,en.y*y.scale*this.scale*y.Mb,le.shadowBlur),gc(a),a.shadowColor=le.shadowColor)}oe&&this.shadowVisible===!0?gc(a):oe&&this.shadowVisible===!1&&Xh(a),le=this.naturalBounds,this.areaBackground!==null&&(a.yc(),du(this,a,le,ne)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),oe&&Ls(this,re)&&this.shadowVisible===null&&Xh(a),this.Ma!==null&&(a.yc(),Zl(this,a,le,ne)),oe&&(this.Ma!==null||this.areaBackground!==null||Ls(this,re))?(ih(this,!0),this.shadowVisible===null&&Xh(a)):ih(this,!1),this.hh(a,y),oe&&this.l&512&&gc(a),ue&&oe&&Xh(a),xe&&(a.restore(),a.Vc(this instanceof Hn)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function Ls(a,y){return y===null?!1:(zc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Hn.Auto||y.type===Hn.Spot)&&y.Pb()!==a)}Le.Dv=function(){};function du(a,y,x,E){Da(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Ao&&a.areaBackground.type===Nu?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function Zl(a,y,x,E){var b=a.kq(),z=x.x,ne=x.y,re=x.width+b,oe=x.height+b;Da(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Ao&&a.Ma.type===Nu?(y.beginPath(),y.rect(z-b/2,ne-b/2,re,oe),y.ng(a.Ma)):y.fillRect(z-b/2,ne-b/2,re,oe)}function qs(a,y,x){for(var E=y.O.s,b=E.length,z=-1,ne=0;ne<b;ne++)if(E[ne]===a){z=ne;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===Hn.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 Lu(a,y,x){if(!(y instanceof Jl))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var E=a.panel,b=a.nk(y);if(a.kk(y,x,b))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):E&&qs(a,E,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),gc(y),y.shadowColor=a.shadowColor}a instanceof Qo&&(y.font=a.font),y.yd=null;var ne=a.transform;z=a instanceof Hn;var re=a instanceof Hn?zc(a):!1;a.l&4096&&Ts(a);var oe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&re?(lp(y,1,0,0,1,0,0),a.svg=y.ad):z?(lp(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):lp(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var le=ne.copy().Vj();y.rb.ha=[le.m11,le.m12,le.m21,le.m22,le.dx,le.dy],du(a,y,b,oe),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(z?(re&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),Zl(a,y,b,oe),re&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Zl(a,y,b,oe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,b=a.part,re=!1,b&&x.Gf("drawShadows")&&(re=b.isShadowed),y.clipInsteadOfFill&&(re=!1),a.Dd()&&re&&gc(y),re&&a.shadowVisible===!0?gc(y):re&&a.shadowVisible===!1&&Xh(y),b=a.panel,re&&Ls(a,b)&&a.shadowVisible===null&&Xh(y),y.Il&&(le=x.computePixelRatio(),le="drop-shadow("+y.shadowOffsetX/le+"px "+y.shadowOffsetY/le+"px "+y.shadowBlur/le/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",le),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",le)),re&&(a.Ma!==null||a.areaBackground!==null||Ls(a,b))?(ih(a,!0),a.shadowVisible===null&&Xh(y)):ih(a,!1),b=re,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,re=z?a.svg:y.yd,le=a.svg,!z&&le!==null&&re!==le&&le.parentNode===a.panel.svg?(a.svg.replaceWith(re),a.svg=re,re!==null&&a.$o(y,E,oe,re),Fl(y,le),!0):(a.svg=re,ne!==null&&re===null&&(fm(y),y.nh.pop()),re===null||(a.$o(y,E,oe,re),y.Il&&(x=x.computePixelRatio(),a.Dv(re,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&gc(y),a.Dd()&&Xh(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&re.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&re.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(re):y.Nj.prepend(re),y.ti=re):E!==null&&qs(a,E,re),ne!==null&&ne(a,re)),!0)}Le.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var ne=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,ne=z.width,x=z.height),z=E.getAttribute("clip-path");var re=null;z!==null&&(re=a.svg.getElementById(z.split("#")[1].slice(0,-1))),re===null?(z="CLIP"+Mo++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:ne,height:x}),this instanceof Hn&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),re.appendChild(y),a.svg.appendChild(re),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=re.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),Fl(a,E)};function Fl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function el(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=ji(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}Le.hh=function(){},Le.lv=function(){this.Uc=!0},Le.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var E=this.transform,b=this instanceof Hn?zc(this):!1;if(!(this instanceof Hn&&b))if(this instanceof kl){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&Yy(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Xy(a)):y.setAttributeNS(null,"transform",Xy(a))}else if(!x||this instanceof Hn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Mr){z=y.getElementsByTagName("path");for(var ne=0;ne<z.length;ne++)z[ne].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=E.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],du(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&gm(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(gm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof Hn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),Zl(this,a,this.naturalBounds,this.actualBounds),y.Ma?(gm(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&&gm(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Le.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 Da(a,y,x,E,b,z,ne){if(x!==null){var re=1,oe=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===jc)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var le=a.kq();if(re=z.width,oe=z.height,b?(re=ne.width,oe=ne.height):E||(re+=le,oe+=le),(z=y instanceof Qd)&&x.xe&&(x.type===cg||x.yk===re&&x.ft===oe))var ue=x.xe;else{var pe=0,xe=0,Ee=0,Fe=0,Oe=0,st=0;if(st=Oe=0,b?(Oe=ne.x,st=ne.y):E||(Oe-=le/2,st-=le/2),pe=x.start.x*re+x.start.offsetX,xe=x.start.y*oe+x.start.offsetY,Ee=x.end.x*re+x.end.offsetX,Fe=x.end.y*oe+x.end.offsetY,pe+=Oe,Ee+=Oe,xe+=st,Fe+=st,x.type===mc)ue=y.createLinearGradient(pe,xe,Ee,Fe);else if(x.type===Nu)st=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(Oe=0,st=Math.max(re,oe)/2):Oe=x.startRadius,ue=y.createRadialGradient(pe,xe,Oe,Ee,Fe,st);else if(x.type===cg)try{ue=y.createPattern(x.pattern,"repeat")}catch(pt){ue=null}if(x.type!==cg&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ue.addColorStop(b.key,b.value);if(z&&(x.xe=ue,ue!==null&&(x.yk=re,x.ft=oe),ue===null&&x.type===cg&&x.yk!==-1)){x.yk=-1;var Ye=a.diagram;Ye!==null&&x.yk===-1&&Pn(function(){Ye.redraw()},600)}}E?y.fillStyle=ue:y.strokeStyle=ue}}}Le.rg=function(a){if(a instanceof Hn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},Le.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Le.If=function(){for(var a=this instanceof Hn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ts(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Wu(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)}Wu(a,!1),Fu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Fu(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,Fu(a,!1)))}Le.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=tt.alloc();z.yi(y,x,E,b,Jr),a.rotate(this.Kb,z.x,z.y),tt.free(z)}},Le.v=function(a){if(!fu(this)){a===void 0&&(a=!1),ls(this,!0),Yh(this,!0);var y=this.panel;y===null||a||y.v()}},Le.Uj=function(){fu(this)||(ls(this,!0),Yh(this,!0))};function cl(a){if(!dl(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof ai&&a.Bd(),y.$b())),Yh(a,!0)}}Le.Uk=function(){!(this.l&2048)&&(Wu(this,!0),Fu(this,!0))},Le.Wu=function(){Fu(this,!0)},Le.N=function(){var a=this.part;a!==null&&a.N()};function Bl(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===Hn.Table?mh(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Hn.Auto&&E.Pb()===a?Fs(a,zn,y):x===vr?E!==null?E.type===Hn.Spot&&E.Pb()===a?Fs(a,zn,y):(x=E.defaultStretch,x===vr?Fs(a,On,y):Fs(a,x,y)):Fs(a,On,y):Fs(a,x,y)}function mh(a,y,x,E){var b=a.stretch;if(b!==vr)return Fs(a,b,E);var z=b=null;switch(y.stretch){case Hi:z=!0;break;case zn:z=!0}switch(x.stretch){case Ti:b=!0;break;case zn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Ti||y===zn),z===null&&(z=y===Hi||y===zn),b===!0&&z===!0?Fs(a,zn,E):b===!0?Fs(a,Ti,E):z===!0?Fs(a,Hi,E):Fs(a,On,E)}function Fs(a,y,x){if(x)return y;if(y===On||(x=a.desiredSize,x.w()))return On;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Ti)return On;if(y===zn)return Hi}else{if(y===Hi)return On;if(y===zn)return Ti}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Hi)return On;if(y===zn)return Ti}else{if(y===Ti)return On;if(y===zn)return Hi}return y}function ih(a,y){a.l=y?a.l|512:a.l&-513}function Zs(a){return(a.l&1024)!==0}function bf(a,y){a.l=y?a.l|1024:a.l&-1025}function Wu(a,y){a.l=y?a.l|2048:a.l&-2049}function Fu(a,y){a.l=y?a.l|4096:a.l&-4097}function fu(a){return(a.l&8192)!==0}function ls(a,y){a.l=y?a.l|8192:a.l&-8193}function dl(a){return(a.l&16384)!==0}function Yh(a,y){a.l=y?a.l|16384:a.l&-16385}Le.Gj=function(){this.svg=null},Le.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Le.Av=function(){},Le.zv=function(a){return this.pa=a,cl(this),!0},Le.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Le.kq=function(){return 0};function Xd(a){var y=a.part;if(y instanceof ai&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function Vy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Hn?a instanceof ai?a.Bd():a.qm(a,function(x){Xd(x)}):Xd(a))}Le.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ja(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&d1(a)&&St("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new Mn),this.localBindings.add(b),this},Le.set=function(a){return Object.assign(this,a),this},Le.Du=function(a){return nv(this,a),this},Le.apply=function(a){return a(this),this},Le.nm=function(a){return bu(this,a),this},Le.pz=function(){return this.ih()},Le.ih=function(){for(var a=this instanceof Hn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Le.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new xi),this.animationTriggers.add(a.propertyName,a),this};function Bu(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=og.I(a);typeof z=="function"?(x=hi(arguments),E=z(x),Gt(E)||St('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=rt.go[a]}if(E===null&&(b!=null&&b.constructor||St("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof qt&&1<x.length){z=E;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Id(z,ne),b++)}for(;b<x.length;b++)z=x[b],z===void 0?St("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):nv(E,z);return E}function nv(a,y){if(typeof y=="string")if(a instanceof Qo)a.text=y;else if(a instanceof Mr)a.figure=y;else if(a instanceof kl)a.source=y;else if(a instanceof Hn)y=rh.I(y),y!==null&&(a.type=y);else if(a instanceof Ao){var x=Rn(Ao,y);x!==null?a.type=x:St("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof vn?(y=Rn(vn,y),y!==null&&(a.type=y)):a instanceof Zi&&(y=Rn(Zi,y),y!==null&&(a.type=y));else if(y instanceof Rt)a instanceof Hn||St("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof us){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof us?Nm(E,y):St("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof fn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof gs)a.type=y;else if(y instanceof Ja)a instanceof Rt||a instanceof us?a.bind(y):St("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Xl)a instanceof Rt?a.Jv(y):St("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof co)a instanceof vn&&a.type===vn.o?a.figures.add(y):St("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Zi)a instanceof co?a.segments.add(y):St("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof da)a instanceof qt||a instanceof fr?a.layout=y:St("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++)nv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ao){x=new _i;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);bu(a,x)}else if(a instanceof us){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&St("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&St("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new _i;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);bu(a,b)}else bu(a,y);else St('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Rc(a,y){og.add(a,y)}function dm(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Ve.Object.defineProperties(Rt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Mf),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 Mf),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 Mf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Fr(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&&(Fr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:pl},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new fd),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===pl&&(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 fd),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 fd),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:lo},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new fd),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:vr},set:function(a){var y=this.stretch;y!==a&&(Fr(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&&(Fr(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)&&In(a,"0 <= value <= 1",Rt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(nf(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(nf(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(),Vy(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Ff(a,"GraphObject.areaBackground"),a instanceof Ao&&a.freeze(),Fr(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Ff(a,"GraphObject.background"),a instanceof Ao&&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 Oi)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new tt(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&St("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,Vy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Mr&&this.qc(),this.g("desiredSize",E,a),Zs(this)&&(a=this.part,a!==null&&(oa(this,a,"width"),oa(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 Xn(a,this.jd.height).freeze(),this.v(),this instanceof Mr&&this.qc(),this.g("desiredSize",y,a),Zs(this)&&(a=this.part,a!==null&&oa(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 Xn(this.jd.width,a).freeze(),this.v(),this instanceof Mr&&this.qc(),this.g("desiredSize",y,a),Zs(this)&&(a=this.part,a!==null&&oa(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:wr},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(),Fr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:na},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(),Fr(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 Di(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&&Ts(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ts(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Fr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:On},set:function(a){this.reshapingBehavior!==a&&(Fr(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()&&St("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),cl(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&&In(a,">= 0",Rt,"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&&In(a,">= 1",Rt,"columnSpan"),Fr(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&&In(a,">= 0",Rt,"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&&In(a,">= 1",Rt,"rowSpan"),Fr(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&&(Fr(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 ai||St("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Hv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,K1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Ma},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Xd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&In(a,">= 0",Rt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Xd(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),Xd(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&&In(a,">= 0",Rt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Ma},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Xd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&In(a,">= 0",Rt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Xd(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),Xd(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&&In(a,">= 0",Rt,"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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(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&&(Fr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Rt.prototype.trigger=Rt.prototype.Jv,Rt.prototype.findBindingPanel=Rt.prototype.ih,Rt.prototype.findTemplateBinder=Rt.prototype.pz,Rt.prototype.setProperties=Rt.prototype.nm,Rt.prototype.apply=Rt.prototype.apply,Rt.prototype.attach=Rt.prototype.Du,Rt.prototype.set=Rt.prototype.set,Rt.prototype.isEnabledObject=Rt.prototype.If,Rt.prototype.isVisibleObject=Rt.prototype.Ed,Rt.prototype.isContainedBy=Rt.prototype.rg,Rt.prototype.getNearestIntersectionPoint=Rt.prototype.rs,Rt.prototype.getLocalPoint=Rt.prototype.qs,Rt.prototype.getDocumentScale=Rt.prototype.Df,Rt.prototype.getDocumentAngle=Rt.prototype.li,Rt.prototype.getDocumentBounds=Rt.prototype.mi,Rt.prototype.getDocumentPoint=Rt.prototype.ga,Rt.prototype.intersectsRect=Rt.prototype.Yc,Rt.prototype.containedInRect=Rt.prototype.fh,Rt.prototype.containsRect=Rt.prototype.Re,Rt.prototype.containsPoint=Rt.prototype.ca,Rt.prototype.raiseChanged=Rt.prototype.g,Rt.prototype.raiseChangedEvent=Rt.prototype.cb,Rt.prototype.addCopyProperty=Rt.prototype.Vw;var og=null;Rt.className="GraphObject",og=new xi,Rc("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=Bu(Hn,Hn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Hn){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Bu(Mr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ei(0,0,2.76142374915397,2.761423749153969),spot2:new Ei(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof Hn&&(x=E.fb("ButtonBorder"),x instanceof Mr)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof Hn&&(x=E.fb("ButtonBorder"),x instanceof Mr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Hn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Mr){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=ne,ne=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=ne,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof Hn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Mr){var z=x.diagram,ne=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=ne}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof Hn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Mr){var z=x.diagram,ne=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=ne}}},y.actionMove=function(x,E){if(E.If()&&E instanceof Hn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Mr))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var ne=E._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=E._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),b.skipsUndoManager=z}}},y}),Rc("TreeExpanderButton",function(){var a=Bu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Bu(Mr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:No},new Ja("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Ja("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof ho&&(x=x.adornedPart),x instanceof ai){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),Rc("SubGraphExpanderButton",function(){var a=Bu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Bu(Mr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:No},new Ja("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 ho&&(x=x.adornedPart),x instanceof fr){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),Rc("ToolTip",function(){return Bu(ho,Hn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new tt(0,3),shadowBlur:5},Bu(Mr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Ei(0,0,4,6),spot2:new Ei(1,1,-4,-4)}))}),Rc("ContextMenu",function(){return Bu(ho,Hn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new tt(0,3),shadowBlur:5},new Ja("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Rc("ContextMenuButton",function(){var a=Bu("Button");a.stretch=Ti;var y=a.fb("ButtonBorder");return y instanceof Mr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Ei(0,0,2,3),y.spot2=new Ei(1,1,-2,-2)),a}),Rc("PanelExpanderButton",function(a){var y=dm(a,"COLLAPSIBLE"),x=Bu("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},Bu(Mr,{name:"ButtonIcon",strokeWidth:2},new Ja("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Mr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var ne=b.ih();ne===null&&(ne=b.part),ne!==null&&(b=ne.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),Rc("CheckBoxButton",function(a){var y=dm(a);return a=Bu("Button",{desiredSize:new Xn(14,14)},Bu(Mr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:zn,geometryStretch:wi,visible:!1},y!==""?new Ja("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Hn){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),Rc("CheckBox",function(a){a=dm(a),a=Bu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Di(0,1,0,0)});var y=Bu(Hn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Di(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}),Rt.None=On=new fn(Rt,"None",0),Rt.Default=vr=new fn(Rt,"Default",0),Rt.Vertical=Hi=new fn(Rt,"Vertical",4),Rt.Horizontal=Ti=new fn(Rt,"Horizontal",5),Rt.Fill=zn=new fn(Rt,"Fill",3),Rt.Uniform=wi=new fn(Rt,"Uniform",1),Rt.UniformToFill=Kr=new fn(Rt,"UniformToFill",2),Rt.FlipVertical=kr=new fn(Rt,"FlipVertical",1),Rt.FlipHorizontal=ro=new fn(Rt,"FlipHorizontal",2),Rt.FlipBoth=Ho=new fn(Rt,"FlipBoth",3),Rt.make=Bu,Rt.getBuilders=function(){var a=new xi,y;for(y in og)if(y!==y.toLowerCase()){var x=og.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Rt.defineBuilder=Rc,Rt.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=og.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof Rt))return y&&E.set(y),E;St('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Rt.takeBuilderArgument=dm;function Mf(){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=wr,this.o=na,this.hg=vr,this.ob=this.Bi=1,this.Pf=On,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Mf.prototype.copy=function(){var a=new Mf;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 fd(){this.u=-1/0,this.o=0,this.F=lo,this.rr=pl,this.j=this.V="None"}fd.prototype.copy=function(){var a=new fd;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},fd.className="LinkElementSettings";function sp(){this.yj=this.Xi=Po,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}sp.prototype.copy=function(){var a=new sp;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},sp.className="LinkSettings";function Jd(){this.ha=[1,0,0,1,0,0]}Jd.prototype.copy=function(){var a=new Jd;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},Jd.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},Jd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Jd.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,ne=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=ne,this.translate(-y,-x)}},Jd.className="STransform";function Lf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Lf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Lf.className="SGradient";function Oh(a,y,x){this.ownerDocument=a=y===void 0?rt.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 Jl(this,x)}Oh.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},Oh.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Gt(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},Oh.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Oh.prototype.focus=function(){this.Oa.focus()},Oh.prototype.mx=function(){this.ownerDocument=null},Ve.Object.defineProperties(Oh.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}}}),Oh.className="SVGSurface";function Jl(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 Jd,this.j=fm(this),this.Nj=fm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Mo++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Uy(a,y,x,E,b,z,ne){a.Nj===void 0?lp(a,y,x,E,b,z,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+ne+")")}Le=Jl.prototype,Le.arc=function(a,y,x,E,b,z,ne,re){var oe=2*Math.PI,le=oe-1e-6,ue=x*Math.cos(E),pe=x*Math.sin(E),xe=a+ue,Ee=y+pe,Fe=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(ne-xe)||1e-6<Math.abs(re-Ee))&&this.path.push(["L",xe,+Ee]),0>E&&(E=E%oe+oe),E>le?(this.path.push(["A",x,x,0,1,Fe,a-ue,y-pe]),this.path.push(["A",x,x,0,1,Fe,xe,Ee])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Fe,a+x*Math.cos(b),y+x*Math.sin(b)])},Le.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Le.Se=function(a){this.addPath(this.path,this.rb,a||0)},Le.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Le.clearRect=function(){},Le.clip=function(){this.Yl.clipPath=!0},Le.closePath=function(){this.path.push(["z"])},Le.createLinearGradient=function(a,y,x,E){var b=new Lf("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Le.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var E="PATTERN"+Mo++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Ud,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Le.createRadialGradient=function(a,y,x,E,b,z){var ne=new Lf("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=E,ne.y2=b,ne.r2=z,ne};function Yy(a,y,x,E,b,z,ne,re,oe){E=re/E,b=oe/b,z===0&&ne===0||a.rb.translate(z,ne),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Le.drawImage=function(a,y,x,E,b,z,ne,re,oe){var le="";a instanceof HTMLCanvasElement&&(le=a.toDataURL()),a instanceof HTMLImageElement&&(le=a.getAttribute("src"));var ue=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,ne=x,re=E=ue,oe=b=a),E=E||0,b=b||0,re=re||0,oe=oe||0,Yy(this,y,x,E,b,z||0,ne||0,re,oe),z={x:0,y:0,width:ue||E,height:a||b,href:le},it.$(E,re)&&it.$(b,oe)?le.toLowerCase().indexOf(".svg")===-1&&le.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ue||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),ag(this,Ud,z,this.rb),this.addElement(Ud,z)},Le.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},Le.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Le.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},ag(this,"fill",a,this.rb),this.addElement("rect",a)},Le.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},ag(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},Le.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},ag(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Le.lineTo=function(a,y){this.path.push(["L",a,y])},Le.moveTo=function(a,y){this.path.push(["M",a,y])},Le.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Le.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},Le.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},Le.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())},Le.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||lp(this,a,y,x,E,b,z)};function Xy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Le.scale=function(a,y){this.rb.scale(a,y)},Le.translate=function(a,y){this.rb.translate(a,y)},Le.transform=function(){},Le.yc=function(){},Le.stroke=function(){Qy(this,this.Yl)},Le.jk=function(){this.clipInsteadOfFill||this.stroke()},Le.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Le.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 ag(a,y,x,E){y==="fill"?iv(a,x):y==="stroke"&&Qy(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function iv(a,y){a.fillStyle instanceof Lf?y.fill=rv(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 Jy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Lf?y.setAttributeNS(null,"fill",rv(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function Qy(a,y){if(a.strokeStyle instanceof Lf)y.stroke=rv(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 rv(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+Mo++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],ne=0;ne<y;ne++){var re=b[ne],oe=re.color;re={offset:re.offset,"stop-color":oe},/^rgba\(/.test(oe)&&(oe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(oe),re["stop-color"]="rgb("+oe[1]+","+oe[2]+","+oe[3]+")",re["stop-opacity"]=oe[4]),z.push(re)}for(z.sort(function(le,ue){return le.offset>ue.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Le.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=hi(a[b]),ne=[z.shift()];if(ne[0]==="A")ne.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)ne.push(z.shift()+","+z.shift());E.push(ne.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,ag(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var re in a)re!=="transform"&&y.setAttributeNS(null,re,a[re]);else{re=y.getElementsByTagName("path");for(var oe in a)oe!=="transform"&&re[x].setAttributeNS(null,oe,a[oe])}else this.addElement("path",a)};function lp(a,y,x,E,b,z,ne){var re=new Jd;re.ha=[y,x,E,b,z,ne],y={},ag(a,"g",y,re),re=a.addElement("g",y),a.nh.push(re)}function fm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Le.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Xh(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function gc(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Le.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Le.fs=function(){this.Ct=!1},Le.Vc=function(){},Le.Wx=function(){},Jl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Jl.prototype.getImageData=function(){return null},Jl.prototype.measureText=function(){return null};function gm(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()))}Jl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Jl.className="SVGContext",qt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Oh(this,rt.document));var y=new Oh(this,rt.document,!0);a===void 0&&(a=new _i);var x=this;return xf(this,function(E,b){return E=lm(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},qt.prototype.makeSvg=qt.prototype.Cs,qt.prototype.av=function(a){return this.Cs(a)},qt.prototype.makeSVG=qt.prototype.av;function Gu(a,y,x,E){this.ownerDocument=y=y===void 0?rt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Qd(y,x,E),y.H=a}Gu.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},Gu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Gu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Gu.prototype.focus=function(){this.Oa.focus()},Gu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ve.Object.defineProperties(Gu.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}}}),Gu.className="CanvasSurface";function Qd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&St("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 _t,this.isTemporary=!!x}Le=Qd.prototype,Le.Wx=function(a){this.Z.imageSmoothingEnabled=a},Le.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Le.beginPath=function(){this.Z.beginPath()},Le.Se=function(){},Le.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Le.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Le.clip=function(){this.Z.clip()},Le.closePath=function(){this.Z.closePath()},Le.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Le.createPattern=function(a,y){return this.Z.createPattern(a,y)},Le.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Le.drawImage=function(a,y,x,E,b,z,ne,re,oe){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,ne,re,oe)},Le.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Le.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Le.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Le.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Le.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Le.lineTo=function(a,y){this.Z.lineTo(a,y)},Le.measureText=function(a){return this.Z.measureText(a)},Le.moveTo=function(a,y){this.Z.moveTo(a,y)},Le.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Le.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Le.restore=function(){this.Z.restore()},Le.save=function(){this.yc(),this.Z.save()},Qd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Le=Qd.prototype,Le.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Le.scale=function(a,y){this.El.scale(a,y)},Le.translate=function(a,y){this.El.translate(a,y)},Le.stroke=function(){this.Z.stroke()},Le.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var ne=this.El,re=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*E,x=ne.m12*x+ne.m22*E,ne.dx=ne.m11*b+ne.m21*z+ne.dx,ne.dy=ne.m12*b+ne.m22*z+ne.dy,ne.m11=re,ne.m12=a,ne.m21=y,ne.m22=x}},Le.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Le.ng=function(a,y){if(a instanceof Ao&&a.type===Nu){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)},Le.jk=function(){this.Hm||this.stroke()},Le.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Le.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Le.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(mx),a.lineDashOffset=0)},Le.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Le.Hs=function(){},Ve.Object.defineProperties(Qd.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 mx=Object.freeze([]);Qd.className="CanvasSurfaceContext";function up(){this.F=this.o=this.u=this.j=0}up.className="ColorNumbers";function Ao(a,y){hg||(hv(),hg=!0),Hr(this),this._isFrozen=!1,a===void 0?(this.na=jc,this.xk="black"):typeof a=="string"?(this.na=jc,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===mc?(this.Qd=bl,this.Lk=vs):this.Lk=a===Nu?this.Qd=Jr:this.Qd=Ma,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ao.prototype.copy=function(){var a=new Ao;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},Le=Ao.prototype,Le.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Le.ka=function(){return Object.isFrozen(this)&&St("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Le.qb=function(a){a.classType===Ao&&(this.type=a)},Le.toString=function(){var a="Brush(";if(this.type===jc)a+=this.color;else if(a=this.type===mc?a+"Linear ":this.type===Nu?a+"Radial ":this.type===cg?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+")"},Le.addColorStop=function(a,y){return this._isFrozen&&hn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&In(a,"0 <= loc <= 1",Ao,"addColorStop:loc"),this.we===null&&(this.we=new xi),this.we.add(a,y),this.na===jc&&(this.type=mc),this.xe=null,this},Le.Vz=function(a,y){if(this._isFrozen&&hn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dg:y,this.type===jc)pc(this.color),this.color=lg(a,y);else if((this.type===mc||this.type===Nu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)pc(x.value),this.addColorStop(x.key,lg(a,y));return this};function qy(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dg:x,pc(a),lg(y,x)}Le.Wy=function(a,y){if(this._isFrozen&&hn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?dg:y,this.type===jc)pc(this.color),this.color=lg(-a,y);else if((this.type===mc||this.type===Nu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)pc(x.value),this.addColorStop(x.key,lg(-a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?dg:x,pc(a),lg(-y,x)}function ov(a,y,x){pc(a),a=ea.j;var E=ea.u,b=ea.o,z=ea.F;return pc(y),x===void 0&&(x=.5),"rgba("+Math.round((ea.j-a)*x+a)+", "+Math.round((ea.u-E)*x+E)+", "+Math.round((ea.o-b)*x+b)+", "+Math.round((ea.F-z)*x+z)+")"}Le.Gx=function(){if(this.type===jc)return sg(this.color);if((this.type===mc||this.type===Nu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Nu)return sg(a.first().value);if(a.get(.5)!==null)return sg(a.get(.5));if(a.count===2)return a=a.Fa(),sg(ov(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var ne=y.key,re=Math.abs(.5-y.key);b>z&&re<b?(x=ne,b=re):z>=b&&re<z&&(E=ne,z=re)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,sg(ov(a.get(x),a.get(E),1-z/b))}return!1};function sg(a){return a?a instanceof Ao?a.Gx():(pc(a),128>(299*ea.j+587*ea.u+114*ea.o)/1e3):!1}function lg(a,y){switch(y){case dg:y=100*sv(ea.j);var x=100*sv(ea.u),E=100*sv(ea.o);return fl.j=.4124564*y+.3575761*x+.1804375*E,fl.u=.2126729*y+.7151522*x+.072175*E,fl.o=.0193339*y+.119192*x+.9503041*E,fl.F=ea.F,y=uv(fl.j/ug[0]),x=uv(fl.u/ug[1]),E=uv(fl.o/ug[2]),Jh.j=116*x-16,Jh.u=500*(y-x),Jh.o=200*(x-E),Jh.F=fl.F,Jh.j=Math.min(100,Math.max(0,Jh.j+100*a)),a=(Jh.j+16)/116,y=a-Jh.o/200,fl.j=ug[0]*t1(Jh.u/500+a),fl.u=ug[1]*(Jh.j>pm*cv?Math.pow(a,3):Jh.j/pm),fl.o=ug[2]*t1(y),fl.F=Jh.F,a=-.969266*fl.j+1.8760108*fl.u+.041556*fl.o,y=.0556434*fl.j+-.2040259*fl.u+1.0572252*fl.o,ea.j=255*lv((3.2404542*fl.j+-1.5371385*fl.u+-.4985314*fl.o)/100),ea.u=255*lv(a/100),ea.o=255*lv(y/100),ea.F=fl.F,ea.j=Math.round(ea.j),255<ea.j?ea.j=255:0>ea.j&&(ea.j=0),ea.u=Math.round(ea.u),255<ea.u?ea.u=255:0>ea.u&&(ea.u=0),ea.o=Math.round(ea.o),255<ea.o?ea.o=255:0>ea.o&&(ea.o=0),"rgba("+ea.j+", "+ea.u+", "+ea.o+", "+ea.F+")";case n1:return av(),gu.o=Math.min(100,Math.max(0,gu.o+100*a)),"hsla("+gu.j+", "+gu.u+"%, "+gu.o+"%, "+gu.F+")";default:St("Unknown color space: "+y)}}function pc(a){hg||(hv(),hg=!0);var y=dv;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,ea.j=a[0],ea.u=a[1],ea.o=a[2],ea.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,ea.j=0,ea.u=0,ea.o=0,ea.F=1)}}function av(){var a=ea.j/255,y=ea.u/255,x=ea.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var ne=a=0;else{switch(E){case a:ne=(y-x)/z%6;break;case y:ne=(x-a)/z+2;break;case x:ne=(a-y)/z+4}ne*=60,0>ne&&(ne+=360),a=z/(1-Math.abs(2*b-1))}gu.j=Math.round(ne),gu.u=Math.round(100*a),gu.o=Math.round(100*b),gu.F=ea.F}function sv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function lv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function uv(a){return a>cv?Math.pow(a,1/3):(pm*a+16)/116}function t1(a){var y=a*a*a;return y>cv?y:(116*a-16)/pm}function Ff(a,y){typeof a!="string"&&(a instanceof Ao||St("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){dv=La?new Gu(null,void 0,{willReadFrequently:!0}).context:null}Ve.Object.defineProperties(Ao.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&hn(this,a),this.na=a,this.start.Mc()&&(a===mc?this.start=bl:a===Nu&&(this.start=Jr)),this.end.Mc()&&(a===mc?this.end=vs:a===Nu&&(this.end=Jr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&hn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&hn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&hn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&hn(this,a),0>a&&In(a,">= zero",Ao,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&hn(this,a),0>a&&In(a,">= zero",Ao,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&hn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&hn(this,a),this.cr=a,this.xe=null}}}),Ao.prototype.isDark=Ao.prototype.Gx,Ao.prototype.darkenBy=Ao.prototype.Wy,Ao.prototype.lightenBy=Ao.prototype.Vz,Ao.prototype.addColorStop=Ao.prototype.addColorStop;var cv=216/24389,pm=24389/27,ug=[95.047,100,108.883],dv=null,ea=new up,gu=new up,fl=new up,Jh=new up,hg=!1;Ao.className="Brush";var jc;Ao.Solid=jc=new fn(Ao,"Solid",0);var mc;Ao.Linear=mc=new fn(Ao,"Linear",1);var Nu;Ao.Radial=Nu=new fn(Ao,"Radial",2);var cg;Ao.Pattern=cg=new fn(Ao,"Pattern",4);var dg;Ao.Lab=dg=new fn(Ao,"Lab",5);var n1;Ao.HSL=n1=new fn(Ao,"HSL",6),Ao.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},Ao.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;hg||(hv(),hg=!0);var y=dv;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},Ao.lighten=function(a){return qy(a)},Ao.lightenBy=qy,Ao.darken=function(a){return e1(a)},Ao.darkenBy=e1,Ao.mix=ov,Ao.isDark=sg;function gs(){this.xa="Base"}gs.prototype.measure=function(){},gs.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},gs.prototype.arrange=function(){},gs.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},gs.prototype.iA=function(a){a.Uj()},gs.prototype.gc=function(){},Ve.Object.defineProperties(gs.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Hn}}}),gs.prototype.remeasureObject=gs.prototype.iA,gs.prototype.arrangeElement=gs.prototype.Ly,gs.prototype.measureElement=gs.prototype.Yz,gs.className="PanelLayout";function mm(){this.xa="Base"}Dt(mm,gs),mm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;a=vc(a);for(var oe=0;oe<re;oe++){var le=E[oe];if(le.visible||le===a){var ue=le.margin,pe=ue.right+ue.left;ue=ue.top+ue.bottom,le.measure(y,x,z,ne);var xe=le.measuredBounds;pe=Math.max(xe.width+pe,0),ue=Math.max(xe.height+ue,0),xe=le.position.x;var Ee=le.position.y;isFinite(xe)||(xe=0),isFinite(Ee)||(Ee=0),le instanceof Mr&&le.isGeometryPositioned&&(le=le.strokeWidth/2,xe-=le,Ee-=le),ma(b,xe,Ee,pe,ue)}}},mm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],ne=z.measuredBounds,re=z.margin,oe=z.position.x,le=z.position.y;if(oe=isNaN(oe)?-a:oe-a,le=isNaN(le)?-x:le-x,z instanceof Mr&&z.isGeometryPositioned){var ue=z.strokeWidth/2;oe-=ue,le-=ue}z.visible&&z.arrange(oe+re.left,le+re.top,ne.width,ne.height)}};function vm(){this.xa="Base"}Dt(vm,gs),vm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;y=ni(),z=vc(a);for(var oe=0;oe<re;oe++){var le=E[oe];if(le.visible||le===z){var ue=Bl(le,!1);if(ue!==On&&ue!==Ti)y.push(le);else{le.measure(1/0,x,0,ne),ue=le.margin,le=le.measuredBounds;var pe=Math.max(le.height+ue.top+ue.bottom,0);b.width+=Math.max(le.width+ue.right+ue.left,0),b.height=Math.max(b.height,pe)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)oe=y[a],(oe.visible||oe===z)&&(ue=oe.margin,re=ue.right+ue.left,ue=ue.top+ue.bottom,oe.measure(1/0,x,0,ne),oe=oe.measuredBounds,ue=Math.max(oe.height+ue,0),b.width+=Math.max(oe.width+re,0),b.height=Math.max(b.height,ue));ci(y)},vm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,ne=a.isOpposite,re=ne?x.width:b.left,oe=0;oe<E;oe++){var le=z,ue=y[oe];if(ue.visible){var pe=ue.measuredBounds,xe=ue.margin,Ee=xe.top+xe.bottom,Fe=z+b.bottom,Oe=pe.height,st=Bl(ue,!1);(isNaN(ue.desiredSize.height)&&st===zn||st===Hi)&&(Oe=Math.max(x.height-Ee-Fe,0)),Ee=Oe+Ee+Fe,Fe=ue.alignment,Fe.Xb()&&(Fe=a.defaultAlignment),Fe.sb()||(Fe=Jr),ne&&(re-=pe.width+xe.left+xe.right),ue.arrange(re+Fe.offsetX+xe.left,le+Fe.offsetY+xe.top+(x.height*Fe.y-Ee*Fe.y),pe.width,Oe),ne||(re+=pe.width+xe.left+xe.right)}}};function ym(){this.xa="Base"}Dt(ym,gs),ym.prototype.measure=function(a,y,x,E,b,z){var ne=E.length;x=ni();for(var re=vc(a),oe=0;oe<ne;oe++){var le=E[oe];if(le.visible||le===re){var ue=Bl(le,!1);if(ue!==On&&ue!==Hi)x.push(le);else{var pe=le.margin;ue=pe.right+pe.left,pe=pe.top+pe.bottom,le.measure(y,1/0,z,0),le=le.measuredBounds,Ia(b,Math.max(b.width,Math.max(le.width+ue,0)),b.height+Math.max(le.height+pe,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)oe=x[a],(oe.visible||oe===re)&&(le=oe.margin,ne=le.right+le.left,le=le.top+le.bottom,oe.measure(y,1/0,z,0),oe=oe.measuredBounds,le=Math.max(oe.height+le,0),b.width=Math.max(b.width,Math.max(oe.width+ne,0)),b.height+=le);ci(x)}},ym.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,ne=a.isOpposite,re=ne?x.height:b.top,oe=0;oe<E;oe++){var le=z,ue=y[oe];if(ue.visible){var pe=ue.measuredBounds,xe=ue.margin,Ee=xe.left+xe.right,Fe=z+b.right,Oe=pe.width,st=Bl(ue,!1);(isNaN(ue.desiredSize.width)&&st===zn||st===Ti)&&(Oe=Math.max(x.width-Ee-Fe,0)),Ee=Oe+Ee+Fe,Fe=ue.alignment,Fe.Xb()&&(Fe=a.defaultAlignment),Fe.sb()||(Fe=Jr),ne&&(re-=pe.height+xe.bottom+xe.top),ue.arrange(le+Fe.offsetX+xe.left+(x.width*Fe.x-Ee*Fe.x),re+Fe.offsetY+xe.top,Oe,pe.height),ne||(re+=pe.height+xe.bottom+xe.top)}}};function Sm(){this.xa="Base"}Dt(Sm,gs),Sm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),le=oe.margin,ue=le.right+le.left,pe=le.top+le.bottom;oe.measure(y,x,z,ne);var xe=oe.measuredBounds;z=xe.width,ne=xe.height;var Ee=Math.max(z+ue,0),Fe=Math.max(ne+pe,0),Oe=a.isClipping,st=pn.allocAt(-le.left,-le.top,Ee,Fe),Ye=pn.allocAt(0,0,z,ne);fv(oe,Ye,!0),z=Ye.width,ne=Ye.height;for(var pt=!0,xt=vc(a),Mt=0;Mt<re;Mt++){var Ot=E[Mt];xe=y;var en=x;if(Ot!==oe&&(Ot.visible||Ot===xt)){le=Ot.margin;var ri=le.left,Si=le.top;switch(Ee=le.right+le.left,Fe=le.top+le.bottom,le=Bl(Ot,!1),le){case zn:xe=z,en=ne,Si=ri=Fe=Ee=0;break;case Ti:xe=z,ri=Ee=0;break;case Hi:en=ne,Si=Fe=0}Ot.measure(xe,en,0,0),xe=Ot.measuredBounds,Ee=Math.max(xe.width+Ee,0),Fe=Math.max(xe.height+Fe,0),le=Ot.alignment,le.Xb()&&(le=a.defaultAlignment),le.sb()||(le=Jr);var gi=Ot.alignmentFocus;if(gi.Xb()&&(gi=Jr),en=null,Ot instanceof Hn&&Ot.$e!==""&&(en=Ot.fb(Ot.$e),en===Ot&&(en=null)),ri=Ye.x-ri,Si=Ye.y-Si,en!==null){for(Ot.arrange(0,0,xe.width,xe.height),xe=en.actualBounds,xe=tt.allocAt(xe.x+(gi.x*xe.width-gi.offsetX),xe.y+(gi.y*xe.height-gi.offsetY)),en=en.panel;en!==Ot;)en.transform.Ga(xe),en=en.panel;ri+=le.x*z+le.offsetX-xe.x,Si+=le.y*ne+le.offsetY-xe.y,tt.free(xe)}else ri+=le.x*z+le.offsetX-(gi.x*xe.width+gi.offsetX),Si+=le.y*ne+le.offsetY-(gi.y*xe.height+gi.offsetY);pt?(pt=!1,b.h(ri,Si,Ee,Fe)):ma(b,ri,Si,Ee,Fe)}}switch(pt?b.assign(st):Oe?b.Uu(Ye.x,Ye.y,Ye.width,Ye.height):ma(b,st.x,st.y,st.width,st.height),pn.free(st),pn.free(Ye),le=oe.stretch,le===vr&&(le=Bl(oe,!1)),le){case On:return;case zn:if(!isFinite(y)&&!isFinite(x))return;break;case Ti:if(!isFinite(y))return;break;case Hi:if(!isFinite(x))return}for(xe=oe.measuredBounds,z=xe.width,ne=xe.height,Ee=Math.max(z+ue,0),Fe=Math.max(ne+pe,0),le=oe.margin,Ye=pn.allocAt(-le.left,-le.top,Ee,Fe),fv(oe,Ye,!0),z=Ye.width,ne=Ye.height,y=0;y<re;y++)x=E[y],x===oe||!x.visible&&x!==xt||(le=x.margin,Ee=le.right+le.left,Fe=le.top+le.bottom,xe=x.measuredBounds,Ee=Math.max(xe.width+Ee,0),Fe=Math.max(xe.height+Fe,0),ue=x.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=Jr),x=x.alignmentFocus,x.Xb()&&(x=Jr),pt?(pt=!1,b.h(ue.x*z+ue.offsetX-(x.x*xe.width+x.offsetX)-le.left,ue.y*ne+ue.offsetY-(x.y*xe.height+x.offsetY)-le.top,Ee,Fe)):ma(b,ue.x*z+ue.offsetX-(x.x*xe.width+x.offsetX)-le.left,ue.y*ne+ue.offsetY-(x.y*xe.height+x.offsetY)-le.top,Ee,Fe));pt?b.assign(st):Oe?b.Uu(Ye.x,Ye.y,Ye.width,Ye.height):ma(b,st.x,st.y,st.width,st.height),pn.free(Ye)},Sm.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,ne=z.width,re=z.height,oe=a.padding;z=oe.left,oe=oe.top;var le=z-x.x,ue=oe-x.y;for(b.arrange(le,ue,ne,re),ne=pn.allocAt(0,0,ne,re),fv(b,ne,!1),re=0;re<E;re++){var pe=y[re];if(pe!==b){le=pe.measuredBounds;var xe=le.width,Ee=le.height;ue=pe.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=Jr);var Fe=pe.alignmentFocus;if(Fe.Xb()&&(Fe=Jr),le=null,pe instanceof Hn&&pe.$e!==""&&(le=pe.fb(pe.$e),le===pe&&(le=null)),le!==null){var Oe=le.actualBounds;for(Fe=tt.allocAt(Oe.x+(Fe.x*Oe.width-Fe.offsetX),Oe.y+(Fe.y*Oe.height-Fe.offsetY)),le=le.panel;le!==pe;)le.transform.Ga(Fe),le=le.panel;le=ue.x*ne.width+ue.offsetX-Fe.x,ue=ue.y*ne.height+ue.offsetY-Fe.y,tt.free(Fe)}else le=ue.x*ne.width+ue.offsetX-(Fe.x*xe+Fe.offsetX),ue=ue.y*ne.height+ue.offsetY-(Fe.y*Ee+Fe.offsetY);le+=ne.x-x.x,ue+=ne.y-x.y,pe.visible&&pe.arrange(z+le,oe+ue,xe,Ee)}}pn.free(ne)};function fv(a,y,x){var E=null;if(a instanceof Hn&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function xm(){this.xa="Base"}Dt(xm,gs),xm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),le=oe.margin,ue=y,pe=x,xe=le.right+le.left,Ee=le.top+le.bottom;oe.measure(y,x,z,ne),le=oe.measuredBounds;var Fe=0,Oe=null;oe instanceof Mr&&(Oe=oe,Fe=Oe.strokeWidth*Oe.scale);var st=Math.max(le.width+xe,0);le=Math.max(le.height+Ee,0);var Ye=vv(oe),pt=Ye.x*st+Ye.offsetX;Ye=Ye.y*le+Ye.offsetY;var xt=yv(oe),Mt=xt.x*st+xt.offsetX;for(xt=xt.y*le+xt.offsetY,isFinite(y)&&(ue=Math.max(Math.abs(pt-Mt)-Fe,0)),isFinite(x)&&(pe=Math.max(Math.abs(Ye-xt)-Fe,0)),Fe=Xn.alloc(),Fe.h(0,0),a=vc(a),xt=0;xt<re;xt++)Ye=E[xt],Ye===oe||!Ye.visible&&Ye!==a||(le=Ye.margin,st=le.right+le.left,pt=le.top+le.bottom,Ye.measure(ue,pe,0,0),le=Ye.measuredBounds,st=Math.max(le.width+st,0),le=Math.max(le.height+pt,0),Fe.h(Math.max(st,Fe.width),Math.max(le,Fe.height)));if(re===1)b.width=st,b.height=le,Xn.free(Fe);else{switch(Ye=vv(oe),xt=yv(oe),re=E=0,xt.x!==Ye.x&&xt.y!==Ye.y&&(E=Fe.width/Math.abs(xt.x-Ye.x),re=Fe.height/Math.abs(xt.y-Ye.y)),Xn.free(Fe),Fe=0,Oe!==null&&(Fe=Oe.strokeWidth*Oe.scale,Ev(Oe)===wi&&(E=re=Math.max(E,re))),E+=Math.abs(Ye.offsetX)+Math.abs(xt.offsetX)+Fe,re+=Math.abs(Ye.offsetY)+Math.abs(xt.offsetY)+Fe,Oe=oe.stretch,Oe===vr&&(Oe=Bl(oe,!1)),Oe){case On:ne=z=0;break;case zn:isFinite(y)&&(E=y),isFinite(x)&&(re=x);break;case Ti:isFinite(y)&&(E=y),ne=0;break;case Hi:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(E,re,z,ne),b.width=oe.measuredBounds.width+xe,b.height=oe.measuredBounds.height+Ee}},xm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=pn.alloc();z.h(0,0,1,1);var ne=E.margin,re=ne.left;ne=ne.top;var oe=a.padding,le=oe.left;oe=oe.top,E.arrange(le+re,oe+ne,b.width,b.height);var ue=vv(E),pe=yv(E),xe=ue.y*b.height+ue.offsetY,Ee=pe.x*b.width+pe.offsetX;for(pe=pe.y*b.height+pe.offsetY,z.x=ue.x*b.width+ue.offsetX,z.y=xe,ma(z,Ee,pe,0,0),z.x+=re+le,z.y+=ne+oe,b=0;b<x;b++)re=y[b],re!==E&&(le=re.measuredBounds,ne=re.margin,oe=Math.max(le.width+ne.right+ne.left,0),ue=Math.max(le.height+ne.top+ne.bottom,0),xe=re.alignment,xe.Xb()&&(xe=a.defaultAlignment),xe.sb()||(xe=Jr),oe=z.width*xe.x+xe.offsetX-oe*xe.x+ne.left+z.x,ne=z.height*xe.y+xe.offsetY-ue*xe.y+ne.top+z.y,re.visible&&(Fo(z.x,z.y,z.width,z.height,oe,ne,le.width,le.height)?re.arrange(oe,ne,le.width,le.height):re.arrange(oe,ne,le.width,le.height,new pn(z.x,z.y,z.width,z.height))));pn.free(z)};function Pm(){this.xa="Base",this.name="Table"}Dt(Pm,gs),Pm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,ne=ni(),re=ni(),oe=0;oe<z;oe++){var le=E[oe],ue=le instanceof Hn?le:null;if(ue!==null&&zc(ue)&&le.visible){re.push(ue);for(var pe=ue.O.s,xe=pe.length,Ee=0;Ee<xe;Ee++){var Fe=pe[Ee];ue.type===Hn.TableRow?Fe.row=le.row:ue.type===Hn.TableColumn&&(Fe.column=le.column),ne.push(Fe)}}else ne.push(le)}z=ne.length,z===0&&(a.Fb(0),a.Eb(0));for(var Oe=[],st=0;st<z;st++){var Ye=ne[st];Ye.visible&&(ls(Ye,!0),Yh(Ye,!0),Oe[Ye.row]||(Oe[Ye.row]=[]),Oe[Ye.row][Ye.column]||(Oe[Ye.row][Ye.column]=[]),Oe[Ye.row][Ye.column].push(Ye))}ci(ne);var pt=ni(),xt=ni(),Mt=ni(),Ot={count:0},en={count:0},ri=y,Si=x,gi=a.rowDefs,$n=a.colDefs,An=null;z=gi.length;for(var hr=0;hr<z;hr++)An=gi[hr],An!==void 0&&(An.actual=0);z=$n.length;for(var Ji=0;Ji<z;Ji++)An=$n[Ji],An!==void 0&&(An.actual=0);for(var mo=Oe.length,Yo=0,xs=0;xs<mo;xs++)Oe[xs]&&(Yo=Math.max(Yo,Oe[xs].length));var Es=Math.min(a.topIndex,mo-1),al=Math.min(a.leftIndex,Yo-1),Ps=0;mo=Oe.length;for(var Yc=vc(a),Qa=0;Qa<mo;Qa++)if(Oe[Qa]){Yo=Oe[Qa].length;var Ph=a.Fb(Qa);Ph.actual=0;for(var sl=Ph.oc=0;sl<Yo;sl++)if(Oe[Qa][sl]){var Xc=a.Eb(sl);pt[sl]===void 0&&(Xc.actual=0,Xc.oc=0,pt[sl]=!0);for(var vu=Oe[Qa][sl],Uu=vu.length,eu=0;eu<Uu;eu++){var Wl=vu[eu];if(Wl.visible||Wl===Yc){var Ld=1<Wl.rowSpan||1<Wl.columnSpan;Ld&&(Qa<Es||sl<al||xt.push(Wl));var wh=Wl.margin,Og=wh.right+wh.left,tu=wh.top+wh.bottom,ll=mh(Wl,Ph,Xc,!1),Xp=Wl.desiredSize,_f=!isNaN(Xp.height),jh=!isNaN(Xp.width)&&_f;if(Ld||ll===On||jh||Qa<Es||sl<al||(Ot[sl]!==void 0||ll!==zn&&ll!==Ti||(Ot[sl]=-1,Ot.count++),en[Qa]!==void 0||ll!==zn&&ll!==Hi||(en[Qa]=-1,en.count++),Mt.push(Wl)),Wl.measure(1/0,1/0,0,0),!(Qa<Es||sl<al)){var Gl=Wl.measuredBounds,lf=Math.max(Gl.width+Og,0),nu=Math.max(Gl.height+tu,0);if(Wl.rowSpan===1&&(ll===On||ll===Ti)){An=a.Fb(Qa);var Fd=An.Wc();Ps=Math.max(nu-An.actual,0),Ps+Fd>Si&&(Ps=Math.max(Si-Fd,0));var G0=An.oa===0;An.oc=An.oc+Ps,An.actual=An.oa+Ps,Si=Math.max(Si-(Ps+(G0?Fd:0)),0)}if(Wl.columnSpan===1&&(ll===On||ll===Hi)){An=a.Eb(sl);var Jp=An.Wc();Ps=Math.max(lf-An.actual,0),Ps+Jp>ri&&(Ps=Math.max(ri-Jp,0));var _y=An.oa===0;An.oc=An.oc+Ps,An.actual=An.oa+Ps,ri=Math.max(ri-(Ps+(_y?Jp:0)),0)}Ld&&Wl.Uj()}}}}}ci(pt);var ac=0,xc=0;z=a.columnCount;for(var Zf=0;Zf<z;Zf++){var Bd=$n[Zf];Bd!==void 0&&(ac+=isNaN(Bd.Hc)?Bd.oc:Bd.Hc,Bd.oc!==0&&(ac+=Bd.Wc()))}z=a.rowCount;for(var Ig=0;Ig<z;Ig++){var Nd=gi[Ig];Nd!==void 0&&(xc+=isNaN(Nd.Hc)?Nd.oc:Nd.Hc,Nd.oc!==0&&(xc+=Nd.Wc()))}ri=Math.max(y-ac,0);var sc=Si=Math.max(x-xc,0),Jc=ri;z=Mt.length;for(var $l=0;$l<z;$l++){var zh=Mt[$l],$0=a.Fb(zh.row),Pc=a.Eb(zh.column),Rg=zh.measuredBounds,Ch=zh.margin,uf=Ch.right+Ch.left,_h=Ch.top+Ch.bottom;Ot[zh.column]=Pc.oc===0&&Ot[zh.column]!==void 0?Math.max(Rg.width+uf,Ot[zh.column]):null,en[zh.row]=$0.oc===0&&en[zh.row]!==void 0?Math.max(Rg.height+_h,en[zh.row]):null}var Hf=0,jg=0,hh;for(hh in en)hh!=="count"&&(Hf+=en[hh]);for(hh in Ot)hh!=="count"&&(jg+=Ot[hh]);for(var Os=Xn.alloc(),Qp=0;Qp<z;Qp++){var xl=Mt[Qp];if(xl.visible||xl===Yc){var qa=a.Fb(xl.row),Pl=a.Eb(xl.column),wc=0;isFinite(Pl.width)?wc=Pl.width:(isFinite(ri)&&Ot[xl.column]!==null?jg===0?wc=Pl.actual+ri:wc=Ot[xl.column]/jg*Jc:Ot[xl.column]!==null?wc=ri:wc=Pl.actual||ri,wc=Math.max(0,wc-Pl.Wc()));var Qc=0;switch(isFinite(qa.height)?Qc=qa.height:(isFinite(Si)&&en[xl.row]!==null?Hf===0?Qc=qa.actual+Si:Qc=en[xl.row]/Hf*sc:en[xl.row]!==null?Qc=Si:Qc=qa.actual||Si,Qc=Math.max(0,Qc-qa.Wc())),Os.h(Math.max(Pl.minimum,Math.min(wc,Pl.maximum)),Math.max(qa.minimum,Math.min(Qc,qa.maximum))),ll=mh(xl,qa,Pl,!1),ll){case Ti:Os.height=Math.max(Os.height,qa.actual+Si);break;case Hi:Os.width=Math.max(Os.width,Pl.actual+ri)}var hf=xl.margin,Zy=hf.right+hf.left,K0=hf.top+hf.bottom;xl.Uj(),xl.measure(Os.width,Os.height,Pl.minimum,qa.minimum);var zg=xl.measuredBounds,cf=Math.max(zg.width+Zy,0),Wf=Math.max(zg.height+K0,0);isFinite(ri)&&(cf=Math.min(cf,Os.width)),isFinite(Si)&&(Wf=Math.min(Wf,Os.height));var Kl=0;Kl=qa.actual,qa.actual=Math.max(qa.actual,Wf),qa.oc=Math.max(qa.oc,Wf),Ps=qa.actual-Kl,Si=Math.max(Si-Ps,0),en[xl.row]===null&&(sc=Math.max(sc-Ps,0)),Kl=Pl.actual,Pl.actual=Math.max(Pl.actual,cf),Pl.oc=Math.max(Pl.oc,cf),Ps=Pl.actual-Kl,ri=Math.max(ri-Ps,0),Ot[xl.column]===null&&(Jc=Math.max(Jc-Ps,0))}}ci(Mt);var Cc=Xn.alloc(),Eh=ni(),Ou=ni();if(z=xt.length,z!==0){for(var kd=0;kd<mo;kd++)if(Oe[kd]){Yo=Oe[kd].length;var _g=a.Fb(kd);Eh[kd]=_g.actual;for(var Ad=0;Ad<Yo;Ad++)if(Oe[kd][Ad]){var V0=a.Eb(Ad);Ou[Ad]=V0.actual}}}for(var Zg=0;Zg<z;Zg++){var ja=xt[Zg];if(ja.visible||ja===Yc){var ch=a.Fb(ja.row),Yu=a.Eb(ja.column);switch(Os.h(Math.max(Yu.minimum,Math.min(y,Yu.maximum)),Math.max(ch.minimum,Math.min(x,ch.maximum))),ll=mh(ja,ch,Yu,!1),ll){case zn:Ou[Yu.index]!==0&&(Os.width=Math.min(Os.width,Ou[Yu.index])),Eh[ch.index]!==0&&(Os.height=Math.min(Os.height,Eh[ch.index]));break;case Ti:Ou[Yu.index]!==0&&(Os.width=Math.min(Os.width,Ou[Yu.index]));break;case Hi:Eh[ch.index]!==0&&(Os.height=Math.min(Os.height,Eh[ch.index]))}isFinite(Yu.width)&&(Os.width=Yu.width),isFinite(ch.height)&&(Os.height=ch.height),Cc.h(0,0);for(var U0=Yu.minimum,iu=ch.minimum,qc=1;qc<ja.rowSpan&&!(ja.row+qc>=a.rowCount);qc++)An=a.Fb(ja.row+qc),Ps=0,Ps=ll===zn||ll===Hi?Math.max(An.minimum,Eh[ja.row+qc]===0?An.maximum:Math.min(Eh[ja.row+qc],An.maximum)):Math.max(An.minimum,isNaN(An.Hc)?An.maximum:Math.min(An.Hc,An.maximum)),Cc.height+=Ps,iu+=An.minimum;for(var Xu=1;Xu<ja.columnSpan&&!(ja.column+Xu>=a.columnCount);Xu++)An=a.Eb(ja.column+Xu),Ps=0,Ps=ll===zn||ll===Ti?Math.max(An.minimum,Ou[ja.column+Xu]===0?An.maximum:Math.min(Ou[ja.column+Xu],An.maximum)):Math.max(An.minimum,isNaN(An.Hc)?An.maximum:Math.min(An.Hc,An.maximum)),Cc.width+=Ps,U0+=An.minimum;Os.width+=Cc.width,Os.height+=Cc.height;var Hg=ja.margin,Td=Hg.right+Hg.left,qp=Hg.top+Hg.bottom;ja.measure(Os.width,Os.height,U0,iu);for(var Wg=ja.measuredBounds,Zh=Math.max(Wg.width+Td,0),df=Math.max(Wg.height+qp,0),Dd=0,Gg=0;Gg<ja.rowSpan&&!(ja.row+Gg>=a.rowCount);Gg++)An=a.Fb(ja.row+Gg),Dd+=An.total||0;if(Dd<df){var ed=df-Dd,lc=df-Dd;if(ja.spanAllocation!==null)for(var td=ja.spanAllocation,Ec=0;Ec<ja.rowSpan&&!(0>=ed)&&!(ja.row+Ec>=a.rowCount);Ec++){An=a.Fb(ja.row+Ec);var nd=An.oa||0,ff=td(ja,An,lc);An.actual=Math.min(An.maximum,nd+ff),An.oa!==nd&&(ed-=An.oa-nd)}for(;0<ed;){var bh=An.oa||0;if(isNaN(An.height)&&An.maximum>bh&&(An.actual=Math.min(An.maximum,bh+ed),An.oa!==bh&&(ed-=An.oa-bh)),An.index===0)break;An=a.Fb(An.index-1)}}for(var Gf=0,id=0;id<ja.columnSpan&&!(ja.column+id>=a.columnCount);id++)An=a.Eb(ja.column+id),Gf+=An.total||0;if(Gf<Zh){var $f=Zh-Gf,Hy=Zh-Gf;if(ja.spanAllocation!==null)for(var bc=ja.spanAllocation,gf=0;gf<ja.columnSpan&&!(0>=$f)&&!(ja.column+gf>=a.columnCount);gf++){An=a.Eb(ja.column+gf);var em=An.oa||0,Wy=bc(ja,An,Hy);An.actual=Math.min(An.maximum,em+Wy),An.oa!==em&&($f-=An.oa-em)}for(;0<$f;){var Y0=An.oa||0;if(isNaN(An.width)&&An.maximum>Y0&&(An.actual=Math.min(An.maximum,Y0+$f),An.oa!==Y0&&($f-=An.oa-Y0)),An.index===0)break;An=a.Eb(An.index-1)}}}}ci(xt),Xn.free(Cc),Xn.free(Os),Eh!==void 0&&ci(Eh),Ou!==void 0&&ci(Ou);var Kf=0,Vf=0,X0=a.desiredSize,gx=a.maxSize;ll=Bl(a,!0);var tm=xc=ac=0,nm=0;z=a.columnCount;for(var J0=0;J0<z;J0++)$n[J0]!==void 0&&(An=a.Eb(J0),isFinite(An.width)?(tm+=An.width,tm+=An.Wc()):km(An)===fp?(tm+=An.oa,tm+=An.Wc()):An.oa!==0&&(ac+=An.oa,ac+=An.Wc()));isFinite(X0.width)?Kf=Math.min(X0.width,gx.width):Kf=ll!==On&&isFinite(y)?y:ac,Kf=Math.max(Kf,a.minSize.width),Kf=Math.max(Kf-tm,0);for(var Jx=ac===0?1:Math.max(Kf/ac,1),Q0=0;Q0<z;Q0++)$n[Q0]!==void 0&&(An=a.Eb(Q0),isFinite(An.width)||km(An)===fp||(An.actual=An.oa*Jx),An.position=b.width,An.oa!==0&&(b.width+=An.oa,b.width+=An.Wc()));z=a.rowCount;for(var q0=0;q0<z;q0++)gi[q0]!==void 0&&(An=a.Fb(q0),isFinite(An.height)?(nm+=An.height,nm+=An.Wc()):km(An)===fp?(nm+=An.oa,nm+=An.Wc()):An.oa!==0&&(xc+=An.oa,xc+=An.Wc()));isFinite(X0.height)?Vf=Math.min(X0.height,gx.height):Vf=ll!==On&&isFinite(x)?x:xc,Vf=Math.max(Vf,a.minSize.height),Vf=Math.max(Vf-nm,0);for(var Qx=xc===0?1:Math.max(Vf/xc,1),ev=0;ev<z;ev++)gi[ev]!==void 0&&(An=a.Fb(ev),isFinite(An.height)||km(An)===fp||(An.actual=An.oa*Qx),An.position=b.height,An.oa!==0&&(b.height+=An.oa,b.height+=An.Wc()));z=re.length;for(var Gy=0;Gy<z;Gy++){var im=re[Gy],$y=0,Ky=0;im.type===Hn.TableRow?($y=b.width,An=a.Fb(im.row),Ky=An.actual):(An=a.Eb(im.column),$y=An.actual,Ky=b.height),im.measuredBounds.h(0,0,$y,Ky),ls(im,!1)}ci(re),a.inRowsCols=Oe},Pm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var ne=a.inRowsCols;if(ne!==null){for(var re,oe,le=ne.length,ue=0,pe=0;pe<le;pe++)ne[pe]&&(ue=Math.max(ue,ne[pe].length));oe=a.rowDefs,re=a.colDefs;var xe=pe=0,Ee=Math.min(a.topIndex,le-1);if(0<oe.length){for(;Ee!==le&&(oe[Ee]===void 0||oe[Ee].oa===0);)Ee++;Ee=Math.max(Math.min(Ee,le-1),0),pe=-oe[Ee].position}var Fe=Math.min(a.leftIndex,ue-1);if(0<re.length){for(;Fe!==ue&&(re[Fe]===void 0||re[Fe].oa===0);)Fe++;Fe=Math.max(Math.min(Fe,ue-1),0),xe=-re[Fe].position}for(var Oe=0,st=0;Oe!==le&&oe[Oe]===void 0;)Oe++;for(;st!==le&&re[st]===void 0;)st++;ue=a.part,a.Fb(Oe),a.Eb(st);for(var Ye=0;Ye<y.length;Ye++){var pt=y[Ye];if(pt instanceof Hn&&pt.visible&&zc(pt)){if(pt.type===Hn.TableRow){re=a.Fb(pt.row);var xt=a.Eb(st)}else re=a.Fb(Oe),xt=a.Eb(pt.column);oe=re.position+pe+b,re.oa!==0&&(oe+=re.Io(Math.max(Oe,Ee))),re=xt.position+xe+z,xt.oa!==0&&(re+=xt.Io(Math.max(st,Fe))),xt=pt.measuredBounds,pt.Uk(),pt.actualBounds.ka();var Mt=pt.actualBounds,Ot=pn.allocAt(Mt.x,Mt.y,Mt.width,Mt.height);Mt.x=pt.type===Hn.TableRow?z:re,Mt.y=pt.type===Hn.TableColumn?b:oe,Mt.width=xt.width,Mt.height=xt.height,pt.actualBounds.freeze(),Yh(pt,!1),wl(Ot,Mt)||ue===null||(ue.oh(),pt.Pn(ue)),pn.free(Ot)}}for(Ye=Xn.alloc(),pt=0;pt<le;pt++)if(ne[pt]){for(ue=ne[pt].length,xt=a.Fb(pt),oe=xt.position+pe+b,xt.oa!==0&&(oe+=xt.Io(Math.max(Oe,Ee))),Mt=0;Mt<ue;Mt++)if(ne[pt][Mt]){Ot=a.Eb(Mt),re=Ot.position+xe+z,Ot.oa!==0&&(re+=Ot.Io(Math.max(st,Fe)));for(var en=ne[pt][Mt],ri=en.length,Si=0;Si<ri;Si++){var gi=en[Si],$n=gi.measuredBounds;Ye.h(0,0);for(var An=1;An<gi.rowSpan&&!(pt+An>=a.rowCount);An++){var hr=a.Fb(pt+An);hr.oa!==0&&(Ye.height+=hr.total)}for(An=1;An<gi.columnSpan&&!(Mt+An>=a.columnCount);An++)hr=a.Eb(Mt+An),hr.oa!==0&&(Ye.width+=hr.total);var Ji=Ot.oa+Ye.width,mo=xt.oa+Ye.height;An=re,hr=oe;var Yo=Ji,xs=mo,Es=re,al=oe,Ps=Ji,Yc=mo;re+Ji>x.width&&(Ps=Math.max(x.width-re,0)),oe+mo>x.height&&(Yc=Math.max(x.height-oe,0));var Qa=gi.alignment;if(Qa.Xb()){Qa=a.defaultAlignment,Qa.sb()||(Qa=Jr);var Ph=Qa.x,sl=Qa.y,Xc=Qa.offsetX;Qa=Qa.offsetY;var vu=Ot.alignment,Uu=xt.alignment;vu.sb()&&(Ph=vu.x,Xc=vu.offsetX),Uu.sb()&&(sl=Uu.y,Qa=Uu.offsetY)}else Ph=Qa.x,sl=Qa.y,Xc=Qa.offsetX,Qa=Qa.offsetY;(isNaN(Ph)||isNaN(sl))&&(sl=Ph=.5,Qa=Xc=0),vu=$n.width,Uu=$n.height;var eu=gi.margin,Wl=eu.left+eu.right,Ld=eu.top+eu.bottom,wh=mh(gi,xt,Ot,!1);!isNaN(gi.desiredSize.width)||wh!==zn&&wh!==Ti||(vu=Math.max(Ji-Wl,0)),!isNaN(gi.desiredSize.height)||wh!==zn&&wh!==Hi||(Uu=Math.max(mo-Ld,0)),Ji=gi.maxSize,mo=gi.minSize,vu=Math.min(Ji.width,vu),Uu=Math.min(Ji.height,Uu),vu=Math.max(mo.width,vu),Uu=Math.max(mo.height,Uu),Ji=Uu+Ld,An+=Yo*Ph-(vu+Wl)*Ph+Xc+eu.left,hr+=xs*sl-Ji*sl+Qa+eu.top,gi.visible&&(Fo(Es,al,Ps,Yc,An,hr,$n.width,$n.height)?gi.arrange(An,hr,vu,Uu):gi.arrange(An,hr,vu,Uu,new pn(Es,al,Ps,Yc)))}}}for(Xn.free(Ye),a=0;a<E;a++)x=y[a],z=x instanceof Hn?x:null,z!==null&&zc(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function wm(){this.xa="Base"}Dt(wm,gs),wm.prototype.measure=function(){},wm.prototype.arrange=function(){};function Cm(){this.xa="Base"}Dt(Cm,gs),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Em(){this.xa="Base"}Dt(Em,gs),Em.prototype.measure=function(a,y,x,E,b,z,ne){1<E.length&&St("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,ne);var re=E.measuredBounds,oe=E.margin,le=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var ue=E.scale,pe=re.width;re=re.height;var xe=Math.max(y-le,0),Ee=Math.max(x-oe,0),Fe=1;a.viewboxStretch===wi?pe!==0&&re!==0&&(Fe=Math.min(xe/pe,Ee/re)):pe!==0&&re!==0&&(Fe=Math.max(xe/pe,Ee/re)),Fe===0&&(Fe=1e-4),E.Ca*=Fe,ue!==E.scale&&(ls(E,!0),E.measure(1/0,1/0,z,ne))}re=E.measuredBounds,b.width=isFinite(y)?y:Math.max(re.width+le,0),b.height=isFinite(x)?x:Math.max(re.height+oe,0)},Em.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=Jr),y.arrange(x.width*ne.x-z*ne.x+ne.offsetX,x.height*ne.y-b*ne.y+ne.offsetY,E.width,E.height)};function hp(){this.xa="Base"}Dt(hp,gs),hp.prototype.measure=function(){},hp.prototype.arrange=function(){},hp.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,ne=a.actualBounds,re=z.width,oe=z.height,le=Math.ceil(re/b),ue=Math.ceil(oe/E),pe=a.gridOrigin,xe=pe.x;pe=pe.y,y.save(),y.beginPath(),y.rect(0,0,re,oe),y.clip(),y.Se();for(var Ee=[],Fe=a.O.s,Oe=Fe.length,st=0;st<Oe;st++){var Ye=Fe[st],pt=[];if(Ee.push(pt),Ye.visible){var xt=Ye.interval;if(!(0>xt)){Ye=pv(Ye.figure);for(var Mt=0;Mt<Oe;Mt++)if(Mt!==st){var Ot=Fe[Mt];Ot.visible&&pv(Ot.figure)===Ye&&(Ot=Ot.interval,Ot>xt&&pt.push(Ot))}}}}for(Fe=a.O.s,Oe=Fe.length,st=0;st<Oe;st++){var en=Fe[st];if(en.visible&&(pt=en.interval||1,Ye=Math.abs(pt),!(2>b*Ye*x))){if(xt=en.segmentIndex,(!isFinite(xt)||isNaN(xt))&&(xt=0),0>xt&&(xt=Ye-Math.min(-xt,Ye)),xt=Math.round(xt%Ye),Ye=en.opacity,Mt=1,Ye!==1){if(Ye===0)continue;Mt=y.globalAlpha,y.globalAlpha=Mt*Ye}Ot=Ee[st];var ri=!1,Si=en.strokeDashArray;if(Si!==null&&(ri=!0,y.js(Si,en.strokeDashOffset)),en.figure==="LineV"&&en.stroke!==null&&0<en.strokeWidth){for(y.lineWidth=en.strokeWidth,Da(a,y,en.stroke,!1,!1,z,ne),y.beginPath(),Si=en=Math.floor((xe-b)/b);Si<=en+le;Si++){var gi=Si*b+xe;0<=gi&&gi<=re&&bm(Si,pt,xt,Ot)&&(y.moveTo(gi,0),y.lineTo(gi,oe))}y.stroke(),y.Se()}else if(en.figure==="LineH"&&en.stroke!==null&&0<en.strokeWidth){for(y.lineWidth=en.strokeWidth,Da(a,y,en.stroke,!1,!1,z,ne),y.beginPath(),Si=en=Math.floor((pe-E)/E);Si<=en+ue;Si++)gi=Si*E+pe,0<=gi&&gi<=oe&&bm(Si,pt,xt,Ot)&&(y.moveTo(0,gi),y.lineTo(re,gi));y.stroke(),y.Se()}else if(en.figure==="BarV"&&en.fill!==null)for(Da(a,y,en.fill,!0,!1,z,ne),en=en.width,isNaN(en)&&(en=b),gi=Si=Math.floor((xe-b)/b);gi<=Si+le;gi++){var $n=gi*b+xe;0<=$n+en&&$n<=re&&bm(gi,pt,xt,Ot)&&y.fillRect($n,0,en,oe)}else if(en.figure==="BarH"&&en.fill!==null)for(Da(a,y,en.fill,!0,!1,z,ne),en=en.height,isNaN(en)&&(en=E),gi=Si=Math.floor((pe-E)/E);gi<=Si+ue;gi++)$n=gi*E+pe,0<=$n+en&&$n<=oe&&bm(gi,pt,xt,Ot)&&y.fillRect(0,$n,re,en);ri&&y.fs(),Ye!==1&&(y.globalAlpha=Mt)}}y.restore(),y.Vc(!1)};function bm(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function Mm(){this.xa="Base"}Dt(Mm,gs),Mm.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof ho||a instanceof Kn){var ne=null,re=null;if(a instanceof Kn&&(ne=a),a instanceof ho&&(re=a,ne=re.adornedPart,a.j===null&&(a.j=[])),ne instanceof Kn){var oe=ne;if(z===0)Ia(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var le=a instanceof ho?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ue=oe.points,pe=ne.pointsCount;re!==null?re.Ul(!1):ne!==null&&ne.Ul(!1),re=y.width;var xe=y.height,Ee=a.j;if(Ee.length=0,le!==null){i1(a,re,xe,le);var Fe=le.measuredBounds;x.ed(Fe),Ee.push(Fe)}Fe=_t.alloc();for(var Oe=tt.alloc(),st=tt.alloc(),Ye=0;Ye<z;Ye++){var pt=E[Ye];if(pt!==le)if(pt.isPanelMain&&pt instanceof Mr){i1(a,re,xe,pt);var xt=pt.measuredBounds;x.ed(xt),Ee.push(xt)}else if(2>pe)pt.measure(1/0,1/0,0,0),xt=pt.measuredBounds,x.ed(xt),Ee.push(xt);else{var Mt=pt.segmentIndex,Ot=pt.segmentFraction,en=pt.alignmentFocus;en.Mc()&&(en=Jr);var ri=pt.segmentOrientation,Si=pt.segmentOffset;if(isNaN(Mt)){var gi=oe.ua;xt=ni(),gi.Qu(Ot,xt);var $n=tt.allocAt(xt[0],xt[1]);if($n.add(oe.i(0)),gi.type===vn.j?$n.offset(-gi.startX,-gi.startY):(gi=gi.figures.first(),gi!==null&&$n.offset(-gi.startX,-gi.startY)),gi=xt[2],ri!==pl){var An=oe.computeAngle(pt,ri,gi);pt.Kb=An}An=$n.x-y.x;var hr=$n.y-y.y;tt.free($n),ci(xt)}else if(Mt<-pe||Mt>=pe)xt=tt.alloc(),oe.vg(),oe.computeMidPoint(xt),gi=oe.midAngle,ri!==pl&&(An=oe.computeAngle(pt,ri,gi),pt.Kb=An),An=xt.x-y.x,hr=xt.y-y.y,tt.free(xt);else{if(An=0,0<=Mt?(hr=ue.M(Mt),xt=Mt<pe-1?ue.M(Mt+1):hr):(An=pe+Mt,hr=ue.M(An),xt=0<An?ue.M(An-1):hr),hr.Xa(xt)){0<=Mt?(gi=0<Mt?ue.M(Mt-1):hr,An=Mt<pe-2?ue.M(Mt+2):xt):(gi=An<pe-1?ue.M(An+1):hr,An=1<An?ue.M(An-2):xt),$n=gi.Bf(hr);var Ji=xt.Bf(An);gi=$n>Ji+10?0<=Mt?gi.ab(hr):hr.ab(gi):Ji>$n+10?0<=Mt?xt.ab(An):An.ab(xt):0<=Mt?gi.ab(An):An.ab(gi)}else gi=0<=Mt?hr.ab(xt):xt.ab(hr);ri!==pl&&(An=oe.computeAngle(pt,ri,gi),pt.Kb=An),An=hr.x+(xt.x-hr.x)*Ot-y.x,hr=hr.y+(xt.y-hr.y)*Ot-y.y}pt.measure(1/0,1/0,0,0),xt=pt.measuredBounds,$n=pt.naturalBounds;var mo=0;pt instanceof Mr&&(mo=pt.strokeWidth),Ji=$n.width+mo;var Yo=$n.height+mo;Fe.reset(),Fe.translate(-xt.x,-xt.y),Fe.scale(pt.scale,pt.scale),Fe.rotate(ri===pl?pt.angle:gi,Ji/2,Yo/2),ri!==Cp&&ri!==bp||Fe.rotate(90,Ji/2,Yo/2),ri!==Ep&&ri!==Mp||Fe.rotate(-90,Ji/2,Yo/2),ri===n0&&(45<gi&&135>gi||225<gi&&315>gi)&&Fe.rotate(-gi,Ji/2,Yo/2),$n=new pn(0,0,Ji,Yo),Oe.xi($n,en),Fe.Ga(Oe),en=-Oe.x+mo/2*pt.scale,pt=-Oe.y+mo/2*pt.scale,st.assign(Si),mo=isNaN(Si.x);var xs=isNaN(Si.y);if(mo||xs){Ji=Ji/2+3,Yo=Yo/2+3;var Es=45<=gi&&135>=gi,al=225<=gi&&315>=gi;ri===pl&&(Es||al)?(st.x=xs?Ji:Si.y,st.y=mo?Yo:Si.x,Es?0<=Mt||isNaN(Mt)&&.5>Ot||!mo||(st.y=-Yo):al&&((0<=Mt||isNaN(Mt)&&.5>Ot)&&mo&&(st.y=-Yo),xs&&(st.x=-Ji))):(mo&&(st.x=0<=Mt||isNaN(Mt)&&.5>Ot?Ji:-Ji),xs&&(st.y=-Yo),st.rotate(gi))}else st.rotate(gi);An+=st.x,hr+=st.y,$n.set(xt),$n.h(An+en,hr+pt,xt.width,xt.height),Ee.push($n),x.ed($n)}}if(ne!==null)for(E=ne.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Ia(b,x.width||0,x.height||0),_t.free(Fe),tt.free(Oe),tt.free(st)}}}},Mm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof ho||a instanceof Kn){var E=a,b=null;a instanceof ho&&(b=a,E=b.adornedPart);var z=a instanceof ho?null:E.path,ne=a.j;if(ne.length!==0){var re=0;if(z!==null&&re<ne.length){var oe=ne[re];re++,z.arrange(oe.x-a.jg.x,oe.y-a.jg.y,oe.width,oe.height)}for(oe=0;oe<x;oe++){var le=y[oe];if(le!==z&&re<ne.length){var ue=ne[re];re++,le.arrange(ue.x-a.jg.x,ue.y-a.jg.y,ue.width,ue.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Kn)for(z=a.labelNodes;z.next();){var pe=a;ne=z.value,re=ne.segmentIndex,oe=ne.segmentFraction;var xe=ne.alignmentFocus;if(le=ne.segmentOrientation,ue=ne.segmentOffset,isNaN(re)){var Ee=pe.ua,Fe=ni();Ee.Qu(oe,Fe);var Oe=tt.allocAt(Fe[0],Fe[1]);Oe.add(pe.i(0)),Ee.type===vn.j||(Ee=Ee.figures.first()),Oe.offset(-Ee.startX,-Ee.startY),Ee=Fe[2],le!==pl&&(pe=pe.computeAngle(ne,le,Ee),ne.angle=pe),pe=Oe.x;var st=Oe.y;tt.free(Oe),ci(Fe)}else if(re<-x||re>=x)Fe=tt.alloc(),Ee=pe,st=Fe,Ee.vg(),Ee.computeMidPoint(st),Ee=pe.midAngle,le!==pl&&(pe=pe.computeAngle(ne,le,Ee),ne.angle=pe),pe=Fe.x,st=Fe.y,tt.free(Fe);else{if(Oe=0,0<=re?(Fe=y.s[re],st=re<x-1?y.s[re+1]:Fe):(Oe=x+re,Fe=y.s[Oe],st=0<Oe?y.s[Oe-1]:Fe),Fe.Xa(st)){0<=re?(Ee=0<re?y.s[re-1]:Fe,Oe=re<x-2?y.s[re+2]:st):(Ee=Oe<x-1?y.s[Oe+1]:Fe,Oe=1<Oe?y.s[Oe-2]:st);var Ye=Ee.Bf(Fe),pt=st.Bf(Oe);Ee=Ye>pt+10?0<=re?Ee.ab(Fe):Fe.ab(Ee):pt>Ye+10?0<=re?st.ab(Oe):Oe.ab(st):0<=re?Ee.ab(Oe):Oe.ab(Ee)}else Ee=0<=re?Fe.ab(st):st.ab(Fe);le!==pl&&(pe=pe.computeAngle(ne,le,Ee),ne.angle=pe),pe=Fe.x+(st.x-Fe.x)*oe,st=Fe.y+(st.y-Fe.y)*oe}if(xe.ys())ne.location=new tt(pe,st);else{xe.Mc()&&(xe=Jr),Fe=_t.alloc(),Fe.reset(),Fe.scale(ne.scale,ne.scale),Fe.rotate(ne.angle,0,0);var xt=ne.naturalBounds;Oe=pn.allocAt(0,0,xt.width,xt.height),Ye=tt.alloc(),Ye.xi(Oe,xe),Fe.Ga(Ye),xe=-Ye.x,pt=-Ye.y;var Mt=xt.width,Ot=xt.height;xt=tt.alloc(),xt.assign(ue);var en=isNaN(ue.x),ri=isNaN(ue.y);if(en||ri){Mt=Mt/2+3,Ot=Ot/2+3;var Si=45<=Ee&&135>=Ee,gi=225<=Ee&&315>=Ee;le===pl&&(Si||gi)?(xt.x=ri?Mt:ue.y,xt.y=en?Ot:ue.x,Si?0<=re||isNaN(re)&&.5>oe||!en||(xt.y=-Ot):gi&&((0<=re||isNaN(re)&&.5>oe)&&en&&(xt.y=-Ot),ri&&(xt.x=-Mt))):(en&&(xt.x=0<=re||isNaN(re)&&.5>oe?Mt:-Mt),ri&&(xt.y=-Ot),xt.rotate(Ee))}else xt.rotate(Ee);pe+=xt.x,st+=xt.y,Fe.pp(Oe),xe+=Oe.x,pt+=Oe.y,re=tt.allocAt(pe+xe,st+pt),ne.move(re),tt.free(re),tt.free(xt),tt.free(Ye),pn.free(Oe),_t.free(Fe)}}b!==null?b.Ul(!1):E.Ul(!1),E=A1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),tt.free(E)}};function i1(a,y,x,E){if(fu(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof ho&&a.type===Hn.Link&&a.adornedObject instanceof Mr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Kn&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof ho&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),ls(E,!1)}}function cp(){this.xa="Base"}Dt(cp,gs),cp.prototype.measure=function(a,y,x,E,b,z,ne){var re=a.Pb();a.graduatedBounds=[];var oe=re.margin,le=oe.right+oe.left,ue=oe.top+oe.bottom;re.measure(y,x,z,ne);var pe=re.measuredBounds,xe=new pn(-oe.left,-oe.top,Math.max(pe.width+le,0),Math.max(pe.height+ue,0));a.graduatedBounds.push(xe),b.assign(xe);for(var Ee=re.geometry,Fe=re.strokeWidth,Oe=Ee.flattenedSegments,st=Ee.flattenedLengths,Ye=Ee.flattenedTotalLength,pt=Oe.length,xt=0,Mt=0,Ot=ni(),en=0;en<pt;en++){var ri=Oe[en],Si=[];Mt=xt=0;for(var gi=ri.length,$n=0;$n<gi;$n+=2){var An=ri[$n],hr=ri[$n+1];if($n!==0){var Ji=180*Math.atan2(hr-Mt,An-xt)/Math.PI;0>Ji&&(Ji+=360),Si.push(Ji)}xt=An,Mt=hr}Ot.push(Si)}if(a.graduatedIntervals===null){for(var mo=[],Yo=a.O.s,xs=Yo.length,Es=0;Es<xs;Es++){var al=Yo[Es],Ps=[];if(mo.push(Ps),al.visible){var Yc=al.interval;if(!(0>Yc)){for(var Qa=0;Qa<xs;Qa++)if(Qa!==Es){var Ph=Yo[Qa];if(Ph.visible&&al.constructor===Ph.constructor){var sl=Ph.interval;sl>Yc&&Ps.push(sl)}}}}}a.graduatedIntervals=mo}var Xc=a.graduatedIntervals,vu=a.O.s,Uu=vu.length,eu=0,Wl=0,Ld=Ye;a.graduatedMarks=[];for(var wh,Og=0;Og<Uu;Og++){var tu=vu[Og];if(wh=[],tu.visible&&tu!==re){var ll=Math.abs(tu.interval),Xp=a.graduatedTickUnit;if(!(2>Xp*ll*Ye/a.graduatedRange&&tu.graduatedSkip===null)){var _f=st[0][0],jh=0,Gl=0;Wl=Ye*tu.graduatedStart-1e-4,Ld=Ye*tu.graduatedEnd+1e-4;var lf=Xp*ll,nu=a.graduatedTickBase;if(nu<a.graduatedMin){var Fd=(a.graduatedMin-nu)/lf;Fd=Fd%1===0?Fd:Math.floor(Fd+1),nu+=Fd*lf}else nu>a.graduatedMin+lf&&(nu-=Math.floor((nu-a.graduatedMin)/lf)*lf);for(var G0=Xc[Og],Jp=nu,_y=1e-6*a.graduatedMax,ac=1;nu<=a.graduatedMax+_y;ac++){e:{for(var xc=G0.length,Zf=0;Zf<xc;Zf++){var Bd=(nu-a.graduatedTickBase)%(G0[Zf]*a.graduatedTickUnit),Ig=1e-6*a.graduatedTickUnit;if(Bd<Ig&&Bd>-Ig){var Nd=!1;break e}}Nd=!0}if(Nd&&(nu>a.graduatedMax&&(nu=a.graduatedMax),tu.graduatedSkip===null||tu instanceof Qo&&!tu.graduatedSkip(nu,tu)||tu instanceof Mr&&!tu.graduatedSkip(nu,tu))&&(eu=(nu-a.graduatedMin)*Ye/a.graduatedRange,eu>Ye&&(eu=Ye),Wl<=eu&&eu<=Ld)){for(var sc=Ot[jh][Gl],Jc=st[jh][Gl];jh<st.length;){for(;eu>_f&&Gl<st[jh].length-1;)Gl++,sc=Ot[jh][Gl],Jc=st[jh][Gl],_f+=Jc;if(eu<=_f)break;jh++,Gl=0,sc=Ot[jh][Gl],Jc=st[jh][Gl],_f+=Jc}var $l=Oe[jh],zh=$l[2*Gl],$0=$l[2*Gl+1],Pc=(eu-(_f-Jc))/Jc,Rg=new tt(zh+($l[2*Gl+2]-zh)*Pc+Fe/2-Ee.bounds.x,$0+($l[2*Gl+3]-$0)*Pc+Fe/2-Ee.bounds.y);Rg.scale(re.scale,re.scale);e:{var Ch=sc,uf=Ot[jh];if(!(.5005>Pc&&.4995<Pc)){var _h=Ch;if(.5>Pc?0<Gl?_h=uf[Gl-1]:it.$($l[0],$l[$l.length-2])&&it.$($l[1],$l[$l.length-1])&&(_h=uf[uf.length-1]):.5<Pc&&(Gl+1<uf.length?_h=uf[Gl+1]:it.$($l[0],$l[$l.length-2])&&it.$($l[1],$l[$l.length-1])&&(_h=uf[0])),Ch!==_h){var Hf=Math.abs(Ch-_h);if(180<Hf&&(Ch<_h?Ch+=360:_h+=360,Hf=Math.abs(Ch-_h)),5e-4>Pc||.9995<Pc){sc=(Ch+_h)/2%360;break e}if(10>Hf){var jg=1-Math.abs(.5-Pc);sc=(Ch*jg+_h*(1-jg))%360;break e}}}sc=Ch}if(tu instanceof Qo){var hh="";tu.graduatedFunction!==null?(hh=tu.graduatedFunction(nu,tu),hh=hh!=null?hh.toString():""):hh=(+nu.toFixed(2)).toString(),hh!==""&&wh.push({$l:Rg,angle:sc,text:hh})}else wh.push({$l:Rg,angle:sc})}nu=Jp+ac*lf}}}a.graduatedMarks.push(wh)}ci(Ot);var Os=a.graduatedMarks;if(Os!==null)for(var Qp=E.length,xl=0;xl<Qp;xl++){var qa=E[xl],Pl=Os[xl];if(qa.visible&&qa!==re&&Pl.length!==0){if(qa instanceof Mr){var wc=a,Qc=b,hf=qa.alignmentFocus;hf.Mc()&&(hf=bl);var Zy=qa.angle;qa.Kb=0,qa.measure(1/0,1/0,0,0),qa.Kb=Zy;var K0=qa.measuredBounds,zg=K0.width,cf=K0.height,Wf=pn.allocAt(0,0,zg,cf),Kl=tt.alloc();Kl.xi(Wf,hf),pn.free(Wf);for(var Cc=-Kl.x,Eh=-Kl.y,Ou=new pn,kd=Pl.length,_g=0;_g<kd;_g++)for(var Ad=Pl[_g],V0=Ad.$l.x,Zg=Ad.$l.y,ja=Ad.angle,ch=0;4>ch;ch++){switch(ch){case 0:Kl.h(Cc,Eh);break;case 1:Kl.h(Cc+zg,Eh);break;case 2:Kl.h(Cc,Eh+cf);break;case 3:Kl.h(Cc+zg,Eh+cf)}Kl.rotate(ja+qa.angle),Kl.offset(V0,Zg),_g===0&&ch===0?Ou.h(Kl.x,Kl.y,0,0):Ou.Ye(Kl),Kl.offset(-V0,-Zg),Kl.rotate(-ja-qa.angle)}tt.free(Kl),wc.graduatedBounds!==null&&wc.graduatedBounds.push(Ou),ma(Qc,Ou.x,Ou.y,Ou.width,Ou.height)}else if(qa instanceof Qo){var Yu=a,U0=b;Yu.temporaryTextBlock===null&&(Yu.temporaryTextBlock=new Qo);var iu=Yu.temporaryTextBlock;y1(iu,qa);var qc=qa.alignmentFocus;qc.Mc()&&(qc=bl);for(var Xu=qa.segmentOrientation,Hg=qa.segmentOffset,Td=new pn,qp=0,Wg=0,Zh=0,df=0,Dd=0,Gg=Pl.length,ed=0;ed<Gg;ed++){var lc=Pl[ed];qp=lc.$l.x,Wg=lc.$l.y,Zh=lc.angle,Dd=df=qa.angle,Xu!==pl&&(Dd=Xu===wp||Xu===t0?Zh+qa.angle:Zh,df=Kn.computeAngle(Xu,Dd)),iu.Kb=df,iu.text=lc.text||"",iu.measure(1/0,1/0,0,0);var td=iu.measuredBounds,Ec=iu.naturalBounds,nd=Ec.width,ff=Ec.height,bh=_t.alloc();bh.reset(),bh.translate(-td.x,-td.y),bh.scale(iu.scale,iu.scale),bh.rotate(Dd,nd/2,ff/2),Xu!==Cp&&Xu!==bp||bh.rotate(90,nd/2,ff/2),Xu!==Ep&&Xu!==Mp||bh.rotate(-90,nd/2,ff/2),Xu===n0&&(45<Zh&&135>Zh||225<Zh&&315>Zh)&&bh.rotate(-Zh,nd/2,ff/2);var Gf=pn.allocAt(0,0,nd,ff),id=tt.alloc();id.xi(Gf,qc),bh.Ga(id);var $f=-id.x,Hy=-id.y,bc=tt.alloc();bc.assign(Hg),isNaN(bc.x)&&(bc.x=nd/2+3),isNaN(bc.y)&&(bc.y=-(ff/2+3)),bc.rotate(Zh),qp+=bc.x+$f,Wg+=bc.y+Hy;var gf=new pn(qp,Wg,td.width,td.height),em=new pn(td.x,td.y,td.width,td.height),Wy=new pn(Ec.x,Ec.y,Ec.width,Ec.height);lc.Sz=df,lc.lineCount=iu.lineCount,lc.lines=[iu.Cb,iu.Ih,iu.df,iu.Le,iu.Qc,iu.Qb,iu.ze],lc.actualBounds=gf,lc.measuredBounds=em,lc.naturalBounds=Wy,ed===0?Td.assign(gf):Td.ed(gf),tt.free(bc),tt.free(id),pn.free(Gf),_t.free(bh)}Yu.graduatedBounds!==null&&Yu.graduatedBounds.push(Td),ma(U0,Td.x,Td.y,Td.width,Td.height)}ls(qa,!1)}}},cp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,ne=0,re=z[ne];ne++,E!==null&&E.arrange(re.x-x.x,re.y-x.y,re.width,re.height);for(var oe=y.length,le=0;le<oe;le++){var ue=y[le];re=b[le],ue.visible&&ue!==E&&re.length!==0&&(re=z[ne],ne++,ue.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},cp.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,ne=b.height;b=y instanceof Jl,y.save(),y.beginPath(),y.rect(-1,-1,z+1,ne+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var re=z.actualBounds,oe=a.O.s,le=a.graduatedMarks,ue=oe.length,pe=0;pe<ue;pe++){var xe=oe[pe],Ee=le[pe],Fe=Ee.length;if(xe.visible&&xe!==z&&Ee.length!==0){if(xe instanceof Mr){if(!(2>a.graduatedTickUnit*xe.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ne&&xe.graduatedSkip===null)){var Oe=xe.measuredBounds,st=xe.strokeWidth*xe.scale,Ye=xe.alignmentFocus;Ye.Mc()&&(Ye=bl);for(var pt=0;pt<Fe;pt++){var xt=Ee[pt].$l,Mt=Ee[pt].angle,Ot=Ye,en=xe.Ab;en.reset(),en.translate(xt.x+re.x,xt.y+re.y),en.rotate(Mt+xe.angle,0,0),en.translate(-Oe.width*Ot.x+Ot.offsetX+st/2,-Oe.height*Ot.y+Ot.offsetY+st/2),en.scale(xe.scale,xe.scale),Wu(xe,!1),xe.wh.set(xe.Ab),xe.Kk=xe.scale,Fu(xe,!1),xe.gc(y,x),b&&(a.svg.appendChild(xe.svg),xe.svg=null),xe.Ab.reset()}}}else if(xe instanceof Qo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Qo),Oe=a.temporaryTextBlock,y1(Oe,xe),st=0;st<Fe;st++)Ye=Ee[st],Ye.actualBounds&&Ye.measuredBounds&&Ye.naturalBounds&&(Oe.ec=Ye.text||"",Oe.Kb=Ye.Sz||0,Oe.Gc=Ye.lineCount||0,pt=Ye.lines,pt!==void 0&&(Oe.Cb=pt[0],Oe.Ih=pt[1],Oe.df=pt[2],Oe.Le=pt[3],Oe.Qc=pt[4],Oe.Qb=pt[5],Oe.ze=pt[6]),Ye.naturalBounds&&(Oe.dc=Ye.naturalBounds),Ye.actualBounds&&(pt=Ye.actualBounds,Oe.arrange(pt.x,pt.y,pt.width,pt.height)),pt=Ye.actualBounds,Oe.arrange(pt.x,pt.y,pt.width,pt.height),xt=Ye.measuredBounds,Ye=Ye.naturalBounds,Mt=Oe.Ab,Mt.reset(),Mt.translate(pt.x+re.x,pt.y+re.y),Mt.translate(-xt.x,-xt.y),Oe.no(Mt,Ye.x,Ye.y,Ye.width,Ye.height),Wu(Oe,!1),Oe.wh.set(Oe.Ab),Oe.Kk=Oe.scale,Fu(Oe,!1),Oe.Ng=xe.part,Oe.Me=xe.panel,Oe.gc(y,x),Oe.Me=null,Oe.Ng=null,b&&(a.svg.appendChild(Oe.svg),Oe.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function Hn(a,y){if(Rt.call(this),this.na=null,a===void 0)this.na=Hn.Position;else if(typeof a=="string"){var x=rh.I(a);x!==null&&(this.na=x)}else a instanceof gs?this.na=a:a&&(this.na=Hn.Position,y=a);this.na===null&&St("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Hn.Grid?1048576:0),this.O=new Mn,this.yb=bs,this.Tm=Po,this.Uf=vr,this.$g=null,this.$e="",this.jg=new pn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=wi,this.jn=vo,this.kn=lo,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Dt(Hn,Rt),Hn.prototype.cloneProtected=function(a){Rt.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},Hn.prototype.Af=function(a){Rt.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},Hn.prototype.copy=function(){var a=Rt.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,ne=z.count;if(z.Gb(ne,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof ai&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(ko,"elements",a,null,b,null,ne)}}return a}return null},Le=Hn.prototype,Le.toString=function(){return"Panel("+this.type.name+")#"+Bi(this)},Le.Pn=function(a){Rt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Le.hh=function(a,y){if(this.na===Hn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Hn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Hn.Table)if(a.yc(),a instanceof Jl){var x=a.yd;a.yd=fm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Hn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];x&&re===E&&(a.clipInsteadOfFill=!0),re.gc(a,y),x&&re===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Lm(a,y,!0,x,!0),E!==null&&Lm(a,y,!1,E,!0),x!==null&&r1(a,y,!0,x),E!==null&&r1(a,y,!1,E),x!==null&&Lm(a,y,!0,x,!1),E!==null&&Lm(a,y,!1,E,!1)}function r1(a,y,x,E){for(var b=E.length,z=a.actualBounds,ne=a.naturalBounds,re=!0,oe=0;oe<b;oe++){var le=E[oe];if(le!==void 0&&le.actual!==0)if(re)re=!1;else{if(x){if(le.position>ne.height)continue}else if(le.position>ne.width)continue;var ue=le.separatorStrokeWidth;isNaN(ue)&&(ue=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var pe=le.separatorStroke;if(pe===null&&(pe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ue!==0&&pe!==null){Da(a,y,pe,!1,!1,ne,z),pe=!1;var xe=le.separatorDashArray;xe===null&&(xe=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),xe!==null&&(pe=!0,y.js(xe,0)),y.beginPath(),xe=le.position+ue,x?xe>ne.height&&(ue-=xe-ne.height):xe>ne.width&&(ue-=xe-ne.width),le=le.position+ue/2,y.lineWidth=ue,ue=a.yb,x?(le+=ue.top,xe=ne.width-ue.right,y.moveTo(ue.left,le),y.lineTo(xe,le)):(le+=ue.left,xe=ne.height-ue.bottom,y.moveTo(le,ue.top),y.lineTo(le,xe)),y.stroke(),y.Se(),pe&&y.fs()}}}}function Lm(a,y,x,E,b){for(var z=E.length,ne=a.actualBounds,re=a.naturalBounds,oe=o1(a,!0),le=o1(a,!1),ue=0;ue<z;ue++){var pe=E[ue];if(pe!==void 0&&pe.background!==null&&pe.coversSeparators!==b&&pe.actual!==0){var xe=x?ne.height:ne.width;if(!(pe.position>xe)){var Ee=pe.Wc(),Fe=pe.separatorStrokeWidth;isNaN(Fe)&&(Fe=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Oe=pe.separatorStroke;Oe===null&&(Oe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Oe===null||pe.index===(x?oe:le))&&(Fe=0),Ee-=Fe,Fe=pe.position+Fe,Ee+=pe.actual,Fe+Ee>xe&&(Ee=xe-Fe),0>=Ee||(xe=a.yb,Da(a,y,pe.background,!0,!1,re,ne),x?y.fillRect(xe.left,Fe+xe.top,ne.width-(xe.left+xe.right),Ee):y.fillRect(Fe+xe.left,xe.top,Ee,ne.height-(xe.top+xe.bottom)))}}}}function o1(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function pv(a){return a==="LineV"||a==="BarV"}Le.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Le.kk=function(a,y,x){if(!Rt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Hn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Hn.Grid||this.na===Hn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Le.nk=function(){return!0},Le.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var re=y[ne].actualBounds;b=ne===0?re.x:Math.min(re.x,b),z=ne===0?re.y:Math.min(re.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Rt.prototype.$o.call(this,a,y,x,E)},Le.Sj=function(a,y,x,E,b){var z=this.se(),ne=this.transform,re=1/(ne.m11*ne.m22-ne.m12*ne.m21),oe=ne.m22*re,le=-ne.m12*re,ue=-ne.m21*re,pe=ne.m11*re,xe=re*(ne.m21*ne.dy-ne.m22*ne.dx),Ee=re*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,it.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,E,b);if(this.background!==null)return z=a*oe+y*ue+xe,re=a*le+y*pe+Ee,a=x*oe+E*ue+xe,oe=x*le+E*pe+Ee,b.h(0,0),x=this.naturalBounds,z=it.Ff(0,0,x.width,x.height,z,re,a,oe,b),b.transform(ne),z;z||(oe=1,ue=le=0,pe=1,Ee=xe=0),re=a*oe+y*ue+xe,a=a*le+y*pe+Ee,oe=x*oe+E*ue+xe,x=x*le+E*pe+Ee,b.h(oe,x),E=(oe-re)*(oe-re)+(x-a)*(x-a),le=!1,pe=this.O.s,Ee=pe.length,ue=tt.alloc(),xe=null,y=1/0;var Fe=null,Oe=this.isClipping&&this.na===Hn.Spot;Oe&&(Fe=tt.alloc(),xe=this.Pb(),(le=xe.Sj(re,a,oe,x,Fe))&&(y=(re-Fe.x)*(re-Fe.x)+(a-Fe.y)*(a-Fe.y)));for(var st=0;st<Ee;st++){var Ye=pe[st];Ye.visible&&Ye!==xe&&Ye.Sj(re,a,oe,x,ue)&&(le=!0,Ye=(re-ue.x)*(re-ue.x)+(a-ue.y)*(a-ue.y),Ye<E&&(E=Ye,b.set(ue)))}return Oe&&(y>E&&b.set(Fe),tt.free(Fe)),tt.free(ue),z&&b.transform(ne),le},Le.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Rt.prototype.Gj.call(this)},Le.v=function(a){if(!fu(this)){Rt.prototype.v.call(this,a),a=null,(this.na===Hn.Auto||this.na===Hn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=Bl(b,!1);(b instanceof gl||b instanceof Hn||b instanceof Qo||z!==On)&&b.v(!0)}}}},Le.Uj=function(){if(!fu(this)){ls(this,!0),Yh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Le.Uk=function(){if(!(this.l&2048)){Wu(this,!0),Fu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Le.Wu=function(){Fu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Le.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,E=ne.height),x=Math.max(x,ne.width),E=Math.max(E,ne.height);var re=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,re.width)),isNaN(z.height)||(y=Math.min(z.height,re.height)),a=Math.max(x,a),y=Math.max(E,y);var oe=this.yb;a=Math.max(a-oe.left-oe.right,0),y=Math.max(y-oe.top-oe.bottom,0);var le=this.O.s;le.length!==0&&this.na.measure(this,a,y,le,b,x,E),a=b.width+oe.left+oe.right,oe=b.height+oe.top+oe.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(oe=z.height),a=Math.min(re.width,a),oe=Math.min(re.height,oe),a=Math.max(ne.width,a),oe=Math.max(ne.height,oe),a=Math.max(x,a),oe=Math.max(E,oe),Ia(b,a,oe),Ia(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},Le.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function vc(a){return a.part!==null?a.part.locationObject:null}Le.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=Bl(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var ne=this.Kg,re=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&z===E&&(a=On),a){case On:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case zn:this.v(!0),this.measure(x+re,E+ne,0,0);break;case Ti:this.v(!0),this.measure(x+re,z+ne,0,0);break;case Hi:this.v(!0),this.measure(y+re,E+ne,0,0)}}this.na.arrange(this,b,this.jg)}},Le.gh=function(a){var y=this.naturalBounds,x=vc(this);if(Fo(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=tt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(yr(b.set(a),z.transform),z.ca(b)))return tt.free(b),!0}return tt.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Le.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Le.qm=function(a,y){if(y(this,a),a instanceof Hn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function qd(a,y){a1(a,a,y)}function a1(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof Hn&&a1(a,z,x)}}function vx(a,y){s1(a,a,y)}function s1(a,y,x){if(x(y),y instanceof Hn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)s1(a,y[b],x)}}Le.Nl=function(a){return l1(this,this,a)};function l1(a,y,x){if(x(y))return y;if(y instanceof Hn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=l1(a,y[b],x);if(z!==null)return z}}return null}Le.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=dp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof Hn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function u1(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof Hn?x=Math.max(x,u1(b)):b instanceof Mr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Le.se=function(){return!(this.type===Hn.TableRow||this.type===Hn.TableColumn)};function zc(a){return a.type===Hn.TableRow||a.type===Hn.TableColumn}Le.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),dl(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),ne=z?a:yr(tt.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,le=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),le=oe/2),Fo(-(le*b),-(le*b),E.width+oe*b,E.height+oe*b,ne.x,ne.y)){if(!this.isAtomic){b=this.O.s;var ue=b.length;if(re=tt.alloc(),le=(oe=this.isClipping&&this.na===Hn.Spot)?this.Pb():null,oe&&(le.se()?yr(re.set(a),le.transform):re.set(a),!le.ca(re)))return tt.free(re),z||tt.free(ne),null;for(var pe=vc(this);ue--;){var xe=b[ue];if((xe.visible||xe===pe)&&(xe.se()?yr(re.set(a),xe.transform):re.set(a),!oe||xe!==le)){var Ee=null;if(xe instanceof Hn?Ee=xe.ic(re,y,x):xe.pickable===!0&&xe.ca(re)&&(Ee=xe),Ee!==null&&(y!==null&&(Ee=y(Ee)),Ee!==null&&(x===null||x(Ee))))return tt.free(re),z||tt.free(ne),Ee}}tt.free(re)}return this.background===null&&this.areaBackground===null?(z||tt.free(ne),null):(a=Fo(0,0,E.width,E.height,ne.x,ne.y)?this:null,z||tt.free(ne),a)}return z||tt.free(ne),null},Le.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),ne=z?a:yr(tt.allocAt(a.x,a.y),this.transform);if(b=Fo(0,0,b.width,b.height,ne.x,ne.y),zc(this)||b){if(!this.isAtomic){for(var re=this.O.s,oe=re.length,le=tt.alloc(),ue=vc(this);oe--;){var pe=re[oe];if(pe.visible||pe===ue){pe.se()?yr(le.set(a),pe.transform):le.set(a);var xe=pe;pe=pe instanceof Hn?pe:null,(pe!==null?pe.ji(le,y,x,E):xe.ca(le))&&xe.pickable!==!1&&(y!==null&&(xe=y(xe)),xe===null||x!==null&&!x(xe)||E.add(xe))}}tt.free(le)}return z||tt.free(ne),b&&(this.background!==null||this.areaBackground!==null)}return z||tt.free(ne),!1},Le.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=z;if(z===void 0&&(ne=_t.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return mv(this,y,x,b),z===void 0&&_t.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var re=vc(this),oe=this.O.s,le=oe.length;le--;){var ue=oe[le];if(ue.visible||ue===re){var pe=ue.actualBounds,xe=this.naturalBounds;pe.x>xe.width||pe.y>xe.height||0>pe.x+pe.width||0>pe.y+pe.height||(pe=ue,ue=ue instanceof Hn?ue:null,xe=_t.alloc(),xe.set(ne),(ue!==null?ue.Cf(a,y,x,E,b,xe):Ss(pe,a,E,xe))&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||b.add(pe)),_t.free(xe))}}return z===void 0&&_t.free(ne),E}return z===void 0&&_t.free(ne),!1};function mv(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var ne=b[z];if(ne.visible){var re=ne.actualBounds,oe=a.naturalBounds;re.x>oe.width||re.y>oe.height||0>re.x+re.width||0>re.y+re.height||(ne instanceof Hn&&mv(ne,y,x,E),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||E.add(ne))}}}Le.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var ne=this.naturalBounds,re=this.se(),oe=re?a:yr(tt.allocAt(a.x,a.y),this.transform),le=re?y:yr(tt.allocAt(y.x,y.y),this.transform),ue=oe.Bf(le),pe=0<oe.x&&oe.x<ne.width&&0<oe.y&&oe.y<ne.height||xo(oe.x,oe.y,0,0,0,ne.height)<=ue||xo(oe.x,oe.y,0,ne.height,ne.width,ne.height)<=ue||xo(oe.x,oe.y,ne.width,ne.height,ne.width,0)<=ue||xo(oe.x,oe.y,ne.width,0,0,0)<=ue;if(ne=oe.zd(0,0)<=ue&&oe.zd(0,ne.height)<=ue&&oe.zd(ne.width,0)<=ue&&oe.zd(ne.width,ne.height)<=ue,re||(tt.free(oe),tt.free(le)),pe){if(!this.isAtomic){oe=tt.alloc(),le=tt.alloc(),ue=vc(this);for(var xe=this.O.s,Ee=xe.length;Ee--;){var Fe=xe[Ee];if(Fe.visible||Fe===ue){var Oe=Fe.actualBounds,st=this.naturalBounds;(!re||!(Oe.x>st.width||Oe.y>st.height||0>Oe.x+Oe.width||0>Oe.y+Oe.height))&&(Fe.se()?(Oe=Fe.transform,yr(oe.set(a),Oe),yr(le.set(y),Oe)):(oe.set(a),le.set(y)),Oe=Fe,Fe=Fe instanceof Hn?Fe:null,(Fe!==null?Fe.og(oe,le,x,E,b,z):Oe.tx(oe,le,b))&&(x!==null&&(Oe=x(Oe)),Oe===null||E!==null&&!E(Oe)||z.add(Oe)))}}tt.free(oe),tt.free(le)}return b?pe:ne}return!1};function vv(a){var y=null;return a instanceof Mr&&(y=a.spot1,y===Po&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=cs),y}function yv(a){var y=null;return a instanceof Mr&&(y=a.spot2,y===Po&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=ys),y}Le.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},Le.M=function(a){return this.O.M(a)},Le.Gb=function(a,y){y instanceof Oi&&St("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&St("Cannot make a Panel contain itself: "+this.toString()),St("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&St("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!==Hn.Grid||y instanceof Mr||St("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Hn.Graduated||y instanceof Mr||y instanceof Qo||St("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new xi),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,ne=this.O.s,re=ne.length,oe=0;oe<re;oe++)if(ne[oe]===y){z=oe;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else St("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),fu(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Hn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Bm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof ai&&(x.Te=!0),x.Te&&x instanceof ai&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Uo,"elements",this,y,null,E,null),x.cb(ko,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Le.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Le.mb=function(a){0<=a&&this.pc(a,!0)},Le.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),ls(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof ai&&(E instanceof Hn?E.qm(E,function(ne,re){Hv(z,re,y)}):Hv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Uo,"elements",this,E,null,a,null))},Le.Fb=function(a){0>a&&In(a,">= 0",Hn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new us;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(ko,"rowdefs",this,null,x,null,a)}return y[a]},Le.oA=function(a){if(0>a&&In(a,">= 0",Hn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Uo,"rowdefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof us?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Le.Eb=function(a){0>a&&In(a,">= 0",Hn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new us;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(ko,"coldefs",this,null,x,null,a)}return y[a]},Le.jA=function(a){if(0>a&&In(a,">= 0",Hn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Uo,"coldefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof us?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Le.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Nm(y,a),this},Le.Hy=function(a,y){return(a=this.Fb(a))&&Nm(a,new us(y)),this},Le.By=function(a,y){return(a=this.Eb(a))&&Nm(a,new us(y)),this},Le.nz=function(a){if(0>a||this.type!==Hn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Le.fz=function(a){if(0>a||this.type!==Hn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Le.Fz=function(a,y){if(y===void 0&&(y=new tt(NaN,NaN)),this.type!==Hn.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)},Le.Gz=function(a){if(this.type!==Hn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function d1(a){return a=a.allBindings,a!==null&&a._isFrozen}function $u(a){var y=a.allBindings;if(y===null)a.data!==null&&St("Template cannot have .data be non-null: "+a),a.allBindings=y=new Mn;else if(y._isFrozen)return;var x=new Mn;Sv(a,!1),a.qm(a,function(le,ue){ue.th();var pe=ue.localBindings;if(pe!==null)for(bf(ue,!1),pe=pe.iterator;pe.next();){var xe=pe.value;xe.mode===Dp&&bf(ue,!0);var Ee=xe.sourceName;Ee!==null&&(Ee==="/"&&Sv(le,!0),Ee=MS(xe,le,ue),Ee!==null&&(x.add(Ee),Ee.srcBindings===null&&(Ee.srcBindings=new Mn),Ee.srcBindings.add(xe))),y.add(xe)}if(ue instanceof Hn&&ue.type===Hn.Table){if(0<ue.rowCount){for(le=ue.rowDefs,pe=le.length,xe=0;xe<pe;xe++)if(Ee=le[xe],Ee!==void 0&&Ee.be!==null)for(var Fe=Ee.be.iterator;Fe.next();){var Oe=Fe.value;Oe.xd=Ee,Oe.to=2,Oe.wl=Ee.index,y.add(Oe)}}if(0<ue.columnCount){for(ue=ue.colDefs,le=ue.length,pe=0;pe<le;pe++)if(xe=ue[pe],xe!==void 0&&xe.be!==null)for(Ee=xe.be.iterator;Ee.next();)Fe=Ee.value,Fe.xd=xe,Fe.to=1,Fe.wl=xe.index,y.add(Fe)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){bf(b,!0);for(var z=b.srcBindings.iterator;z.next();){var ne=z.value;b.localBindings===null&&(b.localBindings=new Mn),b.localBindings.add(ne)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var re=b.targetProperty,oe=re.indexOf(".");0<oe&&z instanceof Hn&&(ne=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(ne),oe!==null?(z=oe,b.targetProperty=re):ii('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+b.toString())),z instanceof us?(ne=Bi(z.panel),b.Ai=ne===void 0?-1:ne,z.panel.bindingId=b.Ai):z instanceof Rt?(ne=Bi(z),b.Ai=ne===void 0?-1:ne,z.bindingId=b.Ai):St("Unknown type of binding target: "+z)}y.freeze(),a instanceof Oi&&a.Zc()&&a.Va()}Le.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof Hn&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&$u(y),y},Le.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,ne=x.Ai;if(ne!==-1){if(z=this.ks(ne),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof Hn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Le.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yx(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof Hn&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var ne=0;b<x&&ne<E;){if(z=a[b],!(z instanceof Hn)||z.data!==y[ne])return!0;b++,ne++}return!1}function dp(a){if(a.type===Hn.Spot||a.type===Hn.Auto)return Math.min(a.O.length,1);if(a.type===Hn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Mr&&E.isPanelMain))break}return x}return a.type===Hn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Hn&&zc(a))?1:0}Le.mv=function(){for(var a=dp(this);this.O.length>a;)this.pc(this.O.length-1,!1);f1(this,this.itemArray)};function f1(a,y){var x=dp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;E<x;E++)Fm(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],ne=E<a.O.length?a.O.M(E):null;if(ne instanceof Hn){if(ne.data!==z){var re=Pv(a,ne.data),oe=Pv(a,z),le=oe!==re;le||(re=wv(a,re),le=wv(a,oe)!==re),le?(a.pc(E,!1),Fm(a,z,b,!1)):ne.data=z}}else Fm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,xv(a,x,0),fu(a)||a.v(),a.graduatedIntervals=null,a.If()||Bm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof ai&&(y.Te=!0),y.Te&&y instanceof ai&&(y.wc=null))}}function Fm(a,y,x,E){if(!(y==null||0>x)){var b=Pv(a,y);if(b=wv(a,b),b!==null){if($u(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Sv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new xi),a.ge.add(y,b)),z=x+dp(a),a.Gb(z,b),E&&(b.ub=y,xv(a,z,x),b.ub=null),b.data=y}}}function xv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof Hn){var b=y,z=x;E.type===Hn.TableRow?E.row=b:E.type===Hn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Pv(a,y){if(y===null)return"";if(a=a.itemCategoryProperty,typeof a=="function")a=a(y);else if(typeof a=="string"&&typeof y=="object"){if(a==="")return"";a=Ga(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;St("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function wv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(g1||(g1=!0,ii('No item template Panel found for category "'+y+'" on '+a),ii(" Using default item template."),a=new Hn,y=new Qo,y.bind(new Ja("text","",Ni)),a.add(y),p1=a),E=p1)),E}function Bm(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof Hn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Hn&&!z.isEnabled||Bm(a,z,x)}}}function Ih(a,y){y.name=a,rh.add(a,y)}Ve.Object.defineProperties(Hn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Hn.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&&In(a,">= 0",Hn,"padding"),a=new Di(a)):(0>a.left&&In(a.left,">= 0",Hn,"padding:value.left"),0>a.right&&In(a.right,">= 0",Hn,"padding:value.right"),0>a.top&&In(a.top,">= 0",Hn,"padding:value.top"),0>a.bottom&&In(a.bottom,">= 0",Hn,"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:bs},set:function(a){typeof a=="number"&&(a=new Di(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new ku),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 Ao)&&(a instanceof Ao&&a.freeze(),this.T===null&&(this.T=new ku),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 ku),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||St("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new ku),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 Ao)&&(a instanceof Ao&&a.freeze(),this.T===null&&(this.T=new ku),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 ku),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||St("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new ku),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 ku),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||St("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Th(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()||St("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Th(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 yc),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Zs(this)&&(a=this.part,a!==null&&oa(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 yc),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Zs(this)&&(a=this.part,a!==null&&oa(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 yc),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 yc),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 yc,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 yc,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 yc,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 yc,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 ku),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new ku),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Am},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new ku),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Am},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new ku),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)&&St("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new ku),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)&&St("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new ku),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 Oi&&!(this instanceof ho);$u(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Kn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Oi&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),E!==null&&E.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Mf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&ly(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&sy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||f1(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 xi}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Oi||a.isPanelMain)&&St("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(););Fr(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&&(Fr(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 fr&&(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&&Bm(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))}}}),Ve.Object.defineProperties(Hn,{Position:{get:function(){return rh.I("Position")}},Horizontal:{get:function(){return rh.I("Horizontal")}},Vertical:{get:function(){return rh.I("Vertical")}},Spot:{get:function(){return rh.I("Spot")}},Auto:{get:function(){return rh.I("Auto")}},Table:{get:function(){return rh.I("Table")}},Viewbox:{get:function(){return rh.I("Viewbox")}},TableRow:{get:function(){return rh.I("TableRow")}},TableColumn:{get:function(){return rh.I("TableColumn")}},Link:{get:function(){return rh.I("Link")}},Grid:{get:function(){return rh.I("Grid")}},Graduated:{get:function(){return rh.I("Graduated")}}}),Hn.prototype.rebuildItemElements=Hn.prototype.mv,Hn.prototype.findItemPanelForData=Hn.prototype.sx,Hn.prototype.updateTargetBindings=Hn.prototype.La,Hn.prototype.copyTemplate=Hn.prototype.Uy,Hn.prototype.graduatedValueForPoint=Hn.prototype.Gz,Hn.prototype.graduatedPointForValue=Hn.prototype.Fz,Hn.prototype.findColumnForLocalX=Hn.prototype.fz,Hn.prototype.findRowForLocalY=Hn.prototype.nz,Hn.prototype.addColumnDefinition=Hn.prototype.By,Hn.prototype.addRowDefinition=Hn.prototype.Hy,Hn.prototype.addRowColumnDefinition=Hn.prototype.Gy,Hn.prototype.removeColumnDefinition=Hn.prototype.jA,Hn.prototype.getColumnDefinition=Hn.prototype.Eb,Hn.prototype.removeRowDefinition=Hn.prototype.oA,Hn.prototype.getRowDefinition=Hn.prototype.Fb,Hn.prototype.removeAt=Hn.prototype.mb,Hn.prototype.remove=Hn.prototype.remove,Hn.prototype.insertAt=Hn.prototype.Gb,Hn.prototype.elt=Hn.prototype.M,Hn.prototype.add=Hn.prototype.add,Hn.prototype.findObject=Hn.prototype.fb,Hn.prototype.findInVisualTree=Hn.prototype.Nl,Hn.prototype.walkVisualTreeFrom=Hn.prototype.qm,Hn.prototype.findMainElement=Hn.prototype.Pb;var g1=!1,p1=null,rh=new xi;Hn.className="Panel",Hn.definePanelLayout=Ih,Ih("Position",new mm),Ih("Vertical",new ym),Ih("Auto",new xm),Ih("Link",new Mm);function yc(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}yc.prototype.copy=function(){var a=new yc;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},yc.className="GradPanelSettings";function ku(){this.Pc=[],this.Oc=[],this.j=this.ob=Am,this.hb=this.Hb=0,this.Qp=bs,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}ku.prototype.copy=function(a){for(var y=new ku,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var ne=x[z].copy();ne.wi(a),b[z]=ne}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(ne=x[z].copy(),ne.wi(a),b[z]=ne);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},ku.className="TablePanelSettings";function us(a){Hr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Po,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=vr,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))}us.prototype.copy=function(){var a=new us;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=hi(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Nm(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=hi(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Le=us.prototype,Le.qb=function(a){a.classType===us&&(this.sizing=a)},Le.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Bi(this)},Le.wi=function(a){this.Me=a},Le.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)},Le.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===Hn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var ne=E?y.rowDefs[z]:y.colDefs[z];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Le.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(Yr,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function km(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Le.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ja(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&St("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new Mn),this.be.add(b),this},Ve.Object.defineProperties(us.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&&In(a,">= 0",us,"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&&In(a,">= 0",us,"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))&&In(a,">= 0",us,"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&&In(a,">= 0",us,"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 Di(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&Ff(a,"RowColumnDefinition.separatorStroke"),a instanceof Ao&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||St("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Ff(a,"RowColumnDefinition.background"),a instanceof Ao&&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}}}),us.prototype.computeEffectiveSpacing=us.prototype.Wc,us.prototype.computeEffectiveSpacingTop=us.prototype.Io;var Cv=new fn(us,"Default",0),fp=new fn(us,"None",1),Am=new fn(us,"ProportionalExtra",2);us.className="RowColumnDefinition",us.Default=Cv,us.None=fp,us.ProportionalExtra=Am;function Mr(a,y){Rt.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)}Dt(Mr,Rt),Mr.prototype.cloneProtected=function(a){Rt.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=hi(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 ef(a){a.Na===null?a.Na=new Mv:a.Na.nc&&(a.Na=a.Na.copy())}Le=Mr.prototype,Le.th=function(){Rt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Le.qb=function(a){a===On||a===wi||a===Kr||a===vr?this.geometryStretch=a:Rt.prototype.qb.call(this,a)},Le.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Bi(this)};function fg(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,ne=Math.max(1,z.width);z=z.height;for(var re=x[0],oe=x[1],le,ue,pe,xe,Ee,Fe,Oe=0,st=ni(),Ye=2;Ye<b;Ye+=2)le=x[Ye],ue=x[Ye+1],pe=le-re,re=ue-oe,pe===0&&(pe=.001),xe=re/pe,Ee=Math.atan2(re,pe),Fe=Math.sqrt(pe*pe+re*re),st.push([pe,Ee,xe,Fe]),Oe+=Fe,re=le,oe=ue;re=x[0],oe=x[1],pe=E.measuredBounds.width,E instanceof Mr&&(pe-=E.strokeWidth),1>pe&&(pe=1),b=x=pe,le=ne/2,ue=le!==0,Ye=0,Fe=st[Ye],pe=Fe[0],Ee=Fe[1],xe=Fe[2],Fe=Fe[3];for(var pt=0;.1<=Oe;){if(pt===0&&(ue?(b=x,b-=le,Oe-=le,ue=!1):b=x,b===0&&(b=1)),b>Oe){ci(st);return}b>Fe?(pt=b-Fe,b=Fe):pt=0;var xt=Math.sqrt(b*b/(1+xe*xe));if(0>pe&&(xt=-xt),re+=xt,oe+=xe*xt,a.translate(re,oe),a.rotate(Ee),a.translate(-(ne/2),-(z/2)),pt===0&&E.hh(a,y),a.translate(ne/2,z/2),a.rotate(-Ee),a.translate(-re,-oe),Oe-=b,Fe-=b,pt!==0){if(Ye++,Ye===st.length){ci(st);return}Fe=st[Ye],pe=Fe[0],Ee=Fe[1],xe=Fe[2],Fe=Fe[3],b=pt}}ci(st)}}Le.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,ne=this.naturalBounds;E!==null&&Da(this,a,E,!0,!1,ne,z);var re=this.part,oe=this.ig;if(x===null||oe!==0||re===null||!this.isPanelMain&&re.Pb()!==this||(oe=re.type===Hn.Link&&re instanceof ho&&re.category==="Selection"&&re.adornedObject instanceof Mr&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),oe===0&&(x=null),x!==null&&oe!==0&&(Da(this,a,x,!1,!1,ne,z),a.lineWidth=oe,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,re&&y.Gf("drawShadows")&&(z=re.isShadowed),a.Il===!1&&(z=!1),re=!0,x===null||E!==null&&E!=="transparent"||(re=!1),ne=!1,oe=this.strokeDashArray,oe!==null&&(ne=!0,a.js(oe,this.strokeDashOffset)),b.type===vn.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===vn.u){var le=b.startX;oe=b.startY;var ue=b.endX,pe=b.endY;b=Math.min(le,ue);var xe=Math.min(oe,pe);le=Math.abs(ue-le),oe=Math.abs(pe-oe),a.beginPath(),a.rect(b,xe,le,oe),E!==null&&a.ng(E),x!==null&&(re&&z&&Xh(a),a.jk(),re&&z&&gc(a)),a.Se()}else if(b.type===vn.F)le=b.startX,oe=b.startY,ue=b.endX,pe=b.endY,b=Math.abs(ue-le)/2,xe=Math.abs(pe-oe)/2,le=Math.min(le,ue)+b,oe=Math.min(oe,pe)+xe,a.beginPath(),a.moveTo(le,oe-xe),a.bezierCurveTo(le+it.wg*b,oe-xe,le+b,oe-it.wg*xe,le+b,oe),a.bezierCurveTo(le+b,oe+it.wg*xe,le+it.wg*b,oe+xe,le,oe+xe),a.bezierCurveTo(le-it.wg*b,oe+xe,le-b,oe+it.wg*xe,le-b,oe),a.bezierCurveTo(le-b,oe-it.wg*xe,le-it.wg*b,oe-xe,le,oe-xe),a.closePath(),E!==null&&a.ng(E),x!==null&&(re&&z&&Xh(a),a.jk(),re&&z&&gc(a)),a.Se();else if(b.type===vn.o)for(b=b.figures,oe=b.length,xe=0;xe<oe;xe++){le=b.s[xe],a.beginPath(),a.moveTo(le.startX,le.startY),ue=le.segments.s,pe=ue.length;for(var Ee=null,Fe=0;Fe<pe;Fe++){var Oe=ue[Fe];switch(Oe.type){case Ar:a.moveTo(Oe.endX,Oe.endY);break;case rr:a.lineTo(Oe.endX,Oe.endY);break;case br:a.bezierCurveTo(Oe.point1X,Oe.point1Y,Oe.point2X,Oe.point2Y,Oe.endX,Oe.endY);break;case Lo:a.quadraticCurveTo(Oe.point1X,Oe.point1Y,Oe.endX,Oe.endY);break;case Rr:if(Oe.radiusX===Oe.radiusY){var st=Math.PI/180;a.arc(Oe.point1X,Oe.point1Y,Oe.radiusX,Oe.startAngle*st,(Oe.startAngle+Oe.sweepAngle)*st,0>Oe.sweepAngle,Ee!==null?Ee.endX:le.startX,Ee!==null?Ee.endY:le.startY)}else if(Ee=Ki(Oe,le),st=Ee.length,st===0)a.lineTo(Oe.centerX,Oe.centerY);else for(var Ye=0;Ye<st;Ye++){var pt=Ee[Ye];Ye===0&&a.lineTo(pt[0],pt[1]),a.bezierCurveTo(pt[2],pt[3],pt[4],pt[5],pt[6],pt[7])}break;case tr:if(Ye=st=0,Ee!==null&&Ee.type===Rr){if(Ee=Ki(Ee,le),pt=Ee.length,pt===0){a.lineTo(Oe.endX,Oe.endY);break}Ee=Ee[pt-1]||null,Ee!==null&&(st=Ee[6],Ye=Ee[7])}else st=Ee!==null?Ee.endX:le.startX,Ye=Ee!==null?Ee.endY:le.startY;if(Ee=Dr(Oe,le,st,Ye),st=Ee.length,st===0){a.lineTo(Oe.endX,Oe.endY);break}for(Ye=0;Ye<st;Ye++)pt=Ee[Ye],a.bezierCurveTo(pt[2],pt[3],pt[4],pt[5],pt[6],pt[7]);break;default:St("Segment not of valid type: "+Oe.type)}Oe.isClosed&&a.closePath(),Ee=Oe}ue=le.isFilled,z?le.isShadowed?(ue===!0&&E!=="transparent"&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&(ue&&re&&Xh(a),a.jk(),ue&&re&&gc(a))):(Xh(a),ue&&E!=="transparent"&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&a.jk(),gc(a)):(ue&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&a.jk()),a.Se(xe)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=ni(),z.type===vn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),fg(a,y,E,x);else if(z.type===vn.o)for(z=z.figures.iterator;z.next();){for(re=z.value,E.length=0,E.push(re.startX),E.push(re.startY),ne=re.startX,b=re.startY,oe=ne,xe=b,le=re.segments.s,ue=le.length,pe=0;pe<ue;pe++){switch(Fe=le[pe],Fe.type){case Ar:fg(a,y,E,x),E.length=0,E.push(Fe.endX),E.push(Fe.endY),ne=Fe.endX,b=Fe.endY,oe=ne,xe=b;break;case rr:E.push(Fe.endX),E.push(Fe.endY),ne=Fe.endX,b=Fe.endY;break;case br:it.Qe(ne,b,Fe.point1X,Fe.point1Y,Fe.point2X,Fe.point2Y,Fe.endX,Fe.endY,.5,E),ne=Fe.endX,b=Fe.endY;break;case Lo:it.ep(ne,b,Fe.point1X,Fe.point1Y,Fe.endX,Fe.endY,.5,E),ne=Fe.endX,b=Fe.endY;break;case Rr:if(Oe=Ki(Fe,re),Ee=Oe.length,Ee===0){E.push(Fe.centerX),E.push(Fe.centerY),ne=Fe.centerX,b=Fe.centerY;break}for(st=0;st<Ee;st++)Ye=Oe[st],it.Qe(ne,b,Ye[2],Ye[3],Ye[4],Ye[5],Ye[6],Ye[7],.5,E),ne=Ye[6],b=Ye[7];break;case tr:if(Oe=Dr(Fe,re,ne,b),Ee=Oe.length,Ee===0){E.push(Fe.endX),E.push(Fe.endY),ne=Fe.endX,b=Fe.endY;break}for(st=0;st<Ee;st++)Ye=Oe[st],it.Qe(ne,b,Ye[2],Ye[3],Ye[4],Ye[5],Ye[6],Ye[7],.5,E),ne=Ye[6],b=Ye[7];break;default:St("Segment not of valid type: "+Fe.type)}Fe.isClosed&&(E.push(oe),E.push(xe),fg(a,y,E,x))}fg(a,y,E,x)}else if(z.type===vn.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),fg(a,y,E,x);else if(z.type===vn.F){if(b=new co,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,ne=new Zi(Rr),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(z.startX+z.endX)/2,ne.centerY=(z.startY+z.endY)/2,ne.radiusX=Math.abs(z.startX-z.endX)/2,ne.radiusY=Math.abs(z.startY-z.endY)/2,b.add(ne),z=Ki(ne,b),re=z.length,re===0)E.push(ne.centerX),E.push(ne.centerY);else for(ne=b.startX,b=b.startY,oe=0;oe<re;oe++)xe=z[oe],it.Qe(ne,b,xe[2],xe[3],xe[4],xe[5],xe[6],xe[7],.5,E),ne=xe[6],b=xe[7];fg(a,y,E,x)}ci(E),a.restore(),a.Vc(!1)}}}},Le.kk=function(a,y,x){return!Rt.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)},Le.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Rt.prototype.nk.call(this,a)},Le.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)}},Le.ga=function(a,y){if(y===void 0&&(y=new tt),a instanceof Ei){a.Mc()&&St("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Le.mi=function(a){a===void 0&&(a=new pn);var y=this.naturalBounds,x=this.oe;y=pn.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=tt.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),ma(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),ma(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),ma(a,E.x,E.y,0,0),pn.free(y),tt.free(E),a},Le.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==vn.j||y||(b+=2);var z=pn.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return pn.free(z),!1;if(E=b+1e-4,x.type===vn.j)return this.stroke===null||(E=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(pn.free(z),it.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===vn.u){y=x.startX;var ne=x.startY,re=x.endX;if(x=x.endY,z.x=Math.min(y,re),z.y=Math.min(ne,x),z.width=Math.abs(re-y),z.height=Math.abs(x-ne),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return pn.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),pn.free(z),a}if(x.type===vn.F){ne=x.startX,b=x.startY,re=x.endX;var oe=x.endY;if(x=Math.min(ne,re),y=Math.min(b,oe),ne=Math.abs(re-ne)/2,b=Math.abs(oe-b)/2,x=a.x-(x+ne),y=a.y-(y+b),this.fill===null){if(ne-=E,b-=E,0>=ne||0>=b||1>=x*x/(ne*ne)+y*y/(b*b))return pn.free(z),!1;ne+=E,b+=E}return this.stroke!==null&&(ne+=E,b+=E),pn.free(z),0>=ne||0>=b?!1:1>=x*x/(ne*ne)+y*y/(b*b)}if(x.type===vn.o)return pn.free(z),this.fill===null?Ro(x,a.x,a.y,b):Ir(x,a,b,1<this.strokeWidth,y);St("Unknown Geometry type: "+x.type)},Le.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var re=this.figure,oe=bv[re];if(oe===void 0){var le=it.Ze[re];typeof le=="string"&&(le=it.Ze[le]),typeof le=="function"?(oe=le(null,100,100),bv[re]=oe):St("Unsupported Figure: "+re)}ne=oe.bounds}re=ne.width,oe=ne.height,le=ne.width;var ue=ne.height;switch(Bl(this,!0)){case On:E=x=0;break;case zn:le=Math.max(a-z,0),ue=Math.max(y-z,0);break;case Ti:le=Math.max(a-z,0),E=0;break;case Hi:x=0,ue=Math.max(y-z,0)}isFinite(b.width)&&(le=b.width),isFinite(b.height)&&(ue=b.height);var pe=this.maxSize,xe=this.minSize;switch(x=Math.max(x-z,xe.width),E=Math.max(E-z,xe.height),le=Math.min(pe.width,le),ue=Math.min(pe.height,ue),le=isFinite(le)?Math.max(x,le):Math.max(re,x),ue=isFinite(ue)?Math.max(E,ue):Math.max(oe,E),x=Ev(this),x){case On:break;case zn:re=le,oe=ue;break;case wi:x=Math.min(le/re,ue/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:St(x+" is not a valid geometryStretch.")}this.Rd!==null?(re===0&&(re=.001),oe===0&&(oe=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,E=re/ne.width,ne=oe/ne.height,isFinite(E)||(E=1),isFinite(ne)||(ne=1),this.ua=E===1&&ne===1?x:x.copy().scale(E,ne)):this.ua!==null&&it.$(this.ua.Sk,a-z)&&it.$(this.ua.Rk,y-z)||(this.ua=Mr.makeGeometry(this,re,oe)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-z/2,ne.y-z/2,a===0&&re===0?0:ne.width+z,y===0&&oe===0?0:ne.height+z):this.Ge(-(z/2),-(z/2),le+z,ue+z),b.w()?(le=b.width,ue=b.height,le=Math.min(pe.width,le),ue=Math.min(pe.height,ue),le=Math.max(xe.width,le),ue=Math.max(xe.height,ue),this.dc.h(0,0,le,ue)):this.dc.assign(ne)};function Ev(a){var y=a.geometryStretch;return a.Rd!==null?y===vr?zn:y:y===vr?bv[a.figure].defaultStretch:y}Le.eh=function(a,y,x,E){ol(this,a,y,x,E)},Le.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Le.Sj=function(a,y,x,E,b){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,le=-z.m21*ne,ue=z.m11*ne,pe=ne*(z.m21*z.dy-z.m22*z.dx),xe=ne*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*le+pe,ne=a*oe+y*ue+xe,re=x*re+E*le+pe,oe=x*oe+E*ue+xe,pe=this.ig/2,le=this.ua,le===null&&(this.measure(1/0,1/0),le=this.ua);var Ee=le.bounds;if(ue=!1,le.type===vn.j)if(1.5>=this.strokeWidth)ue=it.Ve(le.startX,le.startY,le.endX,le.endY,z,ne,re,oe,b);else{if(le.startX===le.endX?(E=pe,ue=0):(y=(le.endY-le.startY)/(le.endX-le.startX),ue=pe/Math.sqrt(1+y*y),E=ue*y),y=ni(),a=new tt,it.Ve(le.startX+E,le.startY+ue,le.endX+E,le.endY+ue,z,ne,re,oe,a)&&y.push(a),a=new tt,it.Ve(le.startX-E,le.startY-ue,le.endX-E,le.endY-ue,z,ne,re,oe,a)&&y.push(a),a=new tt,it.Ve(le.startX+E,le.startY+ue,le.startX-E,le.startY-ue,z,ne,re,oe,a)&&y.push(a),a=new tt,it.Ve(le.endX+E,le.endY+ue,le.endX-E,le.endY-ue,z,ne,re,oe,a)&&y.push(a),re=y.length,re===0)return ci(y),!1;for(ue=!0,oe=1/0,E=0;E<re;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-ne)*(a.y-ne),x<oe&&(oe=x,b.x=a.x,b.y=a.y);ci(y)}else if(le.type===vn.u)ue=it.Ff(Ee.x-pe,Ee.y-pe,Ee.x+Ee.width+pe,Ee.y+Ee.height+pe,z,ne,re,oe,b);else if(le.type===vn.F){y=pn.allocAt(Ee.x,Ee.y,Ee.width,Ee.height).Bc(pe,pe);e:if(y.width===0)ue=it.Ve(y.x,y.y,y.x,y.y+y.height,z,ne,re,oe,b);else if(y.height===0)ue=it.Ve(y.x,y.y,y.x+y.width,y.y,z,ne,re,oe,b);else{if(a=y.width/2,le=y.height/2,E=y.x+a,ue=y.y+le,x=9999,z!==re&&(x=(ne-oe)/(z-re)),9999>Math.abs(x)){if(oe=ne-ue-x*(z-E),0>a*a*x*x+le*le-oe*oe){b.x=NaN,b.y=NaN,ue=!1;break e}pe=Math.sqrt(a*a*x*x+le*le-oe*oe),re=(-(a*a*x*oe)+a*le*pe)/(le*le+a*a*x*x)+E,a=(-(a*a*x*oe)-a*le*pe)/(le*le+a*a*x*x)+E,le=x*(re-E)+oe+ue,oe=x*(a-E)+oe+ue,Math.abs((z-re)*(z-re))+Math.abs((ne-le)*(ne-le))<Math.abs((z-a)*(z-a))+Math.abs((ne-oe)*(ne-oe))?(b.x=re,b.y=le):(b.x=a,b.y=oe)}else{if(re=le*le,oe=z-E,re-=re/(a*a)*oe*oe,0>re){b.x=NaN,b.y=NaN,ue=!1;break e}oe=Math.sqrt(re),re=ue+oe,oe=ue-oe,Math.abs(re-ne)<Math.abs(oe-ne)?(b.x=z,b.y=re):(b.x=z,b.y=oe)}ue=!0}pn.free(y)}else if(le.type===vn.o){xe=tt.alloc();var Fe=re-z,Oe=oe-ne,st=Fe*Fe+Oe*Oe,Ye=z,pt=ne;if(0<st&&Ee.contains(Ye,pt)&&(xe.x=Ye,xe.y=pt,this.ca(xe)))for(Fe!==0&&.5>Math.abs(Fe)?(Oe*=.5/Fe,Fe=.5):Oe!==0&&.5>Math.abs(Oe)&&(Fe*=.5/Oe,Oe=.5),Ye-=Fe,pt-=Oe;Ee.contains(Ye,pt);)Ye-=Fe,pt-=Oe;for(b.x=re,b.y=oe,Oe=0;Oe<le.figures.count;Oe++){var xt=le.figures.s[Oe],Mt=xt.isFilled?Ye:z,Ot=xt.isFilled?pt:ne,en=xt.segments;Ee=xt.startX,Fe=xt.startY;for(var ri=Ee,Si=Fe,gi=0;gi<en.count;gi++){var $n=en.s[gi],An=$n.type,hr=$n.endX,Ji=$n.endY,mo=!1;switch(An){case Ar:ri=hr,Si=Ji;break;case rr:mo=Dm(Ee,Fe,hr,Ji,Mt,Ot,re,oe,xe);break;case br:mo=it.Eo(Ee,Fe,$n.point1X,$n.point1Y,$n.point2X,$n.point2Y,hr,Ji,Mt,Ot,re,oe,.6,xe);break;case Lo:mo=it.Eo(Ee,Fe,Ee+2/3*($n.point1X-Ee),Fe+2/3*($n.point1Y-Fe),hr+2/3*($n.point1X-hr),Ji+2/3*($n.point1Y-Ji),hr,Ji,Mt,Ot,re,oe,.6,xe);break;case Rr:case tr:An=$n.type===Rr?Ki($n,xt):Dr($n,xt,Ee,Fe);var Yo=An.length;if(Yo===0){mo=Dm(Ee,Fe,$n.type===Rr?$n.centerX:$n.endX,$n.type===Rr?$n.centerY:$n.endY,Mt,Ot,re,oe,xe);break}for(Ji=null,hr=0;hr<Yo;hr++){if(Ji=An[hr],hr===0&&Dm(Ee,Fe,Ji[0],Ji[1],Mt,Ot,re,oe,xe)){var xs=Tm(Mt,Ot,xe,st,b);xs<st&&(st=xs,ue=!0)}it.Eo(Ji[0],Ji[1],Ji[2],Ji[3],Ji[4],Ji[5],Ji[6],Ji[7],Mt,Ot,re,oe,.6,xe)&&(xs=Tm(Mt,Ot,xe,st,b),xs<st&&(st=xs,ue=!0))}hr=Ji[6],Ji=Ji[7];break;default:St("Unknown Segment type: "+An)}Ee=hr,Fe=Ji,mo&&(mo=Tm(Mt,Ot,xe,st,b),mo<st&&(st=mo,ue=!0)),$n.isClosed&&(hr=ri,Ji=Si,Dm(Ee,Fe,hr,Ji,Mt,Ot,re,oe,xe)&&($n=Tm(Mt,Ot,xe,st,b),$n<st&&(st=$n,ue=!0)))}}z=x-a,ne=E-y,re=Math.sqrt(z*z+ne*ne),re!==0&&(z/=re,ne/=re),b.x-=z*pe,b.y-=ne*pe,tt.free(xe)}else St("Unknown Geometry type: "+le.type);return ue?(this.transform.Ga(b),!0):!1};function Tm(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function Dm(a,y,x,E,b,z,ne,re,oe){if(it.$(a,x)&&it.$(y,E)||it.$(b,ne)&&it.$(z,re))return!1;var le=!1,ue=(b-ne)*(y-E)-(z-re)*(a-x);return ue===0?!1:(oe.x=((b*re-z*ne)*(a-x)-(b-ne)*(a*E-y*x))/ue,oe.y=((b*re-z*ne)*(y-E)-(z-re)*(a*E-y*x))/ue,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(oe.y>a||it.$(oe.y,a))&&(oe.y<y||it.$(oe.y,y))&&(le=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||it.$(oe.x,y))&&(oe.x<a||it.$(oe.x,a))&&(le=!0)),le)}Le.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var E=this.strokeWidth/2,b=!1,z=tt.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),tt.free(z),b},Le.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=_t.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var ne=tt.alloc();if(ne.h(E,z),x.Ga(ne),this.gh(ne,!0)||(ne.h(b,z),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0)))return tt.free(ne),!0;var re=tt.alloc(),oe=tt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),re.x=b,re.y=z,re.transform(x),ne.x=E,ne.y=z,ne.transform(x),y=!1,tf(this,ne,re,oe)?y=!0:(ne.x=b,ne.y=a,ne.transform(x),tf(this,ne,re,oe)?y=!0:(re.x=E,re.y=a,re.transform(x),tf(this,ne,re,oe)?y=!0:(ne.x=E,ne.y=z,ne.transform(x),tf(this,ne,re,oe)&&(y=!0)))),tt.free(ne),_t.free(x),tt.free(re),tt.free(oe),y};function tf(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Le.tx=function(a,y,x){function E(st,Ye){for(var pt=st.length,xt=0;xt<pt;xt+=2)if(Ye.zd(st[xt],st[xt+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,re=ne.x,oe=ne.y,le=ne.x+ne.width;if(ne=ne.y+ne.height,ua(a.x,a.y,re,oe)<=b&&ua(a.x,a.y,le,oe)<=b&&ua(a.x,a.y,re,ne)<=b&&ua(a.x,a.y,le,ne)<=b)return!0}if(re=y.startX,oe=y.startY,le=y.endX,ne=y.endY,y.type===vn.j){if(x=(re-le)*(a.x-le)+(oe-ne)*(a.y-ne),xo(a.x,a.y,re,oe,le,ne)<=(0<=(le-re)*(a.x-re)+(ne-oe)*(a.y-oe)&&0<=x?b:z))return!0}else{if(y.type===vn.u)return y=!1,x&&(y=xo(a.x,a.y,re,oe,re,ne)<=b||xo(a.x,a.y,re,oe,le,oe)<=b||xo(a.x,a.y,le,oe,le,ne)<=b||xo(a.x,a.y,re,ne,le,ne)<=b),y;if(y.type===vn.F){y=a.x-(re+le)/2,z=a.y-(oe+ne)/2;var ue=Math.abs(le-re)/2,pe=Math.abs(ne-oe)/2;if(ue===0||pe===0)return xo(a.x,a.y,re,oe,le,ne)<=b;if(x){if(a=it.$y(ue,pe,y,z),a*a<=b)return!0}else return!(ua(y,z,-ue,0)>=b||ua(y,z,0,-pe)>=b||ua(y,z,0,pe)>=b||ua(y,z,ue,0)>=b)}else if(y.type===vn.o){if(le=y.bounds,z=le.x,re=le.y,oe=le.x+le.width,le=le.y+le.height,a.x>oe&&a.x<z&&a.y>le&&a.y<re&&xo(a.x,a.y,z,re,z,le)>b&&xo(a.x,a.y,z,re,oe,re)>b&&xo(a.x,a.y,oe,le,z,le)>b&&xo(a.x,a.y,oe,le,oe,re)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?Ro(y,a.x,a.y,z):Ir(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],ne=z.startX,ue=z.startY,a.zd(ne,ue)>b)return!1;for(re=z.segments.s,oe=re.length,le=0;le<oe;le++)switch(pe=re[le],pe.type){case Ar:case rr:if(ne=pe.endX,ue=pe.endY,a.zd(ne,ue)>b)return!1;break;case br:var xe=ni();if(it.Qe(ne,ue,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.8,xe),ne=E(xe,a),ci(xe),ne||(ne=pe.endX,ue=pe.endY,a.zd(ne,ue)>b))return!1;break;case Lo:if(xe=ni(),it.ep(ne,ue,pe.point1X,pe.point1Y,pe.endX,pe.endY,.8,xe),ne=E(xe,a),ci(xe),ne||(ne=pe.endX,ue=pe.endY,a.zd(ne,ue)>b))return!1;break;case Rr:case tr:xe=pe.type===Rr?Ki(pe,z):Dr(pe,z,ne,ue);var Ee=xe.length;if(Ee===0){if(ne=pe.type===Rr?pe.centerX:pe.endX,ue=pe.type===Rr?pe.centerY:pe.endY,a.zd(ne,ue)>b)return!1;break}pe=null;for(var Fe=ni(),Oe=0;Oe<Ee;Oe++)if(pe=xe[Oe],Fe.length=0,it.Qe(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.8,Fe),E(Fe,a))return ci(Fe),!1;ci(Fe),pe!==null&&(ne=pe[6],ue=pe[7]);break;default:St("Unknown Segment type: "+pe.type)}}return!0}}}return!1},Le.qc=function(){this.ua=null},Le.kq=function(){return this.ig};function m1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=wp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=rs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Ei(1-rs.x,rs.y)))}Mr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Qh[a.toArrow];else a.fromArrow!=="None"?E=Qh[a.fromArrow]:(E=it.Ze[a.figure],typeof E=="string"&&(E=it.Ze[E]),E===void 0&&St("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=it.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function v1(a){var y=Qh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Qh[x],y===void 0){var E=null,b;for(b in it.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=vn.parse(it.um[E],!1),Qh[E]=a,x!==E&&(Qh[x]=E),E}}return typeof y=="string"?y:y instanceof vn?a:null}Ve.Object.defineProperties(Mr.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),Zs(this)&&(a=this.part,a!==null&&oa(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=vn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=tt.allocAt(-y.x,-y.y),tt.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&Ff(a,"Shape.fill"),a instanceof Ao&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Ff(a,"Shape.stroke"),a instanceof Ao&&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 In(a,"value >= 0",Mr,"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"?In(a,'"butt", "round", or "square"',Mr,"strokeCap"):(ef(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"?In(a,'"miter", "bevel", or "round"',Mr,"strokeJoin"):(ef(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){ef(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||St("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(ef(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=it.Ze[a];typeof x=="function"?x=a:(x=it.Ze[a.toLowerCase()])||St("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=v1(a);x===null?St("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new fd),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),m1(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=v1(a);x===null?St("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new fd),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),m1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Po},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),ef(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Po},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),ef(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&&(ef(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:vr},set:function(a){var y=this.geometryStretch;y!==a&&(ef(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 qh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Th(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 qh),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 qh),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 qh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Mr.prototype.intersectsRect=Mr.prototype.Yc,Mr.prototype.containedInRect=Mr.prototype.fh,Mr.prototype.getNearestIntersectionPoint=Mr.prototype.rs,Mr.prototype.getDocumentBounds=Mr.prototype.mi,Mr.prototype.getDocumentPoint=Mr.prototype.ga;var Qh=new _i,bv=new _i;Mr.className="Shape",Mr.getFigureGenerators=function(){var a=new xi,y;for(y in it.Ze)y!==y.toLowerCase()&&a.add(y,it.Ze[y]);return a.freeze(),a},Mr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=it.Ze;E[a]=y,E[x]=a},Mr.getArrowheadGeometries=function(){var a=new xi;for(E in it.um)if(Qh[E]===void 0){var y=vn.parse(it.um[E],!1);Qh[E]=y,y=E.toLowerCase(),y!==E&&(Qh[y]=E)}for(var x in Qh)if(x!==x.toLowerCase()){var E=Qh[x];E instanceof vn&&a.add(x,E)}return a.freeze(),a},Mr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=vn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||St("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Qh;E[a]=x,E[y]=a};function Mv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=vr,this.gg=this.fg=Po}Mv.prototype.copy=function(){var a=new Mv;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 Qo(a,y){return Rt.call(this),zm||(Nl=La?new Gu(null).context:null,zm=!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}Dt(Qo,Rt),Qo.prototype.cloneProtected=function(a){Rt.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 Rh(a){a.da===null?a.da=new Tv:a.da.nc&&(a.da=a.da.copy())}Le=Qo.prototype,Le.th=function(){Rt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function y1(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}Le.qb=function(a){a.classType===Qo?this.wrap=a:Rt.prototype.qb.call(this,a)},Le.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Le.v=function(){Rt.prototype.v.call(this)},Le.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,ne=pp(this),re=a.textAlign=this.textAlign,oe=y.tn;re==="start"?re=oe?"right":"left":re==="end"&&(re=oe?"left":"right"),oe=this.isUnderline;var le=this.isStrikethrough;Da(this,a,this.xc,!0,!1,x,E),(oe||le)&&Da(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ue=this.oe,pe=ue.dx-(ne*ue.m21+ue.dx);ue=ue.dy-(ne*ue.m22+ue.dy);var xe=y.scale;switch(8>(pe*pe+ue*ue)*xe*xe&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Jl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,pe=this.spacingBelow,this.flip){case ro:a.translate(b,0),a.scale(-1,1);break;case kr:a.translate(0,z),a.scale(1,-1);break;case Ho:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ue=this.Gc,xe=(y+ne+pe)*ue,z>xe&&(E=this.verticalAlignment,E=E.y*z-E.y*xe+E.offsetY),ue===1&&this.ze!==null)pe=this.Cb,pe>b&&(pe=b),this.Oj(this.ze,a,0,E+y,b,ne,pe,x,re,oe,le);else if(this.Qc!==null&&this.Qb!==null)for(xe=0;xe<ue;xe++){var Ee=this.Qc[xe];Ee>b&&(Ee=b),E+=y,this.Oj(this.Qb[xe],a,0,E,b,ne,Ee,x,re,oe,le),E+=ne+pe}switch(this.flip){case ro:a.scale(-1,1),a.translate(-b,0);break;case kr:a.scale(1,-1),a.translate(0,-z);break;case Ho:a.scale(-1,-1),a.translate(-b,-z)}}},Le.Oj=function(a,y,x,E,b,z,ne,re,oe,le,ue){var pe=0;if(re)oe==="left"?pe=0:oe==="right"?pe=b-ne:oe==="center"&&(pe=(b-ne)/2),y.fillRect(x+pe,E+.25*z,ne,1);else{if(oe==="left"?pe=0:oe==="right"?pe=b:oe==="center"&&(pe=b/2),b=Om!==null?Om(this,z):.75*z,y.fillText(a,x+pe,E+b),a=z/20|0,a===0&&(a=1),oe==="right"?pe-=ne:oe==="center"&&(pe-=ne/2),le){re=Im!==null?Im(this,z):.8*z,oe=x+pe,le=E+re,b=x+pe+ne,re=E+re;var xe=a;y.beginPath(),y.lineWidth=xe,y.moveTo(oe,le),y.lineTo(b,re),y.stroke(),y.Se(),y instanceof Jl&&y.ad.classList.add("gojs-td")}ue&&(ue=E+z-z/2.2|0,a%2!==0&&(ue+=.5),E=x+pe,z=ue,x=x+pe+ne,ne=ue,pe=a,y.beginPath(),y.lineWidth=pe,y.moveTo(E,z),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Jl&&y.ad.classList.add("gojs-td"))}},Le.kk=function(a,y,x){if(!Rt.prototype.kk.call(this,a,y,x))return!1;if(Da(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++)Jy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Jy(a,y,!0);return!0},Le.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Rt.prototype.nk.call(this,a)},Le.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)}},Le.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;Nl!==null&&b1!==z&&(b1=Nl.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;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 re=ne=0,oe=!1;!oe;){var le=z.indexOf(`
`,re);le===-1&&(le=z.length,oe=!0),re=z.substr(re,le-re),this.formatting===mp&&(re=re.trim()),ne=Math.max(ne,oh(re)),re=le+1}z=ne}else ne=z.indexOf(`
`,0),0<=ne&&(z=z.substr(0,ne)),z=oh(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)),ne=x1(this,z),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,oe=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Rm&&(y=this.Ae,y=this.overflow===Rm?S1(y):0,le=this.spacingAbove+this.spacingBelow,le=Math.max(0,pp(this)+le),oe=Math.min(this.maxLines-1,Math.max(Math.floor(oe/le+.01)-1,0)),!(oe+1>=this.Qb.length))){for(this.l|=16777216,le=this.Qb[oe],y=Math.max(1,a-y);oh(le)>y&&1<le.length;)le=le.substr(0,le.length-1);le+=vp,y=oh(le),this.Qb[oe]=le,this.Qb=this.Qb.slice(0,oe+1),this.Qc[oe]=y,this.Qc=this.Qc.slice(0,oe+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===P1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),ne=Math.max(E,ne),Ia(this.dc,z,ne),this.Ge(0,0,z,ne),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Le.eh=function(a,y,x,E){ol(this,a,y,x,E)};function gp(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 Lv(a,y,x,E){var b=a.formatting===mp;b&&(y=y.trim());var z=0,ne=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,pp(a)+re);var oe=a.overflow===Rm?S1(ne):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,re);else if(ne=y,a.wrap===Fv){a.Le=1;var le=oh(y);if(oe===0||le<=x)a.Cb=Math.max(a.Cb,le),gp(a,y,a.Cb),E!==null&&E.h(le,re);else{for(z=gg(a,ne),ne=ne.substr(z.length),y=gg(a,ne),le=oh(z+y);0<y.length&&le<=x;)z+=y,ne=ne.substr(y.length),y=gg(a,ne),le=z+y,b&&(le=le.trim()),le=oh(le);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);oh(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=vp;var ue=oh(z);a.Cb=ue,gp(a,z,ue),E!==null&&E.h(ue,re)}}else{for(oe=0,ne.length===0&&(oe=1,gp(a,ne,0));0<ne.length;){for(y=gg(a,ne),ne=ne.substr(y.length);oh(y)>x;){var pe=1;for(le=oh(y.substr(0,pe)),ue=0;le<=x;)pe++,ue=le,le=oh(y.substr(0,pe));if(pe===1){var xe=le;z=Math.max(z,le)}else xe=ue,z=Math.max(z,ue);if(pe--,1>pe&&(pe=1),gp(a,y.substr(0,pe),xe),oe++,y=y.substr(pe),a.Gc+oe>a.maxLines)break}for(ue=gg(a,ne),le=oh(y+ue);0<ue.length&&le<=x;)y+=ue,ne=ne.substr(ue.length),ue=gg(a,ne),le=y+ue,b&&(le=le.trim()),le=oh(le);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ue.length===0?(pe=le,z=Math.max(z,le)):(pe=ue=oh(y),z=Math.max(z,ue)),gp(a,y,pe),oe++,a.Gc+oe>a.maxLines))break}a.Le=Math.min(a.maxLines,oe),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,re*a.Le)}}function gg(a,y){if(a.wrap===w1)return y.substr(0,1);for(var x=y.length,E=0,b=Sx;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===C1&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function oh(a){return Nl===null?8*a.length:Nl.measureText(a).width}function pp(a){if(a.df!==null)return a.df;var y=a.Ae;if(Nl===null){var x=16;return a.df=x}return kv[y]!==void 0&&5e3>E1?x=kv[y]:(x=1.3*Nl.measureText("M").width,kv[y]=x,E1++),a.df=x}function S1(a){if(Nl===null)return 6;if(jm[a]!==void 0&&5e3>Av)var y=jm[a];else y=Nl.measureText(vp).width,jm[a]=y,Av++;return y}function x1(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,pp(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,ne,re=!1;!re;){if(ne=x.indexOf(`
`,z),ne===-1&&(ne=x.length,re=!0),z<=ne){if(z=x.substr(z,ne-z),a.wrap!==Fv){a.Le=0;var oe=Xn.alloc();Lv(a,z,y,oe),b+=oe.height,Xn.free(oe),a.Gc+=a.Le}else Lv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=ne+1}return a.Lq=b}Ve.Object.defineProperties(Qo.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"||(Rh(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:On},set:function(a){var y=this.flip;y!==a&&(Rh(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ds},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Rh(this),this.da.Yr=a,cl(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Xn.alloc();Lv(this,this.ec,999999,a);var y=a.width;Xn.free(a),a=x1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Ia(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:Bv},set:function(a){var y=this.wrap;y!==a&&(Rh(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Nv},set:function(a){var y=this.overflow;y!==a&&(Rh(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Ff(a,"TextBlock.stroke"),a instanceof Ao&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return pp(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&&(Rh(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&&(Rh(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 qh),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 qh),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 qh),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 qh),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 qh),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&&(Rh(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&&(Rh(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&&(Rh(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&&(Rh(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:mp},set:function(a){var y=this.formatting;y!==a&&(Rh(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&&In(a,"> 0",Qo,"maxLines"),Rh(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 Om=null,Im=null,Fv=new fn(Qo,"None",0),P1=new fn(Qo,"WrapFit",1),Bv=new fn(Qo,"WrapDesiredSize",2),w1=new fn(Qo,"WrapBreakAll",3),Nv=new fn(Qo,"OverflowClip",0),Rm=new fn(Qo,"OverflowEllipsis",1),mp=new fn(Qo,"FormatTrim",0),C1=new fn(Qo,"FormatNone",0),Sx=/[ \u200b\u00ad]/,kv=new _i,E1=0,jm=new _i,Av=0,vp="...",b1="",Nl=null,zm=!1;Qo.className="TextBlock";function Tv(){this.nc=!1,this.Hd=null,this.Xf=On,this.gq=mp,this.Jq=1/0,this.$q=Nv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ds,this.$r=Bv}Tv.prototype.copy=function(){var a=new Tv;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},Qo.getEllipsis=function(){return vp},Qo.setEllipsis=function(a){vp=a,jm=new _i,Av=0},Qo.getBaseline=function(){return Om},Qo.setBaseline=function(a){Om=a},Qo.getUnderline=function(){return Im},Qo.setUnderline=function(a){Im=a},Qo.isValidFont=function(a){if(zm||(Nl=La?new Gu(null).context:null,zm=!0),Nl===null)return!0;var y=Nl.font;if(a===y||a==="10px sans-serif")return!0;Nl.font="10px sans-serif",Nl.font=a;var x=Nl.font;if(x!=="10px sans-serif")return Nl.font=y,!0;Nl.font="19px serif";var E=Nl.font;return Nl.font=a,x=Nl.font,Nl.font=y,x!==E},Qo.FormatNone=C1,Qo.FormatTrim=mp,Qo.None=Fv,Qo.OverflowClip=Nv,Qo.OverflowEllipsis=Rm,Qo.WrapBreakAll=w1,Qo.WrapDesiredSize=Bv,Qo.WrapFit=P1;function qh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}qh.prototype.copy=function(){var a=new qh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},qh.className="GradElementSettings";function kl(a,y){Rt.call(this),this.Eg=null,this.qo="",this.Xg=$o,this.Nk=zn,this.Zg=this.Hd=null,this.Mk=Jr,this.Xf=On,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 pg;Dt(kl,Rt),kl.prototype.cloneProtected=function(a){Rt.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},kl.prototype.qb=function(a){a===On||a===wi||a===Kr?this.imageStretch=a:Rt.prototype.qb.call(this,a)},kl.prototype.toString=function(){return"Picture("+this.source+")#"+Bi(this)};function mg(a){a===void 0&&(a=""),a!==""?pg[a]&&(delete pg[a],_m--):(pg=new _i,_m=0)}function M1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",ne=b.Og.I(z);if(ne!==null)for(var re=ne.length,oe=0;oe<re;oe++)z=ne[oe],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(ls(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",ne=b.Og.I(z);if(ne!==null){b=ne.length,z=ni();for(var re=0;re<b;re++)z.push(ne[re]);if(y.hn)for(re=0;re<b;re++)ne=z[re],ne.Hd!==null&&ne.Hd(ne,x);ci(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}kl.prototype.hA=function(){if(this.source!==""){mg(this.source);var a=this.source;this.source="",this.source=a}},kl.prototype.redraw=function(){this.N(),this.Uc=!0},kl.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof Qd)){var b=a instanceof Jl;E=this.naturalBounds;var z=0,ne=0,re=this.qn,oe=re?+x.width:x.naturalWidth;if(re=re?+x.height:x.naturalHeight,oe===void 0&&x.videoWidth&&(oe=x.videoWidth),re===void 0&&x.videoHeight&&(re=x.videoHeight),oe=oe||E.width,re=re||E.height,oe!==0&&re!==0){var le=oe,ue=re;this.sourceRect.w()&&(z=this.Xg.x,ne=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var pe=oe,xe=re,Ee=this.Nk,Fe=this.Mk;switch(Ee){case On:if(this.sourceRect.w())break;pe>=E.width&&(z=z+Fe.offsetX+(pe*Fe.x-E.width*Fe.x)),xe>=E.height&&(ne=ne+Fe.offsetY+(xe*Fe.y-E.height*Fe.y)),oe=Math.min(E.width,pe),re=Math.min(E.height,xe);break;case zn:pe=E.width,xe=E.height;break;case wi:case Kr:Ee===wi?(Ee=Math.min(E.height/xe,E.width/pe),pe*=Ee,xe*=Ee):Ee===Kr&&(Ee=Math.max(E.height/xe,E.width/pe),pe*=Ee,xe*=Ee,pe>=E.width&&(z=(z+Fe.offsetX+(pe*Fe.x-E.width*Fe.x)/pe)*oe),xe>=E.height&&(ne=(ne+Fe.offsetY+(xe*Fe.y-E.height*Fe.y)/xe)*re),oe*=1/(pe/E.width),re*=1/(xe/E.height),pe=E.width,xe=E.height)}Ee=this.Df()*y.scale;var Oe=pe*Ee*xe*Ee,st=oe*re/Oe,Ye=x.__goCache;Ee=null;var pt=xx;if(!b){if(x.sq&&Ye!==void 0&&4<Oe&&st>pt*pt)for(Ye.gi===null&&(F1(Ye,4,le,ue,x),F1(Ye,16,le,ue,x)),b=Ye.gi,le=b.length,ue=0;ue<le&&b[ue].ratio*b[ue].ratio<st;ue++)Ee=b[ue];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Gu(null).context;try{b.drawImage(this.Eg,0,0)}catch(xt){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(xt){this.vl=!0}}if(this.vl)return}}switch(b=pe<E.width?Fe.offsetX+(E.width*Fe.x-pe*Fe.x):0,Fe=xe<E.height?Fe.offsetY+(E.height*Fe.y-xe*Fe.y):0,this.flip){case ro:a.translate(Math.min(E.width,pe),0),a.scale(-1,1);break;case kr:a.translate(0,Math.min(E.height,xe)),a.scale(1,-1);break;case Ho:a.translate(Math.min(E.width,pe),Math.min(E.height,xe)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Ye!==void 0&&Ee!==null&&Ee.ratio!==1){a.save(),y=Ee.ratio;try{a.drawImage(Ee.source,z/y,ne/y,Math.min(Ee.source.width,oe/y),Math.min(Ee.source.height,re/y),b,Fe,Math.min(E.width,pe),Math.min(E.height,xe)),a instanceof Jl&&(this.bt=[z/y,ne/y,Math.min(Ee.source.width,oe/y),Math.min(Ee.source.height,re/y),b,Fe,Math.min(E.width,pe),Math.min(E.height,xe)])}catch(xt){this.en=!1}a.restore()}else try{a.drawImage(x,z,ne,oe,re,b,Fe,Math.min(E.width,pe),Math.min(E.height,xe)),a instanceof Jl&&(this.bt=[z,ne,oe,re,b,Fe,Math.min(E.width,pe),Math.min(E.height,xe)])}catch(xt){this.en=!1}switch(this.flip){case ro:a.scale(-1,1),a.translate(-Math.min(E.width,pe),0);break;case kr:a.scale(1,-1),a.translate(0,-Math.min(E.height,xe));break;case Ho:a.scale(-1,-1),a.translate(-Math.min(E.width,pe),-Math.min(E.height,xe))}}}}},kl.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=Bl(this,!0),ne=this.Eg,re=this.qn,oe=0,le=0;(re||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(oe=re?+ne.width:ne.naturalWidth,le=re?+ne.height:ne.naturalHeight),isFinite(b.width)||z===zn||z===Ti?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=oe)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:oe),isFinite(b.height)||z===zn||z===Hi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=le)),E=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:le),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Ia(this.dc,a,y),this.Ge(0,0,a,y)},kl.prototype.eh=function(a,y,x,E){ol(this,a,y,x,E)},Ve.Object.defineProperties(kl.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||St("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Xg(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Ln),E!==null&&x&&hd(E,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(ls(this,!1),this.v())):x&&M1(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=pg;if(La){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<_m&&(mg(),x=pg),E=kn("img"),E.hn=!0,M1(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,_m++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new L1),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}}}),kl.prototype.redraw=kl.prototype.redraw,kl.prototype.reloadSource=kl.prototype.hA;var _m=0,xx=4;kl.className="Picture",pg=new _i,kl.clearCache=mg;function L1(){this.gi=null}function F1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Gu(null),ne=z.context,re=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new B1(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),ne.setTransform(re*x,0,0,re*x,0,0),ne.yc(),ne.drawImage(b,0,0),a.gi.push(y))}L1.className="PictureCacheArray";function B1(a,y){this.source=a,this.ratio=y}B1.className="PictureCacheInstance";function vg(){this.os=new vn,this.mc=null}vg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new vn,this.mc=null};function yg(a,y,x,E,b,z){a.mc=new co,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}vg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new Zi(Ar);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},vg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new Zi(rr);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function _c(a,y,x,E,b,z,ne){var re;re===void 0&&(re=!1);var oe=new Zi(br);oe.point1X=y,oe.point1Y=x,oe.point2X=E,oe.point2Y=b,oe.endX=z,oe.endY=ne,re&&oe.close(),a.mc.segments.add(oe)}function Zm(a,y,x,E,b){var z;z===void 0&&(z=!1);var ne=new Zi(Lo);ne.point1X=y,ne.point1Y=x,ne.endX=E,ne.endY=b,z&&ne.close(),a.mc.segments.add(ne)}vg.prototype.arcTo=function(a,y,x,E,b,z,ne){z===void 0&&(z=0),ne===void 0&&(ne=!1);var re=new Zi(Rr);re.startAngle=a,re.sweepAngle=y,re.centerX=x,re.centerY=E,re.radiusX=b,re.radiusY=z!==0?z:b,ne&&re.close(),this.mc.segments.add(re)};function wx(a,y,x,E,b,z,ne,re){var oe;oe===void 0&&(oe=!1),y=new Zi(tr,ne,re,y,x,E,b,z),oe&&y.close(),a.mc.segments.add(y)}function N1(a){var y=Hm;return y!==null?(Hm=null,y.reset(a),y):(y=new vg,y.reset(a),y)}var Hm=null;vg.className="StreamGeometryContext";function tl(a,y){var x=a.toLowerCase(),E=it.Ze;E[a]=y,E[x]=a}tl("Rectangle",function(a,y,x){a="r"+y+","+x;var E=it.Mf[a];return E!==void 0||(E=new vn(vn.u),E.endX=y,E.endY=x,it.Nf<it.vm&&(it.Mf[a]=E,it.Nf++)),E}),tl("Square",function(a,y,x){a="s"+y+","+x;var E=it.Mf[a];return E!==void 0||(E=new vn(vn.u),E.endX=y,E.endY=x,E.defaultStretch=wi,it.Nf<it.vm&&(it.Mf[a]=E,it.Nf++)),E}),tl("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var E="rr"+y+","+x+","+a,b=it.Mf[E];if(b!==void 0)return b;var z=a*it.wg;return b=new vn().add(new co(a,0,!0).add(new Zi(rr,y-a,0)).add(new Zi(br,y,a,y-z,0,y,z)).add(new Zi(rr,y,x-a)).add(new Zi(br,y-a,x,y,x-z,y-z,x)).add(new Zi(rr,a,x)).add(new Zi(br,0,x-a,z,x,0,x-z)).add(new Zi(rr,0,a)).add(new Zi(br,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Ei(0,0,z,z),b.spot2=new Ei(1,1,-z,-z)),it.Nf<it.vm&&(it.Mf[E]=b,it.Nf++),b}),tl("Border","RoundedRectangle"),tl("Ellipse",function(a,y,x){a="e"+y+","+x;var E=it.Mf[a];return E!==void 0||(E=new vn(vn.F),E.endX=y,E.endY=x,E.spot1=Gs,E.spot2=$s,it.Nf<it.vm&&(it.Mf[a]=E,it.Nf++)),E}),tl("Circle",function(a,y,x){a="c"+y+","+x;var E=it.Mf[a];return E!==void 0||(E=new vn(vn.F),E.endX=y,E.endY=x,E.spot1=Gs,E.spot2=$s,E.defaultStretch=wi,it.Nf<it.vm&&(it.Mf[a]=E,it.Nf++)),E}),tl("TriangleRight",function(a,y,x){return new vn().add(new co(0,0).add(new Zi(rr,y,.5*x)).add(new Zi(rr,0,x).close())).pm(0,.25,.5,.75)}),tl("TriangleDown",function(a,y,x){return new vn().add(new co(0,0).add(new Zi(rr,y,0)).add(new Zi(rr,.5*y,x).close())).pm(.25,0,.75,.5)}),tl("TriangleLeft",function(a,y,x){return new vn().add(new co(y,x).add(new Zi(rr,0,.5*x)).add(new Zi(rr,y,0).close())).pm(.5,.25,1,.75)}),tl("TriangleUp",function(a,y,x){return new vn().add(new co(y,x).add(new Zi(rr,0,x)).add(new Zi(rr,.5*y,0).close())).pm(.25,.5,.75,1)}),tl("Triangle","TriangleUp"),tl("Diamond",function(a,y,x){return new vn().add(new co(.5*y,0).add(new Zi(rr,0,.5*x)).add(new Zi(rr,.5*y,x)).add(new Zi(rr,y,.5*x).close())).pm(.25,.25,.75,.75)}),tl("LineH",function(a,y,x){return a=new vn(vn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),tl("LineV",function(a,y,x){return a=new vn(vn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),tl("None","Rectangle"),tl("BarH","Rectangle"),tl("BarV","Rectangle"),tl("MinusLine","LineH"),tl("PlusLine",function(a,y,x){return new vn().add(new co(0,x/2,!1).add(new Zi(rr,y,x/2)).add(new Zi(Ar,y/2,0)).add(new Zi(rr,y/2,x)))}),tl("XLine",function(a,y,x){return new vn().add(new co(0,x,!1).add(new Zi(rr,y,0)).add(new Zi(Ar,0,0)).add(new Zi(rr,y,x)))}),tl("LineRight",function(a,y,x){return new vn().add(new co(.25*y,0,!1).add(new Zi(rr,.75*y,.5*x)).add(new Zi(rr,.25*y,x)))}),tl("LineDown",function(a,y,x){return new vn().add(new co(0,.25*x,!1).add(new Zi(rr,.5*y,.75*x)).add(new Zi(rr,y,.25*x)))}),tl("LineLeft",function(a,y,x){return new vn().add(new co(.75*y,0,!1).add(new Zi(rr,.25*y,.5*x)).add(new Zi(rr,.75*y,x)))}),tl("LineUp",function(a,y,x){return new vn().add(new co(0,.75*x,!1).add(new Zi(rr,.5*y,.25*x)).add(new Zi(rr,y,.75*x)))}),it.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Dv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=ia,this.ir=null,this.jr="",this.lr=Po,this.Gq="",this.Hq=cs,this.Pq=_o,this.Kq=ga,this.Up=null,this.Cq=127,this.zr=Oa,this.yr="gray",this.Vg=4}Dv.prototype.copy=function(){var a=new Dv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function Oi(a,y){a===void 0||a instanceof gs||typeof a=="string"?Hn.call(this,a):(Hn.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 tt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new pn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Dt(Oi,Hn),Oi.prototype.cloneProtected=function(a){Hn.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},Le=Oi.prototype,Le.Af=function(a){Hn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Le.toString=function(){var a=li(this.constructor)+"#"+Bi(this);return this.data!==null&&(a+="("+Ni(this.data)+")"),a};function Al(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}Le.th=function(){Hn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Le.gk=function(a,y,x,E,b,z,ne){var re=this.diagram;re!==null&&(a===ko&&y==="elements"?b instanceof Hn?qd(b,function(oe){sy(re.partManager,oe),$d(re,oe)}):hd(re,b):a===Uo&&y==="elements"&&(b instanceof Hn?qd(b,function(oe){ly(re.partManager,oe,re)}):Xg(re,b)),re.cb(a,y,x,E,b,z,ne))},Le.La=function(a){if(Hn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof Hn&&qd(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Oi.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Oi.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Oi.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new xi),y.Tf!==a&&(y.category=a),E.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},Oi.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Oi.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=ni();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);ci(y)}},Oi.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}e:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof fr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof ho))break e;$u(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Hn.Link),x.adornedObject=y)}if(x!==null){x.type===Hn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},Oi.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Ov(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Cx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Wm(a){if(gd(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function k1(a){if(a.G|=2097152,gd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var E=pn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),pn.free(E),Rv(a,!1)}}Oi.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new _t);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Oi.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Jr;this.locationSpot.sb()&&(z=this.locationSpot);var ne=tt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(ne),ne.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else ne.yi(y,x,E,b,z);a.rotate(this.Kb,ne.x,ne.y),tt.free(ne)}},Oi.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Oi.prototype.moveTo=function(a,y,x){a=tt.allocAt(a,y),this.move(a,x),tt.free(a)},Oi.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())},Oi.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())},Oi.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new xi),y.I(a)!==null)return y.I(a);var x=Hn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Zc(a,y,x,E){E===void 0&&(E=new tt),x=x.Mc()?Jr:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}Oi.prototype.mi=function(a){return a===void 0&&(a=new pn),a.assign(this.actualBounds)},Oi.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function A1(a){var y=tt.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Mr?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function nf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=u1(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,z+=ne,y+=ne,E-=ne/2,b-=ne/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}Oi.prototype.arrange=function(){if(dl(this)===!1)k1(this);else{Yh(this,!1);var a=this.Ib,y=pn.alloc();y.assign(a);var x=pd(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;D1(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||it.B(y.width,a.width)&&it.B(y.height,a.height)||0<=this.vw&&this.C(16),pn.free(y),Rv(this,!1)}},Le=Oi.prototype,Le.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=pn.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),pn.free(b)}!(this.G&65536)&&a.D(y)||R1(this,E,x),x.N(),!a.w()&&!y.w()||wl(a,y)||(this instanceof ai&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Le.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&T1(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new tt(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),gd(this)===!1&&dl(this)===!1&&(Wm(this),k1(this)),!0};function T1(a,y,x,E,b){y===null||a instanceof ho||(y=y.animationManager,y.zb&&fh(y,a,new tt(E,b),x))}Le.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;gd(this)||dl(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}Wm(this)},Le.Av=function(){this.G&=-2097153,Wm(this)};function D1(a,y,x){var E=A1(a),b=a.diagram,z=x.w(),ne=y.w();z&&ne?a.G&2097152?O1(a,y,x,b,E):I1(a,y,x,b,E):z?O1(a,y,x,b,E):ne&&I1(a,y,x,b,E),a.G|=2097152,tt.free(E),a.Uk()}function O1(a,y,x,E,b){var z=y.x,ne=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof ho||fh(x,a,new tt(z,ne),y),E||y.x===z&&y.y===ne||a.g("position",new tt(z,ne),y.copy()))}function I1(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function R1(a,y,x){jv(a,!1),a instanceof ai&&Dc(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?pd(a)?(Cl(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Le.si=function(){return!0},Le.Zc=function(){return!0},Le.ph=function(){return!1},Le.Dd=function(){return!0};function Iv(a,y,x,E){y.constructor===a.constructor||_1||(_1=!0,ii('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),ii(" Old class: "+li(a.constructor)+", new class: "+li(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,ne=a.isHighlighted,re=!0,oe=!0,le=!1;a instanceof ai&&(re=a.isTreeLeaf,oe=a.isTreeExpanded,le=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof ai&&(a.U=re?a.U|4:a.U&-5,a.U=oe?a.U|1:a.U&-2,a.U=le?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}Oi.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},Oi.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},Oi.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},Oi.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},Oi.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},Oi.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},Oi.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},Oi.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},Oi.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 gd(a){return(a.G&32768)!==0}function Rv(a,y){a.G=y?a.G|32768:a.G&-32769}function jv(a,y){a.G=y?a.G|65536:a.G&-65537}function pd(a){return(a.G&131072)!==0}Le=Oi.prototype,Le.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Gm(a,y){a.G=y?a.G|1048576:a.G&-1048577}Le.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Le.N=function(){var a=this.diagram;a!==null&&!dl(this)&&!gd(this)&&this.isVisible()&&this.Ib.w()&&a.N(nf(this,this.Ib))},Le.v=function(){Hn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof ai&&this.labeledLink!==null&&cl(this.labeledLink),a.$b(!0))},Le.Vo=function(a){a||(a=this.Ah,a!==null&&Gv(a,this))},Le.Wo=function(a){a||(a=this.Ah,a!==null&&$v(a,this))},Le.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Le.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof ai&&(y=y.labeledLink,y!==null)?zv(a,y):0}Le.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof ai&&(x=y.labeledLink,x!==null)?j1(a,x):y}Le.Td=function(a){return a instanceof fr?_v(this,this,a):!1};function _v(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!_v(a,E,x)?y instanceof ai&&(y=y.labeledLink,y!==null)?_v(a,y,x):!1:!0}Le.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof fr&&Gm(y,!0),y instanceof ai){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 ai&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof fr&&Gm(y,!1),y instanceof ai&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Oi.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof ai&&this.isLinkLabel)},Oi.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 ai&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function md(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof ho)){if(a.add(y),y instanceof ai){if(x&&y instanceof fr)for(var ne=y.memberParts;ne.next();)md(a,ne.value,x,E,b,z);if(b!==!1)for(ne=y.linksConnected;ne.next();){var re=ne.value;if(!a.contains(re)){var oe=re.fromNode,le=re.toNode;oe=oe===null||a.contains(oe),le=le===null||a.contains(le),(b?oe&&le:oe||le)&&md(a,re,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)md(a,y.value,x,E-1,b,z)}else if(y instanceof Kn)for(y=y.labelNodes;y.next();)md(a,y.value,x,E,b,z)}}Ve.Object.defineProperties(Oi.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?cr:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var E=y.pc(-1,this,!0);if(0<=E&&x.cb(Uo,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(ko,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(Al(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&&Zu(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 ho?this.type!==Hn.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:_o},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Al(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:ga},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Al(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&&(Al(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:cs},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Al(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,dl(this)===!1&&(Wm(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),T1(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof ho)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof ho?this instanceof ho&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&($u(x),x=x.copy(),x!==null&&Iv(this,x,y,a))):(z!==null&&z.jm(E,a),x=cS(x.partManager,E,a),x!==null&&($u(x),x=x.copy(),x===null||x instanceof Kn||(E=this.location.copy(),Iv(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){Iv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(Al(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&&(Al(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&&(Al(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 Kn?(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&&(Al(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&&(Al(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&&(Al(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:ia},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Al(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&&(Al(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&&(Al(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:Po},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Al(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&&St("Cannot make a Group a member of itself: "+this.toString()),St("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?$v(y,this):this instanceof fr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Gv(a,this):this instanceof fr&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof fr){for(x=new Ln,md(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof ai)for(E=E.linksConnected;E.next();)Sg(E.value)}if(this instanceof ai){for(x=this.linksConnected;x.next();)Sg(x.value);x=this.labeledLink,x!==null&&Sg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Zu(y,-1,a))}}else St("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&&(Al(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof ai&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Al(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&&(Al(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Oa},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Al(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&&(Al(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&&(Al(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Oi.prototype.invalidateLayout=Oi.prototype.C,Oi.prototype.findCommonContainingGroup=Oi.prototype.px,Oi.prototype.isMemberOf=Oi.prototype.Td,Oi.prototype.findTopLevelPart=Oi.prototype.sz,Oi.prototype.findSubGraphLevel=Oi.prototype.oz,Oi.prototype.ensureBounds=Oi.prototype.Va,Oi.prototype.getDocumentBounds=Oi.prototype.mi,Oi.prototype.findObject=Oi.prototype.fb,Oi.prototype.moveTo=Oi.prototype.moveTo,Oi.prototype.invalidateAdornments=Oi.prototype.Wb,Oi.prototype.clearAdornments=Oi.prototype.Ej,Oi.prototype.removeAdornment=Oi.prototype.Jf,Oi.prototype.addAdornment=Oi.prototype.bh,Oi.prototype.findAdornment=Oi.prototype.Pj,Oi.prototype.updateTargetBindings=Oi.prototype.La;var _1=!1;Oi.className="Part",Oi.LayoutNone=0,Oi.LayoutAdded=1,Oi.LayoutRemoved=2,Oi.LayoutShown=4,Oi.LayoutHidden=8,Oi.LayoutNodeSized=16,Oi.LayoutGroupLayout=32,Oi.LayoutNodeReplaced=64,Oi.LayoutStandard=127,Oi.LayoutAll=16777215;function ho(a,y){a===void 0||a instanceof gs||typeof a=="string"?Oi.call(this,a):(Oi.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)}Dt(ho,Oi),ho.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},ho.prototype.updateRelationshipsFromData=function(){},ho.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Kn&&y instanceof Mr){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof Mr&&(b.ua=a)}}},ho.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!dl(a))},ho.prototype.Zc=function(){return!1},ho.prototype.gk=function(a,y,x,E,b,z,ne){if(a===ko&&y==="elements"){if(b instanceof gl)this.$a===null&&(this.$a=b);else if(b instanceof Hn){var re=b.Nl(function(oe){return oe instanceof gl});re instanceof gl&&this.$a===null&&(this.$a=re)}}else a===Uo&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Hn&&this.$a.rg(E)&&(this.$a=null));Oi.prototype.gk.call(this,a,y,x,E,b,z,ne)},ho.prototype.updateAdornments=function(){},ho.prototype.Lj=function(){},Ve.Object.defineProperties(ho.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}}}),ho.className="Adornment";function Zv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=El,this.er=Vm,this.Kr=this.ij=this.Nq=this.Mq=null}Zv.prototype.copy=function(){var a=new Zv;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 ai(a,y){a===void 0||a instanceof gs||typeof a=="string"?Oi.call(this,a):(Oi.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Mn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Dt(ai,Oi),ai.prototype.cloneProtected=function(a){Oi.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Le=ai.prototype,Le.Af=function(a){Oi.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Hc(a){a.Ba===null?a.Ba=new Zv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Le.th=function(){Oi.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function Z1(a,y){y!==null&&(a.af===null&&(a.af=new Ln),a.af.add(y))}function H1(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Le.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=H1(this,a,y,x),a!==null&&a.Sl()},Le.gk=function(a,y,x,E,b,z,ne){a===ko&&y==="elements"?this.wc=null:a===Uo&&y==="elements"&&(this.wc=null),Oi.prototype.gk.call(this,a,y,x,E,b,z,ne)},Le.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ql(x.fromPort),Ql(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ql(x.fromPort),Ql(x.toPort),x.bb())}}function Ql(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ql(y.port)}}Le.si=function(){return!0},ai.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},ai.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},ai.prototype.isVisible=function(){if(!Oi.prototype.isVisible.call(this))return!1;var a=!0,y=Ic,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Ic){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===ss){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===rg&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},ai.prototype.Zb=function(a){Oi.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},ai.prototype.qx=function(){var a=new Ln,y=new Ln;return G1(this,this,a,y),y.iterator};function G1(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(b?ne.fromNode===y:ne.toNode===y)&&G1(a,b?ne.toNode:ne.fromNode,x,E):E.add(ne)})}}ai.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new nr(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Le=ai.prototype,Le.Mo=function(a){a===void 0&&(a=null);var y=new nr(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Le.Sd=function(a){a===void 0&&(a=null);var y=new nr(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Le.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ln,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ln,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new qi(x):cr},Le.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ln,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new qi(x):cr},Le.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Ln,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new qi(x):cr},Le.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new nr(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Le.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new nr(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function $m(a,y,x){Ql(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,ne=a.diagram;ne!==null&&(z=ne.aa,ne.aa=!0),b(a,y,x),ne!==null&&(ne.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function Km(a,y,x){Ql(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=ne)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):yp(y)))}function yp(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}ai.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Le=ai.prototype,Le.Vo=function(a){Oi.prototype.Vo.call(this,a),a||(yp(this),a=this.Yk,a!==null&&q1(a,this))},Le.Wo=function(a){Oi.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Le.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,Oi.prototype.Lj.call(this)},Le.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;$1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function $1(a){a.wc===null?a.wc=new xi:a.wc.clear(),a.qm(a,function(y,x){K1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function K1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Hv(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=ni()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);ci(x)}}}Le.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Le.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink&&(a=E.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Le.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Gm(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;)Gm(y,!1),y=y.pg();return x},Le.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},Le.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof ai)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},Le.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new Ln;return a(this,y),y},Le.uz=function(){return V1(this,this)};function V1(a,y){return y=y.pg(),y===null?0:1+V1(a,y)}Le.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new nr(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Le.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Mn,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Mn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new qi(x):cr},Le.wz=function(a){a===void 0&&(a=1/0);var y=new Ln;return md(y,this,!1,a,!0),y},ai.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 Ln;x.add(this),U1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ic),y.Ue=!1}};function U1(a,y,x,E,b,z,ne){if(1<E)for(var re=x?a.Mo():a.Sd();re.next();){var oe=re.value;oe.isTreeLink&&(oe=oe.To(a),oe===null||oe===a||y.contains(oe)||(y.add(oe),U1(oe,y,x,E-1,b,z,ne)))}else Y1(a,y,x,b,z,ne)}function Y1(a,y,x,E,b,z){for(var ne=b===a?!0:a.isTreeExpanded,re=x?a.Mo():a.Sd(),oe={};re.next();){var le=re.value;if(le.isTreeLink&&(le=le.To(a),le!==null&&le!==a)){var ue=y.contains(le);if(ue||y.add(le),ne){var pe=x?le.Oo():le.Po();oe.uv=a,pe.all(function(xe){return function(Ee){return Ee===xe.uv||!Ee.isTreeExpanded}}(oe))&&E.Aj(le,b),le.oh(),le.Zb(!1)}le.isTreeExpanded&&(le.wasTreeExpanded=le.isTreeExpanded,ue||Y1(le,y,x,E,b,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}ai.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 Ln;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ic),y.Ue=!1}};function X1(a,y,x,E,b,z,ne){for(var re=z===a?!1:a.isTreeExpanded,oe=x?a.Mo():a.Sd(),le={};oe.next();){var ue=oe.value;if(ue.isTreeLink&&(re||ue.fd||ue.bb(),ue=ue.To(a),ue!==null&&ue!==a&&!y.contains(ue))){if(y.add(ue),!re){ue.Zb(!0),ue.oh();var pe=x?ue.Oo():ue.Po();le.vv=a,pe.all(function(xe){return function(Ee){return Ee===xe.vv||!Ee.isTreeExpanded}}(le))&&b.Cj(ue,z)}(2<E||ue.wasTreeExpanded)&&(ue.wasTreeExpanded=!1,X1(ue,y,x,E-1,b,z,ne))}le={vv:le.vv}}a.isTreeExpanded=!0}Ve.Object.defineProperties(ai.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Vm},set:function(a){var y=this.portSpreading;y!==a&&(Hc(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&&Dc(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:El},set:function(a){typeof a=="number"&&(a=new Di(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Hc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Dc(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&&(Hc(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&&(Hc(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&&(Hc(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var ne=z.wa(E);ne!==void 0&&z.Qx(b,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(q1(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),cl(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&$1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(Hc(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))}}}),ai.prototype.expandTree=ai.prototype.expandTree,ai.prototype.collapseTree=ai.prototype.collapseTree,ai.prototype.findTreeParts=ai.prototype.wz,ai.prototype.findTreeChildrenNodes=ai.prototype.Ou,ai.prototype.findTreeChildrenLinks=ai.prototype.Qo,ai.prototype.findTreeLevel=ai.prototype.uz,ai.prototype.findTreeParentChain=ai.prototype.vz,ai.prototype.findTreeParentNode=ai.prototype.pg,ai.prototype.findTreeParentLink=ai.prototype.kh,ai.prototype.findCommonTreeParent=ai.prototype.gz,ai.prototype.findTreeRoot=ai.prototype.xz,ai.prototype.isInTreeOf=ai.prototype.Nz,ai.prototype.findPort=ai.prototype.ns,ai.prototype.findLinksTo=ai.prototype.kz,ai.prototype.findLinksBetween=ai.prototype.jz,ai.prototype.findNodesInto=ai.prototype.Oo,ai.prototype.findNodesOutOf=ai.prototype.Po,ai.prototype.findNodesConnected=ai.prototype.Mu,ai.prototype.findLinksInto=ai.prototype.Sd,ai.prototype.findLinksOutOf=ai.prototype.Mo,ai.prototype.findExternalTreeLinksConnected=ai.prototype.qx,ai.prototype.invalidateConnectedLinks=ai.prototype.Bd,ai.prototype.invalidateLinkBundle=ai.prototype.Lz;var Ex=new fn(ai,"SpreadingNone",10),Vm=new fn(ai,"SpreadingEvenly",11),Wv=new fn(ai,"SpreadingPacked",12);ai.className="Node",ai.SpreadingNone=Ex,ai.SpreadingEvenly=Vm,ai.SpreadingPacked=Wv;function fr(a,y){a===void 0||a instanceof gs||typeof a=="string"?ai.call(this,a):(ai.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Ln,this.$a=null,this.Sc=new da,this.Sc.group=this,this.gl=new Ln,this.tb=this.$p=null,y&&Object.assign(this,y)}Dt(fr,ai),fr.prototype.cloneProtected=function(a){ai.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof gl});y instanceof gl?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())},Le=fr.prototype,Le.Af=function(a){ai.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 ai)x.Bd(y);else if(x instanceof Kn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Le.gk=function(a,y,x,E,b,z,ne){if(a===ko&&y==="elements"){if(b instanceof gl)this.$a===null?this.$a=b:this.$a!==b&&St("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof Hn){var re=b.Nl(function(oe){return oe instanceof gl});re instanceof gl&&(this.$a===null?this.$a=re:this.$a!==re&&St("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Uo&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Hn&&this.$a.rg(E)&&(this.$a=null));ai.prototype.gk.call(this,a,y,x,E,b,z,ne)},Le.Xl=function(a,y){ai.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Hn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Hn&&(a=a.Pb()),this.tb===null&&(this.tb=new pn),a.mi(this.tb),a instanceof Mr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Le.eh=function(a,y,x,E){this.nf=this.$a,ai.prototype.eh.call(this,a,y,x,E)},Le.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Kn||y.Va()}),ai.prototype.Va.call(this)},Le.si=function(){if(!ai.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof ai){if(y.isVisible()&&dl(y))return!1}else if(y instanceof Kn&&y.isVisible()&&dl(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Gv(a,y){if(a.Gn.add(y)){y instanceof fr&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof Kn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function $v(a,y){if(a.Gn.remove(y)){y instanceof fr&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof Kn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Le.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)}ai.prototype.Lj.call(this)},fr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=dn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},fr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=dn(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},fr.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))},Le=fr.prototype,Le.Bd=function(a){var y=(this.U&65536)!==0;if(ai.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?(Ql(x.fromPort),Ql(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Ql(x.fromPort),Ql(x.toPort),x.bb()))}}},Le.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 Ln,E=y.iterator;E.next();){var b=E.value;if(b instanceof ai)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Le.iz=function(){var a=this.Rj();a.add(this);for(var y=new Ln,x=a.iterator;x.next();){var E=x.value;if(E instanceof ai)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Le.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Ln;return a(this,y),y},Le.Rj=function(){var a=new Ln;return md(a,this,!0,0,!0),a.remove(this),a},Le.Zb=function(a){ai.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},fr.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();J1(this,y,a,this),a.Ue=!1}};function J1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof fr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,J1(z,y,x,E)),z instanceof ai)z.Bd(y),x.Aj(z,E);else if(z instanceof Kn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}fr.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof fr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,Q1(z,y,x,E)),z instanceof ai)z.Bd(y),x.Cj(z,E);else if(z instanceof Kn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}fr.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=tt.alloc(),ai.prototype.move.call(this,a,y),a=new Ln,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Kn&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof ai&&b.isLinkLabel)){var ne=b.position,re=b.location;ne.w()?(z.x=ne.x+E,z.y=ne.y+x,b.position=z):re.w()&&(z.x=re.x+E,z.y=re.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof Kn&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(ne=b.position,z.x=ne.x+E,z.y=ne.y+x,z.w()?b.move(z):b.bb(),Vv(b)&&b.bb());tt.free(z)}},Ve.Object.defineProperties(fr.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&&St("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&&(Hc(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&&(Hc(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&&(Hc(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(Hc(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)}}}),fr.prototype.expandSubGraph=fr.prototype.expandSubGraph,fr.prototype.collapseSubGraph=fr.prototype.collapseSubGraph,fr.prototype.findSubGraphParts=fr.prototype.Rj,fr.prototype.findContainingGroupChain=fr.prototype.hz,fr.prototype.findExternalNodesConnected=fr.prototype.iz,fr.prototype.findExternalLinksConnected=fr.prototype.Lu,fr.prototype.ensureBounds=fr.prototype.Va,fr.className="Group";function gl(a){Rt.call(this),this.yb=bs,this.ko=new pn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Dt(gl,Rt),gl.prototype.cloneProtected=function(a){Rt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},gl.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Fo(0,0,y.width,y.height,a.x,a.y)},gl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof fr||a instanceof ho)||St("Placeholder is not inside a Group or Adornment."),a instanceof fr){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Ia(E,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=tt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),tt.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var ne=0;z instanceof Mr&&(ne=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,le=(oe.width+ne)*re;ne=(oe.height+ne)*re,a.type!==Hn.Link&&(re=z.ga(a.category==="Selection"?cs:a.locationSpot,tt.alloc()),a.location=re,tt.free(re)),isNaN(le)||isNaN(ne)?(a=z.ga(cs,tt.alloc()),le=pn.allocAt(a.x,a.y,0,0),le.Ye(z.ga(ys,a)),le.Ye(z.ga(Ol,a)),le.Ye(z.ga(nl,a)),Ia(y,le.width+E||0,le.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),tt.free(a),pn.free(le)):(Ia(y,le+E||0,ne+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},gl.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},gl.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof fr&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=pn.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof fr&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),pn.free(x),E&&y instanceof fr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},gl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof fr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,ne=y.memberParts;ne.next();){var re=ne.value;if(re.isVisible()){if(re instanceof Kn&&(!y.computesBoundsIncludingLinks||fu(re)||re.fromNode===y||re.toNode===y))continue;re=re.actualBounds,re.left<x&&(x=re.left),re.top<E&&(E=re.top),re.right>b&&(b=re.right),re.bottom>z&&(z=re.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},Ve.Object.defineProperties(gl.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Di(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),gl.className="Placeholder";function Kn(a){Oi.call(this,Hn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=pl,this.Om=0,this.Qm=pl,this.Rm=NaN,this.qj=Xv,this.po=.5,this.wd=null,this.Nb=new Mn().freeze(),this.Tg=this.Mg=null,this.ml=new pn,this.ua=new vn,this.u=this.o=this.Sf=this.Wf=null,this.su=new tt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Dt(Kn,Oi),Kn.prototype.cloneProtected=function(a){Oi.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())},Le=Kn.prototype,Le.Af=function(a){Oi.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&&Ql(y),a=a.toPort,a!==null&&Ql(a)},Le.qb=function(a){a.classType===Kn?(a.value&2)===2?this.routing=a:a===pu||a===Gc||a===Pg?this.curve=a:a===Pp||a===qm||a===e0?this.adjusting=a:a!==Xv&&a!==pl&&St("Unknown Link enum value for a Link property: "+a):Oi.prototype.qb.call(this,a)},Le.Xc=function(){this.ba===null&&(this.ba=new sp)},Le.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),dl(a)||gd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),dl(a)||gd(a)))},Le.zv=function(){return!1},Le.Av=function(){},Le.Zc=function(){return!1},Kn.prototype.computeAngle=function(a,y,x){return Kn.computeAngle(y,x)},Kn.computeAngle=function(a,y){switch(a){default:case pl:a=0;break;case wp:a=y;break;case Cp:a=y+90;break;case Ep:a=y-90;break;case Jv:a=y+180;break;case t0:a=it.bp(y),90<a&&270>a&&(a-=180);break;case bp:a=it.bp(y+90),90<a&&270>a&&(a-=180);break;case Mp:a=it.bp(y-90),90<a&&270>a&&(a-=180);break;case n0:if(a=it.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return it.bp(a)};function Sg(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&$v(x,a),a.Ah=y,y!==null&&Gv(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,ne=a.diagram;ne!==null&&(z=ne.aa,ne.aa=!0),b(a,x,y),ne!==null&&(ne.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Le=Kn.prototype,Le.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Oi.prototype.oh.call(this)},Le.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Le.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function q1(a,y){a.wd===null&&(a.wd=new Ln),a.wd.add(y),a.v()}Le.Vo=function(a){if(Oi.prototype.Vo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,$m(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||$m(x,this,E)}Sp(this)}},Le.Wo=function(a){if(Oi.prototype.Wo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Km(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Km(x,this,E)}xp(this)}},Le.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))},Kn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Kn.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?Oi.prototype.move.call(this,a,!1):(a=tt.allocAt(x.x+E,x.y+b),Oi.prototype.move.call(this,a,!1),tt.free(a)),Wc(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Kn.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},Kn.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},Kn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Xo),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===pu))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()===pu){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return it.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),it.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=ne[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},Kn.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()===pu))return this.ua.wx(.5);if(this.computeCurve()===pu&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var E=this.i(x+2);return x=this.i(x+3),it.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Le=Kn.prototype,Le.i=function(a){return this.Nb.s[a]},Le.dd=function(a,y){this.Nb.cd(a,y)},Le.L=function(a,y,x){this.Nb.cd(a,new tt(y,x))},Le.Kz=function(a,y){this.Nb.Gb(a,y)},Le.m=function(a,y,x){this.Nb.Gb(a,new tt(y,x))},Le.ne=function(a){this.Nb.add(a)},Le.yf=function(a,y){this.Nb.add(new tt(a,y))},Le.pv=function(a){this.Nb.mb(a)},Le.Fj=function(){this.Nb.clear()};function Wc(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var E=a.fd,b=new Mn,z=a.Nb.iterator;z.next();){var ne=z.value;b.add(new tt(ne.x+y,ne.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),cl(a)),E?Um(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ra(ne.animationManager,a,b),a.g("points",z,b)}}Le.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Le.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];x=Math.min(re.x,x),E=Math.min(re.y,E)}re=ne=1/0;for(var oe=y.s,le=oe.length,ue=0;ue<le;ue++){var pe=oe[ue];ne=Math.min(pe.x,ne),re=Math.min(pe.y,re),pe.freeze()}if(y.freeze(),le===z){for(z=0;z<le;z++)if(ue=b[z],pe=oe[z],ue.x-x!==pe.x-ne||ue.y-E!==pe.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ra(x.animationManager,this,y),Um(this),this.g("points",a,y)}},Le.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Um(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),Qm(a,!1))}Le.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())}},Le.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()}}},Kn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(kf||(kf=new ai,kf.desiredSize=wr,kf.Va()),this.defaultFromPoint&&(kf.location=this.defaultFromPoint,kf.Va(),y=a=kf)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var E=this.toNode,b=null;if(E===null?(Af||(Af=new ai,Af.desiredSize=wr,Af.Va()),this.defaultToPoint&&(Af.location=this.defaultToPoint,Af.Va(),b=E=Af)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var re=xg(ne),oe=xg(x),le=y===b&&y!==null,ue=this.isOrthogonal,pe=this.curve===pu;this.Wf=le&&!ue?pe=!0:!1;var xe=this.computeAdjusting()===pl||le;if(!ue&&!le&&re&&oe){if(re=!1,!xe&&3<=z&&(xe=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=this.adjustPoints(0,xe,z-1,oe))&&(xe=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,xe,z-1,oe)),!re)if(this.Fj(),pe){z=this.getLinkPoint(a,y,ne,!0,!1,E,b),xe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=xe.x-z.x,oe=xe.y-z.y,le=this.computeCurviness(),pe=ue=0;var Ee=z.x+re/3,Fe=z.y+oe/3,Oe=Ee,st=Fe;it.B(oe,0)?st=0<re?st-le:st+le:(ue=-re/oe,pe=Math.sqrt(le*le/(ue*ue+1)),0>le&&(pe=-pe),Oe=(0>oe?-1:1)*pe+Ee,st=ue*(Oe-Ee)+Fe),Ee=z.x+2*re/3,Fe=z.y+2*oe/3;var Ye=Ee,pt=Fe;it.B(oe,0)?pt=0<re?pt-le:pt+le:(Ye=(0>oe?-1:1)*pe+Ee,pt=ue*(Ye-Ee)+Fe),this.Fj(),this.ne(z),this.yf(Oe,st),this.yf(Ye,pt),this.ne(xe),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,xe=b,E=this.getLinkPoint(a,y,ne,!0,!1,z,xe),b=this.getLinkPoint(z,xe,x,!1,!1,a,y),this.hasCurviness()?(xe=b.x-E.x,x=b.y-E.y,ne=this.computeCurviness(),a=E.x+xe/2,y=E.y+x/2,z=a,re=y,it.B(x,0)?re=0<xe?re-ne:re+ne:(xe=-xe/x,z=Math.sqrt(ne*ne/(xe*xe+1)),0>ne&&(z=-z),z=(0>x?-1:1)*z+a,re=xe*(z-a)+y),this.ne(E),this.yf(z,re),this.ne(b)):(this.ne(E),this.ne(b),re=pn.alloc(),y.mi(re),oe=re.ca(b),xe.mi(re),le=re.ca(E),(oe||le)&&(ne=y.ga(Xm(ne),new tt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,b,!0,ne)),x=xe.ga(Xm(x),new tt),this.dd(1,this.getLinkPointFromPoint(z,xe,x,E,!1,x))),pn.free(re))}else{pe=this.isAvoiding,xe&&(ue&&pe||le)&&this.Fj();var xt=le?this.computeCurviness():0;pe=this.getLinkPoint(a,y,ne,!0,ue,E,b),Ee=Oe=Fe=0,(ue||!re||le)&&(st=this.computeEndSegmentLength(a,y,ne,!0),Ee=this.getLinkDirection(a,y,pe,ne,!0,ue,E,b),le&&(re||ne.D(x)||!ue&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ee-=ue?90:30,0>xt&&(Ee-=180)),0>Ee?Ee+=360:360<=Ee&&(Ee-=360),le&&(st+=Math.abs(xt)*(ue?1:2)),Ee===0?Fe=st:Ee===90?Oe=st:Ee===180?Fe=-st:Ee===270?Oe=-st:(Fe=st*Math.cos(Ee*Math.PI/180),Oe=st*Math.sin(Ee*Math.PI/180)),ne.Mc()&&le&&(st=y.ga(Jr,tt.alloc()),Ye=tt.allocAt(st.x+1e3*Fe,st.y+1e3*Oe),this.getLinkPointFromPoint(a,y,st,Ye,!0,pe),tt.free(st),tt.free(Ye))),st=this.getLinkPoint(E,b,x,!1,ue,a,y);var Mt=pt=Ye=0;if(ue||!oe||le){var Ot=this.computeEndSegmentLength(E,b,x,!1);Mt=this.getLinkDirection(E,b,st,x,!1,ue,a,y),le&&(oe||ne.D(x)||!ue&&ne.x+x.x===1&&ne.y+x.y===1)&&(Mt+=ue?0:30,0>xt&&(Mt+=180)),0>Mt?Mt+=360:360<=Mt&&(Mt-=360),le&&(Ot+=Math.abs(xt)*(ue?1:2)),Mt===0?Ye=Ot:Mt===90?pt=Ot:Mt===180?Ye=-Ot:Mt===270?pt=-Ot:(Ye=Ot*Math.cos(Mt*Math.PI/180),pt=Ot*Math.sin(Mt*Math.PI/180)),x.Mc()&&le&&(x=b.ga(Jr,tt.alloc()),ne=tt.allocAt(x.x+1e3*Ye,x.y+1e3*pt),this.getLinkPointFromPoint(E,b,x,ne,!1,st),tt.free(x),tt.free(ne))}x=pe,(ue||!re||le)&&(x=new tt(pe.x+Fe,pe.y+Oe)),ne=st,(ue||!oe||le)&&(ne=new tt(st.x+Ye,st.y+pt)),!xe&&!ue&&re&&3<z&&this.adjustPoints(0,pe,z-2,ne)?this.dd(z-1,st):!xe&&!ue&&oe&&3<z&&this.adjustPoints(1,x,z-1,st)?this.dd(0,pe):!xe&&(ue?6<=z:4<z)&&this.adjustPoints(1,x,z-2,ne)?(this.dd(0,pe),this.dd(z-1,st)):(this.Fj(),this.ne(pe),(ue||!re||le)&&this.ne(x),ue&&this.addOrthoPoints(x,Ee,ne,Mt,a,E),(ue||!oe||le)&&this.ne(ne),this.ne(st))}return!0};function Kv(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}Kn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new tt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var ne=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*b;var re=-a.m12*b,oe=-a.m21*b,le=a.m11*b,ue=b*(a.m21*a.dy-a.m22*a.dx),pe=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*ne+E.y*oe+ue,E=E.x*re+E.y*le+pe,ne=x.x*ne+x.y*oe+ue,x=x.x*re+x.y*le+pe}return y.Sj(b,E,ne,x,z),a!==null&&z.transform(a),z};function Ym(a,y){var x=y.Zn;return x===null&&(x=new Tf,x.port=y,x.node=y.part,y.Zn=x),sS(x,a)}Kn.prototype.getLinkPoint=function(a,y,x,E,b,z,ne,re){if(re===void 0&&(re=new tt),x.sb()&&!xg(x))return y.ga(x,re),re;if(x.$c()){var oe=Ym(this,y);if(oe!==null){if(re.assign(oe.Zo),b&&this.routing===tS){var le=Ym(this,ne);if(le!==null&&oe.Gl<le.Gl){oe=tt.alloc(),le=tt.alloc();var ue=new pn(y.ga(cs,oe),y.ga(ys,le)),pe=this.computeSpot(!E,ne);a=this.getLinkPoint(z,ne,pe,!E,b,a,y,le),(x.Hf(Iu)||x.Hf(Ys))&&a.y>=ue.y&&a.y<=ue.y+ue.height?re.y=a.y:(x.Hf(Su)||x.Hf(ul))&&a.x>=ue.x&&a.x<=ue.x+ue.width&&(re.x=a.x),tt.free(oe),tt.free(le)}}return re}}return x=y.ga(Xm(x),tt.alloc()),this.pointsCount>(b?6:2)?(ne=E?this.i(1):this.i(this.pointsCount-2),b&&(ne=Kv(x,ne.copy()))):(oe=this.computeSpot(!E,ne),z=tt.alloc(),ne=ne.ga(Xm(oe),z),b&&(ne=Kv(x,ne)),tt.free(z)),this.getLinkPointFromPoint(a,y,x,ne,E,re),tt.free(x),re},Kn.prototype.getLinkDirection=function(a,y,x,E,b,z,ne,re){e:if(E.sb())var oe=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(oe=Ym(this,y),oe!==null))switch(oe.Nc){case 1:oe=270;break e;case 2:oe=180;break e;default:case 4:oe=0;break e;case 8:oe=90;break e}oe=y.ga(Jr,tt.alloc()),this.pointsCount>(z?6:2)?(re=b?this.i(1):this.i(this.pointsCount-2),re=z?Kv(oe,re.copy()):x):(x=tt.alloc(),re=re.ga(Jr,x),tt.free(x)),x=Math.abs(re.x-oe.x)>Math.abs(re.y-oe.y)?re.x>=oe.x?0:180:re.y>=oe.y?90:270,tt.free(oe),oe=x}return E.Mc()&&ne.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),xg(E)||(a=y.li(),a===0)||(45<=a&&135>a?oe+=90:135<=a&&225>a?oe+=180:225<=a&&315>a&&(oe+=270),360<=oe&&(oe-=360)),oe},Kn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=Ym(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Kn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Jr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Po?Ma:y)):(a=y||this.toPort,a===null?a=Jr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Po?Ma:y)),a};function xg(a){return a===Ma||a.x===.5&&a.y===.5}function Xm(a){return a.x===.5&&a.y===.5?a:Jr}Kn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==pl&&4<this.pointsCount?this.computeMidPoint(new tt):(a=y.Zn,a=a!==null?sS(a,this):null,a!==null?a.Zo:y.ga(Jr))},Kn.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},Kn.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=z;if(z===void 0&&(ne=_t.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return mv(this,y,x,b),z===void 0&&_t.free(ne),!0;if(this.Yc(a,ne)){var re=!1;if(!this.isAtomic)for(var oe=this.O.s,le=oe.length;le--;){var ue=oe[le];if(ue.visible||ue===this.locationObject){var pe=ue.actualBounds,xe=this.naturalBounds;if(!(pe.x>xe.width||pe.y>xe.height||0>pe.x+pe.width||0>pe.y+pe.height)){if(pe=_t.alloc(),pe.set(ne),ue instanceof Hn)re=ue.Cf(a,y,x,E,b,pe);else if(this.path===ue){if(ue instanceof Mr)if(re=a,xe=E,ue.pickable===!1)re=!1;else if(pe.multiply(ue.transform),xe)e:{var Ee=re,Fe=pe;if(ue.fh(Ee,Fe))re=!0;else{if(Fe===void 0&&(Fe=ue.transform,Ee.Re(ue.actualBounds))){re=!0;break e}re=Ee.left,xe=Ee.right;var Oe=Ee.top;Ee=Ee.bottom;var st=tt.alloc(),Ye=tt.alloc(),pt=tt.alloc(),xt=_t.alloc();xt.set(Fe),xt.bv(ue.transform),xt.Vj(),Ye.x=xe,Ye.y=Oe,Ye.transform(xt),st.x=re,st.y=Oe,st.transform(xt),Fe=!1,tf(ue,st,Ye,pt)?Fe=!0:(st.x=xe,st.y=Ee,st.transform(xt),tf(ue,st,Ye,pt)?Fe=!0:(Ye.x=re,Ye.y=Ee,Ye.transform(xt),tf(ue,st,Ye,pt)?Fe=!0:(st.x=re,st.y=Oe,st.transform(xt),tf(ue,st,Ye,pt)&&(Fe=!0)))),_t.free(xt),tt.free(st),tt.free(Ye),tt.free(pt),re=Fe}}else re=ue.fh(re,pe)}else re=Ss(ue,a,E,pe);re&&(xe=ue,y!==null&&(xe=y(ue)),xe&&(x===null||x(xe))&&b.add(xe)),_t.free(pe)}}}return z===void 0&&_t.free(ne),re||this.background!==null||this.areaBackground!==null}return z===void 0&&_t.free(ne),!1},Kn.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?pu:this.curve},Kn.prototype.computeCorner=function(){if(this.curve===pu)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Kn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Kn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,ne=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===wp||E===t0||E===Jv?a=Math.max(a,b):E===Ep||E===Mp||E===Cp||E===bp?a=Math.max(a,ne):(y=y.ga(Jr).ab(x.ga(Jr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*b)+1)),this.curve===pu&&(a*=1.333)}}return a},Kn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===pl&&x.bb()}},Kn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=nS;var y=this.Sf;if(y!==null){for(var x=ni(),E=0,b=y.links,z=0;z<b.length;z++){var ne=b[z].computeSpacing();x.push(ne),E+=ne}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),ci(x)}}return a},Kn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Kn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Kn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===qm)return!1;b===e0&&(b=Pp)}switch(b){case qm:var z=this.i(a),ne=this.i(x);if(!z.Xa(y)||!ne.Xa(E)){b=z.x,z=z.y;var re=ne.x-b,oe=ne.y-z,le=Math.sqrt(re*re+oe*oe);if(!it.$(le,0)){if(it.$(re,0))var ue=0>oe?-Math.PI/2:Math.PI/2;else ue=Math.atan(oe/Math.abs(re)),0>re&&(ue=Math.PI-ue);ne=y.x;var pe=y.y;re=E.x-ne;var xe=E.y-pe;for(oe=Math.sqrt(re*re+xe*xe),it.$(re,0)?xe=0>xe?-Math.PI/2:Math.PI/2:(xe=Math.atan(xe/Math.abs(re)),0>re&&(xe=Math.PI-xe)),le=oe/le,ue=xe-ue,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),re=y.x-b,oe=y.y-z,y=Math.sqrt(re*re+oe*oe),it.$(y,0)||(it.$(re,0)?oe=0>oe?-Math.PI/2:Math.PI/2:(oe=Math.atan(oe/Math.abs(re)),0>re&&(oe=Math.PI-oe)),re=oe+ue,y*=le,this.L(a,ne+y*Math.cos(re),pe+y*Math.sin(re)));this.dd(x,E)}}return!0;case e0:if(z=this.i(a),pe=this.i(x),!z.Xa(y)||!pe.Xa(E)){b=z.x,z=z.y,ne=pe.x,pe=pe.y,le=(ne-b)*(ne-b)+(pe-z)*(pe-z),re=y.x,ue=y.y,oe=E.x,xe=E.y;var Ee=1;if(oe-re!==0){var Fe=(xe-ue)/(oe-re);Ee=Math.sqrt(1+1/(Fe*Fe))}else Fe=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Oe=y.x,st=y.y,Ye=.5;le!==0&&(Ye=((b-Oe)*(b-ne)+(z-st)*(z-pe))/le);var pt=b+Ye*(ne-b),xt=z+Ye*(pe-z);y=Math.sqrt((Oe-pt)*(Oe-pt)+(st-xt)*(st-xt)),st<Fe*(Oe-pt)+xt&&(y=-y),0<Fe&&(y=-y),Oe=re+Ye*(oe-re),Ye=ue+Ye*(xe-ue),Fe!==0?(y=Oe+y/Ee,this.L(a,y,Ye-(y-Oe)/Fe)):this.L(a,Oe,Ye+y)}this.dd(x,E)}return!0;case Pp:e:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),ne=this.i(a+2),re=z.x,ue=z.y,pe=re,le=ue,it.B(b.y,z.y)?it.B(z.x,ne.x)?ue=y.y:it.B(z.y,ne.y)&&(re=y.x):it.B(b.x,z.x)&&(it.B(z.y,ne.y)?re=y.x:it.B(z.x,ne.x)&&(ue=y.y)),this.L(a+1,re,ue),b=this.i(x),z=this.i(x-1),ne=this.i(x-2),re=z.x,ue=z.y,oe=re,xe=ue,it.B(b.y,z.y)?it.B(z.x,ne.x)?ue=E.y:it.B(z.y,ne.y)&&(re=E.x):it.B(b.x,z.x)&&(it.B(z.y,ne.y)?re=E.x:it.B(z.x,ne.x)&&(ue=E.y)),this.L(x-1,re,ue),Vv(this))){this.L(a+1,pe,le),this.L(x-1,oe,xe),x=!1;break e}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Kn.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var ne=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var re=b.actualBounds.copy(),oe=z.actualBounds.copy();if(re.w()&&oe.w()){re.Bc(Lp,Lp),oe.Bc(Lp,Lp),re.Ye(a),oe.Ye(x);var le=tt.alloc(),ue=tt.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&oe.right>a.x||E===90&&x.y>a.y&&oe.right>a.x?(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),E===180?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ue.x=le.x,ue.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(le.x=a.x<oe.left?this.computeMidOrthoPosition(a.x,a.y,oe.left,x.y,!1):a.x<oe.right&&(E===270&&a.y<oe.top||E===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.right,ue.x=le.x,ue.y=x.y):E===0&&a.x<oe.left&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ue.y=le.y)):(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===180&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===180||E===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ue.x=x.x,ue.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x>=re.left&&x.x<=a.x||a.x<=oe.right&&a.x>=x.x?(E===90||E===270)&&(le.h(Math.max((a.x+x.x)/2,a.x),a.y),ue.h(le.x,x.y)):(le.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===0?re.bottom:Math.max(re.bottom,oe.bottom)),ue.x=x.x,ue.y=le.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&oe.left<a.x||E===90&&x.y>a.y&&oe.left<a.x?(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),E===0?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ue.x=le.x,ue.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(le.x=a.x>oe.right?this.computeMidOrthoPosition(a.x,a.y,oe.right,x.y,!1):a.x>oe.left&&(E===270&&a.y<oe.top||E===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.left,ue.x=le.x,ue.y=x.y):E===180&&a.x>oe.right&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ue.y=le.y)):(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===0&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===0||E===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ue.x=x.x,ue.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x<=re.right&&x.x>=a.x||a.x>=oe.left&&a.x<=x.x?(E===90||E===270)&&(le.h(Math.min((a.x+x.x)/2,a.x),a.y),ue.h(le.x,x.y)):(le.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===180?re.bottom:Math.max(re.bottom,oe.bottom)),ue.x=x.x,ue.y=le.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&oe.bottom>a.y||E===0&&x.x>a.x&&oe.bottom>a.y?(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),E===270?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ue.x=x.x,ue.y=le.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(le.y=a.y<oe.top?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.top,!0):a.y<oe.bottom&&(E===180&&a.x<oe.left||E===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.bottom,ue.x=x.x,ue.y=le.y):E===90&&a.y<oe.top&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,ue.x=le.x)):(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===270&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ue.x=le.x,ue.y=x.y),le.x>re.left&&le.x<re.right&&(x.y>=re.top&&x.y<=a.y||a.y<=oe.bottom&&a.y>=x.y?(E===0||E===180)&&(le.h(a.x,Math.max((a.y+x.y)/2,a.y)),ue.h(x.x,le.y)):(le.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===90?re.right:Math.max(re.right,oe.right)),ue.x=le.x,ue.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&oe.top<a.y||E===0&&x.x>a.x&&oe.top<a.y?(le.h(a.x,x.y),ue.h((a.x+x.x)/2,x.y),E===90?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ue.x=x.x,ue.y=le.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(le.y=a.y>oe.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.bottom,!0):a.y>oe.top&&(E===180&&a.x<oe.left||E===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.top,ue.x=x.x,ue.y=le.y):E===270&&a.y>oe.bottom&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,ue.x=le.x)):(le.h(x.x,a.y),ue.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===90&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ue.x=le.x,ue.y=x.y),le.x>re.left&&le.x<re.right&&(x.y<=re.bottom&&x.y>=a.y||a.y>=oe.top&&a.y<=x.y?(E===0||E===180)&&(le.h(a.x,Math.min((a.y+x.y)/2,a.y)),ue.h(x.x,le.y)):(le.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===270?re.right:Math.max(re.right,oe.right)),ue.x=le.x,ue.y=x.y)));var pe=x;if(this.isAvoiding){var xe=this.diagram;if(xe===null||b===z||this.layer.isTemporary||!eg(xe)||re.ca(pe)&&!z.Td(b)||oe.ca(a)&&!b.Td(z))y=!1;else{var Ee=tg(xe,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ee.Yj(Math.min(a.x,le.x),Math.min(a.y,le.y),Math.abs(a.x-le.x),Math.abs(a.y-le.y))&&Ee.Yj(Math.min(le.x,ue.x),Math.min(le.y,ue.y),Math.abs(le.x-ue.x),Math.abs(le.y-ue.y))&&Ee.Yj(Math.min(ue.x,pe.x),Math.min(ue.y,pe.y),Math.abs(ue.x-pe.x),Math.abs(ue.y-pe.y)))y=!1;else{b=a,z=pe;var Fe=x=null;if(xe.isVirtualized){xe=Ee.bounds.copy(),xe.Bc(-Ee.Ho,-Ee.Go);var Oe=tt.alloc();wg(Ee,a.x,a.y)||(it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,a.x,a.y,le.x,le.y,Oe)?(x=a=Oe.copy(),y=Oe.ab(le)):it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,le.x,le.y,ue.x,ue.y,Oe)?(x=a=Oe.copy(),y=Oe.ab(ue)):it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,ue.x,ue.y,pe.x,pe.y,Oe)&&(x=a=Oe.copy(),y=Oe.ab(pe))),wg(Ee,pe.x,pe.y)||(it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,pe.x,pe.y,ue.x,ue.y,Oe)?(Fe=pe=Oe.copy(),E=ue.ab(Oe)):it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,ue.x,ue.y,le.x,le.y,Oe)?(Fe=pe=Oe.copy(),E=le.ab(Oe)):it.Ff(xe.x,xe.y,xe.x+xe.width,xe.y+xe.height,le.x,le.y,a.x,a.y,Oe)&&(Fe=pe=Oe.copy(),E=a.ab(Oe))),tt.free(Oe)}re=re.copy().ed(oe),re.Bc(Ee.Ho*Ee.Os,Ee.Go*Ee.Os),oS(Ee,a,y,pe,E,re,!0),oe=ec(Ee,pe.x,pe.y),!Ee.abort&&oe>=Cg&&(rS(Ee),re.Bc(Ee.Ho*Ee.Hx,Ee.Go*Ee.Ix),oS(Ee,a,y,pe,E,re,!1),oe=ec(Ee,pe.x,pe.y)),!Ee.abort&&oe<Cg&&ec(Ee,pe.x,pe.y)!==$c?(Uv(this,Ee,pe.x,pe.y,E,!0,ne),re=this.i(2),4>this.pointsCount?(y===0||y===180?(re.x=a.x,re.y=pe.y):(re.x=pe.x,re.y=a.y),this.L(2,re.x,re.y),this.m(3,re.x,re.y)):(ne=this.i(3),y===0||y===180?it.B(re.x,ne.x)?(re=y===0?Math.max(re.x,a.x):Math.min(re.x,a.x),this.L(2,re,a.y),this.L(3,re,ne.y)):it.B(re.y,ne.y)?(Math.abs(a.y-re.y)<=Ee.Go/2&&(this.L(2,re.x,a.y),this.L(3,ne.x,a.y)),this.m(2,re.x,a.y)):this.L(2,a.x,re.y):(y===90||y===270)&&(it.B(re.y,ne.y)?(re=y===90?Math.max(re.y,a.y):Math.min(re.y,a.y),this.L(2,a.x,re),this.L(3,ne.x,re)):it.B(re.x,ne.x)?(Math.abs(a.x-re.x)<=Ee.Ho/2&&(this.L(2,a.x,re.y),this.L(3,a.x,ne.y)),this.m(2,a.x,re.y)):this.L(2,re.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Fe!==null&&(E===0||E===180?this.yf(z.x,Fe.y):this.yf(Fe.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(le.copy()),this.ne(ue.copy())),tt.free(le),tt.free(ue)}},Kn.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Vv(a){if(a.diagram===null||!a.isAvoiding||!eg(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=tg(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function Uv(a,y,x,E,b,z,ne){var re=y.Ho,oe=y.Go,le=ec(y,x,E),ue=x,pe=E;for(b===0?ue+=re:b===90?pe+=oe:b===180?ue-=re:pe-=oe,b!==ne&&le>of&&ec(y,ue,pe)!==le-1&&(ec(y,x-re,E)===le-1?(b=180,ue=x-re,pe=E):ec(y,x+re,E)===le-1?(b=0,ue=x+re,pe=E):ec(y,x,E-oe)===le-1?(b=270,ue=x,pe=E-oe):ec(y,x,E+oe)===le-1&&(b=90,ue=x,pe=E+oe));le>of&&ec(y,ue,pe)===le-1;)x=ue,E=pe,b===0?ue+=re:b===90?pe+=oe:b===180?ue-=re:pe-=oe,--le;z?le>of&&(b===180||b===0?x=Math.floor(x/re)*re+re/2:(b===90||b===270)&&(E=Math.floor(E/oe)*oe+oe/2)):(x=Math.floor(x/re)*re+re/2,E=Math.floor(E/oe)*oe+oe/2),le>of&&(z=b,ne=x,ue=E,b===0?(z=90,ue+=oe):b===90?(z=180,ne-=re):b===180?(z=270,ue-=oe):b===270&&(z=0,ne+=re),ec(y,ne,ue)===le-1?Uv(a,y,ne,ue,z,!1,z):(ne=x,ue=E,b===0?(z=270,ue-=oe):b===90?(z=0,ne+=re):b===180?(z=90,ue+=oe):b===270&&(z=180,ne-=re),ec(y,ne,ue)===le-1&&Uv(a,y,ne,ue,z,!1,z))),a.yf(x,E)}Kn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=xo(y,a,x.x,x.y,E.x,E.y),z=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var re=xo(y,a,E.x,E.y,x.x,x.y);E=x,re<b&&(z=ne,b=re)}return z},Kn.prototype.qc=function(){this.lk=!1,this.v()},Kn.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof Mr&&(b.ua=this.ua)}}},Kn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&rf(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var ne=this.computeCurve();if(ne===pu&&3<=y&&!it.$(this.smoothness,0))if(y===3){var re=this.i(1);E=Math.min(b.x,re.x);var oe=Math.min(b.y,re.y);re=this.i(2),E=Math.min(E,re.x),oe=Math.min(oe,re.y)}else{if(this.isOrthogonal)for(oe=0;oe<y;oe++)re=E[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),oe=this.i(E),z.x=Math.min(oe.x,z.x),z.y=Math.min(oe.y,z.y);E=z.x,oe=z.y}else{for(oe=0;oe<y;oe++)re=E[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);E=z.x,oe=z.y}if(E-=this.su.x,oe-=this.su.y,b.x-=E,b.y-=oe,y!==2||rf(this)){if(a.type=vn.o,re=N1(a),this.computeShortLength(!0)!==0&&(b=Bf(this,b,!0,z)),yg(re,b.x,b.y,!1),ne===pu&&3<=y&&!it.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-oe,b=this.i(2).copy(),b.x-=E,b.y-=oe,this.computeShortLength(!1)!==0&&(b=Bf(this,b,!1,z)),_c(re,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=tt.allocAt(E,oe),x=tt.alloc(),x.assign(this.i(1)),z=tt.allocAt(E,oe),b=tt.allocAt(E,oe),ne=this.i(0);for(var le,ue=this.smoothness/3,pe=1;pe<this.pointsCount-1;pe++){le=this.i(pe);var xe=ne,Ee=le,Fe=this.i(Yv(this,le,pe,!1));if((!it.$(xe.x,Ee.x)||!it.$(Ee.x,Fe.x))&&(!it.$(xe.y,Ee.y)||!it.$(Ee.y,Fe.y))){var Oe=ue;isNaN(Oe)&&(Oe=this.smoothness/3);var st=xe.x;xe=xe.y;var Ye=Ee.x;Ee=Ee.y;var pt=Fe.x;Fe=Fe.y;var xt=Oe*Jm(st,xe,Ye,Ee);Oe*=Jm(Ye,Ee,pt,Fe),it.$(xe,Ee)&&it.$(Ye,pt)&&(Ye>st?Fe>Ee?(z.x=Ye-xt,z.y=Ee-xt,b.x=Ye+Oe,b.y=Ee+Oe):(z.x=Ye-xt,z.y=Ee+xt,b.x=Ye+Oe,b.y=Ee-Oe):Fe>Ee?(z.x=Ye+xt,z.y=Ee-xt,b.x=Ye-Oe,b.y=Ee+Oe):(z.x=Ye+xt,z.y=Ee+xt,b.x=Ye-Oe,b.y=Ee-Oe)),it.$(st,Ye)&&it.$(Ee,Fe)&&(Ee>xe?(pt>Ye?(z.x=Ye-xt,z.y=Ee-xt,b.x=Ye+Oe):(z.x=Ye+xt,z.y=Ee-xt,b.x=Ye-Oe),b.y=Ee+Oe):(pt>Ye?(z.x=Ye-xt,z.y=Ee+xt,b.x=Ye+Oe):(z.x=Ye+xt,z.y=Ee+xt,b.x=Ye-Oe),b.y=Ee-Oe)),(it.$(st,Ye)&&it.$(Ye,pt)||it.$(xe,Ee)&&it.$(Ee,Fe))&&(st=.5*(st+pt),xe=.5*(xe+Fe),z.x=st,z.y=xe,b.x=st,b.y=xe),(pe===1||pe===2&&it.$(ne.x,this.i(0).x)&&it.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+le.x),x.y=.5*(ne.y+le.y)),_c(re,x.x-E,x.y-oe,z.x-E,z.y-oe,le.x-E,le.y-oe),y.set(z),x.set(b),ne=le}}le=ne.x,ne=ne.y,ue=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ue=Bf(this,ue.copy(),!1,lo)),le=.5*(le+ue.x),ne=.5*(ne+ue.y),_c(re,b.x-E,b.y-oe,le-E,ne-oe,ue.x-E,ue.y-oe),tt.free(y),tt.free(x),tt.free(z),tt.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Bf(this,ne.copy(),!1,lo)),_c(re,z.x-E,z.y-oe,b.x-E,b.y-oe,ne.x-E,ne.y-oe);else{for(z=tt.alloc(),z.assign(this.i(0)),b=tt.alloc(),b.assign(z),ne=this.computeCorner(),pe=1,le=0;pe<y;){if(pe=Yv(this,z,pe,1<pe),ue=this.i(pe),pe>=y-1){if(!z.D(ue))this.computeShortLength(!1)!==0&&(ue=Bf(this,ue.copy(),!1,lo)),Nf(this,re,-E,-oe,z,ue,x);else if(le===0)for(pe=1;pe<y;)b.assign(z),ue=this.i(pe++),Nf(this,re,-E,-oe,z,ue,x),z.assign(ue);break}if(le=Yv(this,ue,pe+1,pe<y-3),pe=-E,st=-oe,xe=ue,Ye=this.i(le),Oe=x,it.B(z.y,xe.y)&&it.B(xe.x,Ye.x))if(Fe=Math.min(ne,Math.abs(xe.x-b.x)/2),Fe=xt=Math.min(Fe,Math.abs(Ye.y-xe.y)/2),it.B(Fe,0))Nf(this,re,pe,st,z,xe,Oe),z.assign(xe);else{var Mt=xe.x,Ot=xe.y;Ee=Mt,pt=Ot,xe.x>z.x?Mt=xe.x-Fe:Mt=xe.x+Fe,Ye.y>xe.y?pt=xe.y+xt:pt=xe.y-xt,Ye=tt.allocAt(Mt,Ot),Nf(this,re,pe,st,z,Ye,Oe),tt.free(Ye),Zm(re,xe.x+pe,xe.y+st,Ee+pe,pt+st),z.h(Ee,pt)}else it.B(z.x,xe.x)&&it.B(xe.y,Ye.y)?(Fe=Math.min(ne,Math.abs(xe.y-b.y)/2),Fe=xt=Math.min(Fe,Math.abs(Ye.x-xe.x)/2),it.B(xt,0)?(Nf(this,re,pe,st,z,xe,Oe),z.assign(xe)):(Mt=xe.x,Ot=xe.y,Ee=Mt,pt=Ot,xe.y>z.y?Ot=xe.y-Fe:Ot=xe.y+Fe,Ye.x>xe.x?Ee=xe.x+xt:Ee=xe.x-xt,Ye=tt.allocAt(Mt,Ot),Nf(this,re,pe,st,z,Ye,Oe),tt.free(Ye),Zm(re,xe.x+pe,xe.y+st,Ee+pe,pt+st),z.h(Ee,pt))):(Nf(this,re,pe,st,z,xe,Oe),z.assign(xe));b.assign(ue),pe=le}tt.free(z)}Hm=re}else re=this.i(1).copy(),re.x-=E,re.y-=oe,this.computeShortLength(!0)!==0&&(b=Bf(this,b,!0,z)),this.computeShortLength(!1)!==0&&(re=Bf(this,re,!1,z)),a.type=vn.j,a.startX=b.x,a.startY=b.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function Jm(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),it.$(a,0)?y:it.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Bf(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=Jm(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=Jm(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function Yv(a,y,x,E){for(var b=a.pointsCount,z=y;it.$(y.x,z.x)&&it.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!it.$(y.x,z.x)&&!it.$(y.y,z.y))return x-1;for(var ne=z;it.$(y.x,z.x)&&it.$(z.x,ne.x)&&(!E||(y.y>=z.y?z.y>=ne.y:z.y<=ne.y))||it.$(y.y,z.y)&&it.$(z.y,ne.y)&&(!E||(y.x>=z.x?z.x>=ne.x:z.x<=ne.x));){if(x>=b)return b-1;ne=a.i(x++)}return x-2}Kn.prototype.computeJumpLength=function(){return 10};function Nf(a,y,x,E,b,z,ne){if(!ne&&rf(a)){ne=a.computeJumpLength();var re=ne/2,oe=[],le=0;if(a.isVisible()&&(le=bx(a,b,z,oe)),0<le){if(it.B(b.y,z.y))if(b.x<z.x)for(var ue=0;ue<le;){var pe=Math.max(b.x,Math.min(oe[ue++]-re,z.x-ne));y.lineTo(pe+x,z.y+E);for(var xe=pe+x,Ee=Math.min(pe+ne,z.x);ue<le&&(pe=oe[ue],pe<Ee+ne);)ue++,Ee=Math.min(pe+re,z.x);pe=z.y-ne+E,Ee+=x;var Fe=z.y+E;a.curve===Gc?yg(y,Ee,Fe,!1):_c(y,xe,pe,Ee,pe,Ee,Fe)}else for(--le;0<=le;){for(ue=Math.min(b.x,Math.max(oe[le--]+re,z.x+ne)),y.lineTo(ue+x,z.y+E),xe=ue+x,pe=Math.max(ue-ne,z.x);0<=le&&(ue=oe[le],ue>pe-ne);)le--,pe=Math.max(ue-re,z.x);ue=z.y-ne+E,pe+=x,Ee=z.y+E,a.curve===Gc?yg(y,pe,Ee,!1):_c(y,xe,ue,pe,ue,pe,Ee)}else if(it.B(b.x,z.x))if(b.y<z.y)for(ue=0;ue<le;){for(pe=Math.max(b.y,Math.min(oe[ue++]-re,z.y-ne)),y.lineTo(z.x+x,pe+E),xe=pe+E,pe=Math.min(pe+ne,z.y);ue<le&&(Ee=oe[ue],Ee<pe+ne);)ue++,pe=Math.min(Ee+re,z.y);Ee=z.x-ne+x,Fe=z.x+x,pe+=E,a.curve===Gc?yg(y,Fe,pe,!1):_c(y,Ee,xe,Ee,pe,Fe,pe)}else for(--le;0<=le;){for(ue=Math.min(b.y,Math.max(oe[le--]+re,z.y+ne)),y.lineTo(z.x+x,ue+E),xe=ue+E,ue=Math.max(ue-ne,z.y);0<=le&&(pe=oe[le],pe>ue-ne);)le--,ue=Math.max(pe-re,z.y);pe=z.x-ne+x,Ee=z.x+x,ue+=E,a.curve===Gc?yg(y,Ee,ue,!1):_c(y,pe,xe,pe,ue,Ee,ue)}}}y.lineTo(z.x+x,z.y+E)}function bx(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var ne=z.length,re=0;re<ne;re++){var oe=z[re];if(oe instanceof Kn){if(oe===a)return 0<E.length&&E.sort(function(ue,pe){return ue-pe}),E.length;if(oe.isVisible()&&rf(oe)){var le=oe.routeBounds;le.w()&&a.routeBounds.Yc(le)&&!a.usesSamePort(oe)&&(le=oe.path,le!==null&&le.Ed()&&Mx(y,x,E,oe))}}}}}return 0<E.length&&E.sort(function(ue,pe){return ue-pe}),E.length}function Mx(a,y,x,E){for(var b=it.B(a.y,y.y),z=E.pointsCount,ne=E.i(0),re=tt.alloc(),oe=1;oe<z;oe++){var le=E.i(oe);if(oe<z-1){var ue=E.i(oe+1);if(ne.y===le.y&&le.y===ue.y){if(le.x>ne.x&&ue.x>=le.x||le.x<ne.x&&ue.x<=le.x)continue}else if(ne.x===le.x&&le.x===ue.x&&(le.y>ne.y&&ue.y>=le.y||le.y<ne.y&&ue.y<=le.y))continue}e:{ue=a.x;var pe=a.y,xe=y.x,Ee=y.y,Fe=ne.x;ne=ne.y;var Oe=le.x,st=le.y;if(it.B(ue,xe)){if(!it.B(pe,Ee)&&it.B(ne,st)&&Math.min(pe,Ee)<ne&&Math.max(pe,Ee)>ne&&Math.min(Fe,Oe)<ue&&Math.max(Fe,Oe)>ue&&!it.B(Fe,Oe)){re.x=ue,re.y=ne,ue=!0;break e}}else if(it.B(pe,Ee)&&it.B(Fe,Oe)&&Math.min(ue,xe)<Fe&&Math.max(ue,xe)>Fe&&Math.min(ne,st)<pe&&Math.max(ne,st)>pe&&!it.B(ne,st)){re.x=Fe,re.y=pe,ue=!0;break e}re.x=0,re.y=0,ue=!1}ue&&(b?x.push(re.x):x.push(re.y)),ne=le}tt.free(re)}function rf(a){return a=a.curve,a===Pg||a===Gc}function Qm(a,y){(y||rf(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()))}Kn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var ne=b.length,re=0;re<ne;re++){var oe=b[re];oe instanceof Kn&&(oe===this?z=!0:z&&eS(this,oe,a))}}else if(E)for(z=b.Pa.s,b=z.length,ne=0;ne<b;ne++)re=z[ne],re instanceof Kn&&eS(this,re,a)}}}}};function eS(a,y,x){if(y!==null&&y.lk&&y.fd&&rf(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Kn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Kn.prototype.isVisible=function(){if(!Oi.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},Kn.prototype.Zb=function(a){if(Oi.prototype.Zb.call(this,a),a&&Qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Kn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?Pp:this.qk};function Sp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,ne=y.jb.s,re=ne.length,oe=0;oe<re;oe++){var le=ne[oe];(le.ef===y&&le.ff===E&&le.uf===x&&le.vf===b||le.ef===x&&le.ff===b&&le.uf===y&&le.vf===E)&&(z===null?z=le:(a===null&&(a=[],a.push(z)),a.push(le)))}if(a!==null){for(z=H1(y,x,E,b),z===null&&(z=new i0(y,E,x,b),Z1(y,z),Z1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function xp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(ui(y.links,a),y.Sl()))}Kn.prototype.ph=function(){return!0},Ve.Object.defineProperties(Kn.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&&Km(y,this,x),xp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ne)}a!==null&&(this.uf!==a&&$m(a,this,b),Sp(this),this.C(1)),this.g("fromNode",y,a),Sg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ql(x),xp(this),this.ff=a;var E=this.fromPort;E!==null&&Ql(E);var b=this.diagram;if(b!==null){var z=this.data,ne=b.model;z!==null&&ne.ri()&&ne.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(ne=!0,b!==null&&(ne=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ne))),Sp(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&&Km(y,this,x),xp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ne)}a!==null&&(this.ef!==a&&$m(a,this,b),Sp(this),this.C(1)),this.g("toNode",y,a),Sg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ql(x),xp(this),this.vf=a;var E=this.toPort;E!==null&&Ql(E);var b=this.diagram;if(b!==null){var z=this.data,ne=b.model;z!==null&&ne.ri()&&ne.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(ne=!0,b!==null&&(ne=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ne))),Sp(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:Po},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&&Ql(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&&In(a,">= 0",Kn,"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:Po},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&&Ql(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&&In(a,">= 0",Kn,"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?cr: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&&yp(this.fromNode),this.toNode!==null&&yp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Mr?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===pu&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),it.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var ne=this.i(z-2);z+3>=E&&(z=E-1);var re=this.i(z-1),oe=this.i(z);it.Dl(b.x,b.y,ne.x,ne.y,re.x,re.y,oe.x,oe.y,.5,a),y=Math.min(oe.x,y),x=Math.min(oe.y,x),b=oe}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new tt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Um(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);it.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):it.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new Mn,E=0;E<a.length/2;E++)b=new tt(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!Gt(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new Mn,E=0;E<a.length;E++)b=a[E],x.add(new tt(b.x,b.y).freeze())}}else if(a instanceof Mn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else St("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Um(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ra(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||!xg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!xg(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(),Qm(this,y===Gc||y===Pg||a===Gc||a===Pg),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(),Qm(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)}}}),Kn.prototype.invalidateOtherJumpOvers=Kn.prototype.Xo,Kn.prototype.findClosestSegment=Kn.prototype.ez,Kn.prototype.updateRoute=Kn.prototype.vg,Kn.prototype.invalidateRoute=Kn.prototype.bb,Kn.prototype.rollbackRoute=Kn.prototype.rv,Kn.prototype.commitRoute=Kn.prototype.zf,Kn.prototype.startRoute=Kn.prototype.uh,Kn.prototype.clearPoints=Kn.prototype.Fj,Kn.prototype.removePoint=Kn.prototype.pv,Kn.prototype.addPointAt=Kn.prototype.yf,Kn.prototype.addPoint=Kn.prototype.ne,Kn.prototype.insertPointAt=Kn.prototype.m,Kn.prototype.insertPoint=Kn.prototype.Kz,Kn.prototype.setPointAt=Kn.prototype.L,Kn.prototype.setPoint=Kn.prototype.dd,Kn.prototype.getPoint=Kn.prototype.i,Kn.prototype.getOtherPort=Kn.prototype.Cz,Kn.prototype.getOtherNode=Kn.prototype.To;var kf=null,Af=null,Xv=new fn(Kn,"Normal",1),Lx=new fn(Kn,"Orthogonal",2),Fx=new fn(Kn,"AvoidsNodes",6),tS=new fn(Kn,"AvoidsNodesStraight",7),pl=new fn(Kn,"None",0),pu=new fn(Kn,"Bezier",9),Gc=new fn(Kn,"JumpGap",10),Pg=new fn(Kn,"JumpOver",11),Pp=new fn(Kn,"End",17),qm=new fn(Kn,"Scale",18),e0=new fn(Kn,"Stretch",19),wp=new fn(Kn,"OrientAlong",21),Cp=new fn(Kn,"OrientPlus90",22),Ep=new fn(Kn,"OrientMinus90",23),Jv=new fn(Kn,"OrientOpposite",24),t0=new fn(Kn,"OrientUpright",25),bp=new fn(Kn,"OrientPlus90Upright",26),Mp=new fn(Kn,"OrientMinus90Upright",27),n0=new fn(Kn,"OrientUpright45",28),nS=16,iS=14,Lp=8;Kn.className="Link",Kn.Normal=Xv,Kn.Orthogonal=Lx,Kn.AvoidsNodes=Fx,Kn.AvoidsNodesStraight=tS,Kn.None=pl,Kn.Bezier=pu,Kn.JumpGap=Gc,Kn.JumpOver=Pg,Kn.End=Pp,Kn.Scale=qm,Kn.Stretch=e0,Kn.OrientAlong=wp,Kn.OrientPlus90=Cp,Kn.OrientMinus90=Ep,Kn.OrientOpposite=Jv,Kn.OrientUpright=t0,Kn.OrientPlus90Upright=bp,Kn.OrientMinus90Upright=Mp,Kn.OrientUpright45=n0,Kn.EndSegmentStep=8,Kn.CurvinessStart=nS,Kn.SpacingMin=iS,Kn.OrthoShortCut=Lp;function i0(a,y,x,E){Hr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}i0.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},i0.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))}},i0.className="LinkBundle";function Fp(a){Hr(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}Fp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=Qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function wg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function ec(a,y,x){return wg(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):Qv}function rS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=of&&(x[E]=Qv)}Fp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===$c)return!1}return!0};function tc(a,y,x,E,b,z,ne,re,oe){if(!(y<z||y>ne||x<re||x>oe)){var le=y|0,ue=x|0,pe=a.ac[le][ue];if(pe>=of&&pe<Cg)for(b?ue+=E:le+=E,pe+=1;z<=le&&le<=ne&&re<=ue&&ue<=oe&&!(pe>=a.ac[le][ue]);)a.ac[le][ue]=pe,pe+=1,b?ue+=E:le+=E;if(le=b?ue:le,b)if(0<E)for(x+=E;x<le;x+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe);else for(x+=E;x>le;x+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe);else if(0<E)for(y+=E;y<le;y+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe);else for(y+=E;y>le;y+=E)tc(a,y,x,1,!b,z,ne,re,oe),tc(a,y,x,-1,!b,z,ne,re,oe)}}function r0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var le=$c,ue=of;for(a.ac[y][x]=ue;le===$c&&y>z&&y<ne&&x>re&&x<oe;)ue+=1,a.ac[y][x]=ue,b?x+=E:y+=E,le=a.ac[y][x]}function o0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var le=$c,ue=Cg;for(a.ac[y][x]=ue;le===$c&&y>z&&y<ne&&x>re&&x<oe;)a.ac[y][x]=ue,b?x+=E:y+=E,le=a.ac[y][x]}function oS(a,y,x,E,b,z,ne){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(wg(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var le=E.x,ue=E.y;if(wg(a,le,ue))if(le-=a.Nd,le/=a.rc,ue-=a.Od,ue/=a.sc,1>=Math.abs(re-le)&&1>=Math.abs(oe-ue))a.abort=!0;else{var pe=z.x;E=z.y,y=z.x+z.width;var xe=z.y+z.height;pe-=a.Nd,pe/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,xe-=a.Od,xe/=a.sc,z=Math.max(0,Math.min(a.di,pe|0)),y=Math.min(a.di,Math.max(0,y|0)),pe=Math.max(0,Math.min(a.ei,E|0)),xe=Math.min(a.ei,Math.max(0,xe|0)),E=a.ac,re|=0,oe|=0,le|=0,ue|=0;var Ee=x===0||x===90?1:-1;if(x=x===90||x===270,E[re][oe]===$c?(r0(a,re,oe,Ee,x,z,y,pe,xe),r0(a,re,oe,1,!x,z,y,pe,xe),r0(a,re,oe,-1,!x,z,y,pe,xe)):r0(a,re,oe,Ee,x,re,oe,re,oe),E[le][ue]===$c?(o0(a,le,ue,b===0||b===90?1:-1,b===90||b===270,z,y,pe,xe),o0(a,le,ue,1,!(b===90||b===270),z,y,pe,xe),o0(a,le,ue,-1,!(b===90||b===270),z,y,pe,xe)):o0(a,le,ue,Ee,x,le,ue,le,ue),x=ni(),ne&&aS(a,le,ue,b,re,oe,x))for((x[0]!==le||x[1]!==ue)&&(x.unshift(ue),x.unshift(le)),(x[x.length-2]!==re||x[x.length-1]!==oe)&&(x.push(re),x.push(oe)),a=of,b=x[x.length-2],ne=x[x.length-1],E[b][ne]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],ne=x[z+3],y=x[z],le=x[z+1];y>b?b++:y<b?b--:le>ne?ne++:le<ne&&ne--,E[b][ne]=a++,b!==y||ne!==le;);else tc(a,re,oe,1,!1,z,y,pe,xe),tc(a,re,oe,-1,!1,z,y,pe,xe),tc(a,re,oe,1,!0,z,y,pe,xe),tc(a,re,oe,-1,!0,z,y,pe,xe);ci(x)}}}}function aS(a,y,x,E,b,z,ne){for(var re=a.ac,oe=y,le=x;;){if(oe===b&&le===z)return!0;var ue=oe,pe=le;if(E===0)if(ue<b)ue++;else break;else if(E===90)if(pe<z)pe++;else break;else if(E===180)if(ue>b)ue--;else break;else if(pe>z)pe--;else break;var xe=re[ue][pe];if(xe===0||xe===qv)break;oe=ue,le=pe}for(;;){if(ue=E,pe=oe,xe=le,E===0?xe<z?(ue=90,xe++):xe>z&&(ue=270,xe--):E===90?pe<b?(ue=0,pe++):pe>b&&(ue=180,pe--):E===180?xe<z?(ue=90,xe++):xe>z&&(ue=270,xe--):pe<b?(ue=0,pe++):pe>b&&(ue=180,pe--),pe=re[pe][xe],ue!==E&&pe!==0&&pe!==qv){if(ne.push(oe),ne.push(le),aS(a,oe,le,ue,b,z,ne))return!0;ne.pop(),ne.pop()}if(re[oe][le]=qv,E===0){if(oe===y)return!1;oe--}else if(E===90){if(le===x)return!1;le--}else if(E===180){if(oe===y)return!1;oe++}else{if(le===x)return!1;le++}}}Ve.Object.defineProperties(Fp.prototype,{bounds:{get:function(){return new pn(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 $c=0,of=1,Cg=999999,Qv=Cg+1,qv=Cg+2;Fp.className="PositionArray";function Tf(){Hr(this),this.port=this.node=null,this.pe=[],this.ap=!1}Tf.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
`+E.toString())}return y};function Bx(a,y,x,E){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return E&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}Tf.prototype.Sl=function(){this.pe.length=0};function sS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof fr?b:null;if(z===null||z.isSubGraphExpanded)var ne=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break e}E=z,ne=E.Lu()}z=a.pe.length=0;var re=a.port.ga(cs,tt.alloc()),oe=a.port.ga(ys,tt.alloc());for(b=pn.allocAt(re.x,re.y,0,0),b.Ye(oe),tt.free(re),tt.free(oe),re=tt.allocAt(b.x+b.width/2,b.y+b.height/2),oe=a.port.li(),ne=ne.iterator;ne.next();){var le=ne.value;if(le.isVisible()&&le.fromPort!==le.toPort){var ue=le.fromPort===a.port||le.fromNode!==null&&le.fromNode.Td(E),pe=le.computeSpot(ue,a.port);if(pe.$c()&&(ue=ue?le.toPort:le.fromPort,ue!==null)){var xe=ue.part;if(xe!==null){var Ee=xe.findVisibleNode();Ee!==null&&Ee!==xe&&(xe=Ee,ue=xe.port),ue=le.computeOtherPoint(xe,ue),xe=re.ab(ue),xe-=oe,0>xe?xe+=360:360<=xe&&(xe-=360),pe=Bx(b,pe,xe,le.isOrthogonal),pe===0?(pe=4,180<xe&&(xe-=360)):pe===90?(pe=8,270<xe&&(xe-=360)):pe===180?pe=2:(pe=1,90>xe&&(xe+=360)),Ee=a.pe[z],Ee===void 0?(Ee=new ey(le,xe,pe),a.pe[z]=Ee):(Ee.link=le,Ee.angle=xe,Ee.Nc=pe),Ee.hv.set(ue),z++}}}}for(tt.free(re),a.pe.sort(Tf.prototype.j),oe=a.pe.length,E=-1,z=re=0;z<oe;z++)ne=a.pe[z],ne!==void 0&&(ne.Nc!==E&&(E=ne.Nc,re=0),ne.Uo=re,re++);for(E=-1,re=0,z=oe-1;0<=z;z--)oe=a.pe[z],oe!==void 0&&(oe.Nc!==E&&(E=oe.Nc,re=oe.Uo+1),oe.Gl=re);if(z=a.pe,pe=a.port,E=a.node.portSpreading,re=tt.alloc(),oe=tt.alloc(),ne=tt.alloc(),le=tt.alloc(),pe.ga(cs,re),pe.ga(Ol,oe),pe.ga(ys,ne),pe.ga(nl,le),Ee=xe=ue=pe=0,E===Wv)for(var Fe=0;Fe<z.length;Fe++){var Oe=z[Fe];if(Oe!==null){var st=Oe.link.computeThickness();switch(Oe.Nc){case 8:xe+=st;break;case 2:Ee+=st;break;case 1:pe+=st;break;default:case 4:ue+=st}}}var Ye=Fe=0,pt=1,xt=Oe=0;for(st=0;st<z.length;st++){var Mt=z[st];if(Mt!==null){if(Fe!==Mt.Nc){switch(Fe=Mt.Nc,Fe){case 8:var Ot=ne;Ye=le;break;case 2:Ot=le,Ye=re;break;case 1:Ot=re,Ye=oe;break;default:case 4:Ot=oe,Ye=ne}switch(Oe=Ye.x-Ot.x,xt=Ye.y-Ot.y,Fe){case 8:xe>Math.abs(Oe)?(pt=Math.abs(Oe)/xe,xe=Math.abs(Oe)):pt=1;break;case 2:Ee>Math.abs(xt)?(pt=Math.abs(xt)/Ee,Ee=Math.abs(xt)):pt=1;break;case 1:pe>Math.abs(Oe)?(pt=Math.abs(Oe)/pe,pe=Math.abs(Oe)):pt=1;break;default:case 4:ue>Math.abs(xt)?(pt=Math.abs(xt)/ue,ue=Math.abs(xt)):pt=1}Ye=0}var en=Mt.Zo;if(E===Wv){switch(Mt=Mt.link.computeThickness(),Mt*=pt,en.set(Ot),Fe){case 8:en.x=Ot.x+Oe/2+xe/2-Ye-Mt/2;break;case 2:en.y=Ot.y+xt/2+Ee/2-Ye-Mt/2;break;case 1:en.x=Ot.x+Oe/2-pe/2+Ye+Mt/2;break;default:case 4:en.y=Ot.y+xt/2-ue/2+Ye+Mt/2}Ye+=Mt}else{var ri=.5;E===Vm&&(ri=(Mt.Uo+1)/(Mt.Gl+1)),en.x=Ot.x+Oe*ri,en.y=Ot.y+xt*ri}}}for(tt.free(re),tt.free(oe),tt.free(ne),tt.free(le),Ot=a.pe,z=0;z<Ot.length;z++)E=Ot[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,pn.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}Tf.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},Tf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Ma,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},Tf.className="Knot";function ey(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new tt,this.Gl=this.Uo=0,this.Zo=new tt,this.Ju=0}ey.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()},ey.className="LinkInfo";function da(a){Hr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new tt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}da.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},da.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},da.prototype.qb=function(){},da.prototype.toString=function(){var a=li(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},da.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())}}},da.prototype.createNetwork=function(){return new qo(this)},da.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof qt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof fr?y.lg(a.memberParts):y.lg(a.iterator),y},da.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")}},da.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()}},da.prototype.doLayout=function(a){var y=new Ln;a instanceof qt?(vd(this,y,a.nodes,!0,this.rh,!0,!1,!0),vd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof fr?vd(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},da.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,ne=0;for(a=a.iterator;a.next();){var re=a.value;Bp(re);var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(E,b),re instanceof fr&&(re.rh=!1),E+=Math.max(le,50)+20,ne=Math.max(ne,Math.max(oe,50)),z>=y-1?(z=0,E=x,b+=ne+20,ne=0):z++}},da.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,E=this.arrangementOrigin.y,b=0,z=0,ne=this.network.vertexes.iterator;ne.next();){var re=ne.value.node;if(!(re===null||re instanceof Kn)&&(Bp(re),this.rh(re))){var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(x,E),re instanceof fr&&(re.rh=!1),x+=Math.max(le,50)+20,z=Math.max(z,Math.max(oe,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},da.prototype.rh=function(a){return!!(!a.location.w()||a instanceof fr&&a.rh)};function vd(a,y,x,E,b,z,ne,re){for(x=x.iterator;x.next();){var oe=x.value;E&&!oe.isTopLevel||b!==null&&!b(oe)||!oe.canLayout()||(z&&oe instanceof ai?oe.isLinkLabel||(oe instanceof fr&&oe.layout===null?vd(a,y,oe.memberParts,!1,b,z,ne,re):(Bp(oe),y.add(oe))):ne&&oe instanceof Kn?y.add(oe):!re||!oe.Zc()||oe instanceof ai||(Bp(oe),y.add(oe)))}}function Bp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}da.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new pn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},da.prototype.ex=function(a){var y=new Ln;return a instanceof qt?(vd(this,y,a.nodes,!0,null,!0,!0,!0),vd(this,y,a.links,!0,null,!0,!0,!0),vd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof fr?vd(this,y,a.memberParts,!1,null,!0,!0,!0):vd(this,y,a.iterator,!1,null,!0,!0,!0),y},da.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(cs),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ve.Object.defineProperties(da.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())}}}),da.prototype.collectParts=da.prototype.ex,da.prototype.getLayoutBounds=da.prototype.ni,da.prototype.invalidateLayout=da.prototype.C,da.className="Layout";function qo(a){Hr(this),this.Sc=a,this.wf=new Ln,this.ye=new Ln,this.Es=new xi,this.zs=new xi}qo.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 Ln,this.ye=new Ln,this.Es=new xi,this.zs=new xi},qo.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},qo.prototype.createVertex=function(){return new ps(this)},qo.prototype.createEdge=function(){return new ql(this)},qo.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof ai)return!ne.isLinkLabel;if(ne instanceof Kn){var re=ne.fromNode;return re===null||re.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof ai&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof fr&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof Kn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},qo.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},Le=qo.prototype,Le.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Le.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},Le.Iu=function(a){if(a!==null&&lS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function lS(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}Le.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Le.ki=function(a){return a===null?null:this.Es.I(a)},Le.Bo=function(a){if(a!==null){ty(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ty(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}}Le.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Le.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ny(this,a)}};function ny(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Le.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Le.Lo=function(a){return a===null?null:this.zs.I(a)},Le.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}return null},Le.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))}},Le.Ko=function(){for(var a=ni(),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]);ci(a)},qo.prototype.deleteArtificialVertexes=function(){for(var a=ni(),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=ni(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);ci(a),ci(y)};function Nx(a){for(var y=ni(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);ci(y)}qo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new Mn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),iy(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){lS(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(ny(a,b),ty(y,b),iy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(ny(a,x),ty(y,x),iy(a,y,x.toVertex))}}qo.prototype.dz=function(){for(var a=new Ln,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},Ve.Object.defineProperties(qo.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}}}),qo.prototype.findAllParts=qo.prototype.dz,qo.prototype.splitIntoSubNetworks=qo.prototype.Zx,qo.prototype.deleteSelfEdges=qo.prototype.Ko,qo.prototype.reverseEdge=qo.prototype.gm,qo.prototype.linkVertexes=qo.prototype.Zj,qo.prototype.findEdge=qo.prototype.Lo,qo.prototype.deleteLink=qo.prototype.Yy,qo.prototype.deleteEdge=qo.prototype.Mj,qo.prototype.addLink=qo.prototype.Dy,qo.prototype.addEdge=qo.prototype.Bo,qo.prototype.findVertex=qo.prototype.ki,qo.prototype.deleteNode=qo.prototype.Zy,qo.prototype.deleteVertex=qo.prototype.Iu,qo.prototype.addNode=qo.prototype.Bl,qo.prototype.addVertex=qo.prototype.dh,qo.prototype.addParts=qo.prototype.lg,qo.className="LayoutNetwork";function ps(a){Hr(this),this.ob=a,this.j=new pn(0,0,10,10).freeze(),this.o=new tt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Mn,this.mg=new Mn}ps.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Mn,this.mg=new Mn},ps.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Bi(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},ps.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Gt(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 fr)){x=pn.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Jr);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),pn.free(x);return}pn.free(x)}a.moveTo(y.x,y.y)}},ps.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},ps.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},ps.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},ps.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function ry(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}Ve.Object.defineProperties(ps.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=pn.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),pn.free(x),!(a instanceof fr)&&(a=a.locationObject.ga(Jr),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new Ln,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Ln,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Ln,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 Mn,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}}}),ps.prototype.deleteDestinationEdge=ps.prototype.Jl,ps.prototype.addDestinationEdge=ps.prototype.zl,ps.prototype.deleteSourceEdge=ps.prototype.Kl,ps.prototype.addSourceEdge=ps.prototype.Cl,ps.className="LayoutVertex",ps.standardComparer=ry,ps.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function ql(a){Hr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}ql.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},ql.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Bi(this);return 0<a&&(y+=this.$k!==null?"("+this.$k.toString()+")":"",1<a&&(y+=" "+(this.kd?this.kd.toString():"null")+" --> "+(this.qd?this.qd.toString():"null"))),y},ql.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},ql.prototype.commit=function(){},ql.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ve.Object.defineProperties(ql.prototype,{network:{get:function(){return this.nb},set:function(a){this.nb=a}},data:{get:function(){return this.ub},set:function(a){this.ub!==a&&(this.ub=a)}},link:{get:function(){return this.$k},set:function(a){this.$k!==a&&(this.$k=a)}},fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}}}),ql.prototype.getOtherVertex=ql.prototype.Ax,ql.className="LayoutEdge";function Ds(a){da.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Xn(NaN,NaN).freeze(),this.tf=new Xn(10,10).freeze(),this.Jb=Np,this.Rb=s0,this.nd=kp,this.hd=uS,a&&Object.assign(this,a)}Dt(Ds,da),Ds.prototype.cloneProtected=function(a){da.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},Ds.prototype.qb=function(a){a.classType===Ds?a===kp||a===u0||a===oy||a===l0?this.sorting=a:a===s0||a===vh?this.arrangement=a:a===Np||a===a0?this.alignment=a:St("Unknown enum value: "+a):da.prototype.qb.call(this,a)},Ds.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof fr)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case l0:b.reverse();break;case kp:b.sort(this.comparer);break;case u0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=z&&0>=ne&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case a0:var re=y,oe=x,le=pn.alloc(),ue=Math.max(this.cellSize.width,1);if(!isFinite(ue))for(var pe=ue=0;pe<b.length;pe++){var xe=this.ni(b[pe],le);ue=Math.max(ue,xe.width)}if(ue=Math.max(ue+re,1),pe=Math.max(this.cellSize.height,1),!isFinite(pe))for(xe=pe=0;xe<b.length;xe++){var Ee=this.ni(b[xe],le);pe=Math.max(pe,Ee.height)}pe=Math.max(pe+oe,1),xe=this.arrangement;for(var Fe=Ee=this.arrangementOrigin.x,Oe=this.arrangementOrigin.y,st=0,Ye=0,pt=0;pt<b.length;pt++){var xt=b[pt],Mt=this.ni(xt,le),Ot=Math.ceil((Mt.width+re)/ue)*ue,en=Math.ceil((Mt.height+oe)/pe)*pe;switch(xe){case vh:var ri=Math.abs(Fe-Mt.width);break;default:ri=Fe+Mt.width}switch((0<z&&st>z-1||0<ne&&0<st&&ri-Ee>ne)&&(E.push(new pn(0,Oe,ne+re,Ye)),st=0,Fe=Ee,Oe+=Ye,Ye=0),Ye=Math.max(Ye,en),xe){case vh:Mt=-Mt.width;break;default:Mt=0}switch(xt.moveTo(Fe+Mt,Oe),xe){case vh:Fe-=Ot;break;default:Fe+=Ot}st++}E.push(new pn(0,Oe,ne+re,Ye)),pn.free(le);break;case Np:for(oe=ne,ue=z,pe=y,xe=x,ne=pn.alloc(),Ee=Math.max(this.cellSize.width,1),z=Oe=le=0,re=tt.alloc(),Fe=0;Fe<b.length;Fe++)Ye=b[Fe],st=this.ni(Ye,ne),Ye=Zc(Ye,Ye.locationObject,Ye.locationSpot,re),le=Math.max(le,Ye.x),Oe=Math.max(Oe,st.width-Ye.x),z=Math.max(z,Ye.y);switch(Fe=this.arrangement,Fe){case vh:le+=pe;break;default:Oe+=pe}Ee=isFinite(Ee)?Math.max(Ee+pe,1):Math.max(le+Oe,1);var Si=Ye=this.arrangementOrigin.x;for(pt=this.arrangementOrigin.y,Oe=0,oe>=le&&(oe-=le),le=xt=0,Ot=Math.max(this.cellSize.height,1),Mt=z=0,en=!0,st=tt.alloc(),ri=0;ri<b.length;ri++){var gi=b[ri],$n=this.ni(gi,ne),An=Zc(gi,gi.locationObject,gi.locationSpot,re);if(0<Oe)switch(Fe){case vh:Si=(Si-Ye-($n.width-An.x))/Ee,Si=it.$(Math.round(Si),Si)?Math.round(Si):Math.floor(Si),Si=Si*Ee+Ye;break;default:Si=(Si-Ye+An.x)/Ee,Si=it.$(Math.round(Si),Si)?Math.round(Si):Math.ceil(Si),Si=Si*Ee+Ye}else switch(Fe){case vh:xt=Si+An.x+$n.width;break;default:xt=Si-An.x}switch(Fe){case vh:var hr=-(Si+An.x)+xt;break;default:hr=Si+$n.width-An.x-xt}if(0<ue&&Oe>ue-1||0<oe&&0<Oe&&hr>oe){for(E.push(new pn(0,en?pt-z:pt,oe+pe,Mt+z+xe)),Si=0;Si<Oe&&ri!==Oe;Si++){hr=b[ri-Oe+Si];var Ji=Zc(hr,hr.locationObject,hr.locationSpot,st);hr.moveTo(hr.position.x,hr.position.y+z-Ji.y)}Mt+=xe,pt=en?pt+Mt:pt+(Mt+z),Oe=Mt=z=0,Si=Ye,en=!1}switch(Si===Ye&&(le=Fe===vh?Math.max(le,$n.width-An.x):Math.min(le,-An.x)),z=Math.max(z,An.y),Mt=Math.max(Mt,$n.height-An.y),isFinite(Ot)&&(Mt=Math.max(Mt,Math.max($n.height,Ot)-An.y)),en?gi.moveTo(Si-An.x,pt-An.y):gi.moveTo(Si-An.x,pt),Fe){case vh:Si-=An.x+pe;break;default:Si+=$n.width-An.x+pe}Oe++}if(E.push(new pn(0,pt,oe+pe,(en?Mt:Mt+z)+xe)),b.length!==Oe)for(oe=0;oe<Oe;oe++)ue=b[b.length-Oe+oe],pe=Zc(ue,ue.locationObject,ue.locationSpot,re),ue.moveTo(ue.position.x,ue.position.y+z-pe.y);if(tt.free(re),tt.free(st),Fe===vh)for(b=0;b<E.length;b++)z=E[b],z.width+=le,z.x-=le;else for(b=0;b<E.length;b++)z=E[b],z.x>le&&(z.width+=z.x-le,z.x=le);pn.free(ne)}for(re=z=ne=b=0;re<E.length;re++)oe=E[re],b=Math.min(b,oe.x),ne=Math.min(ne,oe.y),z=Math.max(z,oe.x+oe.width);this.arrangement===vh?this.commitLayers(E,new tt(b+y/2-(z+b),ne-x/2)):this.commitLayers(E,new tt(b-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Ds.prototype.commitLayers=function(){};function uS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ve.Object.defineProperties(Ds.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!==Np&&a!==a0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==s0&&a!==vh||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==oy&&a!==l0&&a!==kp&&a!==u0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var a0=new fn(Ds,"Position",0),Np=new fn(Ds,"Location",1),s0=new fn(Ds,"LeftToRight",2),vh=new fn(Ds,"RightToLeft",3),oy=new fn(Ds,"Forward",4),l0=new fn(Ds,"Reverse",5),kp=new fn(Ds,"Ascending",6),u0=new fn(Ds,"Descending",7);Ds.className="GridLayout",Ds.standardComparer=uS,Ds.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Ds.Position=a0,Ds.Location=Np,Ds.LeftToRight=s0,Ds.RightToLeft=vh,Ds.Forward=oy,Ds.Reverse=l0,Ds.Ascending=kp,Ds.Descending=u0;function Oo(){this.On=new Ln,this.Dn=new Ln,this.Pa=new Ln,this.cf=new xi,this.bf=new xi,this.aj=new xi,this.H=null,this.tp=!1}Le=Oo.prototype,Le.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Le.Xe=function(a){this.H=a},Le.oi=function(a){if(a instanceof ai){if(this.On.add(a),a instanceof fr){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 Kn?this.Dn.add(a):a instanceof ho||this.Pa.add(a);y=a.data,y===null||a instanceof ho||(a instanceof Kn?this.bf.add(y,a):this.cf.add(y,a))},Le.pc=function(a){if(a.Ej(),a instanceof ai){if(this.On.remove(a),a instanceof fr){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 Kn?this.Dn.remove(a):a instanceof ho||this.Pa.remove(a);y=a.data,y===null||a instanceof ho||(a instanceof Kn?this.bf.remove(y):this.cf.remove(y))},Le.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,E=y.key;(!x.Zc()||x instanceof fr)&&St('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof fr||St('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof Kn||St('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=ni(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=ni(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=ni(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);ci(y),ci(x),ci(a)}},Oo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Oo.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&hS(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&Qf(this.diagram,!1)};function hS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=cS(a,y,E);if(b!==null&&($u(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break e}}E=null}E!==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 cS(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,ii('No Group template found for category "'+x+'"'),ii(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(fS||(fS=!0,ii('No Node template found for category "'+x+'"'),ii(" 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&&(pS||(pS=!0,ii('No Link template found for category "'+a+'"'),ii(" 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&&(ld(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 ai?a:null)},Oo.prototype.findLinkForKey=function(){return null},Le=Oo.prototype,Le.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Le.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof ai?a:null)},Le.Kc=function(a){return a===null?null:this.bf.I(a)},Le.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Ln;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var ne=arguments[z];if(Gt(ne)&&ay(this,b,ne)){y.add(E);break}}}return y.iterator},Le.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Ln;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var ne=arguments[z];if(Gt(ne)&&ay(this,b,ne)){y.add(E);break}}}return y.iterator};function ay(a,y,x){for(var E in x){var b=y[E],z=x[E];if(Jt(z)){if(!Jt(b)||b.length<z.length)return!1;for(var ne=0;ne<b.length;ne++){var re=z[ne];if(re!==void 0&&!dS(a,b[ne],re))return!1}}else if(!dS(a,b,z))return!1}return!0}function dS(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if(Gt(y)&&Gt(x)){if(!ay(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 E=a.modelChange;if(E!=="")if(x===Yr){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===ko){var ne=a.newValue;E==="nodeDataArray"&&Gt(ne)&&hS(this,ne),y.isModified=!0}else if(x===Uo){var re=a.oldValue;E==="nodeDataArray"&&Gt(re)&&this.ip(re),y.isModified=!0}else x===To&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===Yr){var oe=a.propertyName,le=a.object;le===y.model?(oe==="nodeKeyProperty"||oe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(le,oe),y.isModified=!0}else if(x===ko||x===Uo){var ue=a.change===ko,pe=ue?a.newParam:a.oldParam,xe=ue?a.newValue:a.oldValue,Ee=this.aj.I(a.object);if(Array.isArray(Ee))for(a=0;a<Ee.length;a++){var Fe=Ee[a];if(ue)Fm(Fe,xe,pe,!0);else if(!(0>pe)){var Oe=pe+dp(Fe);Fe.pc(Oe,!0),xv(Fe,Oe,pe)}}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 Ln,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||b.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||b.push(ne.data)}),b.forEach(function(ne){ES(a,ne,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&CS(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 E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var ne=b[z].sx(a);ne!==null&&(x===null&&(x=ni()),x.push(ne))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);ci(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function sy(a,y){var x=y.Hh;if(Jt(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function ly(a,y,x){qd(y,function(ne){ne=ne.O.s;for(var re=ne.length,oe=0;oe<re;oe++)Xg(x,ne[oe])});var E=y.Hh;if(Jt(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}Oo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new xi;if(Jt(a))for(var b=0;b<a.length;b++)h0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)h0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new Ln;for(var z=new xi,ne=E.iterator;ne.next();){var re=ne.value;if(re instanceof Kn)a||re.fromNode!==null&&re.toNode!==null||b.add(re);else if(re instanceof ai&&re.data!==null&&x.Tl()){var oe=re;re=ne.key;var le=re.pg();le!==null&&(le=E.I(le),le!==null?(x.qe(oe.data,x.wa(le.data)),oe=y.Kc(oe.data),re=re.kh(),re!==null&&oe!==null&&z.add(re,oe)):x.qe(oe.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ue=new xi;E.each(function(pe){pe.key.data!==null&&ue.add(pe.key.data,pe.value.data)}),x(ue,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function h0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Oi))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof ai){for(var ne=y.linksConnected;ne.next();){var re=ne.value;if(re.fromNode===y){var oe=E.I(re);oe!==null&&(oe.fromNode=z)}re.toNode===y&&(re=E.I(re),re!==null&&(re.toNode=z))}if(y instanceof fr&&z instanceof fr)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,E,b),ne instanceof Kn||ne===null||(ne.containingGroup=z)}else if(y instanceof Kn&&z instanceof Kn)for(ne=y.fromNode,ne!==null&&(ne=E.I(ne),ne!==null&&(z.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=E.I(ne),ne!==null&&(z.toNode=ne)),y=y.labelNodes;y.next();)ne=h0(a,y.value,x,E,b),ne!==null&&ne instanceof ai&&(ne.labeledLink=z);return z}Oo.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Kn||(E=b.copyNodeData(E),Gt(E)&&(b.xf(E),x=y.Lc(E)))}else $u(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof Kn||(b=y.copyNodeData(E)),Gt(b)&&(x.data=b)));return x},Ve.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 fS=!1,gS=!1,pS=!1;Oo.className="PartManager";function Cs(a){Oo.apply(this,arguments)}Dt(Cs,Oo),Cs.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mS(this,a.linkDataArray)},Cs.prototype.addModeledParts=function(a){for(Oo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Sg(a.value);Qf(this.diagram,!1)};function mS(a,y){y.forEach(function(x){vS(a,x)}),Qf(a.diagram,!1)}function vS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){$u(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=g0(x,y,!0);z!==""&&(b.fromPortId=z),z=mu(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof ai&&(b.fromNode=z)),z=g0(x,y,!1),z!==""&&(b.toPortId=z),z=mu(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof ai&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}Cs.prototype.removeAllModeledParts=function(){var a=this.diagram.model;yS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function yS(a,y){y.forEach(function(x){a.ip(x)})}Cs.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Cs.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Cs.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Cs.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Cs.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Cs.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},Cs.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Cs.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 E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===Yr){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var ne=this.Vb(a.newValue);z.fromNode=ne}}else if(b==="linkToKey"){var re=this.Kc(a.object);if(re!==null){var oe=this.Vb(a.newValue);re.toNode=oe}}else if(b==="linkFromPortId"){var le=this.Kc(a.object);if(le!==null){var ue=a.newValue;typeof ue=="string"&&(le.fromPortId=ue)}}else if(b==="linkToPortId"){var pe=this.Kc(a.object);if(pe!==null){var xe=a.newValue;typeof xe=="string"&&(pe.toPortId=xe)}}else if(b==="nodeGroupKey"){var Ee=this.Lc(a.object);if(Ee!==null){var Fe=a.newValue;if(Fe!==void 0){var Oe=this.Vb(Fe);Oe instanceof fr?Ee.containingGroup=Oe:Ee.containingGroup=null}else Ee.containingGroup=null}}else if(b==="linkLabelKeys"){var st=this.Kc(a.object);if(st!==null){var Ye=a.oldValue,pt=a.newValue;Array.isArray(Ye)&&Ye.forEach(function(An){0<=pt.indexOf(An)||(An=y.Vb(An),An!==null&&(An.labeledLink=null))}),Array.isArray(pt)&&pt.forEach(function(An){An=y.Vb(An),An!==null&&(An.labeledLink=st)})}}else if(b==="linkCategory"){var xt=this.Kc(a.object),Mt=a.newValue;xt!==null&&typeof Mt=="string"&&(xt.category=Mt)}else b==="linkDataArray"&&(yS(this,a.oldValue),mS(this,a.newValue));x.isModified=!0}else if(E===ko){var Ot=a.newValue;if(b==="linkDataArray"&&typeof Ot=="object"&&Ot!==null)vS(this,Ot);else if(b==="linkLabelKeys"&&Sd(Ot)){var en=this.Kc(a.object),ri=this.Vb(Ot);en!==null&&ri!==null&&(ri.labeledLink=en)}x.isModified=!0}else if(E===Uo){var Si=a.oldValue;if(b==="linkDataArray"&&typeof Si=="object"&&Si!==null)this.ip(Si);else if(b==="linkLabelKeys"&&Sd(Si)){var gi=this.Vb(Si);gi!==null&&(gi.labeledLink=null)}x.isModified=!0}}else if(E===Yr){var $n=a.propertyName;a.object!==x.model||$n!=="linkFromKeyProperty"&&$n!=="linkToKeyProperty"&&$n!=="linkFromPortIdProperty"&&$n!=="linkToPortIdProperty"&&$n!=="linkLabelKeysProperty"&&$n!=="nodeIsGroupProperty"&&$n!=="nodeGroupKeyProperty"&&$n!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Cs.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Ln,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){NS(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&BS(y,z,!1)})},Cs.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof Kn){var b=mu(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=mu(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new Ln().addAll(y);var ne=new Ln;a.labelNodes.each(function(re){re.data!==null&&(re=E.wa(re.data),re!==void 0&&ne.add(re))}),y=ne.copy(),y.hp(b),b=b.copy(),b.hp(ne),(0<y.count||0<b.count)&&(y.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink===a&&(re.labeledLink=null)}),b.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink!==a&&(re.labeledLink=a)}))}}else!(a instanceof ho)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof fr)&&(a.containingGroup=y)}}},Cs.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Ap(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var ne=E.value;y.lb(ne)?b instanceof fr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=b)):(z.link=this.Kc(ne),z.link!==null&&b instanceof ai&&(mu(y,ne,!0)===x&&(z.link.fromNode=b),mu(y,ne,!1)===x&&(z.link.toNode=b),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(re){return function(oe){return oe===x?(b.labeledLink=re.link,!0):!1}}(z)))),z={link:z.link}}Sh(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof fr&&(b.containingGroup=a))}},Cs.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ai){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)yh(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&yh(y,x,E.data)),a instanceof fr)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&yh(y,x,E)}}},Cs.prototype.copyPartData=function(a,y){var x=Oo.prototype.copyPartData.call(this,a,y);if(a instanceof Kn)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},Cs.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,ne=b.toolManager.findTool("Linking"),re="";if(a!==null&&(y===null&&(y=a),re=y.portId,re===null&&(re="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=ne.archetypeLinkData,E instanceof Kn){if($u(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=re,z.toNode=x,z.toPortId=y,b.add(z),a=ne.archetypeLabelNodeData,a instanceof ai&&($u(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&bg(z,E,z.wa(a.data),!0),Mg(z,E,re,!0),x!==null&&bg(z,E,z.wa(x.data),!1),Mg(z,E,y,!1),z.fi(E),a=ne.archetypeLabelNodeData,a===null||a instanceof ai||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},Cs.prototype.findLinkForKey=Cs.prototype.findLinkForKey,Cs.prototype.findPartForKey=Cs.prototype.findPartForKey,Cs.prototype.removeAllModeledParts=Cs.prototype.removeAllModeledParts,Cs.prototype.addModeledParts=Cs.prototype.addModeledParts,Cs.prototype.addAllModeledParts=Cs.prototype.addAllModeledParts,Cs.className="GraphLinksPartManager";function Au(){Oo.apply(this,arguments),this.Sg=null}Dt(Au,Oo);function c0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!yn(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&($u(E),E=E.copy(),E!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}Au.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Au.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Au.prototype.setFromNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},Au.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.wa(y))},Au.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Au.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Au.prototype.doModelChanged=function(a){if(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 E=a.modelChange;if(E!==""){if(x===Yr){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),ne=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(ne!==null){var re=ne.kh();re!==null?z===null?y.remove(re):y.isTreePathToChildren?re.fromNode=z:re.toNode=z:c0(this,z,ne)}}else if(E==="parentLinkCategory"){var oe=this.ii(a.object),le=a.newValue;if(oe!==null&&typeof le=="string"){var ue=oe.kh();ue!==null&&(ue.category=le)}}y.isModified=!0}}else if(x===Yr){var pe=a.propertyName;a.object===y.model&&pe==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Au.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof ai&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:c0(this,y,a):E!==null&&ld(x,E,!1)))}}},Au.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))},Au.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Ap(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof ai&&y.mh(z)===x&&c0(this,b,this.ii(z))}Sh(y,x)}a=y.mh(a),a!==void 0&&b instanceof ai&&(a=this.Vb(a),c0(this,a,b))}},Au.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ai){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(Uo,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&yh(y,x,b)}},Au.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},Au.prototype.findLinkForKey=Au.prototype.findLinkForKey,Au.className="TreePartManager";function Mi(a,y){this.kl=new Ln,this.il=new Ln,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,Hr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new xi,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 xi,this.Lt=new Mn,this.Wg=!1,this.o=null,this.undoManager=new Do,a!==void 0&&(Jt(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Mi.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},Mi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Mi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Mi.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Ni(b)}}return y},Mi.prototype.xA=function(a){a.change!==To&&St("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Lr?(xS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Mi.prototype.Qv=function(a,y){var x=this,E=!1,b=new Ln,z=new Ln,ne=new Ln,re=this.vh;a.changes.each(function(pe){pe.model===x&&(pe.modelChange==="nodeDataArray"?pe.change===ko?b.add(pe.newValue):pe.change===Uo&&ne.add(pe.oldValue):x.lb(pe.object)?z.add(pe.object):pe.change!==Yr||x.modelData!==pe.object&&pe.propertyName!=="modelData"?pe.object!==null&&(re&&re.contains(pe.object)?re.get(pe.object).each(function(xe){x.lb(xe)&&z.add(xe)}):pe.object instanceof Mi||x.ri()&&x.Jc(pe.object)||PS(x,pe.object).each(function(xe){z.add(xe)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(pe){oe.add(x.wa(pe)),y||z.add(pe)});var le=this.kl;le.clear(),ne.each(function(pe){le.add(x.wa(pe)),y&&z.add(pe)}),a=x.cloneDeep(z.Fa());var ue=null;return E&&(ue===null&&(ue={}),ue.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(ue===null&&(ue={}),y?ue.removedNodeKeys=oe.Fa():ue.insertedNodeKeys=oe.Fa()),0<a.length&&(ue===null&&(ue={}),ue.modifiedNodeData=a),0<le.count&&(ue===null&&(ue={}),y?ue.insertedNodeKeys=le.Fa():ue.removedNodeKeys=le.Fa()),le.clear(),oe.clear(),ue},Mi.prototype.cloneDeep=function(a){return Eg(this,a,!0)};function Eg(a,y,x,E,b,z){function ne(pe,xe){re?(pe.__gohashid===void 0&&z.push(pe),E.set(pe,xe)):(pe=Mo++,E.set(pe,xe),b.set(pe,y))}if(!Gt(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(E||(E=new xi),re){var oe=E.get(y);if(oe)return oe}else for(b||(b=new xi),oe=b.iterator;oe.next();){var le=oe.key;if(oe.value===y&&(le=E.get(le)))return le}if(Array.isArray(y)){oe=[],ne(y,oe);for(var ue=0;ue<y.length;ue++)oe.push(Eg(a,y[ue],!1,E,b,z))}else if(y instanceof tt||y instanceof Xn||y instanceof pn||y instanceof Di||y instanceof Ei)oe=y.copy(),ne(y,oe);else{if(y instanceof Ao||y instanceof vn||y instanceof fn)return y;if(y instanceof Mn)oe=new Mn().addAll(Eg(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Ln)oe=new Ln().addAll(Eg(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof xi)oe=new xi().addAll(Eg(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Date)oe=new Date(y.getTime()),ne(y,oe);else if(y instanceof RegExp)oe=new RegExp(y),ne(y,oe),oe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")oe=y.copy(),ne(y,oe);else for(ue in oe={},ne(y,oe),y)ue!=="__gohashid"&&(oe[ue]=Eg(a,y[ue],!1,E,b,z))}return x&&z.forEach(function(pe){delete pe.__gohashid}),oe}Le=Mi.prototype,Le.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Le.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},Le.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 SS(a,y){y=y.modelData,Gt(y)&&(a.dm(y),a.modelData=y)}Le.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!wS(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+uy(this,this.modelData)),a+`,
"nodeDataArray": `+yd(this,this.nodeDataArray,!0)},Le.kv=function(a){SS(this,a),a=a.nodeDataArray,Jt(a)&&(this.dm(a),this.nodeDataArray=a)};function xS(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var ne=E.get(b);ne===null?(ne=new Ln,ne.add(z),E.add(b,ne)):ne.add(z)}}var E=a.vh;E===null&&(E=new xi,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===Yr?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===ko||z===Uo)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function PS(a,y){for(var x=new Ln,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];d0(a,y,b,b,x)}return x}function d0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var ne=x[z];if(ne===y)return b.add(E),!0;if(d0(a,y,ne,E,b))return!0}else if(Gt(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(ne=x[z],ne===y)return b.add(E),!0;if(d0(a,y,ne,E,b))return!0}return!1}Le.Pv=function(a,y){var x=this,E=!1,b=new Ln,z=new Ln,ne=new Ln,re=this.vh;a.changes.each(function(ue){ue.model===x&&(ue.modelChange==="nodeDataArray"?ue.change===ko?b.add(ue.newValue):ue.change===Uo&&ne.add(ue.oldValue):x.lb(ue.object)?z.add(ue.object):ue.change!==Yr||x.modelData!==ue.object&&ue.propertyName!=="modelData"?ue.object!==null&&(re&&re.contains(ue.object)?re.get(ue.object).each(function(pe){x.lb(pe)&&z.add(pe)}):ue.object instanceof Mi||x.ri()&&x.Jc(ue.object)||PS(x,ue.object).each(function(pe){z.add(pe)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(ue){oe.add(x.wa(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),ne.each(function(ue){le.add(x.wa(ue)),y&&z.add(ue)}),a="",E&&(a+=`,
"modelData": `+uy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+yd(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+yd(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Wv:this.Yv)+yd(this,le.Fa(),!0)),le.clear(),oe.clear(),a},Le.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)&&St("applyIncrementalJson cannot change Model properties"),SS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new xi;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],ne=this.wa(z);ne!=null&&E.set(ne,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){ne=y[z];var re=this.hc(ne);re===null&&(re=(re=E.get(ne))?re:this.copyNodeData({}),this.km(re,ne),this.xf(re))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var oe in b)oe==="__gohashid"||oe===this.nodeKeyProperty||this.Wj()&&oe===this.nodeIsGroupProperty||this.setDataProperty(z,oe,b[oe]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,oe=0;oe<x;oe++)y=this.hc(a[oe]),y!==null&&this.cm(y)},Le.$x=function(a,y){a.change!==To&&St("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Lr?(y===void 0&&(y=Tp(this,this)),xS(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 }'},Le.yA=function(a,y){return this.$x(a,y)},Le.np=function(a){return a===void 0&&(a=Tp(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Le.toJSON=function(a){return this.np(a)},Le.Zw=function(a){var y=null;if(typeof a=="string")try{y=rt.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:St("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&St("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Le.Ky=function(a){return this.Zw(a)},Mi.constructGraphLinksModel=function(){return new Mi},Le=Mi.prototype,Le.dm=function(a){if(Jt(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(Gt(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:St("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(Gt(a)){for(y in a)if(x=a[y],Gt(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new Mn,E=0;E<x.length/2;E++)b.add(new tt(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return kx(a)}return a},Le.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()):Jt(a)?yd(this,a):Gt(a)?uy(this,a):typeof a=="function"?"null":a.toString()};function yd(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Ci;b.add("["),x&&1<E&&b.add(`
`);for(var z=0;z<E;z++){var ne=y[z];ne!==void 0&&(0<z&&(b.add(","),x&&b.add(`
`)),b.add(a.sm(ne)))}return x&&1<E&&b.add(`
`),b.add("]"),b.toString()}function wS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function ml(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function uy(a,y){var x=y;if(x instanceof tt)y={class:"go.Point",x:ml(x.x),y:ml(x.y)};else if(x instanceof Xn)y={class:"go.Size",width:ml(x.width),height:ml(x.height)};else if(x instanceof pn)y={class:"go.Rect",x:ml(x.x),y:ml(x.y),width:ml(x.width),height:ml(x.height)};else if(x instanceof Di)y={class:"go.Margin",top:ml(x.top),right:ml(x.right),bottom:ml(x.bottom),left:ml(x.left)};else if(x instanceof Ei)x.sb()?y={class:"go.Spot",x:ml(x.x),y:ml(x.y),offsetX:ml(x.offsetX),offsetY:ml(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ao){if(y={class:"go.Brush",type:x.type.name},x.type===jc?y.color=x.color:(x.type===mc||x.type===Nu)&&(y.start=x.start,y.end=x.end,x.type===Nu&&(x.startRadius!==0&&(y.startRadius=ml(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=ml(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof vn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=ml(x.startX)),x.startY!==0&&(y.startY=ml(x.startY)),x.endX!==0&&(y.endX=ml(x.endX)),x.endY!==0&&(y.endY=ml(x.endY)),x.spot1.D(cs)||(y.spot1=x.spot1),x.spot2.D(ys)||(y.spot2=x.spot2),x.type===vn.o&&(y.path=vn.ia(x))):x instanceof fn&&(y={class:"go.EnumValue",classType:Tp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Ga(y,b);if(!wS(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof Mn){var ne="[";for(z=z.iterator;z.next();){var re=z.value;1<ne.length&&(ne+=","),ne+=a.sm(re.x),ne+=",",ne+=a.sm(re.y)}ne+="]",E+=ne}else E+=a.sm(z)}return E+"}"}function vl(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function kx(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 tt(vl(a.x),vl(a.y));else if(y==="Size")x=new Xn(vl(a.width),vl(a.height));else if(y==="Rect")x=new pn(vl(a.x),vl(a.y),vl(a.width),vl(a.height));else if(y==="Margin")x=new Di(vl(a.top),vl(a.right),vl(a.bottom),vl(a.left));else if(y==="Spot")typeof a.enum=="string"?x=rd(a.enum):x=new Ei(vl(a.x),vl(a.y),vl(a.offsetX),vl(a.offsetY));else if(y==="Brush"){if(x=new Ao,x.type=Rn(Ao,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Ei&&(x.start=a.start),a.end instanceof Ei&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=vl(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=vl(a.endRadius)),a=a.colorStops,Gt(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=vn.parse(a.path):x=new vn,x.type=Rn(vn,a.type),typeof a.startX=="number"&&(x.startX=vl(a.startX)),typeof a.startY=="number"&&(x.startY=vl(a.startY)),typeof a.endX=="number"&&(x.endX=vl(a.endX)),typeof a.endY=="number"&&(x.endY=vl(a.endY)),a.spot1 instanceof Ei&&(x.spot1=a.spot1),a.spot2 instanceof Ei&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=cy(E),typeof E=="function"&&(x=Rn(E,a.name)));return x}Le.Pe=function(a){return this.Lt.add(a),this},Le.ik=function(a){this.Lt.remove(a)},Le.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,E=0;E<x;E++)y.M(E)(a)},Le.cb=function(a,y,x,E,b,z,ne){hs(this,"",a,y,x,E,b,z,ne)},Le.g=function(a,y,x,E,b){hs(this,"",Yr,a,this,y,x,E,b)},Le.Fs=function(a,y,x,E,b,z){hs(this,"",Yr,y,a,x,E,b,z)};function hs(a,y,x,E,b,z,ne,re,oe){re===void 0&&(re=null),oe===void 0&&(oe=null);var le=new Ri;le.model=a,le.change=x,le.modelChange=y,le.propertyName=E,le.object=b,le.oldValue=z,le.oldParam=re,le.newValue=ne,le.newParam=oe,a.ds(le)}Mi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Yr){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),la(x,E,b)}else a.change===ko?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Gt(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&ui(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&fi(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Jt(E)&&a.propertyName&&(E=Ga(a.object,a.propertyName)),Jt(E)&&typeof x=="number"&&(a=a.newValue,y?ui(E,x):fi(E,x,a))):St("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Uo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Gt(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&fi(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&ui(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Jt(E)&&a.propertyName&&(E=Ga(a.object,a.propertyName)),Jt(E)&&typeof x=="number"&&(a=a.oldValue,y?fi(E,x,a):ui(E,x))):St("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==To&&St("unknown ChangedEvent: "+a.toString())},Mi.prototype.Ea=function(a){return this.undoManager.Ea(a)},Mi.prototype.eb=function(a){return this.undoManager.eb(a)},Mi.prototype.Kf=function(){return this.undoManager.Kf()},Mi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Le=Mi.prototype,Le.La=function(a,y){y===void 0&&(y=""),hs(this,"SourceChanged",To,y,a,null,null)},Le.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Ga(a,y),y!==void 0)){if(Sd(y))return y;St("Key value for node data "+a+" is not a number or a string: "+y)}}},Le.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=Ga(a,x);E!==y&&this.hc(y)===null&&(la(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),hs(this,"nodeKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else la(a,x,y)}};function Sd(a){return typeof a=="number"||typeof a=="string"}Le.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Le.hc=function(a){return a===null&&St("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Sd(a)?this.kb.I(a):null},Le.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){la(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;la(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;la(a,y,x)}}}}},Le.xf=function(a){a!==null&&(so(a),this.lb(a)||CS(this,a,!0))};function CS(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&St("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,fi(a.Tc,E,y)),hs(a,"nodeDataArray",ko,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Le.Fy=function(a){if(Jt(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)},Le.cm=function(a){a!==null&&ES(this,a,!0)};function ES(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){e:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break e}E=-1}if(0>E)return;ui(a.Tc,E)}hs(a,"nodeDataArray",Uo,"nodeDataArray",a,y,null,E,null),a.qp(y)}Le.nA=function(a){if(Jt(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)},Le.$z=function(a){if(a!==this.nodeDataArray&&Jt(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],ne=this.wa(z);if(ne!==void 0){x.add(ne);var re=this.hc(ne);re!==z&&(re!==null?(this.Do(re,z),this.lm(z,re)):(z=this.cloneDeep(z),this.km(z,ne),this.xf(z)))}else ne=this.cloneDeep(z),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Le.jp=function(a,y){y!==void 0&&(a=Ap(this,a),a instanceof Ln&&this.Vf.add(y,a))},Le.Lv=function(){},Le.fm=function(){},Le.em=function(){},Le.qp=function(){};function yh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Ln,a.Vf.add(y,E)),E.add(x)}}function Sh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Ln&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Ap(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Ln?a:null)}Le.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Mi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):f0(this,a,!0),Gt(a)&&Hr(a),a};function f0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=f0(a,y[x],a.copiesArrayObjects);E.push(b)}return Hr(E),E}if(x&&Gt(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=Ga(y,E),ne=Tp(a,z);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||z instanceof Mi||z instanceof Do||z instanceof Lr||z instanceof Ri||(z=f0(a,z,!1)),la(x,E,z)}return Hr(x),x}return y instanceof tt||y instanceof Xn||y instanceof pn||y instanceof Ei||y instanceof Di?y.copy():y}Mi.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!bS&&a instanceof Rt&&(bS=!0,ii('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),ii(" Is that really your intent?"));var E=Ga(a,y);E!==x&&(la(a,y,x),this.Fs(a,y,E,x))},Le=Mi.prototype,Le.set=function(a,y,x){this.setDataProperty(a,y,x)},Le.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Le.Ay=function(a,y){this.ts(a,-1,y)},Le.ts=function(a,y,x){0>y&&(y=a.length),fi(a,y,x),hs(this,"",ko,"",a,null,x,null,y)},Le.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&St("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];ui(a,y),hs(this,"",Uo,"",a,x,null,y,null)},Le.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Ga(a,y),y===void 0))return"";if(typeof y=="string")return y;St("getCategoryForNodeData found a non-string category for "+a+": "+y)},Le.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=Ga(a,x);E===void 0&&(E=""),E!==y&&(la(a,x,y),hs(this,"nodeCategory",Yr,x,a,E,y))}else la(a,x,y)}},Le.lm=function(a,y){this.jm(y,this.Ro(a))},Le.Tl=function(){return!1},Le.Wj=function(){return!1},Le.ri=function(){return!1},Le.xs=function(){return!1},Le.Xj=function(){return!1};function hy(){return new Mi}function Tp(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 Tp(a,y.constructor);return typeof y}function cy(a){return ah[a]?ah[a]:rt.go!==void 0&&rt.go[a]?rt.go[a]:null}function Ga(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(E){}return x}function la(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(E){}}Ve.Object.defineProperties(Mi.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===""&&St("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&St("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,E=0;E<x;E++){var b=a[E];Gt(b)||St("Model.nodeDataArray must only contain Objects, not: "+b),so(b)}for(this.Tc=a,E=new Mn,b=0;b<x;b++){var z=a[b],ne=this.wa(z);ne===void 0||this.kb.I(ne)!==null?E.add(z):this.kb.add(ne,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(hs(this,"nodeDataArray",Yr,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),Mi.prototype.setCategoryForNodeData=Mi.prototype.jm,Mi.prototype.getCategoryForNodeData=Mi.prototype.Ro,Mi.prototype.removeArrayItem=Mi.prototype.ov,Mi.prototype.insertArrayItem=Mi.prototype.ts,Mi.prototype.addArrayItem=Mi.prototype.Ay,Mi.prototype.assignAllDataProperties=Mi.prototype.Do,Mi.prototype.set=Mi.prototype.set,Mi.prototype.clearUnresolvedReferences=Mi.prototype.Qy,Mi.prototype.mergeNodeDataArray=Mi.prototype.$z,Mi.prototype.removeNodeDataCollection=Mi.prototype.nA,Mi.prototype.removeNodeData=Mi.prototype.cm,Mi.prototype.addNodeDataCollection=Mi.prototype.Fy,Mi.prototype.addNodeData=Mi.prototype.xf,Mi.prototype.makeNodeDataKeyUnique=Mi.prototype.$u,Mi.prototype.findNodeDataForKey=Mi.prototype.hc,Mi.prototype.containsNodeData=Mi.prototype.lb,Mi.prototype.setKeyForNodeData=Mi.prototype.km,Mi.prototype.getKeyForNodeData=Mi.prototype.wa,Mi.prototype.updateTargetBindings=Mi.prototype.La,Mi.prototype.commit=Mi.prototype.commit,Mi.prototype.rollbackTransaction=Mi.prototype.Kf,Mi.prototype.commitTransaction=Mi.prototype.eb,Mi.prototype.startTransaction=Mi.prototype.Ea,Mi.prototype.raiseDataChanged=Mi.prototype.Fs,Mi.prototype.raiseChanged=Mi.prototype.g,Mi.prototype.raiseChangedEvent=Mi.prototype.cb,Mi.prototype.removeChangedListener=Mi.prototype.ik,Mi.prototype.addChangedListener=Mi.prototype.Pe,Mi.prototype.writeJsonValue=Mi.prototype.sm,Mi.prototype.replaceJsonObjects=Mi.prototype.dm,Mi.prototype.applyIncrementalJSON=Mi.prototype.Ky,Mi.prototype.applyIncrementalJson=Mi.prototype.Zw,Mi.prototype.toJSON=Mi.prototype.toJSON,Mi.prototype.toJson=Mi.prototype.np,Mi.prototype.toIncrementalJSON=Mi.prototype.yA,Mi.prototype.toIncrementalJson=Mi.prototype.$x,Mi.prototype.toIncrementalData=Mi.prototype.xA,Mi.prototype.clear=Mi.prototype.clear;var bS=!1,ah={};Mi.className="Model",Mi.fromJSON=Mi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=rt.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:St("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=cy(E)):(b=cy(E),b===null&&(b=rt[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Mi?y=a:St("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Mi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Mi.safePropertyValue=Ga,Mi.safePropertySet=la,ah.Brush=Ao,ah.ChangedEvent=Ri,ah.Geometry=vn,ah.Margin=Di,ah.Panel=Hn,ah.Point=tt,ah.Rect=pn,ah.Size=Xn,ah.Spot=Ei,ah.Transaction=Lr,ah.UndoManager=Do;function Ja(a,y,x,E){Hr(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,E===void 0?(this.el=LS,this.wk=null):(this.el=Dp,this.wk=E),this.st=new Ln}Ja.prototype.copy=function(){var a=new Ja;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},Le=Ja.prototype,Le.qb=function(a){a.classType===Ja&&(this.mode=a)},Le.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Le.freeze=function(){return this._isFrozen=!0,this},Le.ka=function(){return this._isFrozen=!1,this},Le.Kx=function(a){return a===void 0&&(a=null),this.mode=Dp,this.backConverter=a,this},Le.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Le.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function MS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Le.Mv=function(a,y,x){var E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")ii("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Ga(y,E)),z!==void 0)if(b===null)x!==""&&la(a,x,z);else try{if(x!==""){var ne=b(z,a);la(a,x,ne)}else b(z,a)}catch(re){}}}},Le.sp=function(a,y,x,E){if(this.el===Dp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,ne=a;if(b!==""&&(ne=Ga(a,b)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var re=E!==null?E.diagram:null,oe=re!==null?re.model:null;if(z===null){if(x!=="")oe!==null?oe.setDataProperty(y,x,ne):la(y,x,ne);else if(oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var le=E.itemIndex,ue=E.panel.itemArray;oe.ov(ue,le),oe.ts(ue,le,ne)}}else try{if(x!==""){var pe=z(ne,y,oe);oe!==null?oe.setDataProperty(y,x,pe):la(y,x,pe)}else{var xe=z(ne,y,oe);if(xe!==void 0&&oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var Ee=E.itemIndex,Fe=E.panel.itemArray;oe.ov(Fe,Ee),oe.ts(Fe,Ee,xe)}}}catch(Oe){}}finally{this.st.remove(a)}}}},Ve.Object.defineProperties(Ja.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&hn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&hn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&hn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&hn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&hn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&hn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&hn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&hn(this),this.el=a}}}),Ja.prototype.updateSource=Ja.prototype.sp,Ja.prototype.updateTarget=Ja.prototype.Mv,Ja.prototype.ofModel=Ja.prototype.dA,Ja.prototype.ofObject=Ja.prototype.cp,Ja.prototype.makeTwoWay=Ja.prototype.Kx;var Ax="Binding",LS=new fn(Ja,"OneWay",1),Dp=new fn(Ja,"TwoWay",2);Ja.className="Binding",Ja.parseEnum=function(a,y){return function(x){return x=Rn(a,x),x===null?y:x}},Ja.toString=Ni,Ja.OneWay=LS,Ja.TwoWay=Dp;function eo(a,y,x){Mi.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new Ln,this.wb=new xi,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&&(Jt(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Dt(eo,Mi),eo.constructGraphLinksModel=Mi.constructGraphLinksModel,eo.prototype.cloneProtected=function(a){Mi.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},Le=eo.prototype,Le.clear=function(){Mi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Le.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;var x=a.length,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Ni(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+mu(this,b,!0)+"-->"+mu(this,b,!1)}return y},Le.Qv=function(a,y){this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Mi.prototype.Qv.call(this,a,y),E=this,b=new Ln,z=new Ln,ne=new Ln,re=this.vh;a.changes.each(function(ue){ue.model===E&&(ue.modelChange==="linkDataArray"?ue.change===ko?b.add(ue.newValue):ue.change===Uo&&ne.add(ue.oldValue):E.Jc(ue.object)?z.add(ue.object):ue.object!==null&&(ue.object!==null&&re&&re.contains(ue.object)?re.get(ue.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):ue.object instanceof Mi||E.lb(ue.object)||FS(E,ue.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(ue){oe.add(E.Ac(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),ne.each(function(ue){le.add(E.Ac(ue)),y&&z.add(ue)}),a=E.cloneDeep(z.Fa()),0<oe.count&&(x===null&&(x={}),y?x.removedLinkKeys=oe.Fa():x.insertedLinkKeys=oe.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<le.count&&(x===null&&(x={}),y?x.insertedLinkKeys=le.Fa():x.removedLinkKeys=le.Fa()),le.clear(),oe.clear(),x},Le.rm=function(){var a=Mi.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},Le.gp=function(a){Mi.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)},Le.Rv=function(){var a=Mi.prototype.Rv.call(this),y=`,
"linkDataArray": `+yd(this,this.linkDataArray,!0);return a+y},Le.kv=function(a){Mi.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 Ln,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];d0(a,y,b,b,x)}return x}Le.Pv=function(a,y){this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Mi.prototype.Pv.call(this,a,y),E=this,b=new Ln,z=new Ln,ne=new Ln,re=this.vh;a.changes.each(function(ue){ue.model===E&&(ue.modelChange==="linkDataArray"?ue.change===ko?b.add(ue.newValue):ue.change===Uo&&ne.add(ue.oldValue):E.Jc(ue.object)?z.add(ue.object):ue.object!==null&&(ue.object!==null&&re&&re.contains(ue.object)?re.get(ue.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):ue.object instanceof Mi||E.lb(ue.object)||FS(E,ue.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(ue){oe.add(E.Ac(ue)),y||z.add(ue)});var le=this.kl;return le.clear(),ne.each(function(ue){le.add(E.Ac(ue)),y&&z.add(ue)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+yd(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+yd(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Vv:this.Xv)+yd(this,le.Fa(),!0)),le.clear(),oe.clear(),a},Le.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)&&St("applyIncrementalJson cannot change Model properties"),Mi.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var ne in b)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(z,ne,b[ne]);kS(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},eo.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Yr){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),la(x,E,b);return}}else if(a.change===ko){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Gt(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===Uo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Gt(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}Mi.prototype.changeState.call(this,a,y)}},Le=eo.prototype,Le.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),la(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Le.yx=function(a){return mu(this,a,!0)},Le.wv=function(a,y){bg(this,a,y,!0)},Le.Bx=function(a){return mu(this,a,!1)},Le.Bv=function(a,y){bg(this,a,y,!1)};function mu(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Ga(y,a),a!==void 0))){if(Sd(a))return a;St((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function bg(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=Ga(y,b);z!==x&&(Sh(a,z,y),la(y,b,x),a.hc(x)===null&&yh(a,x,y),hs(a,E?"linkFromKey":"linkToKey",Yr,b,y,z,x),typeof b=="string"&&a.La(y,b))}else la(y,b,x)}}Le.zx=function(a){return g0(this,a,!0)},Le.xv=function(a,y){Mg(this,a,y,!0)},Le.Cx=function(a){return g0(this,a,!1)},Le.Cv=function(a,y){Mg(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Ga(y,a),y===void 0?"":y)}function Mg(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Ga(y,b);z===void 0&&(z=""),z!==x&&(la(y,b,x),hs(a,E?"linkFromPortId":"linkToPortId",Yr,b,y,z,x),typeof b=="string"&&a.La(y,b))}else la(y,b,x)}}Le.Ef=function(a){if(a===null)return p0;var y=this.je;return y===""?p0:(a=Ga(a,y),a===void 0?p0:a)},Le.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Ga(a,x);if(E===void 0&&(E=p0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)Sh(this,E[z],a);for(la(a,x,y),b=y.length,z=0;z<b;z++){var ne=y[z];this.hc(ne)===null&&yh(this,ne,a)}hs(this,"linkLabelKeys",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else la(a,x,y)}},Le.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Ga(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&yh(this,y,a),hs(this,"linkLabelKeys",ko,x,a,null,y,null,b)))}else St(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Le.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Ga(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(Sh(this,y,a),hs(this,"linkLabelKeys",Uo,x,a,y,null,b,null)))}else E!==void 0&&St(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Le.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Ga(a,y),y!==void 0)){if(Sd(y))return y;St("Key value for link data "+a+" is not a number or a string: "+y)}}},Le.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=Ga(a,x);E!==y&&this.jh(y)===null&&(la(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),hs(this,"linkKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},Le.jh=function(a){return a===null&&St("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Sd(a)?this.wb.I(a):null},Le.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){la(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;la(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;la(a,y,x)}}}}},Le.Jc=function(a){return a===null?!1:this.$f.contains(a)},Le.fi=function(a){a!==null&&(so(a),this.Jc(a)||BS(this,a,!0))};function BS(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&St("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),hs(a,"linkDataArray",ko,"linkDataArray",a,null,y,null,E),dy(a,y)}Le.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)},Le.bm=function(a){a!==null&&NS(this,a,!0)};function NS(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(hs(a,"linkDataArray",Uo,"linkDataArray",a,y,null,E,null),x=mu(a,y,!0),Sh(a,x,y),x=mu(a,y,!1),Sh(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],Sh(a,x,y)}Le.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)},Le.Zz=function(a){if(this.linkKeyProperty===""&&St("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Jt(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],ne=this.Ac(z);if(ne!==void 0){x.add(ne);var re=this.jh(ne);re!==z&&(re!==null?(this.Do(re,z),kS(this,z,re)):(z=this.cloneDeep(z),this.Ks(z,ne),this.fi(z)))}else ne=this.cloneDeep(z),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function dy(a,y){var x=mu(a,y,!0);x=a.Vl(x),a.hc(x)===null&&yh(a,x,y),x=mu(a,y,!1),x=a.Vl(x),a.hc(x)===null&&yh(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&yh(a,x,y)}Le.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):f0(this,a,!0),Gt(a)&&(Hr(a),this.lf!==""&&la(a,this.lf,void 0),this.mf!==""&&la(a,this.mf,void 0),this.je!==""&&la(a,this.je,[])),a},Le.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Ga(a,y)},Le.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Ga(a,y),y!==void 0)){if(Sd(y))return y;St("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Le.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=Ga(a,x);E!==y&&(Sh(this,E,a),la(a,x,y),this.hc(y)===null&&yh(this,y,a),hs(this,"nodeGroupKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},eo.prototype.copyNodeData=function(a){return a===null?null:(a=Mi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Ga(a,this.Je)===void 0||la(a,this.Je,void 0),a)},eo.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){bg(this,a,x,!0);return}if(y===this.linkToKeyProperty){bg(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Mg(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Mg(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var E=Ga(a,y);E!==x&&(la(a,y,x),this.Fs(a,y,E,x))},Le=eo.prototype,Le.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&Ga(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Le.jp=function(a,y){Mi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var E=x.value,b=a,z=y;if(mu(this,E,!0)===b){var ne=this.lf;la(E,ne,z),hs(this,"linkFromKey",Yr,ne,E,b,z),typeof ne=="string"&&this.La(E,ne)}if(mu(this,E,!1)===b&&(ne=this.mf,la(E,ne,z),hs(this,"linkToKey",Yr,ne,E,b,z),typeof ne=="string"&&this.La(E,ne)),ne=this.Ef(E),Array.isArray(ne))for(var re=ne.length,oe=this.je,le=0;le<re;le++)ne[le]===b&&(ne[le]=z,hs(this,"linkLabelKeys",ko,oe,E,b,z,le,le))}},Le.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;la(a,E,x),hs(this,"nodeGroupKey",Yr,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Le.Lv=function(){Mi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},Le.fm=function(a){Mi.prototype.fm.call(this,a),a=this.wa(a);var y=Ap(this,a);if(y!==null){var x=ni();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;hs(this,"nodeGroupKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(mu(this,E,!0)===a&&(b=this.lf,hs(this,"linkFromKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),mu(this,E,!1)===a&&(b=this.mf,hs(this,"linkToKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,ne=this.je,re=0;re<z;re++)b[re]===a&&(hs(this,"linkLabelKeys",ko,ne,E,a,a,re,re),x.push(E))}for(y=0;y<x.length;y++)Sh(this,a,x[y]);ci(x)}},Le.em=function(a){Mi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&yh(this,y,a)},Le.qp=function(a){Mi.prototype.qp.call(this,a);var y=this.lh(a);Sh(this,y,a)},Le.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Ga(a,y),y===void 0))return"";if(typeof y=="string")return y;St("getCategoryForLinkData found a non-string category for "+a+": "+y)},eo.prototype.getLinkCategoryForData=function(a){return this.ps(a)},eo.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Ga(a,x);E===void 0&&(E=""),E!==y&&(la(a,x,y),hs(this,"linkCategory",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},eo.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Le=eo.prototype,Le.lm=function(a,y){Mi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function kS(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))}Le.Wj=function(){return!0},Le.ri=function(){return!0},Le.xs=function(){return!0},Le.Xj=function(){return!0},Ve.Object.defineProperties(eo.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,E=0;E<x;E++){var b=a[E];Gt(b)||St("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),so(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new Mn,b=0;b<x;b++){var z=a[b],ne=this.Ac(z);ne===void 0||this.wb.I(ne)!==null?E.add(z):this.wb.add(ne,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new Ln,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,hs(this,"linkDataArray",Yr,"linkDataArray",this,y,a),y=0;y<x;y++)dy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),eo.prototype.setCategoryForLinkData=eo.prototype.lp,eo.prototype.getCategoryForLinkData=eo.prototype.ps,eo.prototype.assignAllDataProperties=eo.prototype.Do,eo.prototype.setGroupKeyForNodeData=eo.prototype.mp,eo.prototype.getGroupKeyForNodeData=eo.prototype.lh,eo.prototype.isGroupForNodeData=eo.prototype.Yu,eo.prototype.copyLinkData=eo.prototype.Jo,eo.prototype.mergeLinkDataArray=eo.prototype.Zz,eo.prototype.removeLinkDataCollection=eo.prototype.lA,eo.prototype.removeLinkData=eo.prototype.bm,eo.prototype.addLinkDataCollection=eo.prototype.Ey,eo.prototype.addLinkData=eo.prototype.fi,eo.prototype.containsLinkData=eo.prototype.Jc,eo.prototype.makeLinkDataKeyUnique=eo.prototype.Bs,eo.prototype.findLinkDataForKey=eo.prototype.jh,eo.prototype.setKeyForLinkData=eo.prototype.Ks,eo.prototype.getKeyForLinkData=eo.prototype.Ac,eo.prototype.removeLabelKeyForLinkData=eo.prototype.Qx,eo.prototype.addLabelKeyForLinkData=eo.prototype.Bu,eo.prototype.setLabelKeysForLinkData=eo.prototype.Ls,eo.prototype.getLabelKeysForLinkData=eo.prototype.Ef,eo.prototype.setToPortIdForLinkData=eo.prototype.Cv,eo.prototype.getToPortIdForLinkData=eo.prototype.Cx,eo.prototype.setFromPortIdForLinkData=eo.prototype.xv,eo.prototype.getFromPortIdForLinkData=eo.prototype.zx,eo.prototype.setToKeyForLinkData=eo.prototype.Bv,eo.prototype.getToKeyForLinkData=eo.prototype.Bx,eo.prototype.setFromKeyForLinkData=eo.prototype.wv,eo.prototype.getFromKeyForLinkData=eo.prototype.yx,eo.prototype.clear=eo.prototype.clear;var p0=Object.freeze([]);eo.className="GraphLinksModel",ah.GraphLinksModel=eo,Mi.constructGraphLinksModel=Mi.constructGraphLinksModel=function(){return new eo},Mi.initDiagramModel=hy=function(){return new eo};function yl(a,y){Mi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Jt(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Dt(yl,Mi),yl.constructGraphLinksModel=Mi.constructGraphLinksModel,yl.prototype.cloneProtected=function(a){Mi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Le=yl.prototype,Le.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Ni(b)}}return y},Le.rm=function(){var a=Mi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Le.gp=function(a){Mi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Le.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&St("applyIncrementalJson cannot change Model properties"),Mi.prototype.fp.call(this,a)},Le.Vl=function(a){return a},Le.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Ga(a,y),y!==void 0)){if(Sd(y))return y;St("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Le.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var E=Ga(a,x);E!==y&&(Sh(this,E,a),la(a,x,y),this.hc(y)===null&&yh(this,y,a),hs(this,"nodeParentKey",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},Le.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Ga(a,y),y===void 0)?"":typeof y=="string"?y:(St("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},yl.prototype.getLinkCategoryForData=function(a){return this.ss(a)},yl.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Ga(a,x);E===void 0&&(E=""),E!==y&&(la(a,x,y),hs(this,"parentLinkCategory",Yr,x,a,E,y),typeof x=="string"&&this.La(a,x))}else la(a,x,y)}},yl.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},yl.prototype.copyNodeData=function(a){return a===null?null:(a=Mi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Ga(a,this.Ke)===void 0||la(a,this.Ke,void 0),a)},yl.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var E=Ga(a,y);E!==x&&(la(a,y,x),this.Fs(a,y,E,x))},Le=yl.prototype,Le.jp=function(a,y){Mi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Le.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;la(a,E,x),hs(this,"nodeParentKey",Yr,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Le.fm=function(a){Mi.prototype.fm.call(this,a),a=this.wa(a);var y=Ap(this,a);if(y!==null){var x=ni();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;hs(this,"nodeParentKey",Yr,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)Sh(this,a,x[y]);ci(x)}},Le.em=function(a){Mi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&yh(this,y,a)},Le.qp=function(a){Mi.prototype.qp.call(this,a);var y=this.mh(a);Sh(this,y,a)},Le.lm=function(a,y){Mi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Le.Tl=function(){return!0},Le.xs=function(){return!0},Ve.Object.defineProperties(yl.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"}}}),yl.prototype.setParentLinkCategoryForNodeData=yl.prototype.Ms,yl.prototype.getParentLinkCategoryForNodeData=yl.prototype.ss,yl.prototype.setParentKeyForNodeData=yl.prototype.qe,yl.prototype.getParentKeyForNodeData=yl.prototype.mh,yl.className="TreeModel",ah.TreeModel=yl;function xa(a){da.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=sh,this.Ti=0,this.Zv=new tt,this.Jp=this.me=0,this.Xr=new jp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=sh,this.K=Sl,this.nd=Fg,this.hd=ry,this.tf=6,this.Nn=w0,a&&Object.assign(this,a)}Dt(xa,da),xa.prototype.cloneProtected=function(a){da.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},xa.prototype.qb=function(a){a.classType===xa?a===x0||a===P0||a===y0||a===S0||a===Fg?this.sorting=a:a===af||a===Lg||a===Sl||a===Pd?this.direction=a:a===Kc||a===xd||a===sh||a===lh?this.arrangement=a:(a===Df||a===w0)&&(this.nodeDiameterFormula=a):da.prototype.qb.call(this,a)},xa.prototype.createNetwork=function(){return new Bg(this)},xa.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 Mn;y.addAll(a.iterator),a=new Mn;var x=new Mn,E=this.sort(y),b,z,ne=this.Jp,re=this.arrangement,oe=this.nodeDiameterFormula,le=this.radius;(!isFinite(le)||0>=le)&&(le=NaN);var ue=this.aspectRatio;(!isFinite(ue)||0>=ue)&&(ue=1);var pe=this.startAngle;isFinite(pe)||(pe=0);var xe=this.sweepAngle;if((!isFinite(xe)||360<xe||1>xe)&&(xe=360),y=this.spacing,isFinite(y)||(y=NaN),re===lh&&oe===Df?re=sh:re===lh&&oe!==Df&&(re=this.arrangement),(this.direction===af||this.direction===Lg)&&this.sorting!==Fg){for(oe=0;!(oe>=E.length)&&(a.add(E.M(oe)),!(oe+1>=E.length));oe+=2)x.add(E.M(oe+1));this.direction===af?(this.arrangement===lh&&a.reverse(),E=new Mn,E.addAll(a),E.addAll(x)):(this.arrangement===lh&&x.reverse(),E=new Mn,E.addAll(x),E.addAll(a))}oe=E.length;for(var Ee=z=b=0;Ee<E.length;Ee++){var Fe=pe+xe*z*(this.direction===Sl?1:-1)/oe,Oe=E.M(Ee).diameter;isNaN(Oe)&&(Oe=wd(E.M(Ee),Fe)),360>xe&&(Ee===0||Ee===E.length-1)&&(Oe/=2),b+=Oe,z++}if(isNaN(le)||re===lh){if(isNaN(y)&&(y=6),re!==sh&&re!==lh){for(z=-1/0,ne=0;ne<oe;ne++)Ee=E.M(ne),b=E.M(ne===oe-1?0:ne+1),isNaN(Ee.diameter)&&wd(Ee,0),isNaN(b.diameter)&&wd(b,0),z=Math.max(z,(Ee.diameter+b.diameter)/2);ne=z+y,re===Kc?le=(z+y)/(2*Math.PI/oe):le=m0(this,ne*(360<=xe?oe:oe-1),ue,pe*Math.PI/180,xe*Math.PI/180)}else le=m0(this,b+(360<=xe?oe:oe-1)*(re!==lh?y:1.6*y),ue,pe*Math.PI/180,xe*Math.PI/180);z=le*ue}else if(z=le*ue,Ee=fy(this,le,z,pe*Math.PI/180,xe*Math.PI/180),isNaN(y))(re===sh||re===lh)&&(y=(Ee-b)/(360<=xe?oe:oe-1));else if(re===sh||re===lh)Ee=(Ee-b)/(360<=xe?oe:oe-1),Ee<y?(le=m0(this,b+y*(360<=xe?oe:oe-1),ue,pe*Math.PI/180,xe*Math.PI/180),z=le*ue):y=Ee;else{for(ne=-1/0,b=0;b<oe;b++)Fe=E.M(b),Oe=E.M(b===oe-1?0:b+1),isNaN(Fe.diameter)&&wd(Fe,0),isNaN(Oe.diameter)&&wd(Oe,0),ne=Math.max(ne,(Fe.diameter+Oe.diameter)/2);ne+=y,b=m0(this,ne*(360<=xe?oe:oe-1),ue,pe*Math.PI/180,xe*Math.PI/180),b>le?(le=b,z=le*ue):ne=Ee/(360<=xe?oe:oe-1)}if(this.kw=re,this.lc=le,this.Zm=ue,this.lw=pe,this.Wp=xe,this.Ti=y,this.me=z,this.Jp=ne,y=E,E=this.kw,re=this.lc,le=this.lw,ue=this.Wp,pe=this.Ti,xe=this.me,oe=this.Jp,this.direction!==af&&this.direction!==Lg||E!==lh)if(this.direction===af||this.direction===Lg){switch(ne=0,E){case xd:ne=180*v0(this,re,xe,le,oe)/Math.PI;break;case sh:oe=y=0,ne=a.first(),ne!==null&&(y=wd(ne,Math.PI/2)),ne=x.first(),ne!==null&&(oe=wd(ne,Math.PI/2)),ne=180*v0(this,re,xe,le,pe+(y+oe)/2)/Math.PI;break;case Kc:ne=ue/y.length}if(this.direction===af){switch(E){case xd:Rp(this,a,le,Pd);break;case sh:Ip(this,a,le,Pd);break;case Kc:Op(this,a,ue/2,le,Pd)}switch(E){case xd:Rp(this,x,le+ne,Sl);break;case sh:Ip(this,x,le+ne,Sl);break;case Kc:Op(this,x,ue/2,le+ne,Sl)}}else{switch(E){case xd:Rp(this,x,le,Pd);break;case sh:Ip(this,x,le,Pd);break;case Kc:Op(this,x,ue/2,le,Pd)}switch(E){case xd:Rp(this,a,le+ne,Sl);break;case sh:Ip(this,a,le+ne,Sl);break;case Kc:Op(this,a,ue/2,le+ne,Sl)}}}else switch(E){case xd:Rp(this,y,le,this.direction);break;case sh:Ip(this,y,le,this.direction);break;case Kc:Op(this,y,ue,le,this.direction);break;case lh:AS(this,y,ue,le,this.direction)}else AS(this,y,ue,le-ue/2,Sl)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Op(a,y,x,E,b){var z=a.Wp,ne=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=E+(b===Sl?oe*x/(360<=z?re:re-1):-(oe*x)/re),ue=y.M(oe),pe=ne*Math.tan(le)/a;pe=Math.sqrt((ne*ne+a*a*pe*pe)/(1+pe*pe)),ue.centerX=pe*Math.cos(le),ue.centerY=pe*Math.sin(le),ue.actualAngle=180*le/Math.PI}}function Ip(a,y,x,E){var b=a.lc,z=a.me,ne=a.Ti;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe),ue=y.M(oe===re-1?0:oe+1),pe=z*Math.sin(x);le.centerX=b*Math.cos(x),le.centerY=pe,le.actualAngle=180*x/Math.PI,isNaN(le.diameter)&&wd(le,0),isNaN(ue.diameter)&&wd(ue,0),le=v0(a,b,z,E===Sl?x:-x,(le.diameter+ue.diameter)/2+ne),x+=E===Sl?le:-le}}function Rp(a,y,x,E){var b=a.lc,z=a.me,ne=a.Jp;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe);le.centerX=b*Math.cos(x),le.centerY=z*Math.sin(x),le.actualAngle=180*x/Math.PI,le=v0(a,b,z,E===Sl?x:-x,ne),x+=E===Sl?le:-le}}function AS(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new jp,360>x){for(z=E+(b===Sl?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,DS(a,y,x,E,b)}else TS(a,y,x,E,b);a.Xr.commit(y)}function TS(a,y,x,E,b){var z=a.lc,ne=a.Ti,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),le=a.me*Math.sin(E*Math.PI/180),ue=y.Fa();if(ue.length===3)ue[0].centerX=z,ue[0].centerY=0,ue[1].centerX=ue[0].centerX-ue[0].width/2-ue[1].width/2-ne,ue[1].y=ue[0].y,ue[2].centerX=(ue[0].centerX+ue[1].centerX)/2,ue[2].y=ue[0].y-ue[2].height-ne;else if(ue.length===4)ue[0].centerX=z,ue[0].centerY=0,ue[2].centerX=-ue[0].centerX,ue[2].centerY=ue[0].centerY,ue[1].centerX=0,ue[1].y=Math.min(ue[0].y,ue[2].y)-ue[1].height-ne,ue[3].centerX=0,ue[3].y=Math.max(ue[0].y+ue[0].height+ne,ue[2].y+ue[2].height+ne);else{z=tt.alloc();for(var pe=0;pe<ue.length&&(ue[pe].centerX=oe,ue[pe].centerY=le,!(pe>=ue.length-1));pe++)OS(a,oe,le,ue,pe,b,z)||IS(a,oe,le,ue,pe,b,z),oe=z.x,le=z.y;if(tt.free(z),a.mj++,!(23<a.mj)){oe=ue[0].centerX,le=ue[0].centerY,z=ue[ue.length-1].centerX,pe=ue[ue.length-1].centerY;var xe=Math.abs(oe-z)-((ue[0].width+ue[ue.length-1].width)/2+ne),Ee=Math.abs(le-pe)-((ue[0].height+ue[ue.length-1].height)/2+ne);ne=0,1>Math.abs(Ee)?Math.abs(oe-z)<(ue[0].width+ue[ue.length-1].width)/2&&(ne=0):ne=0<Ee?Ee:1>Math.abs(xe)?0:xe,oe=Math.abs(z)>Math.abs(pe)?0<z!=le>pe:0<pe!=oe<z,(oe=b===Sl?oe:!oe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ue[ue.length-1].width),ne=Math.min(ne,-ue[ue.length-1].height)),a.Xr.compare(ne,ue),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ue.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*re,TS(a,y,x,E,b))}}}function DS(a,y,x,E,b){for(var z=a.lc,ne=a.me,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),le=ne*Math.sin(E*Math.PI/180),ue=tt.alloc(),pe=y.Fa(),xe=0;xe<pe.length&&(pe[xe].centerX=oe,pe[xe].centerY=le,!(xe>=pe.length-1));xe++)OS(a,oe,le,pe,xe,b,ue)||IS(a,oe,le,pe,xe,b,ue),oe=ue.x,le=ue.y;if(tt.free(ue),a.mj++,!(23<a.mj)){if(oe=Math.atan2(le,oe),oe=b===Sl?a.gt-oe:oe-a.gt,oe=Math.abs(oe)<Math.abs(oe-2*Math.PI)?oe:oe-2*Math.PI,z=oe*(z+ne)/2,ne=a.Xr,Math.abs(z)<Math.abs(ne.Pl))for(ne.Pl=z,ne.mk=[],ne.tm=[],oe=0;oe<pe.length;oe++)ne.mk[oe]=pe[oe].bounds.x,ne.tm[oe]=pe[oe].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*re,DS(a,y,x,E,b))}}function OS(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,le=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ue=!1;if(0<=x!=(z===Sl)){if(z=y+a,z>re){if(z=y-a,z<-re)return ne.x=z,ne.y=le,!1;ue=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ne.x=z,ne.y=le,!1;ue=!0}return le=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==ue&&(le=-le),Math.abs(x-le)>(E[b].height+E[b+1].height)/2?(ne.x=z,ne.y=le,!1):(ne.x=z,ne.y=le,!0)}function IS(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,le=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Sl)){if(z=x-a,z<-oe){if(z=x+a,z>oe){ne.x=le,ne.y=z;return}E=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){ne.x=le,ne.y=z;return}E=!0}le=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==E&&(le=-le),ne.x=le,ne.y=z}xa.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},xa.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 tt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},xa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function fy(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,re=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),oe=0,le=0;le<=z;le++){E!==void 0&&b!==void 0?oe=E+le*b/z:oe=le*Math.PI/(2*z);var ue=Math.sin(oe);ne+=Math.sqrt(1-a*a*ue*ue)*re}return E!==void 0&&b!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function m0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?fy(a,1,x,E,b):fy(a,1,x))}function v0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var re=0;;re++){var oe=Math.sin(E+re*a);if(ne+=(y>x?y:x)*Math.sqrt(1-z*z*oe*oe)*a,ne>=b)return re*a}}xa.prototype.sort=function(a){switch(this.sorting){case y0:break;case S0:a.reverse();break;case x0:a.sort(this.comparer);break;case P0:a.sort(this.comparer),a.reverse();break;case Fg:return this.ak(Tx(a));default:St("Invalid sorting type.")}return a};function Tx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Mn;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var ne=0;ne<a.length;ne++){var re=a.M(ne).edgesCount;re>b&&(b=re,z=ne)}else for(ne=0;ne<a.length;ne++)re=y[ne],re>b&&(b=re,z=ne);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),ne=z.sourceEdges;ne.next();)b=a.indexOf(ne.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}xa.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var ne=[],re=[];E=[],b=new Mn;for(var oe=0,le=0;le<y.length;le++){var ue=y[le].length;if(ue===1)E.push(le);else if(ue===0)b.add(a.M(le));else{if(oe===0)x.push(le);else{for(var pe=ue=1/0,xe=-1,Ee=[],Fe=0;Fe<x.length;Fe++)0>y[x[Fe]].indexOf(x[Fe===x.length-1?0:Fe+1])&&Ee.push(Fe===x.length-1?0:Fe+1);if(Ee.length===0)for(Fe=0;Fe<x.length;Fe++)Ee.push(Fe);for(Fe=0;Fe<Ee.length;Fe++){for(var Oe=Ee[Fe],st=y[le],Ye=0,pt=0;pt<ne.length;pt++){var xt=z[ne[pt]],Mt=z[re[pt]];if(xt<Mt){var Ot=xt;xt=Mt}else Ot=Mt;if(Ot<Oe&&Oe<=xt)for(Mt=0;Mt<st.length;Mt++){var en=st[Mt];0>x.indexOf(en)||Ot<z[en]&&z[en]<xt||Ot===z[en]||xt===z[en]||Ye++}else for(Mt=0;Mt<st.length;Mt++)en=st[Mt],0>x.indexOf(en)||Ot<z[en]&&z[en]<xt&&Ot!==z[en]&&xt!==z[en]&&Ye++}for(st=Ye,pt=Ye=0;pt<y[le].length;pt++)Ot=x.indexOf(y[le][pt]),0<=Ot&&(Ot=Math.abs(Oe-(Ot>=Oe?Ot+1:Ot)),Ye+=Ot<x.length+1-Ot?Ot:x.length+1-Ot);for(pt=0;pt<ne.length;pt++)Ot=z[ne[pt]],xt=z[re[pt]],Ot>=Oe&&Ot++,xt>=Oe&&xt++,Ot>xt&&(Mt=xt,xt=Ot,Ot=Mt),xt-Ot<(x.length+2)/2==(Ot<Oe&&Oe<=xt)&&Ye++;(st<ue||st===ue&&Ye<pe)&&(ue=st,pe=Ye,xe=Oe)}for(x.splice(xe,0,le),ue=0;ue<x.length;ue++)z[x[ue]]=ue;for(ue=0;ue<y[le].length;ue++)pe=y[le][ue],0<=x.indexOf(pe)&&(ne.push(le),re.push(pe))}oe++}}for(ne=x.length;;){for(z=!0,re=0;re<E.length;re++)if(oe=E[re],le=y[oe][0],ue=x.indexOf(le),0<=ue){for(xe=pe=0;xe<y[le].length;xe++)Ee=x.indexOf(y[le][xe]),0>Ee||Ee===ue||(Fe=Ee>ue?Ee-ue:ue-Ee,pe+=Ee<ue!=Fe>ne-Fe?1:-1);x.splice(0>pe?ue:ue+1,0,oe),E.splice(re,1),re--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},Ve.Object.defineProperties(xa.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!==lh&&a!==sh&&a!==xd&&a!==Kc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Sl&&a!==Pd&&a!==af&&a!==Lg||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==y0&&a!==S0&&a!==x0&&!P0&&a!==Fg||(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!==w0&&a!==Df||(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 sh=new fn(xa,"ConstantSpacing",0),xd=new fn(xa,"ConstantDistance",1),Kc=new fn(xa,"ConstantAngle",2),lh=new fn(xa,"Packed",3),Sl=new fn(xa,"Clockwise",4),Pd=new fn(xa,"Counterclockwise",5),af=new fn(xa,"BidirectionalLeft",6),Lg=new fn(xa,"BidirectionalRight",7),y0=new fn(xa,"Forwards",8),S0=new fn(xa,"Reverse",9),x0=new fn(xa,"Ascending",10),P0=new fn(xa,"Descending",11),Fg=new fn(xa,"Optimized",12),w0=new fn(xa,"Pythagorean",13),Df=new fn(xa,"Circular",14);xa.className="CircularLayout",xa.ConstantSpacing=sh,xa.ConstantDistance=xd,xa.ConstantAngle=Kc,xa.Packed=lh,xa.Clockwise=Sl,xa.Counterclockwise=Pd,xa.BidirectionalLeft=af,xa.BidirectionalRight=Lg,xa.Forwards=y0,xa.Reverse=S0,xa.Ascending=x0,xa.Descending=P0,xa.Optimized=Fg,xa.Pythagorean=w0,xa.Circular=Df;function jp(){this.Pl=-1/0,this.tm=this.mk=null}jp.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},jp.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]}},jp.className="VertexArrangement";function Bg(a){qo.call(this,a)}Dt(Bg,qo),Bg.prototype.createVertex=function(){return new zp(this)},Bg.prototype.createEdge=function(){return new C0(this)},Bg.className="CircularNetwork";function zp(a){ps.call(this,a),this.u=this.Si=NaN}Dt(zp,ps);function wd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===lh)if(x.nodeDiameterFormula===Df)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===Df?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Ve.Object.defineProperties(zp.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)}}}),zp.className="CircularVertex";function C0(a){ql.call(this,a)}Dt(C0,ql),C0.className="CircularEdge";function Ks(a){da.call(this),this.ah=null,this.An=0,this.$d=new Xn(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)}Dt(Ks,da),Ks.prototype.cloneProtected=function(a){da.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},Ks.prototype.createNetwork=function(){return new Of(this)},Ks.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}RS(this,0,a)}this.network=y;var ne=E=x.iterator;E=this.arrangementSpacing;var re=ne.count,oe=!0;z=b=0;for(var le=ni(),ue=0;ue<re+y.vertexes.count+2;ue++)le[ue]=null;re=0,ne.reset();for(var pe=pn.alloc();ne.next();)if(ue=ne.value,this.computeBounds(ue,pe),oe)oe=!1,b=pe.x+pe.width/2,z=pe.y+pe.height/2,le[0]=new tt(pe.x+pe.width+E.width,pe.y),le[1]=new tt(pe.x,pe.y+pe.height+E.height),re=2;else{var xe=jS(le,re,b,z,pe.width,pe.height,E),Ee=le[xe],Fe=new tt(Ee.x+pe.width+E.width,Ee.y),Oe=new tt(Ee.x,Ee.y+pe.height+E.height);for(xe+1<re&&le.splice(xe+1,0,null),le[xe]=Fe,le[xe+1]=Oe,re++,xe=Ee.x-pe.x,Ee=Ee.y-pe.y,ue=ue.vertexes.iterator;ue.next();)Fe=ue.value,Fe.centerX+=xe,Fe.centerY+=Ee}for(pn.free(pe),ue=y.vertexes.iterator;ue.next();)ne=ue.value,xe=ne.bounds,2>re?(b=xe.x+xe.width/2,z=xe.y+xe.height/2,le[0]=new tt(xe.x+xe.width+E.width,xe.y),le[1]=new tt(xe.x,xe.y+xe.height+E.height),re=2):(oe=jS(le,re,b,z,xe.width,xe.height,E),pe=le[oe],Ee=new tt(pe.x+xe.width+E.width,pe.y),xe=new tt(pe.x,pe.y+xe.height+E.height),oe+1<re&&le.splice(oe+1,0,null),le[oe]=Ee,le[oe+1]=xe,re++,ne.centerX=pe.x+ne.width/2,ne.centerY=pe.y+ne.height/2);for(ci(le),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}_S(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Ks.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Ks.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function RS(a,y,x){if(Dx(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Ox(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,RS(a,y+1,x),_S(a,z),Ix(a,b),y=b.vertexes.Fa(),y.sort(function(ne,re){return ne===null||re===null||ne===re?0:re.Vd-ne.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=E}}function Dx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Ox(a,y){for(var x=a.network,E=new Of(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var ne=new ZS;ne.Rs=z.Vd,ne.Ss=z.width,ne.Qs=z.height,ne.Sv=z.focus.x,ne.Tv=z.focus.y,z.We===null&&(z.We=new Mn),z.We.add(ne),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var re=z.value;b=re.fromVertex,ne=re.toVertex,b.network===E&&ne.network===E?E.Bo(re):b.network===E?(re=b.Hj,re===null&&(re=new Mn,b.Hj=re),re.add(ne),b.Vd--,b.sh+=ne.sh):ne.network===E&&(re=ne.Hj,re===null&&(re=new Mn,ne.Hj=re),re.add(b),ne.Vd--,ne.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,it.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var oe=b.Hj;if(oe!==null&&0<oe.count&&(ne=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=ne))){for(var le=re=0,ue=oe.count-ne;ue<oe.count;ue++){var pe=oe.M(ue),xe=null;for(z=pe.edges.iterator;z.next();){var Ee=z.value;if(Ee.Ax(pe)===b){xe=Ee;break}}xe!==null&&(le+=xe.length,re+=pe.width*pe.height)}z=b.centerX,oe=b.centerY,ue=b.width,pe=b.height,xe=b.focus,Ee=ue*pe,1>Ee&&(Ee=1),re=it.sqrt((re+Ee+le*le*4/(ne*ne))/Ee),ne=(re-1)*ue/2,re=(re-1)*pe/2,b.bounds=new pn(z-xe.x-ne,oe-xe.y-re,ue+2*ne,pe+2*re),b.focus=new tt(xe.x+ne,xe.y+re)}}return a.network=E,x}function Ix(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,ne=b.Tv;E.bounds=new pn(E.centerX-z,E.centerY-ne,b.Ss,b.Qs),E.focus=new tt(z,ne),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),z=ne.Ss,ne=ne.Qs),z=it.sqrt(z*z+ne*ne)/2;for(var re=!1,oe=ne=0,le=0,ue=y.vertexes.iterator;ue.next();){var pe=ue.value;1>=pe.Vd?oe++:(re=!0,le++,ne+=Math.atan2(y.centerY-pe.centerY,y.centerX-pe.centerX))}if(oe!==0){for(0<le&&(ne/=le),le=y=0,y=re?2*Math.PI/(oe+1):2*Math.PI/oe,oe%2===0&&(le=y/2),1<x.count&&x.sort(function(Ee,Fe){return Ee===null||Fe===null||Ee===Fe?0:Fe.width*Fe.height-Ee.width*Ee.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(ue=null,pe=oe.edges.iterator;pe.next();){ue=pe.value;break}pe=oe.width;var xe=oe.height;pe=it.sqrt(pe*pe+xe*xe)/2,ue=z+ue.length+pe,pe=ne+(y*(re/2>>1)+le)*(re%2===0?1:-1),oe.centerX=E+ue*Math.cos(pe),oe.centerY=b+ue*Math.sin(pe),re++}}}}function jS(a,y,x,E,b,z,ne){var re=9e19,oe=-1,le=0;e:for(;le<y;le++){var ue=a[le],pe=ue.x-x,xe=ue.y-E;if(pe=pe*pe+xe*xe,pe<re){for(xe=le-1;0<=xe;xe--)if(a[xe].y>ue.y&&a[xe].x-ue.x<b+ne.width)continue e;for(xe=le+1;xe<y;xe++)if(a[xe].x>ue.x&&a[xe].y-ue.y<z+ne.height)continue e;oe=le,re=pe}}return oe}Ks.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ks.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,ne=z.x;y=z.y;var re=z.width;return z=z.height,E+b<ne?a>y+z?(x=E+b-ne,a=a-y-z,it.sqrt(x*x+a*a)):a+x<y?(E=E+b-ne,a=a+x-y,it.sqrt(E*E+a*a)):ne-(E+b):E>ne+re?a>y+z?(x=E-ne-re,a=a-y-z,it.sqrt(x*x+a*a)):a+x<y?(E=E-ne-re,a=a+x-y,it.sqrt(E*E+a*a)):E-(ne+re):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function _S(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jx(a)););a.ah=null}function jx(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var E=x.centerX,b=E,z=x=x.centerY,ne=1;ne<y.length;ne++){var re=y[ne];re.forceX=0,re.forceY=0;var oe=re.centerX;re=re.centerY,E=Math.min(E,oe),b=Math.max(b,oe),x=Math.min(x,re),z=Math.max(z,re)}(b=b-E>z-x)?y.sort(function(Oe,st){return Oe===null||st===null||Oe===st?0:Oe.centerX-st.centerX}):y.sort(function(Oe,st){return Oe===null||st===null||Oe===st?0:Oe.centerY-st.centerY}),x=a.Zf;var le=E=re=0;for(z=0;z<y.length;z++){ne=y[z],E=ne.bounds,re=ne.focus,oe=E.x+re.x;var ue=E.y+re.y;E=ne.charge*a.electricalFieldX(oe,ue),le=ne.charge*a.electricalFieldY(oe,ue),E+=ne.mass*a.gravitationalFieldX(oe,ue),le+=ne.mass*a.gravitationalFieldY(oe,ue),ne.forceX+=E,ne.forceY+=le;for(var pe=z+1;pe<y.length;pe++){var xe=y[pe];if(xe!==ne){E=xe.bounds,re=xe.focus,le=E.x+re.x;var Ee=E.y+re.y;if(oe-le>x||le-oe>x){if(b)break}else if(ue-Ee>x||Ee-ue>x){if(!b)break}else{var Fe=zS(ne,xe);1>Fe?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new E0),Fe=E.random(),re=E.random(),oe>le?(E=Math.abs(xe.bounds.right-ne.bounds.x),E=(1+E)*Fe):oe<le?(E=Math.abs(xe.bounds.x-ne.bounds.right),E=-(1+E)*Fe):(E=Math.max(xe.width,ne.width),E=(1+E)*Fe-E/2),ue>Ee?(le=Math.abs(xe.bounds.bottom-ne.bounds.y),le=(1+le)*re):oe<le?(le=Math.abs(xe.bounds.y-ne.bounds.bottom),le=-(1+le)*re):(le=Math.max(xe.height,ne.height),le=(1+le)*re-le/2)):(re=-(ne.charge*xe.charge)/(Fe*Fe),E=(le-oe)/Fe*re,le=(Ee-ue)/Fe*re),ne.forceX+=E,ne.forceY+=le,xe.forceX-=E,xe.forceY-=le}}}}for(b=a.network.edges.iterator;b.next();)re=b.value,x=re.fromVertex,z=re.toVertex,ne=x.bounds,oe=x.focus,E=ne.x+oe.x,ne=ne.y+oe.y,ue=z.bounds,pe=z.focus,oe=ue.x+pe.x,ue=ue.y+pe.y,pe=zS(x,z),1>pe?(pe=a.randomNumberGenerator,pe===null&&(a.randomNumberGenerator=pe=new E0),re=pe.random(),pe=pe.random(),E=(E>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,le=(ne>ue?1:-1)*(1+(z.height>x.height?z.height:x.height))*pe):(re=re.stiffness*(pe-re.length),E=(oe-E)/pe*re,le=(ue-ne)/pe*re),x.forceX+=E,x.forceY+=le,z.forceX-=E,z.forceY-=le;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}Ks.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},Ks.prototype.moveFixedVertex=function(){},Ks.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ks.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Po,y.toSpot=Po)}},Ks.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=pn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,pn.free(x)}x=pn.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}pn.free(x)},Ks.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ks.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ks.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ks.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ks.prototype.electricalFieldX=function(){return 0},Ks.prototype.electricalFieldY=function(){return 0},Ks.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ks.prototype.gravitationalFieldX=function(){return 0},Ks.prototype.gravitationalFieldY=function(){return 0},Ks.prototype.isFixed=function(a){return a.isFixed},Ve.Object.defineProperties(Ks.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"&&St('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())}}}),Ks.className="ForceDirectedLayout";function ZS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}ZS.className="ForceDirectedSubnet";function Of(a){qo.call(this,a)}Dt(Of,qo),Of.prototype.createVertex=function(){return new _p(this)},Of.prototype.createEdge=function(){return new Zp(this)},Of.className="ForceDirectedNetwork";function _p(a){ps.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}Dt(_p,ps),Ve.Object.defineProperties(_p.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)}}}),_p.className="ForceDirectedVertex";function Zp(a){ql.call(this,a),this.j=this.o=NaN}Dt(Zp,ql),Ve.Object.defineProperties(Zp.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)}}}),Zp.className="ForceDirectedEdge";function E0(){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()}E0.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},E0.className="RandomNumberGenerator";function Io(a){da.call(this),this.kc=this.ie=25,this.K=0,this.Dk=B0,this.Zk=N0,this.Qk=k0,this.bj=4,this.rk=A0,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 tt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Dt(Io,da),Io.prototype.cloneProtected=function(a){da.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},Io.prototype.qb=function(a){a.classType===Io?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:St("Unknown enum value: "+a):da.prototype.qb.call(this,a)},Io.prototype.createNetwork=function(){return new kg(this)},Io.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!==Wp&&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===Wp&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var ne=0,re=0,oe=0,le=0;if(E.link!==null){if(re=E.link,re===null)continue;var ue=b.node;if(ne=z.node,ue===null||ne===null)continue;var pe=re.fromNode;oe=re.toNode;for(var xe=re.fromPort;xe!==null&&!xe.Ed();)xe=xe.panel;for(re=re.toPort;re!==null&&!re.Ed();)re=re.panel;if(E.rev){le=pe;var Ee=xe;pe=oe,xe=re,oe=le,re=Ee}var Fe=b.focus;le=z.focus;var Oe=E.rev?z.bounds:b.bounds;Ee=tt.alloc(),ue!==pe?Oe.w()&&pe.isVisible()?pe.actualBounds.w()?(Zc(pe,xe,Jr,Ee),Ee.x+=pe.actualBounds.x-Oe.x,Ee.y+=pe.actualBounds.y-Oe.y):(Zc(pe,xe,Jr,Ee),Ee.w()||Ee.assign(Fe)):Ee.assign(Fe):Oe.w()?(Zc(pe,xe,Jr,Ee),Ee.w()||Ee.assign(Fe)):Ee.assign(Fe),pe=E.rev?b.bounds:z.bounds,ue=tt.alloc(),ne!==oe?pe.w()&&oe.isVisible()?oe.actualBounds.w()?(Zc(oe,re,Jr,ue),ue.x+=oe.actualBounds.x-pe.x,ue.y+=oe.actualBounds.y-pe.y):(Zc(oe,re,Jr,ue),ue.w()||ue.assign(le)):ue.assign(le):pe.w()?(Zc(oe,re,Jr,ue),ue.w()||ue.assign(le)):ue.assign(le),this.K===90||this.K===270?(ne=Math.round((Ee.x-Fe.x)/this.kc),oe=Ee.x,re=Math.round((ue.x-le.x)/this.kc),le=ue.x):(ne=Math.round((Ee.y-Fe.y)/this.kc),oe=Ee.y,re=Math.round((ue.y-le.y)/this.kc),le=ue.y),tt.free(Ee),tt.free(ue),E.portFromColOffset=ne,E.portFromPos=oe,E.portToColOffset=re,E.portToPos=le}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(Ee=b.layer,ue=z.layer,pe=0,Oe=E.link,Oe!==null){var st=Oe.fromPort,Ye=Oe.toPort;if(st!==null&&Ye!==null){var pt=Oe.fromNode;if(xe=Oe.toNode,pt!==null&&xe!==null){var xt=F0(this,!0),Mt=F0(this,!1),Ot=this.setsPortSpots?xt:Oe.computeSpot(!0,st);Fe=this.setsPortSpots?Mt:Oe.computeSpot(!1,Ye);var en=Oe.isOrthogonal;Ot.$c()&&Ot.Hf(Mt)&&Fe.$c()&&Fe.Hf(xt)?pe=0:(xt=Oe.getLinkPoint(pt,st,Ot,!0,en,xe,Ye,tt.alloc()),Mt=Oe.getLinkDirection(pt,st,xt,Ot,!0,en,xe,Ye),tt.free(xt),Ot.ys()||Mt!==XS(this,E,!0)?this.setsPortSpots&&pt!==null&&pt.ports.count===1&&E.rev&&(pe+=1):pe+=1,Ot=Oe.getLinkPoint(xe,Ye,Fe,!1,en,pt,st,tt.alloc()),Oe=Oe.getLinkDirection(xe,Ye,Ot,Fe,!1,en,pt,st),tt.free(Ot),Fe.ys()||Oe!==XS(this,E,!1)?this.setsPortSpots&&xe!==null&&xe.ports.count===1&&E.rev&&(pe+=2):pe+=2)}}}if(xe=pe,pe=xe===1||xe===3,(xe=xe===2||xe===3)&&(Fe=a.createVertex(),Fe.node=null,Fe.Dj=1,Fe.layer=Ee,Fe.near=b,a.dh(Fe),b=a.Zj(b,Fe,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=ne,b.portToColOffset=0,b.portFromPos=oe,b.portToPos=0,b=Fe),Oe=1,pe&&Oe--,Ee-ue>Oe&&0<Ee){for(E.valid=!1,Fe=a.createVertex(),Fe.node=null,Fe.Dj=2,Fe.layer=Ee-1,a.dh(Fe),b=a.Zj(b,Fe,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=xe?0:ne,b.portToColOffset=0,b.portFromPos=xe?0:oe,b.portToPos=0,b=Fe,Ee--;Ee-ue>Oe&&0<Ee;)Fe=a.createVertex(),Fe.node=null,Fe.Dj=3,Fe.layer=Ee-1,a.dh(Fe),b=a.Zj(b,Fe,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Fe,Ee--;b=a.Zj(Fe,z,E.link),b.valid=!pe,pe&&(Fe.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=re,b.portFromPos=0,b.portToPos=le}else E.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=Cd(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),Ed(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Io.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}Io.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},Io.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 Tl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function Tu(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function HS(a,y,x){var E=Cd(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,ne=0;ne<b;ne++){var re=0,oe=E[ne],le=oe.near;if(le!==null&&le.layer===oe.layer)if(oe=le.index,oe>ne)for(var ue=ne+1;ue<oe;ue++){var pe=E[ue];pe.near===le&&pe.Dj===le.Dj||re++}else for(ue=ne-1;ue>oe;ue--)pe=E[ue],pe.near===le&&pe.Dj===le.Dj||re++;var xe;if(0<=x)for(oe=E[ne].sourceEdgesArrayAccess,le=0;le<oe.length;le++){var Ee=oe[le];if(Ee.valid&&Ee.fromVertex.layer!==y)for(pe=Ee.fromVertex.index,ue=Ee.portToPos,Ee=Ee.portFromPos,xe=le+1;xe<oe.length;xe++){var Fe=oe[xe];if(Fe.valid&&Fe.fromVertex.layer!==y){var Oe=Fe.fromVertex.index,st=Fe.portToPos;Fe=Fe.portFromPos,ue<st&&(pe>Oe||pe===Oe&&Ee>Fe)&&re++,st<ue&&(Oe>pe||Oe===pe&&Fe>Ee)&&re++}}}if(0>=x){for(oe=E[ne].destinationEdgesArrayAccess,le=0;le<oe.length;le++)if(Ee=oe[le],Ee.valid&&Ee.toVertex.layer!==y)for(pe=Ee.toVertex.index,ue=Ee.portToPos,Ee=Ee.portFromPos,xe=le+1;xe<oe.length;xe++)Fe=oe[xe],Fe.valid&&Fe.toVertex.layer!==y&&(Oe=Fe.toVertex.index,st=Fe.portToPos,Fe=Fe.portFromPos,Ee<Fe&&(pe>Oe||pe===Oe&&ue>st)&&re++,Fe<Ee&&(Oe>pe||Oe===pe&&st>ue)&&re++)}for(z[ne*b+ne]=re,oe=ne+1;oe<b;oe++){var Ye=0,pt=0;if(0<=x){re=E[ne].sourceEdgesArrayAccess;var xt=E[oe].sourceEdgesArrayAccess;for(le=0;le<re.length;le++)if(Ee=re[le],Ee.valid&&Ee.fromVertex.layer!==y)for(pe=Ee.fromVertex.index,Ee=Ee.portFromPos,xe=0;xe<xt.length;xe++)Fe=xt[xe],Fe.valid&&Fe.fromVertex.layer!==y&&(Oe=Fe.fromVertex.index,Fe=Fe.portFromPos,(pe<Oe||pe===Oe&&Ee<Fe)&&pt++,(Oe<pe||Oe===pe&&Fe<Ee)&&Ye++)}if(0>=x){for(re=E[ne].destinationEdgesArrayAccess,xt=E[oe].destinationEdgesArrayAccess,le=0;le<re.length;le++)if(Ee=re[le],Ee.valid&&Ee.toVertex.layer!==y)for(pe=Ee.toVertex.index,ue=Ee.portToPos,xe=0;xe<xt.length;xe++)Fe=xt[xe],Fe.valid&&Fe.toVertex.layer!==y&&(Oe=Fe.toVertex.index,st=Fe.portToPos,(pe<Oe||pe===Oe&&ue<st)&&pt++,(Oe<pe||Oe===pe&&st<ue)&&Ye++)}z[ne*b+oe]=Ye,z[oe*b+ne]=pt}}return Ed(a,y,E),z}Io.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=HS(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function b0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Cd(E,b),ne=E.tc[b],re=0,oe=0;oe<ne;oe++){var le=z[oe].destinationEdgesArrayAccess;if(le!==null)for(var ue=0;ue<le.length;ue++){var pe=le[ue];if(pe.valid&&pe.toVertex.layer!==b){var xe=pe.fromVertex.column+pe.portFromColOffset,Ee=pe.toVertex.column+pe.portToColOffset;re+=(Math.abs(xe-Ee)+1)*gy(pe)}}}Ed(E,b,z),y+=re}return y}Io.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 py(a,y,x){for(var E=Cd(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ue=0,pe=0,xe=re.near;if(xe!==null&&xe.layer===re.layer&&(ue+=xe.column-1,pe++),oe!==null)for(xe=0;xe<oe.length;xe++){re=oe[xe];var Ee=re.fromVertex;re.valid&&!re.rev&&Ee.layer!==y&&(ue+=Ee.column,pe++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],xe=re.toVertex,re.valid&&!re.rev&&xe.layer!==y&&(ue+=xe.column,pe++);z[ne]=pe===0?-1:ue/pe}return Ed(a,y,E),z}function WS(a,y,x){for(var E=Cd(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ue=0,pe=[],xe=re.near;if(xe!==null&&xe.layer===re.layer&&(pe[ue]=xe.column-1,ue++),re=void 0,oe!==null)for(xe=0;xe<oe.length;xe++){re=oe[xe];var Ee=re.fromVertex;re.valid&&!re.rev&&Ee.layer!==y&&(pe[ue]=Ee.column+re.portFromColOffset,ue++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],xe=re.toVertex,re.valid&&!re.rev&&xe.layer!==y&&(pe[ue]=xe.column+re.portToColOffset,ue++);ue===0?z[ne]=-1:(pe.sort(function(Fe,Oe){return Fe-Oe}),le=ue>>1,z[ne]=ue&1?pe[le]:pe[le-1]+pe[le]>>1)}return Ed(a,y,E),z}function Hp(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();){var re=ne.value,oe=re.toVertex,le=y.layer-oe.layer;re=a.linkMinLength(re),le===re&&Hp(a,oe,x,E,b,z)}if(z)for(ne=y.sourceEdges;ne.next();)re=ne.value,oe=re.fromVertex,le=oe.layer-y.layer,re=a.linkMinLength(re),le===re&&Hp(a,oe,x,E,b,z)}}function my(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();)my(a,ne.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,E,b,z)}}Io.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Sy:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;zx(a)!==null;){for(b=GS(a);b!==null;)E[x]=b,x--,b.valid=!1,b=GS(a);for(b=$S(a);b!==null;)E[y]=b,y++,b.valid=!1,b=$S(a);b=null;for(var z=0,ne=this.network.vertexes.iterator;ne.next();){var re=ne.value;if(re.valid){for(var oe=0,le=re.destinationEdges;le.next();)le.value.toVertex.valid&&oe++;le=0;for(var ue=re.sourceEdges;ue.next();)ue.value.fromVertex.valid&&le++;(b===null||z<oe-le)&&(b=re,z=oe-le)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case B0:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&vy(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&vy(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Wp:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function GS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function $S(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function vy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,vy(a,b))}y.finish=a.Kn,a.Kn++}Io.prototype.assignLayers=function(){switch(this.Zk){case xy:KS(this);break;case Py:for(var a,y=this.network.vertexes.iterator;y.next();)a=US(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 N0:for(KS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&YS(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 KS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=VS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function VS(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,VS(a,z)+b)}y.layer=x}else x=y.layer;return x}function US(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,US(a,z)+b)}y.layer=x}else x=y.layer;return x}function YS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)YS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var ne=E[z],re=ne.fromVertex,oe=ne.toVertex;ne=a.linkMinLength(ne),re.layer-oe.layer>ne&&Hp(a,re,0,-1,!0,!1)}for(Hp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,re=0,oe=null,ne=a.network.vertexes.iterator;ne.next();){var le=ne.value;if(le.component===1){var ue=0,pe=!1,xe=le.sourceEdgesArrayAccess;b=xe.length;for(var Ee=0;Ee<b;Ee++){var Fe=xe[Ee],Oe=Fe.fromVertex;ue+=1,Oe.component!==1&&(z+=1,Oe=Oe.layer-le.layer,Fe=a.linkMinLength(Fe),E=Math.min(E,Oe-Fe))}for(xe=le.destinationEdgesArrayAccess,b=xe.length,Ee=0;Ee<b;Ee++)Fe=xe[Ee].toVertex,--ue,Fe.component!==1?--z:pe=!0;(oe===null||ue<re)&&!pe&&(oe=le,re=ue)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else oe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Hp(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,re=null,oe=a.network.vertexes.iterator;oe.next();)if(ne=oe.value,ne.component===1){for(le=0,ue=!1,xe=ne.sourceEdgesArrayAccess,pe=xe.length,Ee=0;Ee<pe;Ee++)Fe=xe[Ee].fromVertex,le+=1,Fe.component!==1?E+=1:ue=!0;for(xe=ne.destinationEdgesArrayAccess,pe=xe.length,Ee=0;Ee<pe;Ee++)Fe=xe[Ee],Oe=Fe.toVertex,--le,Oe.component!==1&&(--E,Oe=ne.layer-Oe.layer,Fe=a.linkMinLength(Fe),b=Math.min(b,Oe-Fe));(re===null||le>z)&&!ue&&(re=ne,z=le)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else re.component=0}}}function XS(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}Io.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case k0: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&&JS(this,x);break;case wy:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&QS(this,x)}};function JS(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&JS(a,E))}function QS(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&QS(a,E))}Io.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Tl(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)M0(this,E,1),Ku(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=Tl(this)),E=this.Ia;0<=E;E--)M0(this,E,-1),Ku(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=Tl(this))}for(Tu(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)M0(this,E,0),Ku(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=Tl(this)),E=this.Ia;0<=E;E--)M0(this,E,0),Ku(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=Tl(this))}Tu(this,y);var z,ne,re;switch(this.rk){case Ey:break;case by:for(re=a+1;(E=this.countCrossings())<re;)for(re=E,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,-1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,0)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,0)||z;b>=a?Tu(this,y):(a=b,y=Tl(this))}break;default:case A0:for(x=this.Ia,ne=0,re=a+1;(E=this.countCrossings())<re;){for(re=E,z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,1)||z;for(b=this.countCrossings(),b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,-1)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Ku(this,E,0)||z;for(b>=a?Tu(this,y):(a=b,y=Tl(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Ku(this,E,0)||z;b>=a?Tu(this,y):(a=b,y=Tl(this))}}Tu(this,y)};function M0(a,y,x){var E=Cd(a,y),b=a.tc[y],z=WS(a,y,x),ne=py(a,y,x);for(x=0;x<b;x++)ne[x]===-1&&(ne[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var re=!0,oe;re;)for(re=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&ne[x+1]<ne[x])&&(re=!0,oe=z[x],z[x]=z[x+1],z[x+1]=oe,oe=ne[x],ne[x]=ne[x+1],ne[x+1]=oe,oe=E[x],E[x]=E[x+1],E[x+1]=oe);for(x=z=0;x<b;x++)oe=E[x],oe.index=x,z+=a.nodeMinColumnSpace(oe,!0),oe.column=z,z+=1,z+=a.nodeMinColumnSpace(oe,!1);Ed(a,y,E)}function Ku(a,y,x){var E=Cd(a,y),b=a.tc[y];x=HS(a,y,x);var z,ne=[];for(z=0;z<b;z++)ne[z]=-1;var re=[];for(z=0;z<b;z++)re[z]=-1;for(var oe=!1,le=!0;le;)for(le=!1,z=0;z<b-1;z++){var ue=x[E[z].index*b+E[z+1].index],pe=x[E[z+1].index*b+E[z].index],xe=0,Ee=0,Fe=E[z].column,Oe=E[z+1].column,st=a.nodeMinColumnSpace(E[z],!0),Ye=a.nodeMinColumnSpace(E[z],!1),pt=a.nodeMinColumnSpace(E[z+1],!0),xt=a.nodeMinColumnSpace(E[z+1],!1);st=Fe-st+pt,Ye=Oe-Ye+xt;var Mt=E[z].sourceEdges.iterator;for(Mt.reset();Mt.next();)if(pt=Mt.value,xt=pt.fromVertex,pt.valid&&xt.layer===y){for(pt=0;E[pt]!==xt;)pt++;pt<z&&(xe+=2*(z-pt),Ee+=2*(z+1-pt)),pt===z+1&&(xe+=1),pt>z+1&&(xe+=4*(pt-z),Ee+=4*(pt-(z+1)))}for(Mt=E[z].destinationEdges.iterator,Mt.reset();Mt.next();)if(pt=Mt.value,xt=pt.toVertex,pt.valid&&xt.layer===y){for(pt=0;E[pt]!==xt;)pt++;pt===z+1&&(Ee+=1)}for(Mt=E[z+1].sourceEdges.iterator,Mt.reset();Mt.next();)if(pt=Mt.value,xt=pt.fromVertex,pt.valid&&xt.layer===y){for(pt=0;E[pt]!==xt;)pt++;pt<z&&(xe+=2*(z+1-pt),Ee+=2*(z-pt)),pt===z&&(Ee+=1),pt>z+1&&(xe+=4*(pt-(z+1)),Ee+=4*(pt-z))}for(Mt=E[z+1].destinationEdges.iterator,Mt.reset();Mt.next();)if(pt=Mt.value,xt=pt.toVertex,pt.valid&&xt.layer===y){for(pt=0;E[pt]!==xt;)pt++;pt===z&&(xe+=1)}pt=xt=0,Mt=ne[E[z].index];var Ot=re[E[z].index],en=ne[E[z+1].index],ri=re[E[z+1].index];Mt!==-1&&(xt+=Math.abs(Mt-Fe),pt+=Math.abs(Mt-Ye)),Ot!==-1&&(xt+=Math.abs(Ot-Fe),pt+=Math.abs(Ot-Ye)),en!==-1&&(xt+=Math.abs(en-Oe),pt+=Math.abs(en-st)),ri!==-1&&(xt+=Math.abs(ri-Oe),pt+=Math.abs(ri-st)),(Ee<xe-.5||Ee===xe&&pe<ue-.5||Ee===xe&&pe===ue&&pt<xt-.5)&&(le=oe=!0,E[z].column=Ye,E[z+1].column=st,ue=E[z],E[z]=E[z+1],E[z+1]=ue)}for(z=0;z<b;z++)E[z].index=z;return Ed(a,y,E),oe}Io.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Vx)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Ng(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Ng(this,y,-1)||x;x=Ng(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)yy(this,y,1);for(y=this.Md-1;0<=y;y--)yy(this,y,-1);yy(this,this.Md,0)}if(a&&(qS(this,-1),qS(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Ng(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Ng(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Ng(this,y,0)||x}}else Wx(this)};function Ng(a,y,x){for(var E=!1;_x(a,y,x);)E=!0;return E}function _x(a,y,x){var E,b=Cd(a,y),z=a.tc[y],ne=py(a,y,-1);if(0<x)for(E=0;E<z;E++)ne[E]=-1;var re=py(a,y,1);if(0>x)for(E=0;E<z;E++)re[E]=-1;for(var oe=!1,le=!0;le;)for(le=!1,E=0;E<z;E++){var ue=b[E].column,pe=a.nodeMinColumnSpace(b[E],!0),xe=a.nodeMinColumnSpace(b[E],!1),Ee=0;0>E-1||ue-b[E-1].column-1>pe+a.nodeMinColumnSpace(b[E-1],!1)?Ee=ue-1:Ee=ue,pe=E+1>=z||b[E+1].column-ue-1>xe+a.nodeMinColumnSpace(b[E+1],!0)?ue+1:ue;var Fe=xe=0,Oe=0;if(0>=x)for(var st=b[E].sourceEdges.iterator;st.next();){var Ye=st.value,pt=Ye.fromVertex;if(Ye.valid&&pt.layer!==y){var xt=gy(Ye),Mt=Ye.portFromColOffset;Ye=Ye.portToColOffset,pt=pt.column,xe+=(Math.abs(ue+Ye-(pt+Mt))+1)*xt,Fe+=(Math.abs(Ee+Ye-(pt+Mt))+1)*xt,Oe+=(Math.abs(pe+Ye-(pt+Mt))+1)*xt}}if(0<=x)for(st=b[E].destinationEdges.iterator;st.next();)Ye=st.value,pt=Ye.toVertex,Ye.valid&&pt.layer!==y&&(xt=gy(Ye),Mt=Ye.portFromColOffset,Ye=Ye.portToColOffset,pt=pt.column,xe+=(Math.abs(ue+Mt-(pt+Ye))+1)*xt,Fe+=(Math.abs(Ee+Mt-(pt+Ye))+1)*xt,Oe+=(Math.abs(pe+Mt-(pt+Ye))+1)*xt);Ye=Mt=xt=0,st=ne[b[E].index],pt=re[b[E].index],st!==-1&&(xt+=Math.abs(st-ue),Mt+=Math.abs(st-Ee),Ye+=Math.abs(st-pe)),pt!==-1&&(xt+=Math.abs(pt-ue),Mt+=Math.abs(pt-Ee),Ye+=Math.abs(pt-pe)),Fe<xe||Fe===xe&&Mt<xt?(le=oe=!0,b[E].column=Ee):(Oe<xe||Oe===xe&&Ye<xt)&&(le=oe=!0,b[E].column=pe)}return Ed(a,y,b),a.normalize(),oe}function yy(a,y,x){var E=Cd(a,y),b=a.tc[y],z=WS(a,y,x),ne=[];for(x=0;x<b;x++)ne[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var re=E[x].column,oe=a.nodeMinColumnSpace(E[x],!0),le=a.nodeMinColumnSpace(E[x],!1),ue=0;if(ne[x]===-1)if(x===0&&x===b-1)ue=re;else if(x===0){var pe=E[x+1].column;pe-re===le+a.nodeMinColumnSpace(E[x+1],!0)?ue=re-1:ue=re}else x===b-1?(pe=E[x-1].column,ue=re-pe===oe+a.nodeMinColumnSpace(E[x-1],!1)?re+1:re):(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,pe=E[x+1].column,le=pe-a.nodeMinColumnSpace(E[x+1],!0)-le-1,ue=(oe+le)/2|0);else x===0&&x===b-1?ue=ne[x]:x===0?(pe=E[x+1].column,le=pe-a.nodeMinColumnSpace(E[x+1],!0)-le-1,ue=Math.min(ne[x],le)):x===b-1?(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,ue=Math.max(ne[x],oe)):(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,pe=E[x+1].column,le=pe-a.nodeMinColumnSpace(E[x+1],!0)-le-1,oe<ne[x]&&ne[x]<le?ue=ne[x]:oe>=ne[x]?ue=oe:le<=ne[x]&&(ue=le));ue!==re&&(z=!0,E[x].column=ue)}Ed(a,y,E),a.normalize()}function Zx(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),ne=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+ne>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function Hx(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){E=ne.value;var re=E.column-a.nodeMinColumnSpace(E,!0),oe=E.column+a.nodeMinColumnSpace(E,!1);re<=y&&oe>=y&&(b[E.layer]=!0),re<=x&&oe>=x&&(z[E.layer]=!0)}for(re=!0,x=!1,E=0;E<=a.Ia;E++)re=re&&!(b[E]&&z[E]);if(re)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function qS(a,y){for(var x=0;x<=a.Ra;x++)for(;Zx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Hx(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=Tl(a),z=b0(a);for(E=z+1;z<E;){E=z,ex(a,x,1);var ne=b0(a);ne>z?Tu(a,b):ne<z&&(z=ne,b=Tl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=Tl(a),z=b0(a),E=z+1;z<E;)E=z,ex(a,x,-1),ne=b0(a),ne>z?Tu(a,b):ne<z&&(z=ne,b=Tl(a));a.normalize()}function ex(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(my(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var ne=z.layer,re=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),oe=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));re<=oe;re++)b[ne*(a.Ra+1)+re]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(ne=0;ne<a.Ra;ne++)b[z*(a.Ra+1)+ne]!==-1&&b[z*(a.Ra+1)+ne+1]!==-1&&b[z*(a.Ra+1)+ne]!==b[z*(a.Ra+1)+ne+1]&&(y[b[z*(a.Ra+1)+ne]*a.le+b[z*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)b[z*(a.Ra+1)+ne]!==-1&&b[z*(a.Ra+1)+ne-1]!==-1&&b[z*(a.Ra+1)+ne]!==b[z*(a.Ra+1)+ne-1]&&(y[b[z*(a.Ra+1)+ne]*a.le+b[z*(a.Ra+1)+ne-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(oe=ne[ne.length-1],ne.pop(),b[oe])for(b[oe]=!1,z=0;z<a.le;z++)y[oe*a.le+z]&&ne.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function Wx(a){for(var y=ni(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new Ln,Gx(y,x);var z=null,ne=null,re=null,oe=null,le=(a.ve&1)!==0,ue=(a.ve&2)!==0,pe=(a.ve&4)!==0,xe=(a.ve&8)!==0;for(le&&(a.verticalAlignment(y,x,!0),z=L0(a,y,!0,!1)),y.reverse(),pe&&(a.verticalAlignment(y,x,!1),re=L0(a,y,!1,!1)),E=ji(y),b=E.next();!b.done;b=E.next())b.value.reverse();xe&&(a.verticalAlignment(y,x,!1),oe=L0(a,y,!1,!0)),y.reverse(),ue&&(a.verticalAlignment(y,x,!0),ne=L0(a,y,!0,!0)),ci(y),a.u(z,ne,re,oe),a.network.vertexes.each(function(Ee){var Fe=ni();le&&Fe.push(z.get(Ee)),ue&&Fe.push(ne.get(Ee)),pe&&Fe.push(re.get(Ee)),xe&&Fe.push(oe.get(Ee)),Fe.sort(function(st,Ye){return st-Ye});var Oe=Fe.length;Oe=(Fe[Math.floor((Oe-1)/2)]+Fe[Math.ceil((Oe-1)/2)])/2,ci(Fe),Ee.zc=Oe})}function Gx(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,ne=a[E],re=a[E+1],oe=0;z<re.length;oe++){var le=re[oe];e:{if(le.node===null){var ue=My(le);if(0<ue.length){ue=ue[0].node===null;break e}}ue=!1}var pe=ue;if(oe===re.length-1||pe){for(ue=ne.length-1,pe&&(ue=My(le)[0].index);z<=oe;){if(le=re[z],!le.bo){pe=[];for(var xe=ji(le.sourceEdgesArrayAccess),Ee=xe.next();!Ee.done;Ee=xe.next())Ee=Ee.value,Ee.valid&&pe.push(Ee);le.bo=pe}for(le=ji(le.bo),pe=le.next();!pe.done;pe=le.next())pe=pe.value,xe=pe.fromVertex.index,(xe<b||xe>ue)&&y.add(pe);z++}b=ue}}}Io.prototype.verticalAlignment=function(a,y,x){$x(a),a=ji(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=ji(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var ne=x?My(z):Ux(z),re=ne.length;if(0<re){ne.sort(function(pe,xe){return pe.vi-xe.vi});var oe=(re-1)/2;for(re=Math.floor(oe),oe=Math.ceil(oe);re<=oe;re++)if(z.align===z){var le=ne[re],ue=void 0;ue=x?T0(le,z):T0(z,le),!y.contains(ue)&&b<le.vi&&(le.align=z,z.root=le.root,z.align=le.root,b=le.vi)}}}}};function $x(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function L0(a,y,x,E){for(var b=a.K===90||a.K===270,z=ji(y),ne=z.next();!ne.done;ne=z.next()){var re=ji(ne.value);for(ne=re.next();!ne.done;ne=re.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,z=ji(y),re=z.next();!re.done;re=z.next()){re=ji(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var le=0,ue=oe;ue.align!==oe;){var pe=ue.align,xe=ne?ue.width:ue.height,Ee=ne?pe.width:pe.height;if(x){var Fe=T0(ue,pe),Oe=Fe.portFromPos,st=Fe.portToPos;Fe.link!==null&&(ue.node&&ue.node!==Fe.link.fromNode&&(Oe=ne?ue.focusX:ue.focusY),pe.node&&pe.node!==Fe.link.toNode&&(st=ne?pe.focusX:pe.focusY))}else Fe=T0(pe,ue),Oe=Fe.portToPos,st=Fe.portFromPos,Fe.link!==null&&(ue.node&&ue.node!==Fe.link.toNode&&(Oe=ne?ue.focusX:ue.focusY),pe.node&&pe.node!==Fe.link.fromNode&&(st=ne?pe.focusX:pe.focusY));xe=E?ue.qg+(xe-Oe)-(Ee-st):ue.qg+Oe-st,pe.qg=xe,le=Math.min(le,xe),ue=ue.align}ue=oe;do ue.qg=ue.qg-le,ue=ue.align;while(ue!==oe)}}for(x=ji(y),ne=x.next();!ne.done;ne=x.next())for(z=ji(ne.value),ne=z.next();!ne.done;ne=z.next())ne=ne.value,ne.root===ne&&tx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,re=0;do{for(z=y[ne][re];z.align!==z.root;)z=z.align,ne++,0<z.vi&&(re=nx(z,y),re.sd.shift=Math.min(re.sd.shift,z.sd.shift+z.zc+z.qg-(re.zc+re.qg+(b?re.width:re.height)+a.columnSpacing)));re=z.vi+1}while(ne<y.length&&re<y[ne].length&&z.sd===y[ne][re].sd)}for(a=new xi,y=ji(y),ne=y.next();!ne.done;ne=y.next())for(x=ji(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,z=b?ne.width:ne.height,a.add(ne,E?-ne.zc-z:ne.zc);return a}function tx(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=nx(E,x),z=b.root;tx(a,z,x),y.sd===y&&(y.sd=z.sd);var ne=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+ne-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function nx(a,y){var x=a.Tz;return a=a.vi,1>a&&St("Could not determine previous vertex in layer"),y[x][a-1]}Io.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=ni(),b=ni(),z=1/0,ne=0;4>ne;ne++)if(y[ne]){var re=Kx(this,y[ne],E,b,ne);re<z&&(x=ne,z=re)}for(z={},ne=0;4>ne;z={delta:z.delta},ne++)y[ne]&&(z.delta=ne===0||ne===2?E[x]-E[ne]:b[x]-b[ne],z.delta!==0&&y[ne].each(function(oe){return function(le){le.value+=oe.delta}}(z)));ci(E),ci(b)};function Kx(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,ne=-1/0;return y.each(function(re){var oe=re.key;re=re.value,oe=a.K===90||a.K===270?oe.width:oe.height,re<z&&(z=re),re+oe>ne&&(ne=re+oe)}),x[b]=z,E[b]=ne,ne-z}Io.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=F0(this,!0),y=F0(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function F0(a,y){return a.K===270?y?Aa:Va:a.K===90?y?Va:Aa:a.K===180?y?_a:rs:y?rs:_a}Io.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,ne=b=1/0,re=-1/0;a.next();){var oe=a.value,le=oe.layer,ue=oe.column|0;E?(ne=y.x+this.kc*ue,le=this.Kd[le]):(ne=this.Kd[le],le=y.y+this.kc*ue),oe.centerX=ne,oe.centerY=le,x&&isFinite(oe.zc)&&(E?oe.node?oe.x=y.x+oe.zc:oe.centerX=y.x+oe.zc:oe.node?oe.y=y.y+oe.zc:oe.centerY=y.y+oe.zc),z=Math.min(oe.x,z),b=Math.min(oe.y,b),E?(ne=z,re=Math.max(re,oe.bounds.right)):(ne=b,re=Math.max(re,oe.bounds.bottom))}for(this.xw=re-ne,z=y.x-z,y=y.y-b,this.Rf=new tt(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Io.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new pn(0,0,x,Math.abs(this.Ta[0]))):y.push(new pn(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new pn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new pn(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new pn(0,0,Math.abs(this.Ta[0]),x)):y.push(new pn(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new pn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new pn(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},Io.prototype.commitLayers=function(){},Io.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var E=y,b=E.fromNode,z=E.toNode,ne=E.fromPort,re=E.toPort;if(b!==null){var oe=b.findVisibleNode();oe!==null&&oe!==b&&(b=oe,ne=oe.port)}z!==null&&(oe=z.findVisibleNode(),oe!==null&&oe!==z&&(z=oe,re=oe.port));var le=y.computeSpot(!0,ne);oe=y.computeSpot(!1,re);var ue=x.fromVertex,pe=x.toVertex;if(x.valid)y.curve===pu&&y.pointsCount===4&&(ue.column===pe.column&&this.alignOption===0?(x=y.getLinkPoint(b,ne,le,!0,!1,z,re),re=y.getLinkPoint(z,re,oe,!1,!1,b,ne),x.w()||x.set(b.actualBounds.center),re.w()||re.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+re.x)/3,(2*x.y+re.y)/3),y.yf((x.x+2*re.x)/3,(x.y+2*re.y)/3),y.yf(re.x,re.y)):(x=E=!1,ne!==null&&le===Ma&&(E=!0),re!==null&&oe===Ma&&(x=!0),(E||x)&&(oe=null,E&&(oe=y.getLinkPointFromPoint(b,ne,ne.ga(Jr),y.i(3),!0),oe.w()||oe.set(b.actualBounds.center),y.L(0,oe.x,oe.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,re,re.ga(Jr),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),oe&&(z=y.i(2),y.L(1,(2*oe.x+z.x)/3,(2*oe.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(ue.layer===pe.layer)y.zf();else{var xe=!1,Ee=!1,Fe=this.ie,Oe=y.firstPickIndex+1;if(y.isOrthogonal){Ee=!0;var st=y.pointsCount;4<st&&y.points.removeRange(2,st-3)}else if(y.curve===pu)xe=!0,st=y.pointsCount,4<st&&y.points.removeRange(2,st-3),st===4&&(Oe=2);else{st=y.pointsCount;var Ye=le===Ma,pt=oe===Ma;2<st&&Ye&&pt?y.points.removeRange(1,st-2):3<st&&Ye&&!pt?y.points.removeRange(1,st-3):3<st&&!Ye&&pt?y.points.removeRange(2,st-2):4<st&&!Ye&&!pt&&y.points.removeRange(2,st-3)}if(x.rev){for(;pe!==null&&ue!==pe;){var xt=st=null;for(Ye=pe.sourceEdges.iterator;Ye.next()&&(pt=Ye.value,pt.link!==x.link||(st=pt.fromVertex,xt=pt.toVertex,st.node!==null)););if(st===null)break;if(st!==ue){Ye=y.i(Oe-1).x,pt=y.i(Oe-1).y;var Mt=st.centerX,Ot=st.centerY;if(Ee)this.K===180||this.K===0?Oe===y.firstPickIndex+1?(y.m(Oe++,Ye,pt),y.m(Oe++,Ye,Ot)):(xt!==null?xt.centerY:pt)!==Ot&&(xt=this.Ta[st.layer-1]+this.Rf.x,y.m(Oe++,xt,pt),y.m(Oe++,xt,Ot)):Oe===y.firstPickIndex+1?(y.m(Oe++,Ye,pt),y.m(Oe++,Mt,pt)):(xt!==null?xt.centerX:Ye)!==Mt&&(xt=this.Ta[st.layer-1]+this.Rf.y,y.m(Oe++,Ye,xt),y.m(Oe++,Mt,xt));else if(Oe===y.firstPickIndex+1){xt=Math.max(10,this.he[pe.layer]);var en=Math.max(10,this.Ld[pe.layer]);if(xe)this.K===180?Mt<=pe.bounds.x?(pe=pe.bounds.x,y.m(Oe++,pe-xt,Ot),y.m(Oe++,pe,Ot),y.m(Oe++,pe+en,Ot)):(y.m(Oe++,Mt-xt,Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt+en,Ot)):this.K===90?Ot>=pe.bounds.bottom?(pe=pe.bounds.y+pe.bounds.height,y.m(Oe++,Mt,pe+en),y.m(Oe++,Mt,pe),y.m(Oe++,Mt,pe-xt)):(y.m(Oe++,Mt,Ot+en),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Ot-xt)):this.K===270?Ot<=pe.bounds.y?(pe=pe.bounds.y,y.m(Oe++,Mt,pe-xt),y.m(Oe++,Mt,pe),y.m(Oe++,Mt,pe+en)):(y.m(Oe++,Mt,Ot-xt),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Ot+en)):this.K===0&&(Mt>=pe.bounds.right?(pe=pe.bounds.x+pe.bounds.width,y.m(Oe++,pe+en,Ot),y.m(Oe++,pe,Ot),y.m(Oe++,pe-xt,Ot)):(y.m(Oe++,Mt+en,Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt-xt,Ot)));else{y.m(Oe++,Ye,pt);var ri=0;this.K===180||this.K===0?((this.K===180?Mt>=pe.bounds.right:Mt<=pe.bounds.x)&&(ri=(this.K===0?-xt:en)/2),y.m(Oe++,Ye+ri,Ot)):((this.K===270?Ot>=pe.bounds.bottom:Ot<=pe.bounds.y)&&(ri=(this.K===90?-xt:en)/2),y.m(Oe++,Mt,pt+ri)),y.m(Oe++,Mt,Ot)}}else xt=Math.max(10,this.he[st.layer]),en=Math.max(10,this.Ld[st.layer]),xe?this.K===180?(y.m(Oe++,Mt-xt-Fe,Ot),y.m(Oe++,Math.min(Mt-xt+Fe/2,Mt),Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Math.max(Mt+en-Fe/2,Mt),Ot),y.m(Oe++,Mt+en+Fe,Ot)):this.K===90?(y.m(Oe++,Mt,Ot+en+Fe),y.m(Oe++,Mt,Math.max(Ot+en-Fe/2,Ot)),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Math.min(Ot-xt+Fe/2,Ot)),y.m(Oe++,Mt,Ot-xt-Fe)):this.K===270?(y.m(Oe++,Mt,Ot-xt-Fe),y.m(Oe++,Mt,Math.min(Ot-xt+Fe/2,Ot)),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Math.max(Ot+en-Fe/2,Ot)),y.m(Oe++,Mt,Ot+en+Fe)):(y.m(Oe++,Mt+en+Fe,Ot),y.m(Oe++,Math.max(Mt+en-Fe/2,Mt),Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Math.min(Mt-xt+Fe/2,Mt),Ot),y.m(Oe++,Mt-xt-Fe,Ot)):y.m(Oe++,Mt,Ot)}pe=st}(re===null||le!==Ma||Ee)&&(Ye=y.i(Oe-1).x,pt=y.i(Oe-1).y,Mt=y.i(Oe).x,Ot=y.i(Oe).y,Ee?(Fe=this.Ld[ue.layer],this.K===180||this.K===0?(Ee=pt,Ee>=ue.bounds.y&&Ee<=ue.bounds.bottom&&(this.K===180?Mt>=ue.bounds.x:Mt<=ue.bounds.right)&&(pe=ue.centerX+(this.K===180?-Fe:Fe),Ee<ue.bounds.y+ue.bounds.height/2?Ee=ue.bounds.y-this.kc/2:Ee=ue.bounds.bottom+this.kc/2,y.m(Oe++,pe,pt),y.m(Oe++,pe,Ee)),y.m(Oe++,Mt,Ee)):(Ee=Ye,Ee>=ue.bounds.x&&Ee<=ue.bounds.right&&(this.K===270?Ot>=ue.bounds.y:Ot<=ue.bounds.bottom)&&(pe=ue.centerY+(this.K===270?-Fe:Fe),Ee<ue.bounds.x+ue.bounds.width/2?Ee=ue.bounds.x-this.kc/2:Ee=ue.bounds.right+this.kc/2,y.m(Oe++,Ye,pe),y.m(Oe++,Ee,pe)),y.m(Oe++,Ee,Ot)),y.m(Oe++,Mt,Ot)):xe?(xt=Math.max(10,this.he[ue.layer]),en=Math.max(10,this.Ld[ue.layer]),this.K===180&&Mt>=ue.bounds.x?(pe=ue.bounds.x+ue.bounds.width,y.L(Oe-2,pe,pt),y.L(Oe-1,pe+en,pt)):this.K===90&&Ot<=ue.bounds.bottom?(pe=ue.bounds.y,y.L(Oe-2,Ye,pe),y.L(Oe-1,Ye,pe-xt)):this.K===270&&Ot>=ue.bounds.y?(pe=ue.bounds.y+ue.bounds.height,y.L(Oe-2,Ye,pe),y.L(Oe-1,Ye,pe+en)):this.K===0&&Mt<=ue.bounds.right&&(pe=ue.bounds.x,y.L(Oe-2,pe,pt),y.L(Oe-1,pe-xt,pt))):(xt=Math.max(10,this.he[ue.layer]),en=Math.max(10,this.Ld[ue.layer]),Ee=0,this.K===180||this.K===0?((this.K===180?Mt<=ue.bounds.x:Mt>=ue.bounds.right)&&(Ee=(this.K===0?en:-xt)/2),y.m(Oe++,Mt+Ee,pt)):((this.K===270?Ot<=ue.bounds.y:Ot>=ue.bounds.bottom)&&(Ee=(this.K===90?en:-xt)/2),y.m(Oe++,Ye,Ot+Ee)),y.m(Oe++,Mt,Ot)))}else{for(;ue!==null&&ue!==pe;){for(xt=st=null,ue=ue.destinationEdges.iterator;ue.next()&&(Ye=ue.value,Ye.link!==x.link||(st=Ye.toVertex,xt=Ye.fromVertex,xt.node!==null&&(xt=null),st.node!==null)););if(st===null)break;st!==pe&&(Ye=y.i(Oe-1).x,pt=y.i(Oe-1).y,Mt=st.centerX,Ot=st.centerY,Ee?this.K===180||this.K===0?(xt!==null?xt.centerY:pt)!==Ot&&(xt=this.Ta[st.layer]+this.Rf.x,Oe===y.firstPickIndex+1&&(xt=this.K===0?Math.max(xt,Ye):Math.min(xt,Ye)),y.m(Oe++,xt,pt),y.m(Oe++,xt,Ot)):(xt!==null?xt.centerX:Ye)!==Mt&&(xt=this.Ta[st.layer]+this.Rf.y,Oe===y.firstPickIndex+1&&(xt=this.K===90?Math.max(xt,pt):Math.min(xt,pt)),y.m(Oe++,Ye,xt),y.m(Oe++,Mt,xt)):(xt=Math.max(10,this.he[st.layer]),en=Math.max(10,this.Ld[st.layer]),xe?this.K===180?(y.m(Oe++,Mt+en+Fe,Ot),y.m(Oe++,Math.max(Mt+en-Fe/2,Mt),Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Math.min(Mt-xt+Fe/2,Mt),Ot),y.m(Oe++,Mt-xt-Fe,Ot)):this.K===90?(y.m(Oe++,Mt,Ot-xt-Fe),y.m(Oe++,Mt,Math.min(Ot-xt+Fe/2,Ot)),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Math.max(Ot+en-Fe/2,Ot)),y.m(Oe++,Mt,Ot+en+Fe)):this.K===270?(y.m(Oe++,Mt,Ot+en+Fe),y.m(Oe++,Mt,Math.max(Ot+en-Fe/2,Ot)),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Math.min(Ot-xt+Fe/2,Ot)),y.m(Oe++,Mt,Ot-xt-Fe)):(y.m(Oe++,Mt-xt-Fe,Ot),y.m(Oe++,Math.min(Mt-xt+Fe/2,Mt),Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Mt,Ot),y.m(Oe++,Math.max(Mt+en-Fe/2,Mt),Ot),y.m(Oe++,Mt+en+Fe,Ot)):this.K===180?(y.m(Oe++,Mt+en,Ot),y.m(Oe++,Mt-xt,Ot)):this.K===90?(y.m(Oe++,Mt,Ot-xt),y.m(Oe++,Mt,Ot+en)):this.K===270?(y.m(Oe++,Mt,Ot+en),y.m(Oe++,Mt,Ot-xt)):(y.m(Oe++,Mt-xt,Ot),y.m(Oe++,Mt+en,Ot)))),ue=st}Ee&&(Ye=y.i(Oe-1).x,pt=y.i(Oe-1).y,Mt=y.i(Oe).x,Ot=y.i(Oe).y,this.K===180||this.K===0?pt!==Ot&&(xt=this.K===0?Math.min(Math.max((Mt+Ye)/2,this.Ta[pe.layer]+this.Rf.x),Mt):Math.max(Math.min((Mt+Ye)/2,this.Ta[pe.layer]+this.Rf.x),Mt),y.m(Oe++,xt,pt),y.m(Oe++,xt,Ot)):Ye!==Mt&&(xt=this.K===90?Math.min(Math.max((Ot+pt)/2,this.Ta[pe.layer]+this.Rf.y),Ot):Math.max(Math.min((Ot+pt)/2,this.Ta[pe.layer]+this.Rf.y),Ot),y.m(Oe++,Ye,xt),y.m(Oe++,Mt,xt)))}E!==null&&xe&&4<=y.pointsCount&&(ne!==null&&(ne=le===Ma?y.getLinkPointFromPoint(b,ne,ne.ga(Jr),y.i(3),!0):y.i(0),le===Ma&&(le=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+le.x)/2,le.y),y.L(2,E.x,(le.y+E.y)/2)):(y.L(1,le.x,(ne.y+le.y)/2),y.L(2,(le.x+E.x)/2,E.y))),ne.w()||ne.set(b.actualBounds.center),y.L(0,ne.x,ne.y)),re!==null&&(b=oe===Ma?y.getLinkPointFromPoint(z,re,re.ga(Jr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===Ma&&(re=y.i(y.pointsCount-3),oe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+re.x)/2,re.y),y.L(y.pointsCount-2,oe.x,(re.y+oe.y)/2)):(y.L(y.pointsCount-2,re.x,(b.y+re.y)/2),y.L(y.pointsCount-3,(re.x+oe.x)/2,oe.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Io.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Mn,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),ne=E.i(b+1);if(this.B(z.y,ne.y)&&!this.B(z.x,ne.x)){var re=new bd;re.layer=Math.floor(z.y/2);var oe=E.i(0),le=E.i(E.pointsCount-1);if(re.first=oe.x*oe.x+oe.y,re.jc=le.x*le.x+le.y,re.rd=Math.min(z.x,ne.x),re.Ic=Math.max(z.x,ne.x),re.index=b,re.link=E,b+2<E.pointsCount){oe=E.i(b-1),le=E.i(b+2);var ue=0;oe.y<z.y?ue=le.y<z.y?3:z.x<ne.x?2:1:oe.y>z.y&&(ue=le.y>z.y?0:ne.x<z.x?2:1),re.j=ue}x.push(re)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(ne=x[z].Ic,b=a+1;b<E&&x[b].rd<ne;)ne=Math.max(ne,x[b].Ic),b++;if(ne=b-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ue=1,re=x[z].jc,oe=z;oe<b;oe++)le=x[oe],le.jc!==re&&(ue++,re=le.jc);this.zi(x,this.Ux,z,z+ne);var pe=1;for(re=x[z].first,oe=z;oe<b;oe++)le=x[oe],le.first!==re&&(pe++,re=le.first);for(oe=!0,le=pe,ue<pe?(oe=!1,le=ue,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ue=0,pe=z;pe<b;pe++){var xe=x[pe];(oe?xe.first:xe.jc)!==re&&(ue++,re=oe?xe.first:xe.jc);var Ee=xe.link;z=Ee.i(xe.index),ne=Ee.i(xe.index+1);var Fe=this.linkSpacing*(ue-(le-1)/2);y++,Ee.uh(),Ee.L(xe.index,z.x,z.y+Fe),Ee.L(xe.index+1,ne.x,ne.y+Fe),Ee.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),ne=E.i(b+1),this.B(z.x,ne.x)&&!this.B(z.y,ne.y)&&(re=new bd,re.layer=Math.floor(z.x/2),oe=E.i(0),le=E.i(E.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=le.x+le.y*le.y,re.rd=Math.min(z.y,ne.y),re.Ic=Math.max(z.y,ne.y),re.index=b,re.link=E,b+2<E.pointsCount&&(oe=E.i(b-1),le=E.i(b+2),ue=0,oe.x<z.x?ue=le.x<z.x?3:z.y<ne.y?2:1:oe.x>z.x&&(ue=le.x>z.x?0:ne.y<z.y?2:1),re.j=ue),x.push(re));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(ne=x[z].Ic,b=a+1;b<E&&x[b].rd<ne;)ne=Math.max(ne,x[b].Ic),b++;if(ne=b-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ue=1,re=x[z].jc,oe=z;oe<b;oe++)le=x[oe],le.jc!==re&&(ue++,re=le.jc);for(this.zi(x,this.Ux,z,z+ne),pe=1,re=x[z].first,oe=z;oe<b;oe++)le=x[oe],le.first!==re&&(pe++,re=le.first);for(oe=!0,le=pe,ue<pe?(oe=!1,le=ue,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ue=0,pe=z;pe<b;pe++)xe=x[pe],(oe?xe.first:xe.jc)!==re&&(ue++,re=oe?xe.first:xe.jc),Ee=xe.link,z=Ee.i(xe.index),ne=Ee.i(xe.index+1),Fe=this.linkSpacing*(ue-(le-1)/2),y++,Ee.uh(),Ee.L(xe.index,z.x+Fe,z.y),Ee.L(xe.index+1,ne.x+Fe,ne.y),Ee.zf()}z=b}a=E}}}},Le=Io.prototype,Le.Vx=function(a,y){return a instanceof bd&&y instanceof bd&&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},Le.Ux=function(a,y){return a instanceof bd&&y instanceof bd&&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},Le.Js=function(a,y){return a instanceof bd&&y instanceof bd&&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},Le.B=function(a,y){return a-=y,-1<a&&1>a},Le.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&St("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function Cd(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function Ed(a,y,x){a.He[a.tc[y]]=x}Ve.Object.defineProperties(Io.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()):St("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Sy&&a!==B0&&a!==Wp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==N0&&a!==xy&&a!==Py||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==k0&&a!==wy&&a!==Cy||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Ey&&a!==A0&&a!==by||(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 B0=new fn(Io,"CycleDepthFirst",0),Sy=new fn(Io,"CycleGreedy",1),Wp=new fn(Io,"CycleFromLayers",2),N0=new fn(Io,"LayerOptimalLinkLength",0),xy=new fn(Io,"LayerLongestPathSink",1),Py=new fn(Io,"LayerLongestPathSource",2),k0=new fn(Io,"InitDepthFirstOut",0),wy=new fn(Io,"InitDepthFirstIn",1),Cy=new fn(Io,"InitNaive",2),Ey=new fn(Io,"AggressiveNone",0),A0=new fn(Io,"AggressiveLess",1),by=new fn(Io,"AggressiveMore",2),Vx=8;Io.className="LayeredDigraphLayout",Io.CycleDepthFirst=B0,Io.CycleGreedy=Sy,Io.CycleFromLayers=Wp,Io.LayerOptimalLinkLength=N0,Io.LayerLongestPathSink=xy,Io.LayerLongestPathSource=Py,Io.InitDepthFirstOut=k0,Io.InitDepthFirstIn=wy,Io.InitNaive=Cy,Io.AggressiveNone=Ey,Io.AggressiveLess=A0,Io.AggressiveMore=by,Io.PackNone=0,Io.PackExpand=1,Io.PackStraighten=2,Io.PackMedian=4,Io.PackAll=15,Io.AlignNone=0,Io.AlignUpperLeft=1,Io.AlignUpperRight=2,Io.AlignLowerLeft=4,Io.AlignLowerRight=8,Io.AlignAll=15;function bd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}bd.className="SegInfo";function kg(a){qo.call(this,a)}Dt(kg,qo),kg.prototype.createVertex=function(){return new Du(this)},kg.prototype.createEdge=function(){return new Gp(this)},kg.className="LayeredDigraphNetwork";function Du(a){ps.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}Dt(Du,ps);function ix(a,y){return a.index-y.index}function T0(a,y){if(!a.$n){for(var x=[],E=ji(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=ji(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;St("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=ji(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(ix),a.co=y}return a.co}function Ux(a){if(!a.ao){for(var y=[],x=ji(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(ix),a.ao=y}return a.ao}Du.prototype.Cl=function(a){ps.prototype.Cl.call(this,a),this.bo=this.co=null},Du.prototype.Kl=function(a){ps.prototype.Kl.call(this,a),this.bo=this.co=null},Du.prototype.zl=function(a){ps.prototype.zl.call(this,a),this.$n=this.ao=null},Du.prototype.Jl=function(a){ps.prototype.Jl.call(this,a),this.$n=this.ao=null},Ve.Object.defineProperties(Du.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)}}}),Du.prototype.deleteDestinationEdge=Du.prototype.Jl,Du.prototype.addDestinationEdge=Du.prototype.zl,Du.prototype.deleteSourceEdge=Du.prototype.Kl,Du.prototype.addSourceEdge=Du.prototype.Cl,Du.className="LayeredDigraphVertex";function Gp(a){ql.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Dt(Gp,ql),Ve.Object.defineProperties(Gp.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)}}}),Gp.className="LayeredDigraphEdge";function Zr(a){da.call(this),this.Ub=new Ln,this.Wn=R0,this.ud=nc,this.vo=z0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=_0,this.$d=new Xn(10,10).freeze();var y=new zf(this);this.W=new Vu(y),this.Y=new Vu(y),this.ru=[],a&&Object.assign(this,a)}Dt(Zr,da),Zr.prototype.cloneProtected=function(a){da.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)},Zr.prototype.qb=function(a){a.classType===Zr?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:St("Unknown enum value: "+a):da.prototype.qb.call(this,a)},Zr.prototype.createNetwork=function(){return new zf(this)},Zr.prototype.makeNetwork=function(a){function y(E){if(E instanceof ai)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Kn){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof qt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof fr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Zr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==Z0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof qt&&(y=a),this.path===R0&&y!==null?this.ud=y.isTreePathToChildren?nc:Rf:this.ud=this.path===R0?nc: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 Ln,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof ai?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Vu&&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,Ly(this,y));for(y=this.network.vertexes,a=null;a=Yx(y),0<a.count;)y=rx(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ly(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vu&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vu&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vu&&lx(this,y);if(this.Cu(),this.layerStyle===H0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===jy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Vu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Ln,this.isValidLayout=!0};function Yx(a){var y=new Ln;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Zr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case nc:x.sourceEdges.count===0&&this.Ub.add(x);break;case Rf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:St("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=rx(this,a),a!==null&&this.Ub.add(a))};function rx(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case nc:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Rf:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:St("Unhandled path value "+a.ud.toString())}}return E}function Ly(a,y){if(y!==null){switch(a.ud){case nc:if(0<y.destinationEdges.count){for(var x=new Mn,E=y.destinationVertexes;E.next();){var b=E.value;ox(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Rf:if(0<y.sourceEdges.count){for(x=new Mn,E=y.sourceVertexes;E.next();)b=E.value,ox(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:St("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)Ly(a,x[y])}}function ox(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}Zr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===oc&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,ne=z.length,re=0;re<ne;re++){var oe=z[re];ax(a,oe),x+=oe.descendantCount+1,E=Math.max(E,oe.maxChildrenCount),b=Math.max(b,oe.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function Xx(a,y){switch(a.vo){default:case z0:return y.parent!==null?y.parent:a.W;case Oy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Dy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Ty:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Zr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Xx(this,a)),a.parent!==null&&a.parent.alignment===oc){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function sx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)sx(a,y[E])}}Zr.prototype.assignTreeVertexValues=function(){};function lx(a,y){if(y!==null){y.alignment!==oc&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)lx(a,y[E])}}Zr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Ag:break;case Kp:a.children.reverse();break;case Vp:a.children.sort(a.comparer);break;case Up:a.children.sort(a.comparer),a.children.reverse();break;default:St("Unhandled sorting value "+a.sorting.toString())}},Zr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Zr.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=Md(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,ne=0,re=0,oe=a.commentSpacing;if(a.node!==null)for(var le=a.node.Mu();le.next();){var ue=le.value;ue.category==="Comment"&&ue.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ue),ue.Va(),ue=ue.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ue.width),ne+=ue.height+Math.abs(re)):(z+=ue.width+Math.abs(re),ne=Math.max(ne,ue.height)),re=oe)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=pn.allocAt(0,0,a.bounds.width+z,a.bounds.height+ne),a.bounds=b,pn.free(b))};function Md(a){return a===Vc||a===oc||a===Uc||a===Sc}function $p(a){return a===Vc||a===oc}function Fy(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Md(x)){if($p(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Uc)return!0}}return!1}Zr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=Md(z)),E=E===90||E===270,x=b===90||b===270;for(var ne=a.childrenCount===0,re=Fy(a),oe=0,le=a.comments,ue=le.length,pe=tt.alloc(),xe=0;xe<ue;xe++){var Ee=le[xe],Fe=Ee.measuredBounds;if(E&&!ne||!z&&!x&&ne||z&&x&&ne){if(135<b&&!z||x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x-a.commentMargin-Fe.width,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();){var Oe=Ee.value;Oe.fromSpot=_a,Oe.toSpot=rs}else for(pe.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=rs,Oe.toSpot=_a;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=rs,Oe.toSpot=_a;else for(pe.h(a.bounds.x+a.commentMargin-Fe.width,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=_a,Oe.toSpot=rs;oe=0<=a.commentSpacing?oe+(Fe.height+a.commentSpacing):oe+(a.commentSpacing-Fe.height)}else{if(135<b&&!z||!x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-Fe.height),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=Aa,Oe.toSpot=Va;else for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=Va,Oe.toSpot=Aa;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=Va,Oe.toSpot=Aa;else for(pe.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-Fe.height),Ee.move(pe),Ee=Ee.Sd();Ee.next();)Oe=Ee.value,Oe.fromSpot=Aa,Oe.toSpot=Va;oe=0<=a.commentSpacing?oe+(Fe.width+a.commentSpacing):oe+(a.commentSpacing-Fe.width)}}if(tt.free(pe),y=oe-a.commentSpacing-(E?y.height:y.width),this.ud===nc)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},Zr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case j0:ux(this,a);break;case Yp:if(a.alignment===oc)ux(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=Md(x)),E=Fy(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var b=uh(a);y=b===90||b===270;var z=0,ne=a.children,re=ne.length;for(x=0;x<re;x++)E=ne[x],z=Math.max(z,y?E.Da.width:E.Da.height);var oe=a.alignment;E=oe===ic;var le=oe===rc,ue=Md(oe),pe=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var xe=a.nodeSpacing,Ee=this.computeNodeIndent(a),Fe=a.rowSpacing,Oe=0;(E||le||a.hm||a.im&&a.maxGenerationCount===1)&&(Oe=Math.max(0,a.rowIndent)),E=a.width;var st=a.height,Ye=0,pt=0,xt=0,Mt=null,Ot=null,en=0,ri=0,Si=0,gi=0,$n=0,An=0,hr=0,Ji=0;if(ue&&!$p(oe)&&135<b&&ne.reverse(),$p(oe))if(1<re)for(var mo=0;mo<re;mo++)mo%2===0&&mo!==re-1&&(Ji=Math.max(Ji,y?ne[mo].Da.width:ne[mo].Da.height));else re===1&&(Ji=y?ne[0].Da.width:ne[0].Da.height);if(ue){switch(oe){case Vc:pt=135>b?hx(this,a,ne,Ji,Ye,pt):cx(this,a,ne,Ji,Ye,pt),Ji=pt.x,Ye=pt.width,pt=pt.height;break;case Uc:for(Mt=0;Mt<re;Mt++)Ot=ne[Mt],pe=Ot.Da,xt=An===0?0:Fe,y?(Ot.S.h(z-pe.width,gi+xt),Ye=Math.max(Ye,pe.width),pt=Math.max(pt,gi+xt+pe.height),gi+=xt+pe.height):(Ot.S.h(Si+xt,z-pe.height),Ye=Math.max(Ye,Si+xt+pe.width),pt=Math.max(pt,pe.height),Si+=xt+pe.width),An++;break;case Sc:for(Mt=0;Mt<re;Mt++)Ot=ne[Mt],z=Ot.Da,pe=An===0?0:Fe,y?(Ot.S.h(xe/2+a.focus.x,gi+pe),Ye=Math.max(Ye,z.width),pt=Math.max(pt,gi+pe+z.height),gi+=pe+z.height):(Ot.S.h(Si+pe,xe/2+a.focus.y),Ye=Math.max(Ye,Si+pe+z.width),pt=Math.max(pt,z.height),Si+=pe+z.width),An++}Mt=Hl(this,2),Ot=Hl(this,2),y?(Mt[0].h(0,0),Mt[1].h(0,pt),Ot[0].h(Ye,0)):(Mt[0].h(0,0),Mt[1].h(Ye,0),Ot[0].h(0,pt)),Ot[1].h(Ye,pt)}else for(mo=0;mo<re;mo++){var Yo=ne[mo],xs=Yo.Da;if(y){0<pe&&0<An&&Si+xe+xs.width>pe&&(Si<z&&sf(a,oe,z-Si,0,hr,mo-1),$n++,An=0,hr=mo,xt=pt,Si=0,gi=135<b?-pt-Fe:pt+Fe),O0(this,Yo,0,gi);var Es=0;if(An===0)Mt=Yo.Yo,Ot=Yo.kp,en=xs.width,ri=xs.height,(Mt===null||Ot===null||b!==uh(Yo))&&(Mt=Hl(this,2),Ot=Hl(this,2),Mt[0].h(0,0),Mt[1].h(0,ri),Ot[0].h(en,0),Ot[1].h(en,ri));else{var al=ni();ri=dx(this,a,Yo,Mt,Ot,en,ri,al),Es=ri.x,Mt=al[0],Ot=al[1],en=ri.width,ri=ri.height,ci(al),Si<xs.width&&0>Es&&(If(a,-Es,0,hr,mo-1),I0(Mt,-Es,0),I0(Ot,-Es,0),Es=0)}Yo.S.h(Es,gi),Ye=Math.max(Ye,en),pt=Math.max(pt,xt+($n===0?0:Fe)+xs.height),Si=en}else 0<pe&&0<An&&gi+xe+xs.height>pe&&(gi<z&&sf(a,oe,0,z-gi,hr,mo-1),$n++,An=0,hr=mo,xt=Ye,gi=0,Si=135<b?-Ye-Fe:Ye+Fe),O0(this,Yo,Si,0),Es=0,An===0?(Mt=Yo.Yo,Ot=Yo.kp,en=xs.width,ri=xs.height,(Mt===null||Ot===null||b!==uh(Yo))&&(Mt=Hl(this,2),Ot=Hl(this,2),Mt[0].h(0,0),Mt[1].h(en,0),Ot[0].h(0,ri),Ot[1].h(en,ri))):(al=ni(),ri=dx(this,a,Yo,Mt,Ot,en,ri,al),Es=ri.x,Mt=al[0],Ot=al[1],en=ri.width,ri=ri.height,ci(al),gi<xs.height&&0>Es&&(If(a,0,-Es,hr,mo-1),I0(Mt,0,-Es),I0(Ot,0,-Es),Es=0)),Yo.S.h(Si,Es),pt=Math.max(pt,ri),Ye=Math.max(Ye,xt+($n===0?0:Fe)+xs.width),gi=ri;An++}switch(0<$n&&(y?(pt+=Math.max(0,x),Si<Ye&&sf(a,oe,Ye-Si,0,hr,re-1),0<Oe&&(le||If(a,Oe,0,0,re-1),Ye+=Oe)):(Ye+=Math.max(0,x),gi<pt&&sf(a,oe,0,pt-gi,hr,re-1),0<Oe&&(le||If(a,0,Oe,0,re-1),pt+=Oe))),Oe=le=0,oe){case Tg:y?le+=Ye/2-a.focus.x-Ee/2:Oe+=pt/2-a.focus.y-Ee/2;break;case jf:0<$n?y?le+=Ye/2-a.focus.x-Ee/2:Oe+=pt/2-a.focus.y-Ee/2:y?(Ji=ne[0].S.x+ne[0].la.x,le+=Ji+(ne[re-1].S.x+ne[re-1].la.x+2*ne[re-1].focus.x-Ji)/2-a.focus.x-Ee/2):(Ji=ne[0].S.y+ne[0].la.y,Oe+=Ji+(ne[re-1].S.y+ne[re-1].la.y+2*ne[re-1].focus.y-Ji)/2-a.focus.y-Ee/2);break;case ic:y?(le-=Ee,Ye+=Ee):(Oe-=Ee,pt+=Ee);break;case rc:y?(le+=Ye-a.width+Ee,Ye+=Ee):(Oe+=pt-a.height+Ee,pt+=Ee);break;case Vc:y?1<re?le+=Ji+xe/2-a.focus.x:le+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<re?Oe+=Ji+xe/2-a.focus.y:Oe+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Uc:y?le+=Ye+xe/2-a.focus.x:Oe+=pt+xe/2-a.focus.y;break;case Sc:break;default:pt=this.customAlignment(a,le,Oe,Ye,pt),le=pt[0],Oe=pt[1],Ye=pt[2],pt=pt[3]}for(Ee=0;Ee<re;Ee++)Ji=ne[Ee],y?Ji.S.h(Ji.S.x+Ji.la.x-le,Ji.S.y+(135<b?(ue?-pt:-Ji.Da.height)+Ji.la.y-x:st+x+Ji.la.y)):Ji.S.h(Ji.S.x+(135<b?(ue?-Ye:-Ji.Da.width)+Ji.la.x-x:E+x+Ji.la.x),Ji.S.y+Ji.la.y-Oe);if(re=ne=0,ue?y?(Ye=By(a,Ye,le),0>le&&(le=0),135<b&&(Oe+=pt+x),pt+=st+x,oe===Sc&&(ne+=xe/2+a.focus.x),re+=st+x):(135<b&&(le+=Ye+x),Ye+=E+x,pt=Ny(a,pt,Oe),0>Oe&&(Oe=0),oe===Sc&&(re+=xe/2+a.focus.y),ne+=E+x):y?(a.comments===null?E>Ye&&(Ye=ky(oe,E-Ye,0),ne=Ye.x,re=Ye.y,Ye=E,le=0):Ye=By(a,Ye,le),0>le&&(ne-=le,le=0),135<b&&(Oe+=pt+x),pt=Math.max(Math.max(pt,st),pt+st+x),re+=st+x):(135<b&&(le+=Ye+x),Ye=Math.max(Math.max(Ye,E),Ye+E+x),a.comments===null?st>pt&&(pt=ky(oe,0,st-pt),ne=pt.x,re=pt.y,pt=st,Oe=0):pt=Ny(a,pt,Oe),0>Oe&&(re-=Oe,Oe=0),ne+=E+x),0<$n)b=Hl(this,4),$n=Hl(this,4),y?(b[2].h(0,st+x),b[3].h(b[2].x,pt),$n[2].h(Ye,b[2].y),$n[3].h($n[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Ye,b[2].y),$n[2].h(b[2].x,pt),$n[3].h(b[3].x,$n[2].y));else{for(b=Hl(this,Mt.length+2),$n=Hl(this,Ot.length+2),oe=0;oe<Mt.length;oe++)ue=Mt[oe],b[oe+2].h(ue.x+ne,ue.y+re);for(oe=0;oe<Ot.length;oe++)ue=Ot[oe],$n[oe+2].h(ue.x+ne,ue.y+re)}y?(b[0].h(le,0),b[1].h(b[0].x,st),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),$n[0].h(le+E,0),$n[1].h($n[0].x,st),$n[2].y<$n[1].y&&($n[2].x<$n[0].x?$n[2].assign($n[1]):$n[1].assign($n[2])),$n[3].y<$n[2].y&&($n[3].x<$n[0].x?$n[3].assign($n[2]):$n[2].assign($n[3])),b[2].y-=x/2,$n[2].y-=x/2):(b[0].h(0,Oe),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),$n[0].h(0,Oe+st),$n[1].h(E,$n[0].y),$n[2].x<$n[1].x&&($n[2].y<$n[0].y?$n[2].assign($n[1]):$n[1].assign($n[2])),$n[3].x<$n[2].x&&($n[3].y<$n[0].y?$n[3].assign($n[2]):$n[2].assign($n[3])),b[2].x-=x/2,$n[2].x-=x/2),xh(this,Mt),xh(this,Ot),a.Yo=b,a.kp=$n,a.la.h(le,Oe),a.Da.h(Ye,pt)}break;default:St("Unhandled compaction value "+a.compaction.toString())}}};function ux(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=Md(x));var b=Fy(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=uh(y),x=E===90||E===270;var z=0;b=y.children;for(var ne=b.length,re=0;re<ne;re++){var oe=b[re];z=Math.max(z,x?oe.Da.width:oe.Da.height)}var le=y.alignment,ue=le===ic,pe=le===rc;re=Md(le);var xe=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var Ee=y.nodeSpacing,Fe=a.computeNodeIndent(y),Oe=ue||pe?0:Fe/2,st=y.rowSpacing,Ye=0;(ue||pe||y.hm||y.im&&y.maxGenerationCount===1)&&(Ye=Math.max(0,y.rowIndent)),ue=y.width;var pt=y.height,xt=0,Mt=0,Ot=0,en=0,ri=0,Si=0,gi=0,$n=0,An=0,hr=0;if(re&&!$p(le)&&135<E&&b.reverse(),$p(le))if(1<ne)for(var Ji=0;Ji<ne;Ji++){var mo=b[Ji],Yo=mo.Da;Ji%2===0&&Ji!==ne-1?An=Math.max(An,(x?Yo.width:Yo.height)+a.computeBusNodeSpacing(mo)-Ee):Ji%2!==0&&(hr=Math.max(hr,(x?Yo.width:Yo.height)+a.computeBusNodeSpacing(mo)-Ee))}else ne===1&&(An=x?b[0].Da.width:b[0].Da.height);if(re)switch(le){case Vc:case oc:Mt=135>E?hx(a,y,b,An,xt,Mt):cx(a,y,b,An,xt,Mt),An=Mt.x,xt=Mt.width,Mt=Mt.height;break;case Uc:for(xe=0;xe<ne;xe++)Oe=b[xe],Ot=Oe.Da,hr=gi===0?0:st,x?(Oe.S.h(z-Ot.width,ri+hr),xt=Math.max(xt,Ot.width),Mt=Math.max(Mt,ri+hr+Ot.height),ri+=hr+Ot.height):(Oe.S.h(en+hr,z-Ot.height),xt=Math.max(xt,en+hr+Ot.width),Mt=Math.max(Mt,Ot.height),en+=hr+Ot.width),gi++;break;case Sc:for(z=0;z<ne;z++)xe=b[z],Oe=xe.Da,Ot=gi===0?0:st,x?(xe.S.h(Ee/2+y.focus.x,ri+Ot),xt=Math.max(xt,Oe.width),Mt=Math.max(Mt,ri+Ot+Oe.height),ri+=Ot+Oe.height):(xe.S.h(en+Ot,Ee/2+y.focus.y),xt=Math.max(xt,en+Ot+Oe.width),Mt=Math.max(Mt,Oe.height),en+=Ot+Oe.width),gi++}else for(hr=0;hr<ne;hr++)Ji=b[hr],mo=Ji.Da,x?(0<xe&&0<gi&&en+Ee+mo.width>xe&&(en<z&&sf(y,le,z-en,0,$n,hr-1),Si++,gi=0,$n=hr,Ot=Mt,en=0,ri=135<E?-Mt-st:Mt+st),Yo=gi===0?Oe:Ee,O0(a,Ji,0,ri),Ji.S.h(en+Yo,ri),xt=Math.max(xt,en+Yo+mo.width),Mt=Math.max(Mt,Ot+(Si===0?0:st)+mo.height),en+=Yo+mo.width):(0<xe&&0<gi&&ri+Ee+mo.height>xe&&(ri<z&&sf(y,le,0,z-ri,$n,hr-1),Si++,gi=0,$n=hr,Ot=xt,ri=0,en=135<E?-xt-st:xt+st),Yo=gi===0?Oe:Ee,O0(a,Ji,en,0),Ji.S.h(en,ri+Yo),Mt=Math.max(Mt,ri+Yo+mo.height),xt=Math.max(xt,Ot+(Si===0?0:st)+mo.width),ri+=Yo+mo.height),gi++;switch(0<Si&&(x?(Mt+=Math.max(0,oe),en<xt&&sf(y,le,xt-en,0,$n,ne-1),0<Ye&&(pe||If(y,Ye,0,0,ne-1),xt+=Ye)):(xt+=Math.max(0,oe),ri<Mt&&sf(y,le,0,Mt-ri,$n,ne-1),0<Ye&&(pe||If(y,0,Ye,0,ne-1),Mt+=Ye))),Ye=pe=0,le){case Tg:x?pe+=xt/2-y.focus.x-Fe/2:Ye+=Mt/2-y.focus.y-Fe/2;break;case jf:0<Si?x?pe+=xt/2-y.focus.x-Fe/2:Ye+=Mt/2-y.focus.y-Fe/2:x?(a=b[0].S.x+b[0].la.x,pe+=a+(b[ne-1].S.x+b[ne-1].la.x+2*b[ne-1].focus.x-a)/2-y.focus.x-Fe/2):(a=b[0].S.y+b[0].la.y,Ye+=a+(b[ne-1].S.y+b[ne-1].la.y+2*b[ne-1].focus.y-a)/2-y.focus.y-Fe/2);break;case ic:x?(pe-=Fe,xt+=Fe):(Ye-=Fe,Mt+=Fe);break;case rc:x?(pe+=xt-y.width+Fe,xt+=Fe):(Ye+=Mt-y.height+Fe,Mt+=Fe);break;case Vc:case oc:x?1<ne?pe+=An+Ee/2-y.focus.x:pe+=b[0].focus.x-y.focus.x+b[0].la.x:1<ne?Ye+=An+Ee/2-y.focus.y:Ye+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Uc:x?pe+=xt+Ee/2-y.focus.x:Ye+=Mt+Ee/2-y.focus.y;break;case Sc:break;default:a=a.customAlignment(y,pe,Ye,xt,Mt),pe=a[0],Ye=a[1],xt=a[2],Mt=a[3]}for(a=0;a<ne;a++)Fe=b[a],x?Fe.S.h(Fe.S.x+Fe.la.x-pe,Fe.S.y+(135<E?(re?-Mt:-Fe.Da.height)+Fe.la.y-oe:pt+oe+Fe.la.y)):Fe.S.h(Fe.S.x+(135<E?(re?-xt:-Fe.Da.width)+Fe.la.x-oe:ue+oe+Fe.la.x),Fe.S.y+Fe.la.y-Ye);x?(xt=By(y,xt,pe),0>pe&&(pe=0),135<E&&(Ye+=Mt+oe),Mt=Math.max(Math.max(Mt,pt),Mt+pt+oe)):(135<E&&(pe+=xt+oe),xt=Math.max(Math.max(xt,ue),xt+ue+oe),Mt=Ny(y,Mt,Ye),0>Ye&&(Ye=0)),y.la.h(pe,Ye),y.Da.h(xt,Mt)}}Zr.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function hx(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new pn(E,0,b,z);if(ne===1)return y=x[0],b=y.Da.width,z=y.Da.height,new pn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=uh(y)===90,ue=0,pe=0,xe=0,Ee=0;Ee<ne;Ee++)if(!(Ee%2!==0||1<ne&&Ee===ne-1)){var Fe=x[Ee],Oe=Fe.Da,st=ue===0?0:oe;if(le){var Ye=a.computeBusNodeSpacing(Fe)-re;Fe.S.h(E-(Oe.width+Ye),xe+st),b=Math.max(b,Oe.width+Ye),z=Math.max(z,xe+st+Oe.height),xe+=st+Oe.height}else Ye=a.computeBusNodeSpacing(Fe)-re,Fe.S.h(pe+st,E-(Oe.height+Ye)),z=Math.max(z,Oe.height+Ye),b=Math.max(b,pe+st+Oe.width),pe+=st+Oe.width;ue++}for(ue=0,Fe=pe,Ee=xe,le?(pe=E+re,xe=0):(pe=0,xe=E+re),Oe=0;Oe<ne;Oe++)if(Oe%2!==0){st=x[Oe],Ye=st.Da;var pt=ue===0?0:oe;if(le){var xt=a.computeBusNodeSpacing(st)-re;st.S.h(pe+xt,xe+pt),b=Math.max(b,pe+Ye.width+xt),z=Math.max(z,xe+pt+Ye.height),xe+=pt+Ye.height}else xt=a.computeBusNodeSpacing(st)-re,st.S.h(pe+pt,xe+xt),b=Math.max(b,pe+pt+Ye.width),z=Math.max(z,xe+Ye.height+xt),pe+=pt+Ye.width;ue++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,le?Math.max(Math.abs(Ee),Math.abs(xe)):Math.max(Math.abs(Fe),Math.abs(pe))),le?(x.S.h(E+re/2-x.focus.x-x.la.x,z+a),le=E+re/2-x.focus.x-x.la.x,b=Math.max(b,le+ne.width),0>le&&(b-=le),z=Math.max(z,Math.max(Ee,xe)+a+ne.height),0>x.S.x&&(E=D0(y,x.S.x,!1,E,re))):(x.S.h(b+a,E+re/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Fe,pe)+a+ne.width),xe=E+re/2-x.focus.y-x.la.y,z=Math.max(z,xe+ne.height),0>xe&&(z-=xe),0>x.S.y&&(E=D0(y,x.S.y,!0,E,re)))),new pn(E,0,b,z)}function cx(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new pn(E,0,b,z);if(ne===1)return x=x[0],b=x.Da.width,z=x.Da.height,new pn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=uh(y)===270,ue=0,pe=0,xe=0,Ee=0;Ee<ne;Ee++)if(!(Ee%2!==0||1<ne&&Ee===ne-1)){var Fe=x[Ee],Oe=Fe.Da,st=ue===0?0:oe;if(le){var Ye=a.computeBusNodeSpacing(Fe)-re;xe-=st+Oe.height,Fe.S.h(E-(Oe.width+Ye),xe),b=Math.max(b,Oe.width+Ye),z=Math.max(z,Math.abs(xe))}else Ye=a.computeBusNodeSpacing(Fe)-re,pe-=st+Oe.width,Fe.S.h(pe,E-(Oe.height+Ye)),z=Math.max(z,Oe.height+Ye),b=Math.max(b,Math.abs(pe));ue++}for(ue=0,Fe=pe,Ee=xe,le?(pe=E+re,xe=0):(pe=0,xe=E+re),Oe=0;Oe<ne;Oe++)if(Oe%2!==0){st=x[Oe],Ye=st.Da;var pt=ue===0?0:oe;if(le){var xt=a.computeBusNodeSpacing(st)-re;xe-=pt+Ye.height,st.S.h(pe+xt,xe),b=Math.max(b,pe+Ye.width+xt),z=Math.max(z,Math.abs(xe))}else xt=a.computeBusNodeSpacing(st)-re,pe-=pt+Ye.width,st.S.h(pe,xe+xt),z=Math.max(z,xe+Ye.height+xt),b=Math.max(b,Math.abs(pe));ue++}for(1<ne&&ne%2===1&&(oe=x[ne-1],ue=oe.Da,a=a.computeBusLastRowSpacing(oe,le?Math.max(Math.abs(Ee),Math.abs(xe)):Math.max(Math.abs(Fe),Math.abs(pe))),le?(oe.S.h(E+re/2-oe.focus.x-oe.la.x,-z-ue.height-a),pe=E+re/2-oe.focus.x-oe.la.x,b=Math.max(b,pe+ue.width),0>pe&&(b-=pe),z=Math.max(z,Math.abs(Math.min(Ee,xe))+a+ue.height),0>oe.S.x&&(E=D0(y,oe.S.x,!1,E,re))):(oe.S.h(-b-ue.width-a,E+re/2-oe.focus.y-oe.la.y),b=Math.max(b,Math.abs(Math.min(Fe,pe))+a+ue.width),xe=E+re/2-oe.focus.y-oe.la.y,z=Math.max(z,xe+ue.height),0>xe&&(z-=xe),0>oe.S.y&&(E=D0(y,oe.S.y,!0,E,re)))),y=0;y<ne;y++)re=x[y],le?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+b,re.S.y);return new pn(E,0,b,z)}Zr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Zr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function D0(a,y,x,E,b){a=a.children;for(var z=a.length,ne=0;ne<z;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function By(a,y,x){switch(a.alignment){case jf:case Tg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ic:return a.width>y?a.width:y;case rc:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Vc:case oc:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Uc:return a.width-a.focus.x+a.nodeSpacing/2+y;case Sc:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case jf:case Tg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ic:return a.height>y?a.height:y;case rc:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Vc:case oc:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Uc:return a.height-a.focus.y+a.nodeSpacing/2+y;case Sc:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function ky(a,y,x){switch(a){case Tg:y/=2,x/=2;break;case jf:y/=2,x/=2;break;case ic:x=y=0;break;case rc:break;default:St("Unhandled alignment value "+a.toString())}return new tt(y,x)}function sf(a,y,x,E,b,z){y=ky(y,x,E),If(a,y.x,y.y,b,z)}function If(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function O0(a,y,x,E){var b=y.parent;switch(a.ud){case nc:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Rf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:St("Unhandled path value "+a.ud.toString())}}function I0(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function dx(a,y,x,E,b,z,ne,re){var oe=uh(y),le=oe===90||oe===270,ue=y.nodeSpacing;y=E;var pe=b;E=z;var xe=ne,Ee=x.Yo,Fe=x.kp;ne=x.Da;var Oe=le?Math.max(xe,ne.height):Math.max(E,ne.width);if((Ee===null||oe!==uh(x))&&(Ee=Hl(a,2),Fe=Hl(a,2),le?(Ee[0].h(0,0),Ee[1].h(0,ne.height),Fe[0].h(ne.width,0),Fe[1].h(Fe[0].x,Ee[1].y)):(Ee[0].h(0,0),Ee[1].h(ne.width,0),Fe[0].h(0,ne.height),Fe[1].h(Ee[1].x,Fe[0].y))),le){if(xe=9999999,!(pe===null||2>pe.length||Ee===null||2>Ee.length))for(b=x=0;x<pe.length&&b<Ee.length;){z=pe[x];var st=Ee[b];oe=st.x,le=st.y,oe+=E;var Ye=z;x+1<pe.length&&(Ye=pe[x+1]);var pt=st;st=pt.x,pt=pt.y,b+1<Ee.length&&(pt=Ee[b+1],st=pt.x,pt=pt.y,st+=E);var xt=xe;z.y===le?xt=oe-z.x:z.y>le&&z.y<pt?xt=oe+(z.y-le)/(pt-le)*(st-oe)-z.x:le>z.y&&le<Ye.y&&(xt=oe-(z.x+(le-z.y)/(Ye.y-z.y)*(Ye.x-z.x))),xt<xe&&(xe=xt),Ye.y<=z.y?x++:pt<=le?b++:(Ye.y<=pt&&x++,pt<=Ye.y&&b++)}if(xe=E-xe,xe+=ue,x=Ee,b=xe,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ue=Hl(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].y<y[0].y;)le=x[z++],ue[E++].h(le.x+b,le.y);for(;oe<y.length;)le=y[oe++],ue[E++].h(le.x,le.y);for(oe=y[y.length-1].y;z<x.length&&x[z].y<=oe;)z++;for(;z<x.length&&x[z].y>oe;)le=x[z++],ue[E++].h(le.x+b,le.y);for(x=Hl(a,E),oe=0;oe<E;oe++)x[oe].assign(ue[oe]);xh(a,ue),E=x}if(z=Fe,oe=xe,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(ue=Hl(a,pe.length+z.length),b=le=x=0;x<pe.length&&pe[x].y<z[0].y;)Ye=pe[x++],ue[b++].h(Ye.x,Ye.y);for(;le<z.length;)Ye=z[le++],ue[b++].h(Ye.x+oe,Ye.y);for(z=z[z.length-1].y;x<pe.length&&pe[x].y<=z;)x++;for(;x<pe.length&&pe[x].y>z;)oe=pe[x++],ue[b++].h(oe.x,oe.y);for(z=Hl(a,b),x=0;x<b;x++)z[x].assign(ue[x]);xh(a,ue),b=z}return z=Math.max(0,xe)+ne.width,ne=Oe,xh(a,y),xh(a,Ee),xh(a,pe),xh(a,Fe),re[0]=E,re[1]=b,new pn(xe,0,z,ne)}if(E=9999999,!(pe===null||2>pe.length||Ee===null||2>Ee.length))for(b=x=0;x<pe.length&&b<Ee.length;)z=pe[x],st=Ee[b],oe=st.x,le=st.y,le+=xe,Ye=z,x+1<pe.length&&(Ye=pe[x+1]),pt=st,st=pt.x,pt=pt.y,b+1<Ee.length&&(pt=Ee[b+1],st=pt.x,pt=pt.y,pt+=xe),xt=E,z.x===oe?xt=le-z.y:z.x>oe&&z.x<st?xt=le+(z.x-oe)/(st-oe)*(pt-le)-z.y:oe>z.x&&oe<Ye.x&&(xt=le-(z.y+(oe-z.x)/(Ye.x-z.x)*(Ye.y-z.y))),xt<E&&(E=xt),Ye.x<=z.x?x++:st<=oe?b++:(Ye.x<=st&&x++,st<=Ye.x&&b++);if(xe-=E,xe+=ue,x=Ee,b=xe,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ue=Hl(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].x<y[0].x;)le=x[z++],ue[E++].h(le.x,le.y+b);for(;oe<y.length;)le=y[oe++],ue[E++].h(le.x,le.y);for(oe=y[y.length-1].x;z<x.length&&x[z].x<=oe;)z++;for(;z<x.length&&x[z].x>oe;)le=x[z++],ue[E++].h(le.x,le.y+b);for(x=Hl(a,E),oe=0;oe<E;oe++)x[oe].assign(ue[oe]);xh(a,ue),E=x}if(z=Fe,oe=xe,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(ue=Hl(a,pe.length+z.length),b=le=x=0;x<pe.length&&pe[x].x<z[0].x;)Ye=pe[x++],ue[b++].h(Ye.x,Ye.y);for(;le<z.length;)Ye=z[le++],ue[b++].h(Ye.x,Ye.y+oe);for(z=z[z.length-1].x;x<pe.length&&pe[x].x<=z;)x++;for(;x<pe.length&&pe[x].x>z;)oe=pe[x++],ue[b++].h(oe.x,oe.y);for(z=Hl(a,b),x=0;x<b;x++)z[x].assign(ue[x]);xh(a,ue),b=z}return z=Oe,ne=Math.max(0,xe)+ne.height,xh(a,y),xh(a,Ee),xh(a,pe),xh(a,Fe),re[0]=E,re[1]=b,new pn(xe,0,z,ne)}function Hl(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 tt;return a}function xh(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Zr.prototype.arrangeTrees=function(){if(this.Rb===Z0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Vu){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),Ay(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Vu&&a.push(x);switch(this.sorting){case Ag:break;case Kp:a.reverse();break;case Vp:a.sort(this.comparer);break;case Up:a.sort(this.comparer),a.reverse();break;default:St("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(Ay(this,b,y+b.la.x,x+b.la.y),this.Rb){case _0:x+=b.Da.height+this.$d.height;break;case Iy:y+=b.Da.width+this.$d.width;break;default:St("Unhandled arrangement value "+this.Rb.toString())}}}};function Ay(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var ne=y[z];Ay(a,ne,x+ne.S.x,E+ne.S.y)}}}Zr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Zr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Zr.prototype.Gu=function(){if(this.layerStyle===H0){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new tt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new tt(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)z+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var re=a[ne]+y[ne];this.angle===270?(z-=re,b.push(new pn(0,z,x,re))):this.angle===90?(b.push(new pn(0,z,x,re)),z+=re):this.angle===180?(z-=re,b.push(new pn(z,0,re,x))):(b.push(new pn(z,0,re,x)),z+=re)}this.commitLayers(b,E)}},Zr.prototype.commitLayers=function(){},Zr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Zr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Vu&&fx(this,y)}};function fx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)fx(a,y[E])}}Zr.prototype.setPortSpots=function(a){var y=a.alignment;if(Md(y)){var x=this.ud===nc,E=uh(a);switch(E){case 0:var b=rs;break;case 90:b=Va;break;case 180:b=_a;break;default:b=Aa}var z=a.children,ne=z.length;switch(y){case Vc:case oc:for(y=0;y<ne;y++){var re=z[y];if(re=(x?re.sourceEdges:re.destinationEdges).first(),re!==null&&(re=re.link,re!==null)){var oe=E===90||E===270?_a:Aa;if(ne===1||y===ne-1&&ne%2===1)switch(E){case 0:oe=_a;break;case 90:oe=Aa;break;case 180:oe=rs;break;default:oe=Va}else y%2===0&&(oe=E===90||E===270?rs:Va);x?(a.setsPortSpot&&(re.fromSpot=b),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=b))}}break;case Uc:for(E=E===90||E===270?rs:Va,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)):(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)));break;case Sc:for(E=E===90||E===270?_a:Aa,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)):(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)))}}else if(x=uh(a),this.ud===nc){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=rs;break;case 90:E.fromSpot=Va;break;case 180:E.fromSpot=_a;break;default:E.fromSpot=Aa}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=_a;break;case 90:E.toSpot=Aa;break;case 180:E.toSpot=rs;break;default:E.toSpot=Va}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=rs;break;case 90:E.toSpot=Va;break;case 180:E.toSpot=_a;break;default:E.toSpot=Aa}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=_a;break;case 90:E.fromSpot=Aa;break;case 180:E.fromSpot=rs;break;default:E.fromSpot=Va}else E.fromSpot=a.childPortSpot}};function uh(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Zr.prototype.computeLayerSpacing=function(a){var y=uh(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},Zr.prototype.computeNodeIndent=function(a){var y=uh(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},Ve.Object.defineProperties(Zr.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!==z0&&a!==Dy&&a!==Ty&&a!==Oy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==jy&&a!==H0||(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!==_0&&a!==Iy&&a!==Z0||(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!==Ag&&a!==Kp&&a!==Vp&&!Up||(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()):St("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!==j0&&a!==Yp||(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!==Ag&&a!==Kp&&a!==Vp&&!Up||(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!==j0&&a!==Yp||(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 R0=new fn(Zr,"PathDefault",-1),nc=new fn(Zr,"PathDestination",0),Rf=new fn(Zr,"PathSource",1),Ag=new fn(Zr,"SortingForwards",10),Kp=new fn(Zr,"SortingReverse",11),Vp=new fn(Zr,"SortingAscending",12),Up=new fn(Zr,"SortingDescending",13),Tg=new fn(Zr,"AlignmentCenterSubtrees",20),jf=new fn(Zr,"AlignmentCenterChildren",21),ic=new fn(Zr,"AlignmentStart",22),rc=new fn(Zr,"AlignmentEnd",23),Vc=new fn(Zr,"AlignmentBus",24),oc=new fn(Zr,"AlignmentBusBranching",25),Uc=new fn(Zr,"AlignmentTopLeftBus",26),Sc=new fn(Zr,"AlignmentBottomRightBus",27),j0=new fn(Zr,"CompactionNone",30),Yp=new fn(Zr,"CompactionBlock",31),z0=new fn(Zr,"StyleLayered",40),Ty=new fn(Zr,"StyleLastParents",41),Dy=new fn(Zr,"StyleAlternating",42),Oy=new fn(Zr,"StyleRootOnly",43),_0=new fn(Zr,"ArrangementVertical",50),Iy=new fn(Zr,"ArrangementHorizontal",51),Z0=new fn(Zr,"ArrangementFixedRoots",52),Ry=new fn(Zr,"LayerIndividual",60),jy=new fn(Zr,"LayerSiblings",61),H0=new fn(Zr,"LayerUniform",62);Zr.className="TreeLayout",Zr.PathDefault=R0,Zr.PathDestination=nc,Zr.PathSource=Rf,Zr.SortingForwards=Ag,Zr.SortingReverse=Kp,Zr.SortingAscending=Vp,Zr.SortingDescending=Up,Zr.AlignmentCenterSubtrees=Tg,Zr.AlignmentCenterChildren=jf,Zr.AlignmentStart=ic,Zr.AlignmentEnd=rc,Zr.AlignmentBus=Vc,Zr.AlignmentBusBranching=oc,Zr.AlignmentTopLeftBus=Uc,Zr.AlignmentBottomRightBus=Sc,Zr.CompactionNone=j0,Zr.CompactionBlock=Yp,Zr.StyleLayered=z0,Zr.StyleLastParents=Ty,Zr.StyleAlternating=Dy,Zr.StyleRootOnly=Oy,Zr.ArrangementVertical=_0,Zr.ArrangementHorizontal=Iy,Zr.ArrangementFixedRoots=Z0,Zr.LayerIndividual=Ry,Zr.LayerSiblings=jy,Zr.LayerUniform=H0;function zf(a){qo.call(this,a)}Dt(zf,qo),zf.prototype.createVertex=function(){return new Vu(this)},zf.prototype.createEdge=function(){return new Dg(this)},zf.className="TreeNetwork";function Vu(a){ps.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 tt(0,0),this.Da=new Xn(0,0),this.la=new tt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Ag,this.hd=ry,this.Kb=0,this.Jb=jf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Yp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Po,this.wr=!0,this.Dp=Po}Dt(Vu,ps),Vu.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)},Ve.Object.defineProperties(Vu.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)}}}),Vu.className="TreeVertex";function Dg(a){ql.call(this,a),this.$t=new tt(0,0)}Dt(Dg,ql),Dg.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case nc:x=this.fromVertex,E=this.toVertex;break;case Rf:x=this.toVertex,E=this.fromVertex;break;default:St("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=uh(x),ne=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===pu,le=a.isOrthogonal,ue;if(a.uh(),le||oe){for(ue=2;4<a.pointsCount;)a.pv(2);var pe=a.i(1),xe=a.i(2)}else{for(ue=1;3<a.pointsCount;)a.pv(1);pe=a.i(0),xe=a.i(a.pointsCount-1)}var Ee=a.i(a.pointsCount-1);z===0?(x.alignment===rc?(z=E.bottom+b.y,b.y===0&&pe.y>Ee.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.top+b.y,b.y===0&&pe.y<Ee.y-x.rowIndent&&(z=Math.max(z,Math.min(pe.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,oe?(a.m(ue,pe.x,z),ue++,a.m(ue,E.right+ne,z),ue++,a.m(ue,E.right+ne+(b.x-re)/3,z),ue++,a.m(ue,E.right+ne+2*(b.x-re)/3,z),ue++,a.m(ue,E.right+ne+(b.x-re),z),ue++,a.m(ue,xe.x,z)):(le&&(a.m(ue,E.right+ne/2,pe.y),ue++),a.m(ue,E.right+ne/2,z),ue++,a.m(ue,E.right+ne+b.x-(le?re/2:re),z),ue++,le&&a.m(ue,a.i(ue-1).x,xe.y))):z===90?(x.alignment===rc?(z=E.right+b.x,b.x===0&&pe.x>Ee.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.left+b.x,b.x===0&&pe.x<Ee.x-x.rowIndent&&(z=Math.max(z,Math.min(pe.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,oe?(a.m(ue,z,pe.y),ue++,a.m(ue,z,E.bottom+ne),ue++,a.m(ue,z,E.bottom+ne+(b.y-re)/3),ue++,a.m(ue,z,E.bottom+ne+2*(b.y-re)/3),ue++,a.m(ue,z,E.bottom+ne+(b.y-re)),ue++,a.m(ue,z,xe.y)):(le&&(a.m(ue,pe.x,E.bottom+ne/2),ue++),a.m(ue,z,E.bottom+ne/2),ue++,a.m(ue,z,E.bottom+ne+b.y-(le?re/2:re)),ue++,le&&a.m(ue,xe.x,a.i(ue-1).y))):z===180?(x.alignment===rc?(z=E.bottom+b.y,b.y===0&&pe.y>Ee.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.top+b.y,b.y===0&&pe.y<Ee.y-x.rowIndent&&(z=Math.max(z,Math.min(pe.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,oe?(a.m(ue,pe.x,z),ue++,a.m(ue,E.left-ne,z),ue++,a.m(ue,E.left-ne+(b.x+re)/3,z),ue++,a.m(ue,E.left-ne+2*(b.x+re)/3,z),ue++,a.m(ue,E.left-ne+(b.x+re),z),ue++,a.m(ue,xe.x,z)):(le&&(a.m(ue,E.left-ne/2,pe.y),ue++),a.m(ue,E.left-ne/2,z),ue++,a.m(ue,E.left-ne+b.x+(le?re/2:re),z),ue++,le&&a.m(ue,a.i(ue-1).x,xe.y))):z===270?(x.alignment===rc?(z=E.right+b.x,b.x===0&&pe.x>Ee.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===ic?(z=E.left+b.x,b.x===0&&pe.x<Ee.x-x.rowIndent&&(z=Math.max(z,Math.min(pe.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,oe?(a.m(ue,z,pe.y),ue++,a.m(ue,z,E.top-ne),ue++,a.m(ue,z,E.top-ne+(b.y+re)/3),ue++,a.m(ue,z,E.top-ne+2*(b.y+re)/3),ue++,a.m(ue,z,E.top-ne+(b.y+re)),ue++,a.m(ue,z,xe.y)):(le&&(a.m(ue,pe.x,E.top-ne/2),ue++),a.m(ue,z,E.top-ne/2),ue++,a.m(ue,z,E.top-ne+b.y+(le?re/2:re)),ue++,le&&a.m(ue,xe.x,a.i(ue-1).y))):St("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=uh(x),y!==uh(b)&&(ne=E.computeLayerSpacing(x),re=x.bounds,x=b.bounds,y===0&&x.left-re.right<ne+1||y===90&&x.top-re.bottom<ne+1||y===180&&re.left-x.right<ne+1||y===270&&re.top-x.bottom<ne+1||(a.vg(),x=a.curve===pu,b=a.isOrthogonal,E=Md(this.fromVertex.alignment),a.uh(),y===0?(y=re.right+ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=re.bottom+ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=re.left-ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=re.top-ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},Ve.Object.defineProperties(Dg.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)}}}),Dg.className="TreeEdge",Vr.prototype.initializeStandardTools=function(){this.gb("Action",new Cr,this.mouseDownTools),this.gb("Relinking",new yi,this.mouseDownTools),this.gb("LinkReshaping",new bi,this.mouseDownTools),this.gb("Rotating",new Ur,this.mouseDownTools),this.gb("Resizing",new pr,this.mouseDownTools),this.gb("Linking",new Nn,this.mouseMoveTools),this.gb("Dragging",new aa,this.mouseMoveTools),this.gb("DragSelecting",new xr,this.mouseMoveTools),this.gb("Panning",new Vi,this.mouseMoveTools),this.gb("ContextMenu",new So,this.mouseUpTools),this.gb("TextEditing",new ao,this.mouseUpTools),this.gb("ClickCreating",new _r,this.mouseUpTools),this.gb("ClickSelecting",new jo,this.mouseUpTools)},Ih("Horizontal",new vm),Ih("Spot",new Sm),Ih("Table",new Pm),Ih("Viewbox",new Em),Ih("TableRow",new wm),Ih("TableColumn",new Cm),Ih("Graduated",new cp),Ih("Grid",new hp),ig.add("GraphLinksModel",Cs),ig.add("TreeModel",Au);var W0=rt.go,zy={get licenseKey(){return qt.licenseKey},set licenseKey(a){qt.licenseKey=a},get version(){return qt.version},Group:fr,EnumValue:fn,List:Mn,Set:Ln,Map:xi,Point:tt,Size:Xn,Rect:pn,Margin:Di,Spot:Ei,Geometry:vn,PathFigure:co,PathSegment:Zi,InputEvent:ur,DiagramEvent:sr,ChangedEvent:Ri,Model:Mi,GraphLinksModel:eo,TreeModel:yl,Binding:Ja,Transaction:Lr,UndoManager:Do,CommandHandler:at,Tool:Gi,DraggingTool:aa,DraggingInfo:fc,DraggingOptions:ae,LinkingBaseTool:Wt,LinkingTool:Nn,RelinkingTool:yi,LinkReshapingTool:bi,ResizingTool:pr,RotatingTool:Ur,ClickSelectingTool:jo,ActionTool:Cr,ClickCreatingTool:_r,HTMLInfo:Nr,ContextMenuTool:So,DragSelectingTool:xr,PanningTool:Vi,TextEditingTool:ao,ToolManager:Vr,Animation:ba,AnimationManager:wa,AnimationTrigger:Xl,Layer:fa,Diagram:qt,Palette:ge,Overview:ye,Brush:Ao,GraphObject:Rt,Panel:Hn,RowColumnDefinition:us,Shape:Mr,TextBlock:Qo,Picture:kl,Part:Oi,Adornment:ho,Node:ai,Link:Kn,Placeholder:gl,Layout:da,LayoutNetwork:qo,LayoutVertex:ps,LayoutEdge:ql,GridLayout:Ds,PanelLayout:gs,CircularLayout:xa,CircularNetwork:Bg,CircularVertex:zp,CircularEdge:C0,ForceDirectedLayout:Ks,ForceDirectedNetwork:Of,ForceDirectedVertex:_p,ForceDirectedEdge:Zp,LayeredDigraphLayout:Io,LayeredDigraphNetwork:kg,LayeredDigraphVertex:Du,LayeredDigraphEdge:Gp,TreeLayout:Zr,TreeNetwork:zf,TreeVertex:Vu,TreeEdge:Dg};typeof W0=="object"&&W0.version&&ii("WARNING: a `go` object on the root object is already defined. "+("Debug"in W0?"debug ":"")+"version: "+W0.version+", replaced with version: "+zy.version),qt.prototype.go=zy,rt.go=zy,typeof Sn.exports=="object"&&(Sn.exports=typeof ve.g!="undefined"?ve.g.go:self.go)}();var ce=typeof ve.g!="undefined"?ve.g.go:self.go;const De=typeof ve.g!="undefined"?ve.g.go:self.go,ze=De.Group,Ct=De.EnumValue,_e=De.List,Ke=De.Set,Be=De.Map,mt=De.Point,ct=De.Size,Ze=De.Rect,Et=De.Margin,ht=De.Spot,dt=De.Geometry,Ae=De.PathFigure,te=De.PathSegment,ee=De.InputEvent,he=De.DiagramEvent,se=De.ChangedEvent,de=De.Model,me=De.GraphLinksModel,we=De.TreeModel,Me=De.Binding,be=De.Transaction,Ie=De.UndoManager,je=De.CommandHandler,qe=De.Tool,$e=De.DraggingTool,ft=De.DraggingInfo,Re=De.LinkingBaseTool,Tt=De.LinkingTool,et=De.RelinkingTool,bt=De.LinkReshapingTool,Bt=De.ResizingTool,Nt=De.RotatingTool,Zt=De.ClickSelectingTool,Ut=De.ActionTool,lt=De.ClickCreatingTool,Ge=De.HTMLInfo,kt=De.ContextMenuTool,un=De.DragSelectingTool,ln=De.PanningTool,Ft=De.TextEditingTool,$t=De.ToolManager,Qt=De.Animation,Bn=De.AnimationManager,on=De.AnimationTrigger,Cn=De.Layer,gt=De.Diagram,En=De.Palette,Vn=De.Overview,He=De.Brush,Ce=De.GraphObject,Pe=De.Panel,Ne=De.RowColumnDefinition,ke=De.Shape,Se=De.TextBlock,nt=De.TextBlockMetrics,Pt=De.Picture,Xe=De.Part,Je=De.Adornment,yt=De.Node,wt=De.Link,ot=De.Placeholder,It=De.Layout,sn=De.LayoutNetwork,Xt=De.LayoutVertex,Ht=De.LayoutEdge,xn=De.GridLayout,Dn=De.PanelLayout,cn=De.CircularLayout,Un=De.CircularNetwork,ti=De.CircularVertex,Wn=De.CircularEdge,Zn=De.ForceDirectedLayout,Jn=De.ForceDirectedNetwork,vi=De.ForceDirectedVertex,pi=De.ForceDirectedEdge,zi=De.LayeredDigraphLayout,$i=De.LayeredDigraphNetwork,Yn=De.LayeredDigraphVertex,Gn=De.LayeredDigraphEdge,oi=De.TreeLayout,Li=De.TreeNetwork,di=De.TreeVertex,gr=De.TreeEdge,Ii=De.version},24334:function(Sn,an,ve){var ce,De;(function(ze,Ct){Sn.exports=Ct(ze)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ve.g!="undefined"?ve.g:this,function(ze){"use strict";ze=ze||{};var Ct=ze.Base64,_e="2.6.4",Ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Be=function(et){for(var bt={},Bt=0,Nt=et.length;Bt<Nt;Bt++)bt[et.charAt(Bt)]=Bt;return bt}(Ke),mt=String.fromCharCode,ct=function(et){if(et.length<2){var bt=et.charCodeAt(0);return bt<128?et:bt<2048?mt(192|bt>>>6)+mt(128|bt&63):mt(224|bt>>>12&15)+mt(128|bt>>>6&63)+mt(128|bt&63)}else{var bt=65536+(et.charCodeAt(0)-55296)*1024+(et.charCodeAt(1)-56320);return mt(240|bt>>>18&7)+mt(128|bt>>>12&63)+mt(128|bt>>>6&63)+mt(128|bt&63)}},Ze=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Et=function(et){return et.replace(Ze,ct)},ht=function(et){var bt=[0,2,1][et.length%3],Bt=et.charCodeAt(0)<<16|(et.length>1?et.charCodeAt(1):0)<<8|(et.length>2?et.charCodeAt(2):0),Nt=[Ke.charAt(Bt>>>18),Ke.charAt(Bt>>>12&63),bt>=2?"=":Ke.charAt(Bt>>>6&63),bt>=1?"=":Ke.charAt(Bt&63)];return Nt.join("")},dt=ze.btoa&&typeof ze.btoa=="function"?function(et){return ze.btoa(et)}:function(et){if(et.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return et.replace(/[\s\S]{1,3}/g,ht)},Ae=function(et){return dt(Et(String(et)))},te=function(et){return et.replace(/[+\/]/g,function(bt){return bt=="+"?"-":"_"}).replace(/=/g,"")},ee=function(et,bt){return bt?te(Ae(et)):Ae(et)},he=function(et){return ee(et,!0)},se;ze.Uint8Array&&(se=function(et,bt){for(var Bt="",Nt=0,Zt=et.length;Nt<Zt;Nt+=3){var Ut=et[Nt],lt=et[Nt+1],Ge=et[Nt+2],kt=Ut<<16|lt<<8|Ge;Bt+=Ke.charAt(kt>>>18)+Ke.charAt(kt>>>12&63)+(typeof lt!="undefined"?Ke.charAt(kt>>>6&63):"=")+(typeof Ge!="undefined"?Ke.charAt(kt&63):"=")}return bt?te(Bt):Bt});var de=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,me=function(et){switch(et.length){case 4:var bt=(7&et.charCodeAt(0))<<18|(63&et.charCodeAt(1))<<12|(63&et.charCodeAt(2))<<6|63&et.charCodeAt(3),Bt=bt-65536;return mt((Bt>>>10)+55296)+mt((Bt&1023)+56320);case 3:return mt((15&et.charCodeAt(0))<<12|(63&et.charCodeAt(1))<<6|63&et.charCodeAt(2));default:return mt((31&et.charCodeAt(0))<<6|63&et.charCodeAt(1))}},we=function(et){return et.replace(de,me)},Me=function(et){var bt=et.length,Bt=bt%4,Nt=(bt>0?Be[et.charAt(0)]<<18:0)|(bt>1?Be[et.charAt(1)]<<12:0)|(bt>2?Be[et.charAt(2)]<<6:0)|(bt>3?Be[et.charAt(3)]:0),Zt=[mt(Nt>>>16),mt(Nt>>>8&255),mt(Nt&255)];return Zt.length-=[0,0,2,1][Bt],Zt.join("")},be=ze.atob&&typeof ze.atob=="function"?function(et){return ze.atob(et)}:function(et){return et.replace(/\S{1,4}/g,Me)},Ie=function(et){return be(String(et).replace(/[^A-Za-z0-9\+\/]/g,""))},je=function(et){return we(be(et))},qe=function(et){return String(et).replace(/[-_]/g,function(bt){return bt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},$e=function(et){return je(qe(et))},ft;ze.Uint8Array&&(ft=function(et){return Uint8Array.from(Ie(qe(et)),function(bt){return bt.charCodeAt(0)})});var Re=function(){var et=ze.Base64;return ze.Base64=Ct,et};if(ze.Base64={VERSION:_e,atob:Ie,btoa:dt,fromBase64:$e,toBase64:ee,utob:Et,encode:ee,encodeURI:he,btou:we,decode:$e,noConflict:Re,fromUint8Array:se,toUint8Array:ft},typeof Object.defineProperty=="function"){var Tt=function(et){return{value:et,enumerable:!1,writable:!0,configurable:!0}};ze.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Tt(function(){return $e(this)})),Object.defineProperty(String.prototype,"toBase64",Tt(function(et){return ee(this,et)})),Object.defineProperty(String.prototype,"toBase64URI",Tt(function(){return ee(this,!0)}))}}return ze.Meteor&&(Base64=ze.Base64),Sn.exports?Sn.exports.Base64=ze.Base64:(ce=[],De=function(){return ze.Base64}.apply(an,ce),De!==void 0&&(Sn.exports=De)),{Base64:ze.Base64}})},2859:function(Sn,an,ve){"use strict";ve.d(an,{hP:function(){return Vn}});var ce=function(He,Ce){return(ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Pe,Ne){Pe.__proto__=Ne}||function(Pe,Ne){for(var ke in Ne)Object.prototype.hasOwnProperty.call(Ne,ke)&&(Pe[ke]=Ne[ke])})(He,Ce)};function De(He,Ce){function Pe(){this.constructor=He}ce(He,Ce),He.prototype=Ce===null?Object.create(Ce):(Pe.prototype=Ce.prototype,new Pe)}function ze(He,Ce,Pe,Ne){return new(Pe||(Pe=Promise))(function(ke,Se){function nt(Je){try{Xe(Ne.next(Je))}catch(yt){Se(yt)}}function Pt(Je){try{Xe(Ne.throw(Je))}catch(yt){Se(yt)}}function Xe(Je){var yt;Je.done?ke(Je.value):(yt=Je.value,yt instanceof Pe?yt:new Pe(function(wt){wt(yt)})).then(nt,Pt)}Xe((Ne=Ne.apply(He,Ce||[])).next())})}function Ct(He,Ce){var Pe,Ne,ke,Se,nt={label:0,sent:function(){if(1&ke[0])throw ke[1];return ke[1]},trys:[],ops:[]};return Se={next:Pt(0),throw:Pt(1),return:Pt(2)},typeof Symbol=="function"&&(Se[Symbol.iterator]=function(){return this}),Se;function Pt(Xe){return function(Je){return function(yt){if(Pe)throw new TypeError("Generator is already executing.");for(;nt;)try{if(Pe=1,Ne&&(ke=2&yt[0]?Ne.return:yt[0]?Ne.throw||((ke=Ne.return)&&ke.call(Ne),0):Ne.next)&&!(ke=ke.call(Ne,yt[1])).done)return ke;switch(Ne=0,ke&&(yt=[2&yt[0],ke.value]),yt[0]){case 0:case 1:ke=yt;break;case 4:return nt.label++,{value:yt[1],done:!1};case 5:nt.label++,Ne=yt[1],yt=[0];continue;case 7:yt=nt.ops.pop(),nt.trys.pop();continue;default:if(ke=nt.trys,!((ke=ke.length>0&&ke[ke.length-1])||yt[0]!==6&&yt[0]!==2)){nt=0;continue}if(yt[0]===3&&(!ke||yt[1]>ke[0]&&yt[1]<ke[3])){nt.label=yt[1];break}if(yt[0]===6&&nt.label<ke[1]){nt.label=ke[1],ke=yt;break}if(ke&&nt.label<ke[2]){nt.label=ke[2],nt.ops.push(yt);break}ke[2]&&nt.ops.pop(),nt.trys.pop();continue}yt=Ce.call(He,nt)}catch(wt){yt=[6,wt],Ne=0}finally{Pe=ke=0}if(5&yt[0])throw yt[1];return{value:yt[0]?yt[1]:void 0,done:!0}}([Xe,Je])}}}function _e(){for(var He=0,Ce=0,Pe=arguments.length;Ce<Pe;Ce++)He+=arguments[Ce].length;var Ne=Array(He),ke=0;for(Ce=0;Ce<Pe;Ce++)for(var Se=arguments[Ce],nt=0,Pt=Se.length;nt<Pt;nt++,ke++)Ne[ke]=Se[nt];return Ne}var Ke=function(){function He(){}return He.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},He.setAttributes=function(Ce,Pe){for(var Ne=0,ke=Pe;Ne<ke.length;Ne++){var Se=ke[Ne],nt=Se[0],Pt=Se[1];Ce.setAttribute(nt,Pt)}},He.createRect=function(Ce,Pe,Ne){var ke=document.createElementNS("http://www.w3.org/2000/svg","rect");return ke.setAttribute("width",Ce.toString()),ke.setAttribute("height",Pe.toString()),Ne&&He.setAttributes(ke,Ne),ke},He.createLine=function(Ce,Pe,Ne,ke,Se){var nt=document.createElementNS("http://www.w3.org/2000/svg","line");return nt.setAttribute("x1",Ce.toString()),nt.setAttribute("y1",Pe.toString()),nt.setAttribute("x2",Ne.toString()),nt.setAttribute("y2",ke.toString()),Se&&He.setAttributes(nt,Se),nt},He.createPolygon=function(Ce,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ne.setAttribute("points",Ce),Pe&&He.setAttributes(Ne,Pe),Ne},He.createCircle=function(Ce,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ne.setAttribute("cx",(Ce/2).toString()),Ne.setAttribute("cy",(Ce/2).toString()),Ne.setAttribute("r",Ce.toString()),Pe&&He.setAttributes(Ne,Pe),Ne},He.createEllipse=function(Ce,Pe,Ne){var ke=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ke.setAttribute("cx",(Ce/2).toString()),ke.setAttribute("cy",(Pe/2).toString()),ke.setAttribute("rx",(Ce/2).toString()),ke.setAttribute("ry",(Pe/2).toString()),Ne&&He.setAttributes(ke,Ne),ke},He.createGroup=function(Ce){var Pe=document.createElementNS("http://www.w3.org/2000/svg","g");return Ce&&He.setAttributes(Pe,Ce),Pe},He.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},He.createMarker=function(Ce,Pe,Ne,ke,Se,nt,Pt){var Xe=document.createElementNS("http://www.w3.org/2000/svg","marker");return He.setAttributes(Xe,[["id",Ce],["orient",Pe],["markerWidth",Ne.toString()],["markerHeight",ke.toString()],["refX",Se.toString()],["refY",nt.toString()]]),Xe.appendChild(Pt),Xe},He.createText=function(Ce){var Pe=document.createElementNS("http://www.w3.org/2000/svg","text");return Pe.setAttribute("x","0"),Pe.setAttribute("y","0"),Ce&&He.setAttributes(Pe,Ce),Pe},He.createTSpan=function(Ce,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ne.textContent=Ce,Pe&&He.setAttributes(Ne,Pe),Ne},He.createImage=function(Ce){var Pe=document.createElementNS("http://www.w3.org/2000/svg","image");return Ce&&He.setAttributes(Pe,Ce),Pe},He.createPoint=function(Ce,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ne.x=Ce,Ne.y=Pe,Ne},He.createPath=function(Ce,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","path");return Ne.setAttribute("d",Ce),Pe&&He.setAttributes(Ne,Pe),Ne},He}(),Be=function(){function He(){}return He.addKey=function(Ce){He.key=Ce},Object.defineProperty(He,"isLicensed",{get:function(){return!!He.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(He.key)},enumerable:!1,configurable:!0}),He}(),mt=function(){function He(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return He.prototype.rasterize=function(Ce,Pe,Ne){var ke=this;return new Promise(function(Se){var nt=Ne!==void 0?Ne:document.createElement("canvas");Ce===null&&(ke.markersOnly=!0,ke.naturalSize=!1);var Pt=document.createElementNS("http://www.w3.org/2000/svg","svg");Pt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Pt.setAttribute("width",Pe.width.baseVal.valueAsString),Pt.setAttribute("height",Pe.height.baseVal.valueAsString),Pt.setAttribute("viewBox","0 0 "+Pe.viewBox.baseVal.width.toString()+" "+Pe.viewBox.baseVal.height.toString()),Pt.innerHTML=Pe.innerHTML,ke.naturalSize===!0?(Pt.width.baseVal.value=Ce.naturalWidth,Pt.height.baseVal.value=Ce.naturalHeight):ke.width!==void 0&&ke.height!==void 0&&(Pt.width.baseVal.value=ke.width,Pt.height.baseVal.value=ke.height),nt.width=Pt.width.baseVal.value,nt.height=Pt.height.baseVal.value;var Xe=Pt.outerHTML,Je=nt.getContext("2d");ke.markersOnly!==!0&&Je.drawImage(Ce,0,0,nt.width,nt.height);var yt=window.URL,wt=new Image(nt.width,nt.height);wt.setAttribute("crossOrigin","anonymous");var ot=new Blob([Xe],{type:"image/svg+xml"}),It=yt.createObjectURL(ot);wt.onload=function(){Je.drawImage(wt,0,0),yt.revokeObjectURL(It);var sn=nt.toDataURL(ke.imageType,ke.imageQuality);Se(sn)},wt.src=It})},He}(),ct=function(){},Ze=function(){function He(Ce){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ce+"_"}return Object.defineProperty(He.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(He.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(He.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),He.prototype.addClass=function(Ce){return this.styleSheet===void 0&&this.addStyleSheet(),Ce.name=""+this.classNamePrefix+Ce.localName,this.classes.push(Ce),this.styleSheet.sheet.insertRule("."+Ce.name+" {"+Ce.style+"}",this.styleSheet.sheet.cssRules.length),Ce},He.prototype.addRule=function(Ce){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ce),this.styleSheet.sheet.insertRule(Ce.selector+" {"+Ce.style+"}",this.styleSheet.sheet.cssRules.length)},He.prototype.addStyleSheet=function(){var Ce;this.styleSheet=document.createElement("style"),((Ce=this.styleSheetRoot)!==null&&Ce!==void 0?Ce:document.head).appendChild(this.styleSheet),this.addRule(new Et("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Et("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Et("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ht("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ht("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},He.prototype.removeStyleSheet=function(){var Ce;this.styleSheet&&(((Ce=this.styleSheetRoot)!==null&&Ce!==void 0?Ce:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},He}(),Et=function(He,Ce){this.selector=He,this.style=Ce},ht=function(He,Ce){this.localName=He,this.style=Ce},dt=function(){function He(Ce,Pe,Ne,ke,Se){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ce,this.displayMode=Pe,this.markerItems=Ne,this.uiStyleSettings=ke,this.styles=Se,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return He.prototype.show=function(Ce){var Pe=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ce,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ne=document.createElement("div");Ne.className=this.toolbarBlockStyleClass.name,Ne.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ne),this.addActionButton(Ne,'<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(Ne,'<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(Ne,'<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(Ne,'<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(Ne,'<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(Ne,'<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(Ne,'<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(Ne,'<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(Se){var nt=document.createElement("div");nt.className=""+Pe.toolbarButtonStyleClass.name,nt.setAttribute("data-type-name",Se.typeName),nt.innerHTML=Se.icon,nt.addEventListener("click",function(){Pe.markerToolbarButtonClicked(nt,Se)}),Pe.buttons.push(nt),Pe.markerButtons.push(nt)}),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 ke=document.createElement("div");ke.className=this.toolbarBlockStyleClass.name,ke.style.whiteSpace="nowrap",ke.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ke),this.addActionButton(ke,'<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(ke,'<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()},He.prototype.addButtonClickListener=function(Ce){this.buttonClickListeners.push(Ce)},He.prototype.removeButtonClickListener=function(Ce){this.buttonClickListeners.indexOf(Ce)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ce),1)},He.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},He.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ce=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Pe=0;Pe<this.markerButtons.length;Pe++)Pe<Ce||Pe===Ce&&this.markerButtons.length-1===Ce?this.markerButtonBlock.appendChild(this.markerButtons[Pe]):(Pe===Ce&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Pe]))}},He.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")},He.prototype.resetButtonStyles=function(){var Ce=this;this.buttons.forEach(function(Pe){Pe.className=Pe.className.replace(Ce.uiStyleSettings.toolbarButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarButtonStyleColorsClassName:Ce.toolbarButtonStyleColorsClass.name,"").trim(),Pe.className=Pe.className.replace(Ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ce.toolbarActiveButtonStyleColorsClass.name,"").trim(),Pe.className+=" "+(Ce.uiStyleSettings.toolbarButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarButtonStyleColorsClassName:Ce.toolbarButtonStyleColorsClass.name)})},He.prototype.addActionButton=function(Ce,Pe,Ne){var ke=this,Se=document.createElement("div");switch(Se.className=""+this.toolbarButtonStyleClass.name,Se.innerHTML=Pe,Se.setAttribute("data-action",Ne),Se.addEventListener("click",function(){ke.actionToolbarButtonClicked(Se,Ne)}),Ne){case"select":Se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Se.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Se.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Se.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Se.style.fill=this.uiStyleSettings.closeButtonColor}Ce.appendChild(Se),this.buttons.push(Se)},He.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ht("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 ht("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ht("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ht("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 ht("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Ce=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ht("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Ce)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Ce)+`px;
padding: `+Ce+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ht("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ht("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Et("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Et("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},He.prototype.markerToolbarButtonClicked=function(Ce,Pe){this.setActiveButton(Ce),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ne){return Ne("marker",Pe)}),this.markerButtonOverflowBlock.style.display="none"},He.prototype.actionToolbarButtonClicked=function(Ce,Pe){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ne){return Ne("action",Pe)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},He.prototype.setActiveButton=function(Ce){this.resetButtonStyles(),Ce.className=Ce.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ce.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},He.prototype.setActiveMarkerButton=function(Ce){var Pe=this.markerButtons.find(function(Ne){return Ne.getAttribute("data-type-name")===Ce});Pe&&this.setActiveButton(Pe)},He.prototype.setCurrentMarker=function(Ce){var Pe=this;this.currentMarker=Ce,this.buttons.filter(function(Ne){return/delete|notes/.test(Ne.getAttribute("data-action"))}).forEach(function(Ne){Pe.currentMarker===void 0?(Ne.style.fillOpacity="0.4",Ne.style.pointerEvents="none"):(Ne.style.fillOpacity="1",Ne.style.pointerEvents="all")})},He}(),Ae=function(){function He(Ce,Pe,Ne,ke){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ce,this.displayMode=Pe,this.uiStyleSettings=Ne,this.styles=ke,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return He.prototype.addStyles=function(){var Ce;this.toolboxStyleClass=this.styles.addClass(new ht("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 ht("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Pe=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ht("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ht("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ht("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 ht("toolbox-panel-row_colors",`
background-color: `+((Ce=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ce!==void 0?Ce:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ht("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
padding: `+Pe+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ht("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ht("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Et("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Et("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},He.prototype.show=function(Ce){var Pe;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ce,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},He.prototype.setPanelButtons=function(Ce){var Pe,Ne,ke=this;this.panels=Ce,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Se){var nt;Se.uiStyleSettings=ke.uiStyleSettings;var Pt=document.createElement("div");Pt.className=ke.toolboxButtonStyleClass.name+" "+((nt=ke.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&nt!==void 0?nt:ke.toolboxButtonStyleColorsClass.name),Pt.innerHTML=Se.icon,Pt.title=Se.title,Pt.addEventListener("click",function(){ke.panelButtonClick(Se)}),ke.panelButtons.push(Pt),ke.buttonRow.appendChild(Pt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},He.prototype.panelButtonClick=function(Ce){var Pe=this,Ne=-1;if(Ce!==this.activePanel){Ne=this.panels.indexOf(Ce),this.panelRow.innerHTML="";var ke=Ce.getUi();ke.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ke),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=Ce}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Pe.displayMode==="inline"?Pe.panelRow.style.display="none":Pe.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Se,nt){var Pt,Xe;Se.className=Pe.toolboxButtonStyleClass.name+" "+(nt===Ne?""+((Pt=Pe.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Pt!==void 0?Pt:Pe.toolboxActiveButtonStyleColorsClass.name):""+((Xe=Pe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xe!==void 0?Xe:Pe.toolboxButtonStyleColorsClass.name))})},He}(),te=function(He,Ce){this.title=He,this.icon=Ce},ee=function(He){function Ce(Pe,Ne,ke,Se){var nt=He.call(this,Pe,Se||'<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 nt.colors=[],nt.addTransparent=!1,nt.colorBoxes=[],nt.colors=Ne,nt.currentColor=ke,nt.setCurrentColor=nt.setCurrentColor.bind(nt),nt.getColorBox=nt.getColorBox.bind(nt),nt}return De(Ce,He),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.overflow="hidden",Ne.style.whiteSpace="nowrap",this.colors.forEach(function(ke){var Se=Pe.getColorBox(ke);Ne.appendChild(Se),Pe.colorBoxes.push(Se)}),Ne},Ce.prototype.getColorBox=function(Pe){var Ne=this,ke=this.uiStyleSettings.toolbarHeight/4,Se=this.uiStyleSettings.toolbarHeight-ke,nt=document.createElement("div");nt.style.display="inline-block",nt.style.boxSizing="content-box",nt.style.width=Se-2+"px",nt.style.height=Se-2+"px",nt.style.padding="1px",nt.style.marginRight="2px",nt.style.marginBottom="2px",nt.style.borderWidth="2px",nt.style.borderStyle="solid",nt.style.borderRadius=(Se+2)/2+"px",nt.style.borderColor=Pe===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){Ne.setCurrentColor(Pe,nt)});var Pt=document.createElement("div");return Pt.style.display="inline-block",Pt.style.width=Se-2+"px",Pt.style.height=Se-2+"px",Pt.style.backgroundColor=Pe,Pt.style.borderRadius=Se/2+"px",Pe==="transparent"&&(Pt.style.fill=this.uiStyleSettings.toolboxAccentColor,Pt.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>`),nt.appendChild(Pt),nt},Ce.prototype.setCurrentColor=function(Pe,Ne){var ke=this;this.currentColor=Pe,this.colorBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Pe)},Ce}(te),he=function(){function He(Ce,Pe,Ne){this._state="new",this._isSelected=!1,this._container=Ce,this._overlayContainer=Pe,this.globalSettings=Ne,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(He.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),He.prototype.ownsTarget=function(Ce){return!1},Object.defineProperty(He.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),He.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},He.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},He.prototype.pointerDown=function(Ce,Pe){},He.prototype.dblClick=function(Ce,Pe){},He.prototype.manipulate=function(Ce){},He.prototype.pointerUp=function(Ce){this.stateChanged()},He.prototype.dispose=function(){},He.prototype.addMarkerVisualToContainer=function(Ce){this.container.childNodes.length>0?this.container.insertBefore(Ce,this.container.childNodes[0]):this.container.appendChild(Ce)},He.prototype.getState=function(){return{typeName:He.typeName,state:this.state,notes:this.notes}},He.prototype.restoreState=function(Ce){this._state=Ce.state,this.notes=Ce.notes},He.prototype.scale=function(Ce,Pe){},He.prototype.colorChanged=function(Ce){this.onColorChanged&&this.onColorChanged(Ce),this.stateChanged()},He.prototype.fillColorChanged=function(Ce){this.onFillColorChanged&&this.onFillColorChanged(Ce),this.stateChanged()},He.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ce=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ce.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ce)&&this.onStateChanged(this)}},He.typeName="MarkerBase",He}(),se=function(){function He(){this.findGripByVisual=this.findGripByVisual.bind(this)}return He.prototype.findGripByVisual=function(Ce){return this.topLeft.ownsTarget(Ce)?this.topLeft:this.topCenter.ownsTarget(Ce)?this.topCenter:this.topRight.ownsTarget(Ce)?this.topRight:this.centerLeft.ownsTarget(Ce)?this.centerLeft:this.centerRight.ownsTarget(Ce)?this.centerRight:this.bottomLeft.ownsTarget(Ce)?this.bottomLeft:this.bottomCenter.ownsTarget(Ce)?this.bottomCenter:this.bottomRight.ownsTarget(Ce)?this.bottomRight:void 0},He}(),de=function(){function He(){this.GRIP_SIZE=10,this.visual=Ke.createGroup(),this.visual.appendChild(Ke.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ke.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return He.prototype.ownsTarget=function(Ce){return Ce===this.visual||Ce===this.visual.childNodes[0]||Ce===this.visual.childNodes[1]},He}(),me=function(){function He(){}return He.toITransformMatrix=function(Ce){return{a:Ce.a,b:Ce.b,c:Ce.c,d:Ce.d,e:Ce.e,f:Ce.f}},He.toSVGMatrix=function(Ce,Pe){return Ce.a=Pe.a,Ce.b=Pe.b,Ce.c=Pe.c,Ce.d=Pe.d,Ce.e=Pe.e,Ce.f=Pe.f,Ce},He}(),we=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.left=0,Se.top=0,Se.width=0,Se.height=0,Se.defaultSize={x:50,y:20},Se.offsetX=0,Se.offsetY=0,Se.rotationAngle=0,Se.CB_DISTANCE=10,Se._suppressMarkerCreateEvent=!1,Se.container.transform.baseVal.appendItem(Ke.createTransform()),Se.setupControlBox(),Se}return De(Ce,He),Object.defineProperty(Ce.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"visual",{get:function(){return this._visual},set:function(Pe){this._visual=Pe;var Ne=Ke.createTransform();this._visual.transform.baseVal.appendItem(Ne)},enumerable:!1,configurable:!0}),Ce.prototype.ownsTarget=function(Pe){return!!He.prototype.ownsTarget.call(this,Pe)||!!(this.controlGrips.findGripByVisual(Pe)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Pe))},Ce.prototype.pointerDown=function(Pe,Ne){He.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.left=Pe.x,this.top=Pe.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ke=this.unrotatePoint(Pe);if(this.manipulationStartX=ke.x,this.manipulationStartY=ke.y,this.offsetX=ke.x-this.left,this.offsetY=ke.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ne),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne)){this.activeGrip=this.rotatorGrip;var Se=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Se.x-this.width/2,this.top=Se.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var nt=this.container.transform.baseVal.getItem(0);nt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(nt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ce.prototype.pointerUp=function(Pe){var Ne=this.state;He.prototype.pointerUp.call(this,Pe),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Pe),this._state="select",Ne==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ce.prototype.moveVisual=function(Pe){this.visual.style.transform="translate("+Pe.x+"px, "+Pe.y+"px)"},Ce.prototype.manipulate=function(Pe){var Ne=this.unrotatePoint(Pe);this.state==="creating"?this.resize(Pe):this.state==="move"?(this.left=this.manipulationStartLeft+(Ne.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ne.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ne):this.state==="rotate"&&this.rotate(Pe)},Ce.prototype.resize=function(Pe){var Ne=this.manipulationStartLeft,ke=this.manipulationStartWidth,Se=this.manipulationStartTop,nt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ne=this.manipulationStartLeft+Pe.x-this.manipulationStartX,ke=this.manipulationStartWidth+this.manipulationStartLeft-Ne;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ke=this.manipulationStartWidth+Pe.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Se=this.manipulationStartTop+Pe.y-this.manipulationStartY,nt=this.manipulationStartHeight+this.manipulationStartTop-Se;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:nt=this.manipulationStartHeight+Pe.y-this.manipulationStartY}ke>=0?(this.left=Ne,this.width=ke):(this.left=Ne+ke,this.width=-ke),nt>=0?(this.top=Se,this.height=nt):(this.top=Se+nt,this.height=-nt),this.setSize()},Ce.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ce.prototype.rotate=function(Pe){if(Math.abs(Pe.x-this.centerX)>.1){var Ne=Math.sign(Pe.x-this.centerX);this.rotationAngle=180*Math.atan((Pe.y-this.centerY)/(Pe.x-this.centerX))/Math.PI+90*Ne,this.applyRotation()}},Ce.prototype.applyRotation=function(){var Pe=this.container.transform.baseVal.getItem(0);Pe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Pe,0)},Ce.prototype.rotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Ne=this.container.getCTM(),ke=Ke.createPoint(Pe.x,Pe.y);return{x:(ke=ke.matrixTransform(Ne)).x,y:ke.y}},Ce.prototype.unrotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Ne=this.container.getCTM();Ne=Ne.inverse();var ke=Ke.createPoint(Pe.x,Pe.y);return{x:(ke=ke.matrixTransform(Ne)).x,y:ke.y}},Ce.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ce.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},Ce.prototype.setupControlBox=function(){this.controlBox=Ke.createGroup();var Pe=Ke.createTransform();Pe.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Pe),this.container.appendChild(this.controlBox),this.controlRect=Ke.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=Ke.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 se,this.addControlGrips(),this.controlBox.style.display="none"},Ce.prototype.adjustControlBox=function(){var Pe=this.controlBox.transform.baseVal.getItem(0);Pe.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Pe,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()},Ce.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()},Ce.prototype.createGrip=function(){var Pe=new de;return Pe.visual.transform.baseVal.appendItem(Ke.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},Ce.prototype.positionGrips=function(){var Pe=this.controlGrips.topLeft.GRIP_SIZE,Ne=-Pe/2,ke=Ne,Se=(this.width+this.CB_DISTANCE)/2-Pe/2,nt=(this.height+this.CB_DISTANCE)/2-Pe/2,Pt=this.height+this.CB_DISTANCE-Pe/2,Xe=this.width+this.CB_DISTANCE-Pe/2;this.positionGrip(this.controlGrips.topLeft.visual,Ne,ke),this.positionGrip(this.controlGrips.topCenter.visual,Se,ke),this.positionGrip(this.controlGrips.topRight.visual,Xe,ke),this.positionGrip(this.controlGrips.centerLeft.visual,Ne,nt),this.positionGrip(this.controlGrips.centerRight.visual,Xe,nt),this.positionGrip(this.controlGrips.bottomLeft.visual,Ne,Pt),this.positionGrip(this.controlGrips.bottomCenter.visual,Se,Pt),this.positionGrip(this.controlGrips.bottomRight.visual,Xe,Pt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Se,ke-3*this.CB_DISTANCE)},Ce.prototype.positionGrip=function(Pe,Ne,ke){var Se=Pe.transform.baseVal.getItem(0);Se.setTranslate(Ne,ke),Pe.transform.baseVal.replaceItem(Se,0)},Ce.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ce.prototype.showControlBox=function(){this.controlBox.style.display=""},Ce.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:me.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:me.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},He.prototype.getState.call(this))},Ce.prototype.restoreState=function(Pe){He.prototype.restoreState.call(this,Pe);var Ne=Pe;this.left=Ne.left,this.top=Ne.top,this.width=Ne.width,this.height=Ne.height,this.rotationAngle=Ne.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(me.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ne.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(me.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ne.containerTransformMatrix))},Ce.prototype.scale=function(Pe,Ne){He.prototype.scale.call(this,Pe,Ne);var ke=this.rotatePoint({x:this.left,y:this.top}),Se=this.unrotatePoint({x:ke.x*Pe,y:ke.y*Ne});this.left=Se.x,this.top=Se.y,this.width=this.width*Pe,this.height=this.height*Ne,this.adjustControlBox()},Ce}(he),Me=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.fillColor="transparent",Se.strokeColor="transparent",Se.strokeWidth=0,Se.strokeDasharray="",Se.opacity=1,Se.setStrokeColor=Se.setStrokeColor.bind(Se),Se.setFillColor=Se.setFillColor.bind(Se),Se.setStrokeWidth=Se.setStrokeWidth.bind(Se),Se.setStrokeDasharray=Se.setStrokeDasharray.bind(Se),Se.createVisual=Se.createVisual.bind(Se),Se}return De(Ce,He),Ce.prototype.ownsTarget=function(Pe){return!(!He.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},Ce.prototype.createVisual=function(){this.visual=Ke.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)},Ce.prototype.pointerDown=function(Pe,Ne){He.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ce.prototype.manipulate=function(Pe){He.prototype.manipulate.call(this,Pe)},Ce.prototype.resize=function(Pe){He.prototype.resize.call(this,Pe),this.setSize()},Ce.prototype.setSize=function(){He.prototype.setSize.call(this),Ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ce.prototype.pointerUp=function(Pe){He.prototype.pointerUp.call(this,Pe),this.setSize()},Ce.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ce.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Ke.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ce.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this))},Ce.prototype.restoreState=function(Pe){var Ne=Pe;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.opacity=Ne.opacity,this.createVisual(),He.prototype.restoreState.call(this,Pe),this.setSize()},Ce.prototype.scale=function(Pe,Ne){He.prototype.scale.call(this,Pe,Ne),this.setSize()},Ce.title="Rectangle marker",Ce}(we),be=function(He){function Ce(Pe,Ne,ke,Se){var nt=He.call(this,Pe,Se||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return nt.widths=[],nt.widthBoxes=[],nt.widths=Ne,nt.currentWidth=ke,nt.setCurrentWidth=nt.setCurrentWidth.bind(nt),nt}return De(Ce,He),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.widths.forEach(function(ke){var Se=document.createElement("div");Se.style.display="flex",Se.style.flexGrow="2",Se.style.alignItems="center",Se.style.justifyContent="space-between",Se.style.padding="5px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.borderColor=ke===Pe.currentWidth?Pe.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){Pe.setCurrentWidth(ke,Se)}),Ne.appendChild(Se);var nt=document.createElement("div");nt.innerText=ke.toString(),nt.style.marginRight="5px",Se.appendChild(nt);var Pt=document.createElement("div");Pt.style.minHeight="20px",Pt.style.flexGrow="2",Pt.style.display="flex",Pt.style.alignItems="center";var Xe=document.createElement("hr");Xe.style.minWidth="20px",Xe.style.border="0px",Xe.style.borderTop=ke+"px solid "+Pe.uiStyleSettings.toolboxColor,Xe.style.flexGrow="2",Pt.appendChild(Xe),Se.appendChild(Pt),Pe.widthBoxes.push(Se)}),Ne},Ce.prototype.setCurrentWidth=function(Pe,Ne){var ke=this;this.currentWidth=Pe,this.widthBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ce}(te),Ie=function(He){function Ce(Pe,Ne,ke,Se){var nt=He.call(this,Pe,Se||'<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 nt.styles=[],nt.styleBoxes=[],nt.styles=Ne,nt.currentStyle=ke,nt.setCurrentStyle=nt.setCurrentStyle.bind(nt),nt}return De(Ce,He),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.styles.forEach(function(ke){var Se=document.createElement("div");Se.style.display="flex",Se.style.alignItems="center",Se.style.justifyContent="space-between",Se.style.padding="5px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.overflow="hidden",Se.style.maxWidth=100/Pe.styles.length-5+"%",Se.style.borderColor=ke===Pe.currentStyle?Pe.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){Pe.setCurrentStyle(ke,Se)}),Ne.appendChild(Se);var nt=document.createElement("div");nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.overflow="hidden";var Pt=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Pe.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ke!==""?'stroke-dasharray="'+ke+'"':"")+` />
</svg>`;nt.innerHTML=Pt,Se.appendChild(nt),Pe.styleBoxes.push(Se)}),Ne},Ce.prototype.setCurrentStyle=function(Pe,Ne){var ke=this;this.currentStyle=Pe,this.styleBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ce}(te),je=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.strokeColor=ke.defaultColor,Se.strokeWidth=ke.defaultStrokeWidth,Se.strokeDasharray=ke.defaultStrokeDasharray,Se.strokePanel=new ee("Line color",ke.defaultColorSet,ke.defaultColor),Se.strokePanel.onColorChanged=Se.setStrokeColor,Se.strokeWidthPanel=new be("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.strokeWidthPanel.onWidthChanged=Se.setStrokeWidth,Se.strokeStylePanel=new Ie("Line style",ke.defaultStrokeDasharrays,ke.defaultStrokeDasharray),Se.strokeStylePanel.onStyleChanged=Se.setStrokeDasharray,Se}return De(Ce,He),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=He.prototype.getState.call(this);return Pe.typeName=Ce.typeName,Pe},Ce.typeName="FrameMarker",Ce.title="Frame marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ce}(Me),qe=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"},$e=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.x1=0,Se.y1=0,Se.x2=0,Se.y2=0,Se.defaultLength=50,Se.manipulationStartX=0,Se.manipulationStartY=0,Se.manipulationStartX1=0,Se.manipulationStartY1=0,Se.manipulationStartX2=0,Se.manipulationStartY2=0,Se.setupControlBox(),Se}return De(Ce,He),Ce.prototype.ownsTarget=function(Pe){return!!He.prototype.ownsTarget.call(this,Pe)||!(!this.grip1.ownsTarget(Pe)&&!this.grip2.ownsTarget(Pe))},Ce.prototype.pointerDown=function(Pe,Ne){He.prototype.pointerDown.call(this,Pe,Ne),this.manipulationStartX=Pe.x,this.manipulationStartY=Pe.y,this.state==="new"&&(this.x1=Pe.x,this.y1=Pe.y,this.x2=Pe.x,this.y2=Pe.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(Ne)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ne)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ce.prototype.pointerUp=function(Pe){var Ne=this.state;He.prototype.pointerUp.call(this,Pe),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(Pe),this._state="select",Ne==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ce.prototype.adjustVisual=function(){},Ce.prototype.manipulate=function(Pe){this.state==="creating"?this.resize(Pe):this.state==="move"?(this.x1=this.manipulationStartX1+Pe.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Pe.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Pe.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Pe.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Pe)},Ce.prototype.resize=function(Pe){switch(this.activeGrip){case this.grip1:this.x1=Pe.x,this.y1=Pe.y;break;case this.grip2:case void 0:this.x2=Pe.x,this.y2=Pe.y}this.adjustVisual(),this.adjustControlBox()},Ce.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ce.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},Ce.prototype.setupControlBox=function(){this.controlBox=Ke.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ce.prototype.adjustControlBox=function(){this.positionGrips()},Ce.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ce.prototype.createGrip=function(){var Pe=new de;return Pe.visual.transform.baseVal.appendItem(Ke.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},Ce.prototype.positionGrips=function(){var Pe=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Pe/2,this.y1-Pe/2),this.positionGrip(this.grip2.visual,this.x2-Pe/2,this.y2-Pe/2)},Ce.prototype.positionGrip=function(Pe,Ne,ke){var Se=Pe.transform.baseVal.getItem(0);Se.setTranslate(Ne,ke),Pe.transform.baseVal.replaceItem(Se,0)},Ce.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},He.prototype.getState.call(this))},Ce.prototype.restoreState=function(Pe){He.prototype.restoreState.call(this,Pe);var Ne=Pe;this.x1=Ne.x1,this.y1=Ne.y1,this.x2=Ne.x2,this.y2=Ne.y2},Ce.prototype.scale=function(Pe,Ne){He.prototype.scale.call(this,Pe,Ne),this.x1=this.x1*Pe,this.y1=this.y1*Ne,this.x2=this.x2*Pe,this.y2=this.y2*Ne,this.adjustVisual(),this.adjustControlBox()},Ce}(he),ft=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.strokeColor="transparent",Se.strokeWidth=0,Se.strokeDasharray="",Se.setStrokeColor=Se.setStrokeColor.bind(Se),Se.setStrokeWidth=Se.setStrokeWidth.bind(Se),Se.setStrokeDasharray=Se.setStrokeDasharray.bind(Se),Se.strokeColor=ke.defaultColor,Se.strokeWidth=ke.defaultStrokeWidth,Se.strokeDasharray=ke.defaultStrokeDasharray,Se.strokePanel=new ee("Line color",ke.defaultColorSet,ke.defaultColor),Se.strokePanel.onColorChanged=Se.setStrokeColor,Se.strokeWidthPanel=new be("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.strokeWidthPanel.onWidthChanged=Se.setStrokeWidth,Se.strokeStylePanel=new Ie("Line style",ke.defaultStrokeDasharrays,ke.defaultStrokeDasharray),Se.strokeStylePanel.onStyleChanged=Se.setStrokeDasharray,Se}return De(Ce,He),Ce.prototype.ownsTarget=function(Pe){return!(!He.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorLine&&Pe!==this.visibleLine)},Ce.prototype.createVisual=function(){this.visual=Ke.createGroup(),this.selectorLine=Ke.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ke.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)},Ce.prototype.pointerDown=function(Pe,Ne){He.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ce.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()),Ke.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ke.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ke.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ce.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},Ce.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},Ce.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},He.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){He.prototype.restoreState.call(this,Pe);var Ne=Pe;this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.createVisual(),this.adjustVisual()},Ce.typeName="LineMarker",Ce.title="Line marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ce}($e),Re=function(He){function Ce(Pe,Ne,ke,Se){var nt=He.call(this,Pe,Se||'<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 nt.fonts=[],nt.fontBoxes=[],nt.fonts=Ne,nt.currentFont=ke,nt.setCurrentFont=nt.setCurrentFont.bind(nt),nt}return De(Ce,He),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.fonts.forEach(function(ke){var Se=document.createElement("div");Se.style.display="inline-block",Se.style.alignItems="center",Se.style.justifyContent="space-between",Se.style.padding="5px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.overflow="hidden",Se.style.maxWidth=100/Pe.fonts.length-5+"%",Se.style.borderColor=ke===Pe.currentFont?Pe.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){Pe.setCurrentFont(ke,Se)}),Ne.appendChild(Se);var nt=document.createElement("div");nt.style.display="flex",nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.fontFamily=ke,nt.style.overflow="hidden";var Pt=document.createElement("div");Pt.style.whiteSpace="nowrap",Pt.style.overflow="hidden",Pt.style.textOverflow="ellipsis",Pt.innerHTML="The quick brown fox jumps over the lazy dog",nt.appendChild(Pt),Se.appendChild(nt),Pe.fontBoxes.push(Se)}),Ne},Ce.prototype.setCurrentFont=function(Pe,Ne){var ke=this;this.currentFont=Pe,this.fontBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ce}(te),Tt=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.color="transparent",Se.padding=5,Se.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Se.text=Se.DEFAULT_TEXT,Se.isMoved=!1,Se.color=ke.defaultColor,Se.fontFamily=ke.defaultFontFamily,Se.defaultSize={x:100,y:30},Se.setColor=Se.setColor.bind(Se),Se.setFont=Se.setFont.bind(Se),Se.renderText=Se.renderText.bind(Se),Se.sizeText=Se.sizeText.bind(Se),Se.textEditDivClicked=Se.textEditDivClicked.bind(Se),Se.showTextEditor=Se.showTextEditor.bind(Se),Se.setSize=Se.setSize.bind(Se),Se.positionTextEditor=Se.positionTextEditor.bind(Se),Se.colorPanel=new ee("Color",ke.defaultColorSet,ke.defaultColor),Se.colorPanel.onColorChanged=Se.setColor,Se.fontFamilyPanel=new Re("Font",ke.defaultFontFamilies,ke.defaultFontFamily),Se.fontFamilyPanel.onFontChanged=Se.setFont,Se}return De(Ce,He),Ce.prototype.ownsTarget=function(Pe){if(He.prototype.ownsTarget.call(this,Pe)||Pe===this.visual||Pe===this.textElement||Pe===this.bgRectangle)return!0;var Ne=!1;return this.textElement.childNodes.forEach(function(ke){ke===Pe&&(Ne=!0)}),Ne},Ce.prototype.createVisual=function(){this.visual=Ke.createGroup(),this.bgRectangle=Ke.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ke.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ke.createTransform()),this.textElement.transform.baseVal.appendItem(Ke.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ce.prototype.pointerDown=function(Pe,Ne){He.prototype.pointerDown.call(this,Pe,Ne),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ce.prototype.renderText=function(){var Pe=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(Ne){Pe.textElement.appendChild(Ke.createTSpan(Ne.trim()===""?" ":Ne.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ce.prototype.getTextScale=function(){var Pe=this.textElement.getBBox(),Ne=1;if(Pe.width>0&&Pe.height>0){var ke=(1*this.width-this.width*this.padding*2/100)/Pe.width,Se=(1*this.height-this.height*this.padding*2/100)/Pe.height;Ne=Math.min(ke,Se)}return Ne},Ce.prototype.getTextPosition=function(Pe){var Ne=this.textElement.getBBox(),ke=0,Se=0;return Ne.width>0&&Ne.height>0&&(ke=(this.width-Ne.width*Pe)/2,Se=this.height/2-Ne.height*Pe/2),{x:ke,y:Se}},Ce.prototype.sizeText=function(){var Pe=this.textElement.getBBox(),Ne=this.getTextScale(),ke=this.getTextPosition(Ne);ke.y-=Pe.y*Ne,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ke.x+"px, "+ke.y+"px) scale("+Ne+", "+Ne+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ke.x,ke.y),this.textElement.transform.baseVal.getItem(1).setScale(Ne,Ne))},Ce.prototype.manipulate=function(Pe){He.prototype.manipulate.call(this,Pe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Pe.x-this.pointerDownPoint.x)>5||Math.abs(Pe.y-this.pointerDownPoint.y)>5)},Ce.prototype.resize=function(Pe){He.prototype.resize.call(this,Pe),this.isMoved=!0,this.setSize(),this.sizeText()},Ce.prototype.setSize=function(){He.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ke.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ce.prototype.pointerUp=function(Pe){var Ne=this.state;Ne==="creating"&&(this._suppressMarkerCreateEvent=!0),He.prototype.pointerUp.call(this,Pe),this.setSize(),(Ne==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ce.prototype.showTextEditor=function(){var Pe=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(Ne){Ne.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ne=Number.parseFloat(Pe.textEditor.style.fontSize);Pe.textEditor.clientWidth>=Number.parseInt(Pe.textEditor.style.maxWidth)&&Ne>.9;)Ne-=.1,Pe.textEditor.style.fontSize=Math.max(Ne,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ne){Ne.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ne){if(Ne.clipboardData){var ke=Ne.clipboardData.getData("text"),Se=window.getSelection();if(!Se.rangeCount)return!1;Se.deleteFromDocument(),Se.getRangeAt(0).insertNode(document.createTextNode(ke)),Ne.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Pe.textEditDivClicked(Pe.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Ce.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Pe=this.getTextScale(),Ne=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ke=this.textElement.getBBox(),Se={x:ke.width*Pe,y:ke.height*Pe};Ne.x-=Se.x/2,Ne.y-=Se.y/2,this.textEditor.style.top=Ne.y+"px",this.textEditor.style.left=Ne.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ne.x+"px",this.textEditor.style.fontSize=Math.max(16*Pe,12)+"px",this.textElement.style.display="none"}},Ce.prototype.textEditDivClicked=function(Pe){this.text=Pe.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Ce.prototype.select=function(){He.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ce.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),He.prototype.deselect.call(this)},Ce.prototype.dblClick=function(Pe,Ne){He.prototype.dblClick.call(this,Pe,Ne),this.showTextEditor()},Ce.prototype.setColor=function(Pe){this.textElement&&Ke.setAttributes(this.textElement,[["fill",Pe]]),this.color=Pe,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Pe)},Ce.prototype.setFont=function(Pe){this.textElement&&Ke.setAttributes(this.textElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ce.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ce.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},He.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){var Ne=Pe;this.color=Ne.color,this.fontFamily=Ne.fontFamily,this.padding=Ne.padding,this.text=Ne.text,this.createVisual(),He.prototype.restoreState.call(this,Pe),this.setSize()},Ce.prototype.scale=function(Pe,Ne){He.prototype.scale.call(this,Pe,Ne),this.setSize(),this.sizeText(),this.positionTextEditor()},Ce.typeName="TextMarker",Ce.title="Text marker",Ce.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>',Ce}(we),et=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.color="transparent",Se.lineWidth=3,Se.drawing=!1,Se.pixelRatio=1,Se.color=ke.defaultColor,Se.lineWidth=ke.defaultStrokeWidth,Se.pixelRatio=ke.freehandPixelRatio,Se.setColor=Se.setColor.bind(Se),Se.addCanvas=Se.addCanvas.bind(Se),Se.finishCreation=Se.finishCreation.bind(Se),Se.setLineWidth=Se.setLineWidth.bind(Se),Se.colorPanel=new ee("Color",ke.defaultColorSet,ke.defaultColor),Se.colorPanel.onColorChanged=Se.setColor,Se.lineWidthPanel=new be("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.lineWidthPanel.onWidthChanged=Se.setLineWidth,Se}return De(Ce,He),Ce.prototype.ownsTarget=function(Pe){return!(!He.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.drawingImage)},Ce.prototype.createVisual=function(){this.visual=Ke.createGroup(),this.drawingImage=Ke.createImage(),this.visual.appendChild(this.drawingImage);var Pe=Ke.createTransform();this.visual.transform.baseVal.appendItem(Pe),this.addMarkerVisualToContainer(this.visual)},Ce.prototype.pointerDown=function(Pe,Ne){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(Pe.x,Pe.y),this.drawing=!0):He.prototype.pointerDown.call(this,Pe,Ne)},Ce.prototype.manipulate=function(Pe){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Pe.x,Pe.y),this.canvasContext.stroke()):He.prototype.manipulate.call(this,Pe)},Ce.prototype.resize=function(Pe){He.prototype.resize.call(this,Pe),Ke.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ke.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ce.prototype.pointerUp=function(Pe){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):He.prototype.pointerUp.call(this,Pe)},Ce.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)},Ce.prototype.select=function(){this.state==="creating"&&this.finishCreation(),He.prototype.select.call(this)},Ce.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),He.prototype.deselect.call(this)},Ce.prototype.finishCreation=function(){for(var Pe=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ne=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ke=Ne[0],Se=Ne[1],nt=Ne[2],Pt=Ne[3],Xe=!1,Je=0;Je<this.canvasElement.height;Je++)for(var yt=0;yt<this.canvasElement.width;yt++)Pe.data[Je*this.canvasElement.width*4+4*yt+3]>0&&(Xe=!0,Je<Se&&(Se=Je),yt<ke&&(ke=yt),Je>Pt&&(Pt=Je),yt>nt&&(nt=yt));if(Xe){this.left=ke/this.pixelRatio,this.top=Se/this.pixelRatio,this.width=(nt-ke)/this.pixelRatio,this.height=(Pt-Se)/this.pixelRatio;var wt=document.createElement("canvas");wt.width=nt-ke,wt.height=Pt-Se,wt.getContext("2d").putImageData(this.canvasContext.getImageData(ke,Se,nt-ke,Pt-Se),0,0),this.drawingImgUrl=wt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ce.prototype.setDrawingImage=function(){Ke.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ke.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ce.prototype.setColor=function(Pe){this.color=Pe,this.colorChanged(Pe)},Ce.prototype.setLineWidth=function(Pe){this.lineWidth=Pe},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({drawingImgUrl:this.drawingImgUrl},He.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){this.createVisual(),He.prototype.restoreState.call(this,Pe),this.drawingImgUrl=Pe.drawingImgUrl,this.setDrawingImage()},Ce.prototype.scale=function(Pe,Ne){He.prototype.scale.call(this,Pe,Ne),this.setDrawingImage()},Ce.typeName="FreehandMarker",Ce.title="Freehand marker",Ce.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>',Ce}(we),bt=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,ke||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Se.typeBoxes=[],Se.currentType=Ne,Se.setCurrentType=Se.setCurrentType.bind(Se),Se}return De(Ce,He),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2";for(var ke=function(Pt){var Xe="both";switch(Pt){case 0:Xe="both";break;case 1:Xe="start";break;case 2:Xe="end";break;case 3:Xe="none"}var Je=document.createElement("div");if(Je.style.display="flex",Je.style.flexGrow="2",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.borderColor=Xe===Se.currentType?Se.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){Pe.setCurrentType(Xe,Je)}),Ne.appendChild(Je),Xe==="both"||Xe==="start"){var yt=document.createElement("div");yt.style.display="flex",yt.style.alignItems="center",yt.style.minHeight="20px",yt.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="`+(Se.uiStyleSettings!==void 0?Se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,yt.style.marginLeft="5px",Je.appendChild(yt)}var wt=document.createElement("div");wt.style.display="flex",wt.style.alignItems="center",wt.style.minHeight="20px",wt.style.flexGrow="2";var ot=document.createElement("hr");if(ot.style.minWidth="20px",ot.style.border="0px",ot.style.borderTop="3px solid "+(Se.uiStyleSettings!==void 0?Se.uiStyleSettings.toolboxColor:"#eeeeee"),ot.style.flexGrow="2",wt.appendChild(ot),Je.appendChild(wt),Xe==="both"||Xe==="end"){var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.minHeight="20px",It.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(Se.uiStyleSettings!==void 0?Se.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,It.style.marginRight="5px",Je.appendChild(It)}Se.typeBoxes.push(Je)},Se=this,nt=0;nt<4;nt++)ke(nt);return Ne},Ce.prototype.setCurrentType=function(Pe,Ne){var ke=this;this.currentType=Pe,this.typeBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings!==void 0?ke.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ce}(te),Bt=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.arrowType="end",Se.arrowBaseHeight=10,Se.arrowBaseWidth=10,Se.getArrowPoints=Se.getArrowPoints.bind(Se),Se.setArrowType=Se.setArrowType.bind(Se),Se.arrowTypePanel=new bt("Arrow type","end"),Se.arrowTypePanel.onArrowTypeChanged=Se.setArrowType,Se}return De(Ce,He),Ce.prototype.ownsTarget=function(Pe){return!(!He.prototype.ownsTarget.call(this,Pe)&&Pe!==this.arrow1&&Pe!==this.arrow2)},Ce.prototype.getArrowPoints=function(Pe,Ne){var ke=this.arrowBaseWidth+2*this.strokeWidth,Se=this.arrowBaseHeight+2*this.strokeWidth;return Pe-ke/2+","+(Ne+Se/2)+" "+Pe+","+(Ne-Se/2)+" "+(Pe+ke/2)+","+(Ne+Se/2)},Ce.prototype.createTips=function(){this.arrow1=Ke.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ke.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ke.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ke.createTransform()),this.visual.appendChild(this.arrow2)},Ce.prototype.pointerDown=function(Pe,Ne){He.prototype.pointerDown.call(this,Pe,Ne),this.state==="creating"&&this.createTips()},Ce.prototype.adjustVisual=function(){if(He.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",Ke.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ke.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Pe=0;Math.abs(this.x1-this.x2)>.1&&(Pe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Ne=this.arrow1.transform.baseVal.getItem(0);Ne.setRotate(Pe,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ne,0);var ke=this.arrow2.transform.baseVal.getItem(0);ke.setRotate(Pe+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ke,0)}},Ce.prototype.setArrowType=function(Pe){this.arrowType=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({arrowType:this.arrowType},He.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){He.prototype.restoreState.call(this,Pe);var Ne=Pe;this.arrowType=Ne.arrowType,this.createTips(),this.adjustVisual()},Ce.typeName="ArrowMarker",Ce.title="Arrow marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ce}(ft),Nt=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.fillColor=ke.defaultFillColor,Se.strokeWidth=0,Se.fillPanel=new ee("Color",ke.defaultColorSet,ke.defaultFillColor),Se.fillPanel.onColorChanged=Se.setFillColor,Se}return De(Ce,He),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=He.prototype.getState.call(this);return Pe.typeName=Ce.typeName,Pe},Ce.typeName="CoverMarker",Ce.title="Cover marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ce}(Me),Zt=function(He){function Ce(Pe,Ne,ke,Se){var nt=He.call(this,Pe,Se||'<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 nt.opacities=[],nt.opacityBoxes=[],nt.opacities=Ne,nt.currentOpacity=ke,nt.setCurrentOpacity=nt.setCurrentOpacity.bind(nt),nt}return De(Ce,He),Ce.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",Ne.style.justifyContent="space-between",this.opacities.forEach(function(ke){var Se=document.createElement("div");Se.style.display="flex",Se.style.alignItems="center",Se.style.justifyContent="center",Se.style.padding="5px",Se.style.borderWidth="2px",Se.style.borderStyle="solid",Se.style.borderColor=ke===Pe.currentOpacity?Pe.uiStyleSettings.toolboxAccentColor:"transparent",Se.addEventListener("click",function(){Pe.setCurrentOpacity(ke,Se)}),Ne.appendChild(Se);var nt=document.createElement("div");nt.innerText=100*ke+"%",Se.appendChild(nt),Pe.opacityBoxes.push(Se)}),Ne},Ce.prototype.setCurrentOpacity=function(Pe,Ne){var ke=this;this.currentOpacity=Pe,this.opacityBoxes.forEach(function(Se){Se.style.borderColor=Se===Ne?ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ce}(te),Ut=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.setOpacity=Se.setOpacity.bind(Se),Se.fillColor=ke.defaultHighlightColor,Se.strokeWidth=0,Se.opacity=ke.defaultHighlightOpacity,Se.fillPanel=new ee("Color",ke.defaultColorSet,Se.fillColor),Se.fillPanel.onColorChanged=Se.setFillColor,Se.opacityPanel=new Zt("Opacity",ke.defaultOpacitySteps,Se.opacity),Se.opacityPanel.onOpacityChanged=Se.setOpacity,Se}return De(Ce,He),Ce.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Ke.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=He.prototype.getState.call(this);return Pe.typeName=Ce.typeName,Pe},Ce.typeName="HighlightMarker",Ce.title="Highlight marker",Ce.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>',Ce}(Nt),lt='<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>',Ge='<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>',kt=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.bgColor="transparent",Se.tipPosition={x:0,y:0},Se.tipBase1Position={x:0,y:0},Se.tipBase2Position={x:0,y:0},Se.tipMoving=!1,Se.color=ke.defaultStrokeColor,Se.bgColor=ke.defaultFillColor,Se.fontFamily=ke.defaultFontFamily,Se.defaultSize={x:100,y:30},Se.setBgColor=Se.setBgColor.bind(Se),Se.getTipPoints=Se.getTipPoints.bind(Se),Se.positionTip=Se.positionTip.bind(Se),Se.setTipPoints=Se.setTipPoints.bind(Se),Se.colorPanel=new ee("Text color",ke.defaultColorSet,Se.color,lt),Se.colorPanel.onColorChanged=Se.setColor,Se.bgColorPanel=new ee("Fill color",ke.defaultColorSet,Se.bgColor,Ge),Se.bgColorPanel.onColorChanged=Se.setBgColor,Se.fontFamilyPanel=new Re("Font",ke.defaultFontFamilies,ke.defaultFontFamily),Se.fontFamilyPanel.onFontChanged=Se.setFont,Se.tipGrip=new de,Se.tipGrip.visual.transform.baseVal.appendItem(Ke.createTransform()),Se.controlBox.appendChild(Se.tipGrip.visual),Se}return De(Ce,He),Ce.prototype.ownsTarget=function(Pe){return He.prototype.ownsTarget.call(this,Pe)||this.tipGrip.ownsTarget(Pe)||this.tip===Pe},Ce.prototype.createTip=function(){Ke.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ke.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ce.prototype.pointerDown=function(Pe,Ne){this.state==="new"&&He.prototype.pointerDown.call(this,Pe,Ne),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ne)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):He.prototype.pointerDown.call(this,Pe,Ne)},Ce.prototype.pointerUp=function(Pe){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,He.prototype.pointerUp.call(this,Pe);else{var Ne=this.state==="creating";He.prototype.pointerUp.call(this,Pe),this.setTipPoints(Ne),this.positionTip()}},Ce.prototype.manipulate=function(Pe){if(this.tipMoving){var Ne=this.unrotatePoint(Pe);this.tipPosition={x:Ne.x-this.manipulationStartLeft,y:Ne.y-this.manipulationStartTop},this.positionTip()}else He.prototype.manipulate.call(this,Pe)},Ce.prototype.setBgColor=function(Pe){this.bgRectangle&&this.tip&&(Ke.setAttributes(this.bgRectangle,[["fill",Pe]]),Ke.setAttributes(this.tip,[["fill",Pe]])),this.bgColor=Pe,this.fillColorChanged(Pe)},Ce.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},Ce.prototype.setTipPoints=function(Pe){Pe===void 0&&(Pe=!1);var Ne=Math.min(this.height/2,15),ke=this.height/5;Pe&&(this.tipPosition={x:Ne+ke/2,y:this.height+20});var Se=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Se<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ke=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:Ne,y:0},this.tipBase2Position={x:Ne+ke,y:0}):(this.tipBase1Position={x:0,y:Ne},this.tipBase2Position={x:0,y:Ne+ke}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Se<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ke=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ne-ke,y:0},this.tipBase2Position={x:this.width-Ne,y:0}):(this.tipBase1Position={x:this.width,y:Ne},this.tipBase2Position={x:this.width,y:Ne+ke}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Se<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ke=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ne-ke,y:this.height},this.tipBase2Position={x:this.width-Ne,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ne-ke},this.tipBase2Position={x:this.width,y:this.height-Ne}):Se<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ke=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:Ne,y:this.height},this.tipBase2Position={x:Ne+ke,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ne},this.tipBase2Position={x:0,y:this.height-Ne-ke})},Ce.prototype.resize=function(Pe){He.prototype.resize.call(this,Pe),this.positionTip()},Ce.prototype.positionTip=function(){Ke.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Pe=this.tipGrip.visual.transform.baseVal.getItem(0);Pe.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Pe,0)},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ce.prototype.select=function(){this.positionTip(),He.prototype.select.call(this)},Ce.prototype.getState=function(){var Pe=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},He.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){var Ne=Pe;this.bgColor=Ne.bgColor,this.tipPosition=Ne.tipPosition,He.prototype.restoreState.call(this,Pe),this.createTip(),this.setTipPoints()},Ce.prototype.scale=function(Pe,Ne){He.prototype.scale.call(this,Pe,Ne),this.tipPosition={x:this.tipPosition.x*Pe,y:this.tipPosition.y*Ne},this.positionTip()},Ce.typeName="CalloutMarker",Ce.title="Callout marker",Ce.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>',Ce}(Tt),un=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.fillColor="transparent",Se.strokeColor="transparent",Se.strokeWidth=0,Se.strokeDasharray="",Se.opacity=1,Se.strokeColor=ke.defaultColor,Se.strokeWidth=ke.defaultStrokeWidth,Se.strokeDasharray=ke.defaultStrokeDasharray,Se.fillColor=ke.defaultFillColor,Se.setStrokeColor=Se.setStrokeColor.bind(Se),Se.setFillColor=Se.setFillColor.bind(Se),Se.setStrokeWidth=Se.setStrokeWidth.bind(Se),Se.setStrokeDasharray=Se.setStrokeDasharray.bind(Se),Se.setOpacity=Se.setOpacity.bind(Se),Se.createVisual=Se.createVisual.bind(Se),Se.strokePanel=new ee("Line color",_e(ke.defaultColorSet,["transparent"]),ke.defaultColor),Se.strokePanel.onColorChanged=Se.setStrokeColor,Se.fillPanel=new ee("Fill color",_e(ke.defaultColorSet,["transparent"]),Se.fillColor,Ge),Se.fillPanel.onColorChanged=Se.setFillColor,Se.strokeWidthPanel=new be("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.strokeWidthPanel.onWidthChanged=Se.setStrokeWidth,Se.strokeStylePanel=new Ie("Line style",ke.defaultStrokeDasharrays,ke.defaultStrokeDasharray),Se.strokeStylePanel.onStyleChanged=Se.setStrokeDasharray,Se.opacityPanel=new Zt("Opacity",ke.defaultOpacitySteps,Se.opacity),Se.opacityPanel.onOpacityChanged=Se.setOpacity,Se}return De(Ce,He),Ce.prototype.ownsTarget=function(Pe){return!(!He.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},Ce.prototype.createVisual=function(){this.visual=Ke.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)},Ce.prototype.pointerDown=function(Pe,Ne){He.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ce.prototype.manipulate=function(Pe){He.prototype.manipulate.call(this,Pe)},Ce.prototype.resize=function(Pe){He.prototype.resize.call(this,Pe),this.setSize()},Ce.prototype.setSize=function(){He.prototype.setSize.call(this),Ke.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ce.prototype.pointerUp=function(Pe){He.prototype.pointerUp.call(this,Pe),this.setSize()},Ce.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ce.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Ke.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Ke.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ce.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Ke.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){var Ne=Pe;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.opacity=Ne.opacity,this.createVisual(),He.prototype.restoreState.call(this,Pe),this.setSize()},Ce.prototype.scale=function(Pe,Ne){He.prototype.scale.call(this,Pe,Ne),this.setSize()},Ce.typeName="EllipseMarker",Ce.title="Ellipse marker",Ce.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>',Ce}(we),ln=function(He){function Ce(Pe,Ne,ke){return He.call(this,Pe,Ne,ke)||this}return De(Ce,He),Object.defineProperty(Ce.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ce.prototype.ownsTarget=function(Pe){return!(!He.prototype.ownsTarget.call(this,Pe)&&Pe!==this.tip1&&Pe!==this.tip2)},Ce.prototype.createTips=function(){this.tip1=Ke.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(Ke.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ke.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(Ke.createTransform()),this.visual.appendChild(this.tip2)},Ce.prototype.pointerDown=function(Pe,Ne){He.prototype.pointerDown.call(this,Pe,Ne),this.state==="creating"&&this.createTips()},Ce.prototype.adjustVisual=function(){if(He.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ke.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()]]),Ke.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 Pe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Ne=this.tip1.transform.baseVal.getItem(0);Ne.setRotate(Pe,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ne,0);var ke=this.tip2.transform.baseVal.getItem(0);ke.setRotate(Pe+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ke,0)}},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=He.prototype.getState.call(this);return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){He.prototype.restoreState.call(this,Pe),this.createTips(),this.adjustVisual()},Ce.typeName="MeasurementMarker",Ce.title="Measurement marker",Ce.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>',Ce}(ft),Ft=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.strokePanel.colors=ke.defaultColorSet,Se.fillColor="transparent",Se}return De(Ce,He),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=He.prototype.getState.call(this);return Pe.typeName=Ce.typeName,Pe},Ce.typeName="EllipseFrameMarker",Ce.title="Ellipse frame marker",Ce.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>',Ce}(un),$t=function(){function He(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),He.prototype.addUndoStep=function(Ce){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ce)||(this.undoStack.push(Ce),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ce)&&this.redoStack.splice(0,this.redoStack.length))},He.prototype.replaceLastUndoStep=function(Ce){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ce)},He.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},He.prototype.undo=function(){if(this.undoStack.length>1){var Ce=this.undoStack.pop();return Ce!==void 0&&this.redoStack.push(Ce),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},He.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},He}(),Qt=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.strokeColor="transparent",Se.strokeWidth=0,Se.strokeDasharray="",Se.curveX=0,Se.curveY=0,Se.manipulationStartCurveX=0,Se.manipulationStartCurveY=0,Se.setStrokeColor=Se.setStrokeColor.bind(Se),Se.setStrokeWidth=Se.setStrokeWidth.bind(Se),Se.setStrokeDasharray=Se.setStrokeDasharray.bind(Se),Se.positionGrips=Se.positionGrips.bind(Se),Se.addControlGrips=Se.addControlGrips.bind(Se),Se.adjustVisual=Se.adjustVisual.bind(Se),Se.setupControlBox=Se.setupControlBox.bind(Se),Se.resize=Se.resize.bind(Se),Se.strokeColor=ke.defaultColor,Se.strokeWidth=ke.defaultStrokeWidth,Se.strokeDasharray=ke.defaultStrokeDasharray,Se.strokePanel=new ee("Line color",ke.defaultColorSet,ke.defaultColor),Se.strokePanel.onColorChanged=Se.setStrokeColor,Se.strokeWidthPanel=new be("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.strokeWidthPanel.onWidthChanged=Se.setStrokeWidth,Se.strokeStylePanel=new Ie("Line style",ke.defaultStrokeDasharrays,ke.defaultStrokeDasharray),Se.strokeStylePanel.onStyleChanged=Se.setStrokeDasharray,Se}return De(Ce,He),Ce.prototype.ownsTarget=function(Pe){return!(!He.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorCurve&&Pe!==this.visibleCurve&&!this.curveGrip.ownsTarget(Pe))},Ce.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ce.prototype.createVisual=function(){this.visual=Ke.createGroup(),this.selectorCurve=Ke.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ke.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)},Ce.prototype.pointerDown=function(Pe,Ne){He.prototype.pointerDown.call(this,Pe,Ne),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Pe.x,this.curveY=Pe.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ne)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ce.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ke.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ke.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ke.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ce.prototype.setupControlBox=function(){He.prototype.setupControlBox.call(this),this.curveControlLine1=Ke.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ke.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)},Ce.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,He.prototype.addControlGrips.call(this)},Ce.prototype.positionGrips=function(){He.prototype.positionGrips.call(this);var Pe=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Pe/2,this.curveY-Pe/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()))},Ce.prototype.manipulate=function(Pe){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Pe.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Pe.y-this.manipulationStartY),He.prototype.manipulate.call(this,Pe)},Ce.prototype.resize=function(Pe){this.activeGrip===this.curveGrip&&(this.curveX=Pe.x,this.curveY=Pe.y),He.prototype.resize.call(this,Pe),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Ce.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},Ce.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},Ce.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual()},Ce.prototype.scale=function(Pe,Ne){this.curveX=this.curveX*Pe,this.curveY=this.curveY*Ne,He.prototype.scale.call(this,Pe,Ne)},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},He.prototype.getState.call(this));return Pe.typeName=Ce.typeName,Pe},Ce.prototype.restoreState=function(Pe){He.prototype.restoreState.call(this,Pe);var Ne=Pe;this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.curveX=Ne.curveX,this.curveY=Ne.curveY,this.createVisual(),this.adjustVisual()},Ce.typeName="CurveMarker",Ce.title="Curve marker",Ce.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>',Ce}($e),Bn=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,Ne,ke)||this;return Se.fillColor="transparent",Se.strokeColor="transparent",Se.strokeWidth=0,Se.strokeDasharray="",Se.textColor="transparent",Se.fontSize="1rem",Se.isMoved=!1,Se.captionText="Caption",Se.PADDING=5,Se.captionBoxWidth=0,Se.captionBoxHeight=0,Se.strokeColor=ke.defaultColor,Se.strokeWidth=ke.defaultStrokeWidth,Se.strokeDasharray=ke.defaultStrokeDasharray,Se.fillColor=ke.defaultFillColor,Se.textColor=ke.defaultStrokeColor,Se.fontFamily=ke.defaultFontFamily,Se.fontSize=ke.defaultCaptionFontSize,Se.captionText=ke.defaultCaptionText,Se.setStrokeColor=Se.setStrokeColor.bind(Se),Se.setFillColor=Se.setFillColor.bind(Se),Se.setStrokeWidth=Se.setStrokeWidth.bind(Se),Se.setStrokeDasharray=Se.setStrokeDasharray.bind(Se),Se.createVisual=Se.createVisual.bind(Se),Se.sizeCaption=Se.sizeCaption.bind(Se),Se.setCaptionText=Se.setCaptionText.bind(Se),Se.showTextEditor=Se.showTextEditor.bind(Se),Se.positionTextEditor=Se.positionTextEditor.bind(Se),Se.finishTextEditing=Se.finishTextEditing.bind(Se),Se.setFont=Se.setFont.bind(Se),Se.setTextColor=Se.setTextColor.bind(Se),Se.strokePanel=new ee("Line color",_e(ke.defaultColorSet,["transparent"]),Se.strokeColor),Se.strokePanel.onColorChanged=Se.setStrokeColor,Se.fillPanel=new ee("Fill color",_e(ke.defaultColorSet,["transparent"]),Se.fillColor,Ge),Se.fillPanel.onColorChanged=Se.setFillColor,Se.strokeWidthPanel=new be("Line width",ke.defaultStrokeWidths,ke.defaultStrokeWidth),Se.strokeWidthPanel.onWidthChanged=Se.setStrokeWidth,Se.strokeStylePanel=new Ie("Line style",ke.defaultStrokeDasharrays,ke.defaultStrokeDasharray),Se.strokeStylePanel.onStyleChanged=Se.setStrokeDasharray,Se.fontFamilyPanel=new Re("Font",ke.defaultFontFamilies,ke.defaultFontFamily),Se.fontFamilyPanel.onFontChanged=Se.setFont,Se.textColorPanel=new ee("Text color",ke.defaultColorSet,Se.textColor,lt),Se.textColorPanel.onColorChanged=Se.setTextColor,Se}return De(Ce,He),Ce.prototype.ownsTarget=function(Pe){return!(!He.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.frame&&Pe!==this.captionBg&&Pe!==this.captionElement)},Ce.prototype.createVisual=function(){this.visual=Ke.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ke.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ke.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=Ke.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()},Ce.prototype.setCaptionText=function(Pe){this.captionText=Pe,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ce.prototype.pointerDown=function(Pe,Ne){He.prototype.pointerDown.call(this,Pe,Ne),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},Ce.prototype.manipulate=function(Pe){He.prototype.manipulate.call(this,Pe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Pe.x-this.pointerDownPoint.x)>5||Math.abs(Pe.y-this.pointerDownPoint.y)>5)},Ce.prototype.resize=function(Pe){He.prototype.resize.call(this,Pe),this.setSize()},Ce.prototype.sizeCaption=function(){var Pe=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Pe.width+2*this.PADDING,this.captionBoxHeight=Pe.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Ke.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')"]]),Ke.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')"]])},Ce.prototype.showTextEditor=function(){var Pe=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(Ne){Ne.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ne){Ne.key==="Enter"&&Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ne){Ne.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Pe.finishTextEditing(Pe.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Ce.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"))},Ce.prototype.finishTextEditing=function(Pe){this.setCaptionText(Pe.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ce.prototype.setFont=function(Pe){this.captionElement&&Ke.setAttributes(this.captionElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ce.prototype.setTextColor=function(Pe){this.captionElement&&Ke.setAttributes(this.captionElement,[["fill",Pe]]),this.textColor=Pe,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ce.prototype.setSize=function(){He.prototype.setSize.call(this),Ke.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ce.prototype.pointerUp=function(Pe){He.prototype.pointerUp.call(this,Pe),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ce.prototype.dblClick=function(Pe,Ne){He.prototype.dblClick.call(this,Pe,Ne),this.showTextEditor()},Ce.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.frame&&Ke.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},Ce.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.captionBg&&Ke.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.frame&&Ke.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.frame&&Ke.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Pe=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},He.prototype.getState.call(this));return Pe.typeName=this.typeName,Pe},Ce.prototype.restoreState=function(Pe){var Ne=Pe;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.textColor=Ne.textColor,this.fontFamily=Ne.fontFamily,this.captionText=Ne.captionText,this.fontSize=Ne.fontSize,this.createVisual(),He.prototype.restoreState.call(this,Pe),this.setSize()},Ce.prototype.scale=function(Pe,Ne){He.prototype.scale.call(this,Pe,Ne),this.setSize()},Ce.typeName="CaptionFrameMarker",Ce.title="Caption frame marker",Ce.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>',Ce}(we),on=function(){function He(Ce,Pe){Pe===void 0&&(Pe=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ce,this.cancelable=Pe}return Object.defineProperty(He.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),He.prototype.preventDefault=function(){this._defaultPrevented=!0},He}(),Cn=function(He){function Ce(Pe,Ne,ke){var Se=He.call(this,Pe,!1)||this;return Se.dataUrl=Ne,Se.state=ke,Se}return De(Ce,He),Ce}(on),gt=function(He){function Ce(Pe,Ne,ke){ke===void 0&&(ke=!1);var Se=He.call(this,Pe,ke)||this;return Se.marker=Ne,Se}return De(Ce,He),Ce}(on),En=function(){function He(){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 He.prototype.addEventListener=function(Ce,Pe){this[Ce].push(Pe)},He.prototype.removeEventListener=function(Ce,Pe){var Ne=this[Ce].indexOf(Pe);Ne>-1&&this[Ce].splice(Ne,1)},He}(),Vn=function(){function He(Ce){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new qe,this._isOpen=!1,this.undoRedoManager=new $t,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 En,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=He.instanceCounter++,this.styles=new Ze(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ce,this.targetRoot=document.body,this.width=Ce.clientWidth,this.height=Ce.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(He.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,et,Bt,Tt,Ft,un,Ut,kt,ln,Nt,ft,Qt,Bn]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,et,Bt,Tt,un,Ut,kt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,et,Bt,Tt,Ut]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ce){var Pe=this;this._availableMarkerTypes.splice(0),Ce.forEach(function(Ne){if(typeof Ne=="string"){var ke=Pe.ALL_MARKER_TYPES.find(function(Se){return Se.typeName===Ne});ke!==void 0&&Pe._availableMarkerTypes.push(ke)}else Pe._availableMarkerTypes.push(Ne)})},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ce){this._zoomLevel=Ce,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(He.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),He.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Be.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},He.prototype.show=function(){var Ce=this;this.styles.styleSheetRoot===void 0&&ct.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ct.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Pe){return Pe(new on(Ce))})},He.prototype.render=function(){return ze(this,void 0,void 0,function(){var Ce;return Ct(this,function(Pe){switch(Pe.label){case 0:return this.setCurrentMarker(),(Ce=new mt).naturalSize=this.renderAtNaturalSize,Ce.imageType=this.renderImageType,Ce.imageQuality=this.renderImageQuality,Ce.markersOnly=this.renderMarkersOnly,Ce.width=this.renderWidth,Ce.height=this.renderHeight,[4,Ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Pe.sent(),[4,Ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Pe.sent()]}})})},He.prototype.close=function(Ce){var Pe=this;if(Ce===void 0&&(Ce=!1),this.isOpen){var Ne=!1;Ce||this.eventListeners.beforeclose.forEach(function(ke){var Se=new on(Pe,!0);ke(Se),Se.defaultPrevented&&(Ne=!0)}),Ne||(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(ke){return ke(new on(Pe))}),this.detachEvents(),this._isOpen=!1)}},He.prototype.addMarkersToToolbar=function(){for(var Ce,Pe=[],Ne=0;Ne<arguments.length;Ne++)Pe[Ne]=arguments[Ne];(Ce=this._availableMarkerTypes).push.apply(Ce,Pe)},He.prototype.addRenderEventListener=function(Ce){this.addEventListener("render",function(Pe){Ce(Pe.dataUrl,Pe.state)})},He.prototype.removeRenderEventListener=function(Ce){},He.prototype.addCloseEventListener=function(Ce){this.addEventListener("close",function(){Ce()})},He.prototype.removeCloseEventListener=function(Ce){},He.prototype.setupResizeObserver=function(){var Ce=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ce.resize(Ce.target.clientWidth,Ce.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ce.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},He.prototype.onPopupTargetResize=function(){var Ce=1*this.target.clientWidth/this.target.clientHeight,Pe=this.editorCanvas.clientWidth/Ce>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ce:this.editorCanvas.clientWidth,Ne=Pe<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ce;this.resize(Pe,Ne)},He.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},He.prototype.resize=function(Ce,Pe){this._isResizing=!0;var Ne=Ce/this.imageWidth,ke=Pe/this.imageHeight;this.imageWidth=Math.round(Ce),this.imageHeight=Math.round(Pe),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(Ne,ke),this._isResizing=!1},He.prototype.scaleMarkers=function(Ce,Pe){var Ne,ke=this;this._currentMarker&&this._currentMarker instanceof Tt?this._currentMarker.scale(Ce,Pe):(Ne=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Se){Se!==ke._currentMarker&&Se.scale(Ce,Pe)}),Ne!==void 0&&this.setCurrentMarker(Ne)},He.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"},He.prototype.setTopLeft=function(){var Ce=this.editingTarget.getBoundingClientRect(),Pe=this.editorCanvas.getBoundingClientRect();this.left=Ce.left-Pe.left,this.top=Ce.top-Pe.top},He.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)},He.prototype.addDefs=function(){for(var Ce,Pe=[],Ne=0;Ne<arguments.length;Ne++)Pe[Ne]=arguments[Ne];this.defs=Ke.createDefs(),this.addDefsToImage(),(Ce=this.defs).append.apply(Ce,Pe)},He.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},He.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)},He.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},He.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},He.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)},He.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},He.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)},He.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 Ce=document.createElement("a");Ce.href="https://markerjs.com/",Ce.target="_blank",Ce.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>',Ce.title="Powered by marker.js",Ce.style.display="grid",Ce.style.alignItems="center",Ce.style.justifyItems="center",Ce.style.padding="3px",Ce.style.width="20px",Ce.style.height="20px",this.logoUI.appendChild(Ce),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},He.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")},He.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"},He.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},He.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 Ce=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=Ce+"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 dt(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 Ae(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},He.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},He.prototype.removeMarker=function(Ce){this.markerImage.removeChild(Ce.container),this.markers.indexOf(Ce)>-1&&this.markers.splice(this.markers.indexOf(Ce),1),Ce.dispose()},He.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())},He.prototype.toolbarButtonClicked=function(Ce,Pe){if(Ce==="marker"&&Pe!==void 0)this.createNewMarker(Pe);else if(Ce==="action")switch(Pe){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()}},He.prototype.deleteSelectedMarker=function(){var Ce=this;if(this._currentMarker!==void 0){var Pe=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ke){var Se=new gt(Ce,Ce._currentMarker,!0);ke(Se),Se.defaultPrevented&&(Pe=!0)}),!Pe){var Ne=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(ke){return ke(new gt(Ce,Ne))})}}},He.prototype.clear=function(){var Ce=this,Pe=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(nt){var Pt=new gt(Ce,void 0,!0);nt(Pt),Pt.defaultPrevented&&(Pe=!0)}),!Pe)){this.setCurrentMarker();for(var Ne=function(nt){var Pt=ke.markers[nt];ke.setCurrentMarker(ke.markers[nt]),ke._currentMarker.dispose(),ke.markerImage.removeChild(ke._currentMarker.container),ke.markers.splice(ke.markers.indexOf(ke._currentMarker),1),ke.eventListeners.markerdelete.forEach(function(Xe){return Xe(new gt(Ce,Pt))})},ke=this,Se=this.markers.length-1;Se>=0;Se--)Ne(Se);this.addUndoStep()}},Object.defineProperty(He.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),He.prototype.showNotesEditor=function(){var Ce;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=(Ce=this._currentMarker.notes)!==null&&Ce!==void 0?Ce:"",this.overlayContainer.appendChild(this.notesArea))},He.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)},He.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},He.prototype.addUndoStep=function(){var Ce=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Pe=this.getState(),Ne=this.undoRedoManager.getLastUndoStep();if(!Ne||Ne.width===Pe.width&&Ne.height===Pe.height){var ke=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Pe),ke<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Se){return Se(new on(Ce))})}else this.undoRedoManager.replaceLastUndoStep(Pe),this.eventListeners.statechange.forEach(function(Se){return Se(new on(Ce))})}},He.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},He.prototype.undoStep=function(){var Ce=this,Pe=this.undoRedoManager.undo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ne){return Ne(new on(Ce))}))},He.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},He.prototype.redoStep=function(){var Ce=this,Pe=this.undoRedoManager.redo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ne){return Ne(new on(Ce))}))},He.prototype.stepZoom=function(){var Ce=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ce<this.zoomSteps.length-1?this.zoomSteps[Ce+1]:this.zoomSteps[0]},He.prototype.panTo=function(Ce){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ce.x,top:this.prevPanPoint.y-Ce.y}),this.prevPanPoint=Ce},He.prototype.startRenderAndClose=function(){return ze(this,void 0,void 0,function(){var Ce,Pe,Ne=this;return Ct(this,function(ke){switch(ke.label){case 0:return[4,this.render()];case 1:return Ce=ke.sent(),Pe=this.getState(),this.eventListeners.render.forEach(function(Se){return Se(new Cn(Ne,Ce,Pe))}),this.close(!0),[2]}})})},He.prototype.getState=function(Ce){Ce===!0&&this.setCurrentMarker();var Pe={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ne){return Pe.markers.push(Ne.getState())}),Pe},He.prototype.restoreState=function(Ce){var Pe=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ce.markers.forEach(function(Ne){var ke=Pe._availableMarkerTypes.find(function(nt){return nt.typeName===Ne.typeName});if(ke!==void 0){var Se=Pe.addNewMarker(ke);Se.restoreState(Ne),Pe.markers.push(Se)}}),Ce.width&&Ce.height&&(Ce.width!==this.imageWidth||Ce.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ce.width,this.imageHeight/Ce.height),this.eventListeners.restorestate.forEach(function(Ne){return Ne(new on(Pe))})},He.prototype.addNewMarker=function(Ce){var Pe=Ke.createGroup();return this.markerImage.appendChild(Pe),new Ce(Pe,this.overlayContainer,this.settings)},He.prototype.createNewMarker=function(Ce){var Pe,Ne=this;(Pe=typeof Ce=="string"?this._availableMarkerTypes.find(function(ke){return ke.typeName===Ce}):Ce)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Pe),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(Pe.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ke){return ke(new gt(Ne,Ne._currentMarker))}))},He.prototype.markerCreated=function(Ce){var Pe=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ce),this.setCurrentMarker(Ce),Ce instanceof et&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(et):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ne){return Ne(new gt(Pe,Pe._currentMarker))})},He.prototype.colorChanged=function(Ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ce,this.settings.defaultStrokeColor=Ce)},He.prototype.fillColorChanged=function(Ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ce)},He.prototype.markerStateChanged=function(Ce){var Pe=this;this.eventListeners.markerchange.forEach(function(Ne){return Ne(new gt(Pe,Ce))})},He.prototype.setCurrentMarker=function(Ce){var Pe=this;this._currentMarker!==Ce&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ne){return Ne(new gt(Pe,Pe._currentMarker))})),this._currentMarker=Ce,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(Ne){return Ne(new gt(Pe,Pe._currentMarker))}))},He.prototype.onPointerDown=function(Ce){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ce.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Pe=this.markers.find(function(Ne){return Ne.ownsTarget(Ce.target)});Pe!==void 0?(this.setCurrentMarker(Pe),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY),Ce.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ce.clientX,y:Ce.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY))},He.prototype.onDblClick=function(Ce){if(this._isFocused||this.focus(),this.mode==="select"){var Pe=this.markers.find(function(Ne){return Ne.ownsTarget(Ce.target)});Pe!==void 0&&Pe!==this._currentMarker&&this.setCurrentMarker(Pe),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY),Ce.target):this.setCurrentMarker()}},He.prototype.onPointerMove=function(Ce){this.touchPoints!==1&&Ce.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ce.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY)):this.zoomLevel>1&&this.panTo({x:Ce.clientX,y:Ce.clientY}))},He.prototype.onPointerUp=function(Ce){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY)),this.isDragging=!1,this.addUndoStep()},He.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},He.prototype.onKeyUp=function(Ce){this._currentMarker===void 0||this.notesArea!==void 0||Ce.key!=="Delete"&&Ce.key!=="Backspace"||this.deleteSelectedMarker()},He.prototype.clientToLocalCoordinates=function(Ce,Pe){var Ne=this.markerImage.getBoundingClientRect();return{x:(Ce-Ne.left)/this.zoomLevel,y:(Pe-Ne.top)/this.zoomLevel}},He.prototype.onWindowResize=function(){this.positionUI()},He.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ce=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ce+"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()},He.prototype.addLicenseKey=function(Ce){Be.addKey(Ce)},He.prototype.addEventListener=function(Ce,Pe){this.eventListeners.addEventListener(Ce,Pe)},He.prototype.removeEventListener=function(Ce,Pe){this.eventListeners.removeEventListener(Ce,Pe)},He.prototype.renderState=function(Ce){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ce),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(He.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),He.prototype.focus=function(){var Ce=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Pe){return Pe(new on(Ce))}))},He.prototype.blur=function(){var Ce=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Pe){return Pe(new on(Ce))}))},He.instanceCounter=0,He}()},17115:function(Sn,an,ve){"use strict";ve.d(an,{ZP:function(){return Be}});var ce=ve(33606),De=ve(59301),ze=ve(47273),Ct=0,_e=(0,ze.Z)();function Ke(){var mt;return _e?(mt=Ct,Ct+=1):mt="TEST_OR_SSR",mt}function Be(mt){var ct=De.useState(),Ze=(0,ce.Z)(ct,2),Et=Ze[0],ht=Ze[1];return De.useEffect(function(){ht("rc_select_".concat(Ke()))},[]),mt||Et}},77861:function(Sn,an,ve){"use strict";ve.d(an,{Ac:function(){return It},Xo:function(){return pi},Wx:function(){return $i},ZP:function(){return tn},lk:function(){return we}});var ce=ve(92413),De=ve(26407),ze=ve(400),Ct=ve(33708),_e=ve(33606),Ke=ve(37061),Be=ve(39559),mt=ve(18929),ct=ve(48736),Ze=ve(59301),Et=ve(92310),ht=ve.n(Et),dt=ve(34280),Ae=ve(49658),te=ve(10228),ee=ve(8654),he=function(rt){var Vt=rt.className,rn=rt.customizeIcon,Pn=rt.customizeIconProps,kn=rt.onMouseDown,St=rt.onClick,hn=rt.children,In;return typeof rn=="function"?In=rn(Pn):In=rn,Ze.createElement("span",{className:Vt,onMouseDown:function(Gt){Gt.preventDefault(),kn&&kn(Gt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:St,"aria-hidden":!0},In!==void 0?In:Ze.createElement("span",{className:ht()(Vt.split(/\s+/).map(function(ii){return"".concat(ii,"-icon")}))},hn))},se=he;function de(vt,rt,Vt,rn,Pn){var kn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,St=arguments.length>6?arguments[6]:void 0,hn=arguments.length>7?arguments[7]:void 0,In=Ze.useMemo(function(){if((0,Be.Z)(rn)==="object")return rn.clearIcon;if(Pn)return Pn},[rn,Pn]),ii=Ze.useMemo(function(){return!!(!kn&&rn&&(Vt.length||St)&&!(hn==="combobox"&&St===""))},[rn,kn,Vt.length,St,hn]);return{allowClear:ii,clearIcon:Ze.createElement(se,{className:"".concat(vt,"-clear"),onMouseDown:rt,customizeIcon:In},"\xD7")}}var me=Ze.createContext(null);function we(){return Ze.useContext(me)}function Me(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,rt=Ze.useState(!1),Vt=(0,_e.Z)(rt,2),rn=Vt[0],Pn=Vt[1],kn=Ze.useRef(null),St=function(){window.clearTimeout(kn.current)};Ze.useEffect(function(){return St},[]);var hn=function(ii,Gt){St(),kn.current=window.setTimeout(function(){Pn(ii),Gt&&Gt()},vt)};return[rn,hn,St]}function be(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,rt=Ze.useRef(null),Vt=Ze.useRef(null);Ze.useEffect(function(){return function(){window.clearTimeout(Vt.current)}},[]);function rn(Pn){(Pn||rt.current===null)&&(rt.current=Pn),window.clearTimeout(Vt.current),Vt.current=window.setTimeout(function(){rt.current=null},vt)}return[function(){return rt.current},rn]}function Ie(vt,rt,Vt,rn){var Pn=Ze.useRef(null);Pn.current={open:rt,triggerOpen:Vt,customizedTrigger:rn},Ze.useEffect(function(){function kn(St){var hn;if(!((hn=Pn.current)!==null&&hn!==void 0&&hn.customizedTrigger)){var In=St.target;In.shadowRoot&&St.composed&&(In=St.composedPath()[0]||In),Pn.current.open&&vt().filter(function(ii){return ii}).every(function(ii){return!ii.contains(In)&&ii!==In})&&Pn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",kn),function(){return window.removeEventListener("mousedown",kn)}},[])}var je=ve(26112),qe=ve(11780),$e=function(rt,Vt){var rn,Pn,kn=rt.prefixCls,St=rt.id,hn=rt.inputElement,In=rt.disabled,ii=rt.tabIndex,Gt=rt.autoFocus,Jt=rt.autoComplete,hi=rt.editable,fi=rt.activeDescendantId,ui=rt.value,ni=rt.maxLength,ci=rt.onKeyDown,li=rt.onMouseDown,Ni=rt.onChange,Qi=rt.onPaste,lr=rt.onCompositionStart,wn=rt.onCompositionEnd,Pr=rt.open,Or=rt.attrs,ar=hn||Ze.createElement("input",null),fn=ar,Rn=fn.ref,Ci=fn.props,_i=Ci.onKeyDown,ki=Ci.onChange,Wi=Ci.onMouseDown,cr=Ci.onCompositionStart,qi=Ci.onCompositionEnd,nr=Ci.style;return(0,ct.Kp)(!("maxLength"in ar.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),ar=Ze.cloneElement(ar,(0,Ct.Z)((0,Ct.Z)((0,Ct.Z)({type:"search"},Ci),{},{id:St,ref:(0,ee.sQ)(Vt,Rn),disabled:In,tabIndex:ii,autoComplete:Jt||"off",autoFocus:Gt,className:ht()("".concat(kn,"-selection-search-input"),(rn=ar)===null||rn===void 0||(Pn=rn.props)===null||Pn===void 0?void 0:Pn.className),role:"combobox","aria-label":"Search","aria-expanded":Pr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(St,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(St,"_list"),"aria-activedescendant":Pr?fi:void 0},Or),{},{value:hi?ui:"",maxLength:ni,readOnly:!hi,unselectable:hi?null:"on",style:(0,Ct.Z)((0,Ct.Z)({},nr),{},{opacity:hi?null:0}),onKeyDown:function(Mn){ci(Mn),_i&&_i(Mn)},onMouseDown:function(Mn){li(Mn),Wi&&Wi(Mn)},onChange:function(Mn){Ni(Mn),ki&&ki(Mn)},onCompositionStart:function(Mn){lr(Mn),cr&&cr(Mn)},onCompositionEnd:function(Mn){wn(Mn),qi&&qi(Mn)},onPaste:Qi})),ar},ft=Ze.forwardRef($e);ft.displayName="Input";var Re=ft;function Tt(vt){return Array.isArray(vt)?vt:vt!==void 0?[vt]:[]}var et=typeof window!="undefined"&&window.document&&window.document.documentElement,bt=et;function Bt(vt){return vt!=null}function Nt(vt){return!vt&&vt!==0}function Zt(vt){return["string","number"].includes((0,Be.Z)(vt))}function Ut(vt){var rt=void 0;return vt&&(Zt(vt.title)?rt=vt.title.toString():Zt(vt.label)&&(rt=vt.label.toString())),rt}function lt(vt,rt){bt?Ze.useLayoutEffect(vt,rt):Ze.useEffect(vt,rt)}function Ge(vt){var rt;return(rt=vt.key)!==null&&rt!==void 0?rt:vt.value}var kt=function(rt){rt.preventDefault(),rt.stopPropagation()},un=function(rt){var Vt=rt.id,rn=rt.prefixCls,Pn=rt.values,kn=rt.open,St=rt.searchValue,hn=rt.autoClearSearchValue,In=rt.inputRef,ii=rt.placeholder,Gt=rt.disabled,Jt=rt.mode,hi=rt.showSearch,fi=rt.autoFocus,ui=rt.autoComplete,ni=rt.activeDescendantId,ci=rt.tabIndex,li=rt.removeIcon,Ni=rt.maxTagCount,Qi=rt.maxTagTextLength,lr=rt.maxTagPlaceholder,wn=lr===void 0?function(lo){return"+ ".concat(lo.length," ...")}:lr,Pr=rt.tagRender,Or=rt.onToggleOpen,ar=rt.onRemove,fn=rt.onInputChange,Rn=rt.onInputPaste,Ci=rt.onInputKeyDown,_i=rt.onInputMouseDown,ki=rt.onInputCompositionStart,Wi=rt.onInputCompositionEnd,cr=Ze.useRef(null),qi=(0,Ze.useState)(0),nr=(0,_e.Z)(qi,2),dr=nr[0],Mn=nr[1],to=(0,Ze.useState)(!1),Ln=(0,_e.Z)(to,2),Hr=Ln[0],so=Ln[1],Bi="".concat(rn,"-selection"),Mo=kn||Jt==="multiple"&&hn===!1||Jt==="tags"?St:"",oo=Jt==="tags"||Jt==="multiple"&&hn===!1||hi&&(kn||Hr);lt(function(){Mn(cr.current.scrollWidth)},[Mo]);function Ui(lo,_o,ga,Oa,Xo){return Ze.createElement("span",{className:ht()("".concat(Bi,"-item"),(0,ze.Z)({},"".concat(Bi,"-item-disabled"),ga)),title:Ut(lo)},Ze.createElement("span",{className:"".concat(Bi,"-item-content")},_o),Oa&&Ze.createElement(se,{className:"".concat(Bi,"-item-remove"),onMouseDown:kt,onClick:Xo,customizeIcon:li},"\xD7"))}function er(lo,_o,ga,Oa,Xo){var Fa=function(Br){kt(Br),Or(!kn)};return Ze.createElement("span",{onMouseDown:Fa},Pr({label:_o,value:lo,disabled:ga,closable:Oa,onClose:Xo}))}function Wr(lo){var _o=lo.disabled,ga=lo.label,Oa=lo.value,Xo=!Gt&&!_o,Fa=ga;if(typeof Qi=="number"&&(typeof ga=="string"||typeof ga=="number")){var Gr=String(Fa);Gr.length>Qi&&(Fa="".concat(Gr.slice(0,Qi),"..."))}var Br=function(xo){xo&&xo.stopPropagation(),ar(lo)};return typeof Pr=="function"?er(Oa,Fa,_o,Xo,Br):Ui(lo,Fa,_o,Xo,Br)}function no(lo){var _o=typeof wn=="function"?wn(lo):wn;return Ui({title:_o},_o,!1)}var xi=Ze.createElement("div",{className:"".concat(Bi,"-search"),style:{width:dr},onFocus:function(){so(!0)},onBlur:function(){so(!1)}},Ze.createElement(Re,{ref:In,open:kn,prefixCls:rn,id:Vt,inputElement:null,disabled:Gt,autoFocus:fi,autoComplete:ui,editable:oo,activeDescendantId:ni,value:Mo,onKeyDown:Ci,onMouseDown:_i,onChange:fn,onPaste:Rn,onCompositionStart:ki,onCompositionEnd:Wi,tabIndex:ci,attrs:(0,je.Z)(rt,!0)}),Ze.createElement("span",{ref:cr,className:"".concat(Bi,"-search-mirror"),"aria-hidden":!0},Mo,"\xA0")),tt=Ze.createElement(qe.Z,{prefixCls:"".concat(Bi,"-overflow"),data:Pn,renderItem:Wr,renderRest:no,suffix:xi,itemKey:Ge,maxCount:Ni});return Ze.createElement(Ze.Fragment,null,tt,!Pn.length&&!Mo&&Ze.createElement("span",{className:"".concat(Bi,"-placeholder")},ii))},ln=un,Ft=function(rt){var Vt=rt.inputElement,rn=rt.prefixCls,Pn=rt.id,kn=rt.inputRef,St=rt.disabled,hn=rt.autoFocus,In=rt.autoComplete,ii=rt.activeDescendantId,Gt=rt.mode,Jt=rt.open,hi=rt.values,fi=rt.placeholder,ui=rt.tabIndex,ni=rt.showSearch,ci=rt.searchValue,li=rt.activeValue,Ni=rt.maxLength,Qi=rt.onInputKeyDown,lr=rt.onInputMouseDown,wn=rt.onInputChange,Pr=rt.onInputPaste,Or=rt.onInputCompositionStart,ar=rt.onInputCompositionEnd,fn=rt.title,Rn=Ze.useState(!1),Ci=(0,_e.Z)(Rn,2),_i=Ci[0],ki=Ci[1],Wi=Gt==="combobox",cr=Wi||ni,qi=hi[0],nr=ci||"";Wi&&li&&!_i&&(nr=li),Ze.useEffect(function(){Wi&&ki(!1)},[Wi,li]);var dr=Gt!=="combobox"&&!Jt&&!ni?!1:!!nr,Mn=fn===void 0?Ut(qi):fn,to=function(){if(qi)return null;var Hr=dr?{visibility:"hidden"}:void 0;return Ze.createElement("span",{className:"".concat(rn,"-selection-placeholder"),style:Hr},fi)};return Ze.createElement(Ze.Fragment,null,Ze.createElement("span",{className:"".concat(rn,"-selection-search")},Ze.createElement(Re,{ref:kn,prefixCls:rn,id:Pn,open:Jt,inputElement:Vt,disabled:St,autoFocus:hn,autoComplete:In,editable:cr,activeDescendantId:ii,value:nr,onKeyDown:Qi,onMouseDown:lr,onChange:function(Hr){ki(!0),wn(Hr)},onPaste:Pr,onCompositionStart:Or,onCompositionEnd:ar,tabIndex:ui,attrs:(0,je.Z)(rt,!0),maxLength:Wi?Ni:void 0})),!Wi&&qi?Ze.createElement("span",{className:"".concat(rn,"-selection-item"),title:Mn,style:dr?{visibility:"hidden"}:void 0},qi.label):null,to())},$t=Ft;function Qt(vt){return![te.Z.ESC,te.Z.SHIFT,te.Z.BACKSPACE,te.Z.TAB,te.Z.WIN_KEY,te.Z.ALT,te.Z.META,te.Z.WIN_KEY_RIGHT,te.Z.CTRL,te.Z.SEMICOLON,te.Z.EQUALS,te.Z.CAPS_LOCK,te.Z.CONTEXT_MENU,te.Z.F1,te.Z.F2,te.Z.F3,te.Z.F4,te.Z.F5,te.Z.F6,te.Z.F7,te.Z.F8,te.Z.F9,te.Z.F10,te.Z.F11,te.Z.F12].includes(vt)}var Bn=function(rt,Vt){var rn=(0,Ze.useRef)(null),Pn=(0,Ze.useRef)(!1),kn=rt.prefixCls,St=rt.open,hn=rt.mode,In=rt.showSearch,ii=rt.tokenWithEnter,Gt=rt.autoClearSearchValue,Jt=rt.onSearch,hi=rt.onSearchSubmit,fi=rt.onToggleOpen,ui=rt.onInputKeyDown,ni=rt.domRef;Ze.useImperativeHandle(Vt,function(){return{focus:function(){rn.current.focus()},blur:function(){rn.current.blur()}}});var ci=be(0),li=(0,_e.Z)(ci,2),Ni=li[0],Qi=li[1],lr=function(nr){var dr=nr.which;(dr===te.Z.UP||dr===te.Z.DOWN)&&nr.preventDefault(),ui&&ui(nr),dr===te.Z.ENTER&&hn==="tags"&&!Pn.current&&!St&&(hi==null||hi(nr.target.value)),Qt(dr)&&fi(!0)},wn=function(){Qi(!0)},Pr=(0,Ze.useRef)(null),Or=function(nr){Jt(nr,!0,Pn.current)!==!1&&fi(!0)},ar=function(){Pn.current=!0},fn=function(nr){Pn.current=!1,hn!=="combobox"&&Or(nr.target.value)},Rn=function(nr){var dr=nr.target.value;if(ii&&Pr.current&&/[\r\n]/.test(Pr.current)){var Mn=Pr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");dr=dr.replace(Mn,Pr.current)}Pr.current=null,Or(dr)},Ci=function(nr){var dr=nr.clipboardData,Mn=dr.getData("text");Pr.current=Mn},_i=function(nr){var dr=nr.target;if(dr!==rn.current){var Mn=document.body.style.msTouchAction!==void 0;Mn?setTimeout(function(){rn.current.focus()}):rn.current.focus()}},ki=function(nr){var dr=Ni();nr.target!==rn.current&&!dr&&hn!=="combobox"&&nr.preventDefault(),(hn!=="combobox"&&(!In||!dr)||!St)&&(St&&Gt!==!1&&Jt("",!0,!1),fi())},Wi={inputRef:rn,onInputKeyDown:lr,onInputMouseDown:wn,onInputChange:Rn,onInputPaste:Ci,onInputCompositionStart:ar,onInputCompositionEnd:fn},cr=hn==="multiple"||hn==="tags"?Ze.createElement(ln,(0,ce.Z)({},rt,Wi)):Ze.createElement($t,(0,ce.Z)({},rt,Wi));return Ze.createElement("div",{ref:ni,className:"".concat(kn,"-selector"),onClick:_i,onMouseDown:ki},cr)},on=Ze.forwardRef(Bn);on.displayName="Selector";var Cn=on,gt=ve(35593),En=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Vn=function(rt){var Vt=rt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Vt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Vt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Vt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Vt,adjustY:1},htmlRegion:"scroll"}}},He=function(rt,Vt){var rn=rt.prefixCls,Pn=rt.disabled,kn=rt.visible,St=rt.children,hn=rt.popupElement,In=rt.animation,ii=rt.transitionName,Gt=rt.dropdownStyle,Jt=rt.dropdownClassName,hi=rt.direction,fi=hi===void 0?"ltr":hi,ui=rt.placement,ni=rt.builtinPlacements,ci=rt.dropdownMatchSelectWidth,li=rt.dropdownRender,Ni=rt.dropdownAlign,Qi=rt.getPopupContainer,lr=rt.empty,wn=rt.getTriggerDOMNode,Pr=rt.onPopupVisibleChange,Or=rt.onPopupMouseEnter,ar=(0,Ke.Z)(rt,En),fn="".concat(rn,"-dropdown"),Rn=hn;li&&(Rn=li(hn));var Ci=Ze.useMemo(function(){return ni||Vn(ci)},[ni,ci]),_i=In?"".concat(fn,"-").concat(In):ii,ki=typeof ci=="number",Wi=Ze.useMemo(function(){return ki?null:ci===!1?"minWidth":"width"},[ci,ki]),cr=Gt;ki&&(cr=(0,Ct.Z)((0,Ct.Z)({},cr),{},{width:ci}));var qi=Ze.useRef(null);return Ze.useImperativeHandle(Vt,function(){return{getPopupElement:function(){return qi.current}}}),Ze.createElement(gt.Z,(0,ce.Z)({},ar,{showAction:Pr?["click"]:[],hideAction:Pr?["click"]:[],popupPlacement:ui||(fi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ci,prefixCls:fn,popupTransitionName:_i,popup:Ze.createElement("div",{ref:qi,onMouseEnter:Or},Rn),stretch:Wi,popupAlign:Ni,popupVisible:kn,getPopupContainer:Qi,popupClassName:ht()(Jt,(0,ze.Z)({},"".concat(fn,"-empty"),lr)),popupStyle:cr,getTriggerDOMNode:wn,onPopupVisibleChange:Pr}),St)},Ce=Ze.forwardRef(He);Ce.displayName="SelectTrigger";var Pe=Ce,Ne=ve(34589);function ke(vt,rt){var Vt=vt.key,rn;return"value"in vt&&(rn=vt.value),Vt!=null?Vt:rn!==void 0?rn:"rc-index-key-".concat(rt)}function Se(vt,rt){var Vt=vt||{},rn=Vt.label,Pn=Vt.value,kn=Vt.options,St=Vt.groupLabel,hn=rn||(rt?"children":"label");return{label:hn,value:Pn||"value",options:kn||"options",groupLabel:St||hn}}function nt(vt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Vt=rt.fieldNames,rn=rt.childrenAsData,Pn=[],kn=Se(Vt,!1),St=kn.label,hn=kn.value,In=kn.options,ii=kn.groupLabel;function Gt(Jt,hi){Jt.forEach(function(fi){if(hi||!(In in fi)){var ui=fi[hn];Pn.push({key:ke(fi,Pn.length),groupOption:hi,data:fi,label:fi[St],value:ui})}else{var ni=fi[ii];ni===void 0&&rn&&(ni=fi.label),Pn.push({key:ke(fi,Pn.length),group:!0,data:fi,label:ni}),Gt(fi[In],!0)}})}return Gt(vt,!1),Pn}function Pt(vt){var rt=(0,Ct.Z)({},vt);return"props"in rt||Object.defineProperty(rt,"props",{get:function(){return(0,ct.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),rt}}),rt}function Xe(vt,rt){if(!rt||!rt.length)return null;var Vt=!1;function rn(kn,St){var hn=(0,Ne.Z)(St),In=hn[0],ii=hn.slice(1);if(!In)return[kn];var Gt=kn.split(In);return Vt=Vt||Gt.length>1,Gt.reduce(function(Jt,hi){return[].concat((0,De.Z)(Jt),(0,De.Z)(rn(hi,ii)))},[]).filter(function(Jt){return Jt})}var Pn=rn(vt,rt);return Vt?Pn:null}var Je=["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"],yt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function wt(vt){return vt==="tags"||vt==="multiple"}var ot=Ze.forwardRef(function(vt,rt){var Vt,rn,Pn=vt.id,kn=vt.prefixCls,St=vt.className,hn=vt.showSearch,In=vt.tagRender,ii=vt.direction,Gt=vt.omitDomProps,Jt=vt.displayValues,hi=vt.onDisplayValuesChange,fi=vt.emptyOptions,ui=vt.notFoundContent,ni=ui===void 0?"Not Found":ui,ci=vt.onClear,li=vt.mode,Ni=vt.disabled,Qi=vt.loading,lr=vt.getInputElement,wn=vt.getRawInputElement,Pr=vt.open,Or=vt.defaultOpen,ar=vt.onDropdownVisibleChange,fn=vt.activeValue,Rn=vt.onActiveValueChange,Ci=vt.activeDescendantId,_i=vt.searchValue,ki=vt.autoClearSearchValue,Wi=vt.onSearch,cr=vt.onSearchSplit,qi=vt.tokenSeparators,nr=vt.allowClear,dr=vt.suffixIcon,Mn=vt.clearIcon,to=vt.OptionList,Ln=vt.animation,Hr=vt.transitionName,so=vt.dropdownStyle,Bi=vt.dropdownClassName,Mo=vt.dropdownMatchSelectWidth,oo=vt.dropdownRender,Ui=vt.dropdownAlign,er=vt.placement,Wr=vt.builtinPlacements,no=vt.getPopupContainer,xi=vt.showAction,tt=xi===void 0?[]:xi,lo=vt.onFocus,_o=vt.onBlur,ga=vt.onKeyUp,Oa=vt.onKeyDown,Xo=vt.onMouseDown,Fa=(0,Ke.Z)(vt,Je),Gr=wt(li),Br=(hn!==void 0?hn:Gr)||li==="combobox",yr=(0,Ct.Z)({},Fa);yt.forEach(function(Po){delete yr[Po]}),Gt==null||Gt.forEach(function(Po){delete yr[Po]});var xo=Ze.useState(!1),ua=(0,_e.Z)(xo,2),Tr=ua[0],ir=ua[1];Ze.useEffect(function(){ir((0,Ae.Z)())},[]);var Xn=Ze.useRef(null),wr=Ze.useRef(null),bo=Ze.useRef(null),ta=Ze.useRef(null),No=Ze.useRef(null),vo=Me(),na=(0,_e.Z)(vo,3),ia=na[0],Ba=na[1],Na=na[2];Ze.useImperativeHandle(rt,function(){var Po,Vo;return{focus:(Po=ta.current)===null||Po===void 0?void 0:Po.focus,blur:(Vo=ta.current)===null||Vo===void 0?void 0:Vo.blur,scrollTo:function(ds){var es;return(es=No.current)===null||es===void 0?void 0:es.scrollTo(ds)}}});var is=Ze.useMemo(function(){var Po;if(li!=="combobox")return _i;var Vo=(Po=Jt[0])===null||Po===void 0?void 0:Po.value;return typeof Vo=="string"||typeof Vo=="number"?String(Vo):""},[_i,li,Jt]),pn=li==="combobox"&&typeof lr=="function"&&lr()||null,Ia=typeof wn=="function"&&wn(),Vl=(0,ee.x1)(wr,Ia==null||(Vt=Ia.props)===null||Vt===void 0?void 0:Vt.ref),Hs=Ze.useState(!1),wl=(0,_e.Z)(Hs,2),ka=wl[0],yu=wl[1];(0,dt.Z)(function(){yu(!0)},[]);var Cl=(0,mt.Z)(!1,{defaultValue:Or,value:Pr}),ma=(0,_e.Z)(Cl,2),Fo=ma[0],Ul=ma[1],$r=ka?Fo:!1,$o=!ni&&fi;(Ni||$o&&$r&&li==="combobox")&&($r=!1);var yo=$o?!1:$r,Di=Ze.useCallback(function(Po){var Vo=Po!==void 0?Po:!$r;Ni||(Ul(Vo),$r!==Vo&&(ar==null||ar(Vo)))},[Ni,$r,Ul,ar]),$a=Ze.useMemo(function(){return(qi||[]).some(function(Po){return[`
`,`\r
`].includes(Po)})},[qi]),Ka=function(Vo,Ws,ds){var es=!0,Aa=Vo;Rn==null||Rn(null);var _a=ds?null:Xe(Vo,qi);return li!=="combobox"&&_a&&(Aa="",cr==null||cr(_a),Di(!1),es=!1),Wi&&is!==Aa&&Wi(Aa,{source:Ws?"typing":"effect"}),es},bs=function(Vo){!Vo||!Vo.trim()||Wi(Vo,{source:"submit"})};Ze.useEffect(function(){!$r&&!Gr&&li!=="combobox"&&Ka("",!1,!1)},[$r]),Ze.useEffect(function(){Fo&&Ni&&Ul(!1),Ni&&Ba(!1)},[Ni]);var El=be(),Dl=(0,_e.Z)(El,2),Ei=Dl[0],Ma=Dl[1],cs=function(Vo){var Ws=Ei(),ds=Vo.which;if(ds===te.Z.ENTER&&(li!=="combobox"&&Vo.preventDefault(),$r||Di(!0)),Ma(!!is),ds===te.Z.BACKSPACE&&!Ws&&Gr&&!is&&Jt.length){for(var es=(0,De.Z)(Jt),Aa=null,_a=es.length-1;_a>=0;_a-=1){var rs=es[_a];if(!rs.disabled){es.splice(_a,1),Aa=rs;break}}Aa&&hi(es,{type:"remove",values:[Aa]})}for(var Va=arguments.length,Gs=new Array(Va>1?Va-1:0),$s=1;$s<Va;$s++)Gs[$s-1]=arguments[$s];if($r&&No.current){var va;(va=No.current).onKeyDown.apply(va,[Vo].concat(Gs))}Oa==null||Oa.apply(void 0,[Vo].concat(Gs))},bl=function(Vo){for(var Ws=arguments.length,ds=new Array(Ws>1?Ws-1:0),es=1;es<Ws;es++)ds[es-1]=arguments[es];if($r&&No.current){var Aa;(Aa=No.current).onKeyUp.apply(Aa,[Vo].concat(ds))}ga==null||ga.apply(void 0,[Vo].concat(ds))},Ol=function(Vo){var Ws=Jt.filter(function(ds){return ds!==Vo});hi(Ws,{type:"remove",values:[Vo]})},Il=Ze.useRef(!1),Jr=function(){Ba(!0),Ni||(lo&&!Il.current&&lo.apply(void 0,arguments),tt.includes("focus")&&Di(!0)),Il.current=!0},Ju=function(){Ba(!1,function(){Il.current=!1,Di(!1)}),!Ni&&(is&&(li==="tags"?Wi(is,{source:"submit"}):li==="multiple"&&Wi("",{source:"blur"})),_o&&_o.apply(void 0,arguments))},nl=[];Ze.useEffect(function(){return function(){nl.forEach(function(Po){return clearTimeout(Po)}),nl.splice(0,nl.length)}},[]);var vs=function(Vo){var Ws,ds=Vo.target,es=(Ws=bo.current)===null||Ws===void 0?void 0:Ws.getPopupElement();if(es&&es.contains(ds)){var Aa=setTimeout(function(){var Gs=nl.indexOf(Aa);if(Gs!==-1&&nl.splice(Gs,1),Na(),!Tr&&!es.contains(document.activeElement)){var $s;($s=ta.current)===null||$s===void 0||$s.focus()}});nl.push(Aa)}for(var _a=arguments.length,rs=new Array(_a>1?_a-1:0),Va=1;Va<_a;Va++)rs[Va-1]=arguments[Va];Xo==null||Xo.apply(void 0,[Vo].concat(rs))},ys=Ze.useState({}),Su=(0,_e.Z)(ys,2),Iu=Su[1];function Ys(){Iu({})}var ul;Ia&&(ul=function(Vo){Di(Vo)}),Ie(function(){var Po;return[Xn.current,(Po=bo.current)===null||Po===void 0?void 0:Po.getPopupElement()]},yo,Di,!!Ia);var Mh=Ze.useMemo(function(){return(0,Ct.Z)((0,Ct.Z)({},vt),{},{notFoundContent:ni,open:$r,triggerOpen:yo,id:Pn,showSearch:Br,multiple:Gr,toggleOpen:Di})},[vt,ni,yo,$r,Pn,Br,Gr,Di]),uc=!!dr||Qi,Lh;uc&&(Lh=Ze.createElement(se,{className:ht()("".concat(kn,"-arrow"),(0,ze.Z)({},"".concat(kn,"-arrow-loading"),Qi)),customizeIcon:dr,customizeIconProps:{loading:Qi,searchValue:is,open:$r,focused:ia,showSearch:Br}}));var hc=function(){var Vo;ci==null||ci(),(Vo=ta.current)===null||Vo===void 0||Vo.focus(),hi([],{type:"clear",values:Jt}),Ka("",!1,!1)},Fh=de(kn,hc,Jt,nr,Mn,Ni,is,li),Ru=Fh.allowClear,Qu=Fh.clearIcon,Rl=Ze.createElement(to,{ref:No}),Hh=ht()(kn,St,(rn={},(0,ze.Z)(rn,"".concat(kn,"-focused"),ia),(0,ze.Z)(rn,"".concat(kn,"-multiple"),Gr),(0,ze.Z)(rn,"".concat(kn,"-single"),!Gr),(0,ze.Z)(rn,"".concat(kn,"-allow-clear"),nr),(0,ze.Z)(rn,"".concat(kn,"-show-arrow"),uc),(0,ze.Z)(rn,"".concat(kn,"-disabled"),Ni),(0,ze.Z)(rn,"".concat(kn,"-loading"),Qi),(0,ze.Z)(rn,"".concat(kn,"-open"),$r),(0,ze.Z)(rn,"".concat(kn,"-customize-input"),pn),(0,ze.Z)(rn,"".concat(kn,"-show-search"),Br),rn)),qu=Ze.createElement(Pe,{ref:bo,disabled:Ni,prefixCls:kn,visible:yo,popupElement:Rl,animation:Ln,transitionName:Hr,dropdownStyle:so,dropdownClassName:Bi,direction:ii,dropdownMatchSelectWidth:Mo,dropdownRender:oo,dropdownAlign:Ui,placement:er,builtinPlacements:Wr,getPopupContainer:no,empty:fi,getTriggerDOMNode:function(){return wr.current},onPopupVisibleChange:ul,onPopupMouseEnter:Ys},Ia?Ze.cloneElement(Ia,{ref:Vl}):Ze.createElement(Cn,(0,ce.Z)({},vt,{domRef:wr,prefixCls:kn,inputElement:pn,ref:ta,id:Pn,showSearch:Br,autoClearSearchValue:ki,mode:li,activeDescendantId:Ci,tagRender:In,values:Jt,open:$r,onToggleOpen:Di,activeValue:fn,searchValue:is,onSearch:Ka,onSearchSubmit:bs,onRemove:Ol,tokenWithEnter:$a}))),eh;return Ia?eh=qu:eh=Ze.createElement("div",(0,ce.Z)({className:Hh},yr,{ref:Xn,onMouseDown:vs,onKeyDown:cs,onKeyUp:bl,onFocus:Jr,onBlur:Ju}),ia&&!$r&&Ze.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(Jt.map(function(Po){var Vo=Po.label,Ws=Po.value;return["number","string"].includes((0,Be.Z)(Vo))?Vo:Ws}).join(", "))),qu,Lh,Ru&&Qu),Ze.createElement(me.Provider,{value:Mh},eh)}),It=ot,sn=function(vt,rt){var Vt=Ze.useRef({values:new Map,options:new Map}),rn=Ze.useMemo(function(){var kn=Vt.current,St=kn.values,hn=kn.options,In=vt.map(function(Jt){if(Jt.label===void 0){var hi;return(0,Ct.Z)((0,Ct.Z)({},Jt),{},{label:(hi=St.get(Jt.value))===null||hi===void 0?void 0:hi.label})}return Jt}),ii=new Map,Gt=new Map;return In.forEach(function(Jt){ii.set(Jt.value,Jt),Gt.set(Jt.value,rt.get(Jt.value)||hn.get(Jt.value))}),Vt.current.values=ii,Vt.current.options=Gt,In},[vt,rt]),Pn=Ze.useCallback(function(kn){return rt.get(kn)||Vt.current.options.get(kn)},[rt]);return[rn,Pn]};function Xt(vt,rt){return Tt(vt).join("").toUpperCase().includes(rt)}var Ht=function(vt,rt,Vt,rn,Pn){return Ze.useMemo(function(){if(!Vt||rn===!1)return vt;var kn=rt.options,St=rt.label,hn=rt.value,In=[],ii=typeof rn=="function",Gt=Vt.toUpperCase(),Jt=ii?rn:function(fi,ui){return Pn?Xt(ui[Pn],Gt):ui[kn]?Xt(ui[St!=="children"?St:"label"],Gt):Xt(ui[hn],Gt)},hi=ii?function(fi){return Pt(fi)}:function(fi){return fi};return vt.forEach(function(fi){if(fi[kn]){var ui=Jt(Vt,hi(fi));if(ui)In.push(fi);else{var ni=fi[kn].filter(function(ci){return Jt(Vt,hi(ci))});ni.length&&In.push((0,Ct.Z)((0,Ct.Z)({},fi),{},(0,ze.Z)({},kn,ni)))}return}Jt(Vt,hi(fi))&&In.push(fi)}),In},[vt,rn,Pn,Vt,rt])},xn=ve(17115),Dn=ve(11592),cn=["children","value"],Un=["children"];function ti(vt){var rt=vt,Vt=rt.key,rn=rt.props,Pn=rn.children,kn=rn.value,St=(0,Ke.Z)(rn,cn);return(0,Ct.Z)({key:Vt,value:kn!==void 0?kn:Vt,children:Pn},St)}function Wn(vt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Dn.Z)(vt).map(function(Vt,rn){if(!Ze.isValidElement(Vt)||!Vt.type)return null;var Pn=Vt,kn=Pn.type.isSelectOptGroup,St=Pn.key,hn=Pn.props,In=hn.children,ii=(0,Ke.Z)(hn,Un);return rt||!kn?ti(Vt):(0,Ct.Z)((0,Ct.Z)({key:"__RC_SELECT_GRP__".concat(St===null?rn:St,"__"),label:St},ii),{},{options:Wn(In)})}).filter(function(Vt){return Vt})}function Zn(vt,rt,Vt,rn,Pn){return Ze.useMemo(function(){var kn=vt,St=!vt;St&&(kn=Wn(rt));var hn=new Map,In=new Map,ii=function(hi,fi,ui){ui&&typeof ui=="string"&&hi.set(fi[ui],fi)};function Gt(Jt){for(var hi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fi=0;fi<Jt.length;fi+=1){var ui=Jt[fi];!ui[Vt.options]||hi?(hn.set(ui[Vt.value],ui),ii(In,ui,Vt.label),ii(In,ui,rn),ii(In,ui,Pn)):Gt(ui[Vt.options],!0)}}return Gt(kn),{options:kn,valueOptions:hn,labelOptions:In}},[vt,rt,Vt,rn,Pn])}function Jn(vt){var rt=Ze.useRef();rt.current=vt;var Vt=Ze.useCallback(function(){return rt.current.apply(rt,arguments)},[]);return Vt}var vi=function(){return null};vi.isSelectOptGroup=!0;var pi=vi,zi=function(){return null};zi.isSelectOption=!0;var $i=zi,Yn=ve(80547),Gn=ve(2738),oi=ve(4409),Li=Ze.createContext(null),di=Li;function gr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Ii=["disabled","title","children","style","className"];function Le(vt){return typeof vt=="string"||typeof vt=="number"}var si=function(rt,Vt){var rn=we(),Pn=rn.prefixCls,kn=rn.id,St=rn.open,hn=rn.multiple,In=rn.mode,ii=rn.searchValue,Gt=rn.toggleOpen,Jt=rn.notFoundContent,hi=rn.onPopupScroll,fi=Ze.useContext(di),ui=fi.flattenOptions,ni=fi.onActiveValue,ci=fi.defaultActiveFirstOption,li=fi.onSelect,Ni=fi.menuItemSelectedIcon,Qi=fi.rawValues,lr=fi.fieldNames,wn=fi.virtual,Pr=fi.direction,Or=fi.listHeight,ar=fi.listItemHeight,fn="".concat(Pn,"-item"),Rn=(0,Yn.Z)(function(){return ui},[St,ui],function(Ui,er){return er[0]&&Ui[1]!==er[1]}),Ci=Ze.useRef(null),_i=function(er){er.preventDefault()},ki=function(er){Ci.current&&Ci.current.scrollTo(typeof er=="number"?{index:er}:er)},Wi=function(er){for(var Wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,no=Rn.length,xi=0;xi<no;xi+=1){var tt=(er+xi*Wr+no)%no,lo=Rn[tt],_o=lo.group,ga=lo.data;if(!_o&&!ga.disabled)return tt}return-1},cr=Ze.useState(function(){return Wi(0)}),qi=(0,_e.Z)(cr,2),nr=qi[0],dr=qi[1],Mn=function(er){var Wr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;dr(er);var no={source:Wr?"keyboard":"mouse"},xi=Rn[er];if(!xi){ni(null,-1,no);return}ni(xi.value,er,no)};(0,Ze.useEffect)(function(){Mn(ci!==!1?Wi(0):-1)},[Rn.length,ii]);var to=Ze.useCallback(function(Ui){return Qi.has(Ui)&&In!=="combobox"},[In,(0,De.Z)(Qi).toString(),Qi.size]);(0,Ze.useEffect)(function(){var Ui=setTimeout(function(){if(!hn&&St&&Qi.size===1){var Wr=Array.from(Qi)[0],no=Rn.findIndex(function(xi){var tt=xi.data;return tt.value===Wr});no!==-1&&(Mn(no),ki(no))}});if(St){var er;(er=Ci.current)===null||er===void 0||er.scrollTo(void 0)}return function(){return clearTimeout(Ui)}},[St,ii,ui.length]);var Ln=function(er){er!==void 0&&li(er,{selected:!Qi.has(er)}),hn||Gt(!1)};if(Ze.useImperativeHandle(Vt,function(){return{onKeyDown:function(er){var Wr=er.which,no=er.ctrlKey;switch(Wr){case te.Z.N:case te.Z.P:case te.Z.UP:case te.Z.DOWN:{var xi=0;if(Wr===te.Z.UP?xi=-1:Wr===te.Z.DOWN?xi=1:gr()&&no&&(Wr===te.Z.N?xi=1:Wr===te.Z.P&&(xi=-1)),xi!==0){var tt=Wi(nr+xi,xi);ki(tt),Mn(tt,!0)}break}case te.Z.ENTER:{var lo=Rn[nr];lo&&!lo.data.disabled?Ln(lo.value):Ln(void 0),St&&er.preventDefault();break}case te.Z.ESC:Gt(!1),St&&er.stopPropagation()}},onKeyUp:function(){},scrollTo:function(er){ki(er)}}}),Rn.length===0)return Ze.createElement("div",{role:"listbox",id:"".concat(kn,"_list"),className:"".concat(fn,"-empty"),onMouseDown:_i},Jt);var Hr=Object.keys(lr).map(function(Ui){return lr[Ui]}),so=function(er){return er.label};function Bi(Ui,er){var Wr=Ui.group;return{role:Wr?"presentation":"option",id:"".concat(kn,"_list_").concat(er)}}var Mo=function(er){var Wr=Rn[er];if(!Wr)return null;var no=Wr.data||{},xi=no.value,tt=Wr.group,lo=(0,je.Z)(no,!0),_o=so(Wr);return Wr?Ze.createElement("div",(0,ce.Z)({"aria-label":typeof _o=="string"&&!tt?_o:null},lo,{key:er},Bi(Wr,er),{"aria-selected":to(xi)}),xi):null},oo={role:"listbox",id:"".concat(kn,"_list")};return Ze.createElement(Ze.Fragment,null,wn&&Ze.createElement("div",(0,ce.Z)({},oo,{style:{height:0,width:0,overflow:"hidden"}}),Mo(nr-1),Mo(nr),Mo(nr+1)),Ze.createElement(oi.Z,{itemKey:"key",ref:Ci,data:Rn,height:Or,itemHeight:ar,fullHeight:!1,onMouseDown:_i,onScroll:hi,virtual:wn,direction:Pr,innerProps:wn?null:oo},function(Ui,er){var Wr,no=Ui.group,xi=Ui.groupOption,tt=Ui.data,lo=Ui.label,_o=Ui.value,ga=tt.key;if(no){var Oa,Xo=(Oa=tt.title)!==null&&Oa!==void 0?Oa:Le(lo)?lo.toString():void 0;return Ze.createElement("div",{className:ht()(fn,"".concat(fn,"-group")),title:Xo},lo!==void 0?lo:ga)}var Fa=tt.disabled,Gr=tt.title,Br=tt.children,yr=tt.style,xo=tt.className,ua=(0,Ke.Z)(tt,Ii),Tr=(0,Gn.Z)(ua,Hr),ir=to(_o),Xn="".concat(fn,"-option"),wr=ht()(fn,Xn,xo,(Wr={},(0,ze.Z)(Wr,"".concat(Xn,"-grouped"),xi),(0,ze.Z)(Wr,"".concat(Xn,"-active"),nr===er&&!Fa),(0,ze.Z)(Wr,"".concat(Xn,"-disabled"),Fa),(0,ze.Z)(Wr,"".concat(Xn,"-selected"),ir),Wr)),bo=so(Ui),ta=!Ni||typeof Ni=="function"||ir,No=typeof bo=="number"?bo:bo||_o,vo=Le(No)?No.toString():void 0;return Gr!==void 0&&(vo=Gr),Ze.createElement("div",(0,ce.Z)({},(0,je.Z)(Tr),wn?{}:Bi(Ui,er),{"aria-selected":ir,className:wr,title:vo,onMouseMove:function(){nr===er||Fa||Mn(er)},onClick:function(){Fa||Ln(_o)},style:yr}),Ze.createElement("div",{className:"".concat(Xn,"-content")},No),Ze.isValidElement(Ni)||ir,ta&&Ze.createElement(se,{className:"".concat(fn,"-option-state"),customizeIcon:Ni,customizeIconProps:{isSelected:ir}},ir?"\u2713":null))}))},ji=Ze.forwardRef(si);ji.displayName="OptionList";var gn=ji;function qn(vt){var rt=vt.mode,Vt=vt.options,rn=vt.children,Pn=vt.backfill,kn=vt.allowClear,St=vt.placeholder,hn=vt.getInputElement,In=vt.showSearch,ii=vt.onSearch,Gt=vt.defaultOpen,Jt=vt.autoFocus,hi=vt.labelInValue,fi=vt.value,ui=vt.inputValue,ni=vt.optionLabelProp,ci=isMultiple(rt),li=In!==void 0?In:ci||rt==="combobox",Ni=Vt||convertChildrenToData(rn);if(warning(rt!=="tags"||Ni.every(function(Pr){return!Pr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),rt==="tags"||rt==="combobox"){var Qi=Ni.some(function(Pr){return Pr.options?Pr.options.some(function(Or){return typeof("value"in Or?Or.value:Or.key)=="number"}):typeof("value"in Pr?Pr.value:Pr.key)=="number"});warning(!Qi,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(rt!=="combobox"||!ni,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(rt==="combobox"||!Pn,"`backfill` only works with `combobox` mode."),warning(rt==="combobox"||!hn,"`getInputElement` only work with `combobox` mode."),noteOnce(rt!=="combobox"||!hn||!kn||!St,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ii&&!li&&rt!=="combobox"&&rt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Gt||Jt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fi!=null){var lr=toArray(fi);warning(!hi||lr.every(function(Pr){return _typeof(Pr)==="object"&&("key"in Pr||"value"in Pr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ci||Array.isArray(fi),"`value` should be array when `mode` is `multiple` or `tags`")}if(rn){var wn=null;toNodeArray(rn).some(function(Pr){if(!React.isValidElement(Pr)||!Pr.type)return!1;var Or=Pr,ar=Or.type;if(ar.isSelectOption)return!1;if(ar.isSelectOptGroup){var fn=toNodeArray(Pr.props.children).every(function(Rn){return!React.isValidElement(Rn)||!Pr.type||Rn.type.isSelectOption?!0:(wn=Rn.type,!1)});return!fn}return wn=ar,!0}),wn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(wn.displayName||wn.name||wn,"`.")),warning(ui===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function mi(vt,rt){if(vt){var Vt=function rn(Pn){for(var kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=0;St<Pn.length;St++){var hn=Pn[St];if(hn[rt==null?void 0:rt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!kn&&Array.isArray(hn[rt==null?void 0:rt.options])&&rn(hn[rt==null?void 0:rt.options],!0))break}};Vt(vt)}}var Fi=null,jn=["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"],Tn=["inputValue"];function At(vt){return!vt||(0,Be.Z)(vt)!=="object"}var Dt=Ze.forwardRef(function(vt,rt){var Vt=vt.id,rn=vt.mode,Pn=vt.prefixCls,kn=Pn===void 0?"rc-select":Pn,St=vt.backfill,hn=vt.fieldNames,In=vt.inputValue,ii=vt.searchValue,Gt=vt.onSearch,Jt=vt.autoClearSearchValue,hi=Jt===void 0?!0:Jt,fi=vt.onSelect,ui=vt.onDeselect,ni=vt.dropdownMatchSelectWidth,ci=ni===void 0?!0:ni,li=vt.filterOption,Ni=vt.filterSort,Qi=vt.optionFilterProp,lr=vt.optionLabelProp,wn=vt.options,Pr=vt.children,Or=vt.defaultActiveFirstOption,ar=vt.menuItemSelectedIcon,fn=vt.virtual,Rn=vt.direction,Ci=vt.listHeight,_i=Ci===void 0?200:Ci,ki=vt.listItemHeight,Wi=ki===void 0?20:ki,cr=vt.value,qi=vt.defaultValue,nr=vt.labelInValue,dr=vt.onChange,Mn=(0,Ke.Z)(vt,jn),to=(0,xn.ZP)(Vt),Ln=wt(rn),Hr=!!(!wn&&Pr),so=Ze.useMemo(function(){return li===void 0&&rn==="combobox"?!1:li},[li,rn]),Bi=Ze.useMemo(function(){return Se(hn,Hr)},[JSON.stringify(hn),Hr]),Mo=(0,mt.Z)("",{value:ii!==void 0?ii:In,postState:function($o){return $o||""}}),oo=(0,_e.Z)(Mo,2),Ui=oo[0],er=oo[1],Wr=Zn(wn,Pr,Bi,Qi,lr),no=Wr.valueOptions,xi=Wr.labelOptions,tt=Wr.options,lo=Ze.useCallback(function($r){var $o=Tt($r);return $o.map(function(yo){var Di,$a,Ka,bs,El;if(At(yo))Di=yo;else{var Dl;Ka=yo.key,$a=yo.label,Di=(Dl=yo.value)!==null&&Dl!==void 0?Dl:Ka}var Ei=no.get(Di);if(Ei){var Ma;if($a===void 0&&($a=Ei==null?void 0:Ei[lr||Bi.label]),Ka===void 0&&(Ka=(Ma=Ei==null?void 0:Ei.key)!==null&&Ma!==void 0?Ma:Di),bs=Ei==null?void 0:Ei.disabled,El=Ei==null?void 0:Ei.title,0)var cs}return{label:$a,value:Di,key:Ka,disabled:bs,title:El}})},[Bi,lr,no]),_o=(0,mt.Z)(qi,{value:cr}),ga=(0,_e.Z)(_o,2),Oa=ga[0],Xo=ga[1],Fa=Ze.useMemo(function(){var $r,$o=lo(Oa);return rn==="combobox"&&Nt(($r=$o[0])===null||$r===void 0?void 0:$r.value)?[]:$o},[Oa,lo,rn]),Gr=sn(Fa,no),Br=(0,_e.Z)(Gr,2),yr=Br[0],xo=Br[1],ua=Ze.useMemo(function(){if(!rn&&yr.length===1){var $r=yr[0];if($r.value===null&&($r.label===null||$r.label===void 0))return[]}return yr.map(function($o){var yo;return(0,Ct.Z)((0,Ct.Z)({},$o),{},{label:(yo=$o.label)!==null&&yo!==void 0?yo:$o.value})})},[rn,yr]),Tr=Ze.useMemo(function(){return new Set(yr.map(function($r){return $r.value}))},[yr]);Ze.useEffect(function(){if(rn==="combobox"){var $r,$o=($r=yr[0])===null||$r===void 0?void 0:$r.value;er(Bt($o)?String($o):"")}},[yr]);var ir=Jn(function($r,$o){var yo,Di=$o!=null?$o:$r;return yo={},(0,ze.Z)(yo,Bi.value,$r),(0,ze.Z)(yo,Bi.label,Di),yo}),Xn=Ze.useMemo(function(){if(rn!=="tags")return tt;var $r=(0,De.Z)(tt),$o=function(Di){return no.has(Di)};return(0,De.Z)(yr).sort(function(yo,Di){return yo.value<Di.value?-1:1}).forEach(function(yo){var Di=yo.value;$o(Di)||$r.push(ir(Di,yo.label))}),$r},[ir,tt,no,yr,rn]),wr=Ht(Xn,Bi,Ui,so,Qi),bo=Ze.useMemo(function(){return rn!=="tags"||!Ui||wr.some(function($r){return $r[Qi||"value"]===Ui})||wr.some(function($r){return $r[Bi.value]===Ui})?wr:[ir(Ui)].concat((0,De.Z)(wr))},[ir,Qi,rn,wr,Ui,Bi]),ta=Ze.useMemo(function(){return Ni?(0,De.Z)(bo).sort(function($r,$o){return Ni($r,$o)}):bo},[bo,Ni]),No=Ze.useMemo(function(){return nt(ta,{fieldNames:Bi,childrenAsData:Hr})},[ta,Bi,Hr]),vo=function($o){var yo=lo($o);if(Xo(yo),dr&&(yo.length!==yr.length||yo.some(function(Ka,bs){var El;return((El=yr[bs])===null||El===void 0?void 0:El.value)!==(Ka==null?void 0:Ka.value)}))){var Di=nr?yo:yo.map(function(Ka){return Ka.value}),$a=yo.map(function(Ka){return Pt(xo(Ka.value))});dr(Ln?Di:Di[0],Ln?$a:$a[0])}},na=Ze.useState(null),ia=(0,_e.Z)(na,2),Ba=ia[0],Na=ia[1],is=Ze.useState(0),pn=(0,_e.Z)(is,2),Ia=pn[0],Vl=pn[1],Hs=Or!==void 0?Or:rn!=="combobox",wl=Ze.useCallback(function($r,$o){var yo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Di=yo.source,$a=Di===void 0?"keyboard":Di;Vl($o),St&&rn==="combobox"&&$r!==null&&$a==="keyboard"&&Na(String($r))},[St,rn]),ka=function($o,yo,Di){var $a=function(){var Il,Jr=xo($o);return[nr?{label:Jr==null?void 0:Jr[Bi.label],value:$o,key:(Il=Jr==null?void 0:Jr.key)!==null&&Il!==void 0?Il:$o}:$o,Pt(Jr)]};if(yo&&fi){var Ka=$a(),bs=(0,_e.Z)(Ka,2),El=bs[0],Dl=bs[1];fi(El,Dl)}else if(!yo&&ui&&Di!=="clear"){var Ei=$a(),Ma=(0,_e.Z)(Ei,2),cs=Ma[0],bl=Ma[1];ui(cs,bl)}},yu=Jn(function($r,$o){var yo,Di=Ln?$o.selected:!0;Di?yo=Ln?[].concat((0,De.Z)(yr),[$r]):[$r]:yo=yr.filter(function($a){return $a.value!==$r}),vo(yo),ka($r,Di),rn==="combobox"?Na(""):(!wt||hi)&&(er(""),Na(""))}),Cl=function($o,yo){vo($o);var Di=yo.type,$a=yo.values;(Di==="remove"||Di==="clear")&&$a.forEach(function(Ka){ka(Ka.value,!1,Di)})},ma=function($o,yo){if(er($o),Na(null),yo.source==="submit"){var Di=($o||"").trim();if(Di){var $a=Array.from(new Set([].concat((0,De.Z)(Tr),[Di])));vo($a),ka(Di,!0),er("")}return}yo.source!=="blur"&&(rn==="combobox"&&vo($o),Gt==null||Gt($o))},Fo=function($o){var yo=$o;rn!=="tags"&&(yo=$o.map(function($a){var Ka=xi.get($a);return Ka==null?void 0:Ka.value}).filter(function($a){return $a!==void 0}));var Di=Array.from(new Set([].concat((0,De.Z)(Tr),(0,De.Z)(yo))));vo(Di),Di.forEach(function($a){ka($a,!0)})},Ul=Ze.useMemo(function(){var $r=fn!==!1&&ci!==!1;return(0,Ct.Z)((0,Ct.Z)({},Wr),{},{flattenOptions:No,onActiveValue:wl,defaultActiveFirstOption:Hs,onSelect:yu,menuItemSelectedIcon:ar,rawValues:Tr,fieldNames:Bi,virtual:$r,direction:Rn,listHeight:_i,listItemHeight:Wi,childrenAsData:Hr})},[Wr,No,wl,Hs,yu,ar,Tr,Bi,fn,ci,_i,Wi,Hr]);return Ze.createElement(di.Provider,{value:Ul},Ze.createElement(It,(0,ce.Z)({},Mn,{id:to,prefixCls:kn,ref:rt,omitDomProps:Tn,mode:rn,displayValues:ua,onDisplayValuesChange:Cl,direction:Rn,searchValue:Ui,onSearch:ma,autoClearSearchValue:hi,onSearchSplit:Fo,dropdownMatchSelectWidth:ci,OptionList:gn,emptyOptions:!No.length,activeValue:Ba,activeDescendantId:"".concat(to,"_list_").concat(Ia)})))}),Ve=Dt;Ve.Option=$i,Ve.OptGroup=pi;var Yt=Ve,tn=Yt},9296:function(Sn,an,ve){"use strict";ve.r(an),ve.d(an,{ResizableTextArea:function(){return ft},default:function(){return Nt}});var ce=ve(92413),De=ve(33708),ze=ve(400),Ct=ve(39559),_e=ve(33606),Ke=ve(37061),Be=ve(26407),mt=ve(92310),ct=ve.n(mt),Ze=ve(93681),Et=ve(5643),ht=ve(18929),dt=ve(59301),Ae=ve(29301),te=ve(34280),ee=ve(16089),he=`
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;
`,se=["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"],de={},me;function we(Zt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=Zt.getAttribute("id")||Zt.getAttribute("data-reactid")||Zt.getAttribute("name");if(Ut&&de[lt])return de[lt];var Ge=window.getComputedStyle(Zt),kt=Ge.getPropertyValue("box-sizing")||Ge.getPropertyValue("-moz-box-sizing")||Ge.getPropertyValue("-webkit-box-sizing"),un=parseFloat(Ge.getPropertyValue("padding-bottom"))+parseFloat(Ge.getPropertyValue("padding-top")),ln=parseFloat(Ge.getPropertyValue("border-bottom-width"))+parseFloat(Ge.getPropertyValue("border-top-width")),Ft=se.map(function(Qt){return"".concat(Qt,":").concat(Ge.getPropertyValue(Qt))}).join(";"),$t={sizingStyle:Ft,paddingSize:un,borderSize:ln,boxSizing:kt};return Ut&&lt&&(de[lt]=$t),$t}function Me(Zt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;me||(me=document.createElement("textarea"),me.setAttribute("tab-index","-1"),me.setAttribute("aria-hidden","true"),document.body.appendChild(me)),Zt.getAttribute("wrap")?me.setAttribute("wrap",Zt.getAttribute("wrap")):me.removeAttribute("wrap");var kt=we(Zt,Ut),un=kt.paddingSize,ln=kt.borderSize,Ft=kt.boxSizing,$t=kt.sizingStyle;me.setAttribute("style","".concat($t,";").concat(he)),me.value=Zt.value||Zt.placeholder||"";var Qt=void 0,Bn=void 0,on,Cn=me.scrollHeight;if(Ft==="border-box"?Cn+=ln:Ft==="content-box"&&(Cn-=un),lt!==null||Ge!==null){me.value=" ";var gt=me.scrollHeight-un;lt!==null&&(Qt=gt*lt,Ft==="border-box"&&(Qt=Qt+un+ln),Cn=Math.max(Qt,Cn)),Ge!==null&&(Bn=gt*Ge,Ft==="border-box"&&(Bn=Bn+un+ln),on=Cn>Bn?"":"hidden",Cn=Math.min(Bn,Cn))}var En={height:Cn,overflowY:on,resize:"none"};return Qt&&(En.minHeight=Qt),Bn&&(En.maxHeight=Bn),En}var be=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ie=0,je=1,qe=2,$e=dt.forwardRef(function(Zt,Ut){var lt=Zt,Ge=lt.prefixCls,kt=lt.onPressEnter,un=lt.defaultValue,ln=lt.value,Ft=lt.autoSize,$t=lt.onResize,Qt=lt.className,Bn=lt.style,on=lt.disabled,Cn=lt.onChange,gt=lt.onInternalAutoSize,En=(0,Ke.Z)(lt,be),Vn=(0,ht.Z)(un,{value:ln,postState:function(pi){return pi!=null?pi:""}}),He=(0,_e.Z)(Vn,2),Ce=He[0],Pe=He[1],Ne=function(pi){Pe(pi.target.value),Cn==null||Cn(pi)},ke=dt.useRef();dt.useImperativeHandle(Ut,function(){return{textArea:ke.current}});var Se=dt.useMemo(function(){return Ft&&(0,Ct.Z)(Ft)==="object"?[Ft.minRows,Ft.maxRows]:[]},[Ft]),nt=(0,_e.Z)(Se,2),Pt=nt[0],Xe=nt[1],Je=!!Ft,yt=function(){try{if(document.activeElement===ke.current){var pi=ke.current,zi=pi.selectionStart,$i=pi.selectionEnd,Yn=pi.scrollTop;ke.current.setSelectionRange(zi,$i),ke.current.scrollTop=Yn}}catch(Gn){}},wt=dt.useState(qe),ot=(0,_e.Z)(wt,2),It=ot[0],sn=ot[1],Xt=dt.useState(),Ht=(0,_e.Z)(Xt,2),xn=Ht[0],Dn=Ht[1],cn=function(){sn(Ie)};(0,te.Z)(function(){Je&&cn()},[ln,Pt,Xe,Je]),(0,te.Z)(function(){if(It===Ie)sn(je);else if(It===je){var vi=Me(ke.current,!1,Pt,Xe);sn(qe),Dn(vi)}else yt()},[It]);var Un=dt.useRef(),ti=function(){ee.Z.cancel(Un.current)},Wn=function(pi){It===qe&&($t==null||$t(pi),Ft&&(ti(),Un.current=(0,ee.Z)(function(){cn()})))};dt.useEffect(function(){return ti},[]);var Zn=Je?xn:null,Jn=(0,De.Z)((0,De.Z)({},Bn),Zn);return(It===Ie||It===je)&&(Jn.overflowY="hidden",Jn.overflowX="hidden"),dt.createElement(Ae.Z,{onResize:Wn,disabled:!(Ft||$t)},dt.createElement("textarea",(0,ce.Z)({},En,{ref:ke,style:Jn,className:ct()(Ge,Qt,(0,ze.Z)({},"".concat(Ge,"-disabled"),on)),disabled:on,value:Ce,onChange:Ne})))}),ft=$e,Re=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Tt(Zt,Ut){return(0,Be.Z)(Zt||"").slice(0,Ut).join("")}function et(Zt,Ut,lt,Ge){var kt=lt;return Zt?kt=Tt(lt,Ge):(0,Be.Z)(Ut||"").length<lt.length&&(0,Be.Z)(lt||"").length>Ge&&(kt=Ut),kt}var bt=dt.forwardRef(function(Zt,Ut){var lt,Ge=Zt.defaultValue,kt=Zt.value,un=Zt.onFocus,ln=Zt.onBlur,Ft=Zt.onChange,$t=Zt.allowClear,Qt=Zt.maxLength,Bn=Zt.onCompositionStart,on=Zt.onCompositionEnd,Cn=Zt.suffix,gt=Zt.prefixCls,En=gt===void 0?"rc-textarea":gt,Vn=Zt.classes,He=Zt.showCount,Ce=Zt.className,Pe=Zt.style,Ne=Zt.disabled,ke=Zt.hidden,Se=Zt.classNames,nt=Zt.styles,Pt=Zt.onResize,Xe=(0,Ke.Z)(Zt,Re),Je=(0,ht.Z)(Ge,{value:kt,defaultValue:Ge}),yt=(0,_e.Z)(Je,2),wt=yt[0],ot=yt[1],It=(0,dt.useRef)(null),sn=dt.useState(!1),Xt=(0,_e.Z)(sn,2),Ht=Xt[0],xn=Xt[1],Dn=dt.useState(!1),cn=(0,_e.Z)(Dn,2),Un=cn[0],ti=cn[1],Wn=dt.useRef(),Zn=dt.useRef(0),Jn=dt.useState(null),vi=(0,_e.Z)(Jn,2),pi=vi[0],zi=vi[1],$i=function(){var At;(At=It.current)===null||At===void 0||At.textArea.focus()};(0,dt.useImperativeHandle)(Ut,function(){return{resizableTextArea:It.current,focus:$i,blur:function(){var At;(At=It.current)===null||At===void 0||At.textArea.blur()}}}),(0,dt.useEffect)(function(){xn(function(Tn){return!Ne&&Tn})},[Ne]);var Yn=Number(Qt)>0,Gn=function(At){ti(!0),Wn.current=wt,Zn.current=At.currentTarget.selectionStart,Bn==null||Bn(At)},oi=function(At){ti(!1);var Dt=At.currentTarget.value;if(Yn){var Ve,Yt=Zn.current>=Qt+1||Zn.current===((Ve=Wn.current)===null||Ve===void 0?void 0:Ve.length);Dt=et(Yt,Wn.current,Dt,Qt)}Dt!==wt&&(ot(Dt),(0,Et.rJ)(At.currentTarget,At,Ft,Dt)),on==null||on(At)},Li=function(At){var Dt=At.target.value;if(!Un&&Yn){var Ve=At.target.selectionStart>=Qt+1||At.target.selectionStart===Dt.length||!At.target.selectionStart;Dt=et(Ve,wt,Dt,Qt)}ot(Dt),(0,Et.rJ)(At.currentTarget,At,Ft,Dt)},di=function(At){var Dt=Xe.onPressEnter,Ve=Xe.onKeyDown;At.key==="Enter"&&Dt&&Dt(At),Ve==null||Ve(At)},gr=function(At){xn(!0),un==null||un(At)},Ii=function(At){xn(!1),ln==null||ln(At)},Le=function(At){var Dt;ot(""),$i(),(0,Et.rJ)((Dt=It.current)===null||Dt===void 0?void 0:Dt.textArea,At,Ft)},si=(0,Et.D7)(wt);!Un&&Yn&&kt==null&&(si=Tt(si,Qt));var ji=Cn,gn;if(He){var qn=(0,Be.Z)(si).length;(0,Ct.Z)(He)==="object"?gn=He.formatter({value:si,count:qn,maxLength:Qt}):gn="".concat(qn).concat(Yn?" / ".concat(Qt):""),ji=dt.createElement(dt.Fragment,null,ji,dt.createElement("span",{className:ct()("".concat(En,"-data-count"),Se==null?void 0:Se.count),style:nt==null?void 0:nt.count},gn))}var mi=function(At){var Dt;Pt==null||Pt(At),(Dt=It.current)!==null&&Dt!==void 0&&Dt.textArea.style.height&&zi(!0)},Fi=!Xe.autoSize&&!He&&!$t,jn=dt.createElement(Ze.BaseInput,{value:si,allowClear:$t,handleReset:Le,suffix:ji,prefixCls:En,classes:{affixWrapper:ct()(Vn==null?void 0:Vn.affixWrapper,(lt={},(0,ze.Z)(lt,"".concat(En,"-show-count"),He),(0,ze.Z)(lt,"".concat(En,"-textarea-allow-clear"),$t),lt))},disabled:Ne,focused:Ht,className:Ce,style:(0,De.Z)((0,De.Z)({},Pe),pi&&!Fi?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof gn=="string"?gn:void 0}},hidden:ke,inputElement:dt.createElement(ft,(0,ce.Z)({},Xe,{onKeyDown:di,onChange:Li,onFocus:gr,onBlur:Ii,onCompositionStart:Gn,onCompositionEnd:oi,className:Se==null?void 0:Se.textarea,style:(0,De.Z)((0,De.Z)({},nt==null?void 0:nt.textarea),{},{resize:Pe==null?void 0:Pe.resize}),disabled:Ne,prefixCls:En,onResize:mi,ref:It}))});return jn}),Bt=bt,Nt=Bt},39417:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return je}});var ce=ve(92413),De=ve(400),ze=ve(37061),Ct=ve(33708),_e=ve(6909),Ke=ve(4771),Be=ve(25314),mt=ve(9427),ct=ve(25440),Ze=ve(92310),Et=ve.n(Ze),ht=ve(26112),dt=ve(59301),Ae=ve(39378),te=function($e){for(var ft=$e.prefixCls,Re=$e.level,Tt=$e.isStart,et=$e.isEnd,bt="".concat(ft,"-indent-unit"),Bt=[],Nt=0;Nt<Re;Nt+=1){var Zt;Bt.push(dt.createElement("span",{key:Nt,className:Et()(bt,(Zt={},(0,De.Z)(Zt,"".concat(bt,"-start"),Tt[Nt]),(0,De.Z)(Zt,"".concat(bt,"-end"),et[Nt]),Zt))}))}return dt.createElement("span",{"aria-hidden":"true",className:"".concat(ft,"-indent")},Bt)},ee=dt.memo(te),he=ve(67841),se=ve(71430),de=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],me="open",we="close",Me="---",be=function(qe){(0,mt.Z)(ft,qe);var $e=(0,ct.Z)(ft);function ft(){var Re;(0,_e.Z)(this,ft);for(var Tt=arguments.length,et=new Array(Tt),bt=0;bt<Tt;bt++)et[bt]=arguments[bt];return Re=$e.call.apply($e,[this].concat(et)),Re.state={dragNodeHighlight:!1},Re.selectHandle=void 0,Re.cacheIndent=void 0,Re.onSelectorClick=function(Bt){var Nt=Re.props.context.onNodeClick;Nt(Bt,(0,se.F)(Re.props)),Re.isSelectable()?Re.onSelect(Bt):Re.onCheck(Bt)},Re.onSelectorDoubleClick=function(Bt){var Nt=Re.props.context.onNodeDoubleClick;Nt(Bt,(0,se.F)(Re.props))},Re.onSelect=function(Bt){if(!Re.isDisabled()){var Nt=Re.props.context.onNodeSelect;Nt(Bt,(0,se.F)(Re.props))}},Re.onCheck=function(Bt){if(!Re.isDisabled()){var Nt=Re.props,Zt=Nt.disableCheckbox,Ut=Nt.checked,lt=Re.props.context.onNodeCheck;if(!(!Re.isCheckable()||Zt)){var Ge=!Ut;lt(Bt,(0,se.F)(Re.props),Ge)}}},Re.onMouseEnter=function(Bt){var Nt=Re.props.context.onNodeMouseEnter;Nt(Bt,(0,se.F)(Re.props))},Re.onMouseLeave=function(Bt){var Nt=Re.props.context.onNodeMouseLeave;Nt(Bt,(0,se.F)(Re.props))},Re.onContextMenu=function(Bt){var Nt=Re.props.context.onNodeContextMenu;Nt(Bt,(0,se.F)(Re.props))},Re.onDragStart=function(Bt){var Nt=Re.props.context.onNodeDragStart;Bt.stopPropagation(),Re.setState({dragNodeHighlight:!0}),Nt(Bt,(0,Be.Z)(Re));try{Bt.dataTransfer.setData("text/plain","")}catch(Zt){}},Re.onDragEnter=function(Bt){var Nt=Re.props.context.onNodeDragEnter;Bt.preventDefault(),Bt.stopPropagation(),Nt(Bt,(0,Be.Z)(Re))},Re.onDragOver=function(Bt){var Nt=Re.props.context.onNodeDragOver;Bt.preventDefault(),Bt.stopPropagation(),Nt(Bt,(0,Be.Z)(Re))},Re.onDragLeave=function(Bt){var Nt=Re.props.context.onNodeDragLeave;Bt.stopPropagation(),Nt(Bt,(0,Be.Z)(Re))},Re.onDragEnd=function(Bt){var Nt=Re.props.context.onNodeDragEnd;Bt.stopPropagation(),Re.setState({dragNodeHighlight:!1}),Nt(Bt,(0,Be.Z)(Re))},Re.onDrop=function(Bt){var Nt=Re.props.context.onNodeDrop;Bt.preventDefault(),Bt.stopPropagation(),Re.setState({dragNodeHighlight:!1}),Nt(Bt,(0,Be.Z)(Re))},Re.onExpand=function(Bt){var Nt=Re.props,Zt=Nt.loading,Ut=Nt.context.onNodeExpand;Zt||Ut(Bt,(0,se.F)(Re.props))},Re.setSelectHandle=function(Bt){Re.selectHandle=Bt},Re.getNodeState=function(){var Bt=Re.props.expanded;return Re.isLeaf()?null:Bt?me:we},Re.hasChildren=function(){var Bt=Re.props.eventKey,Nt=Re.props.context.keyEntities,Zt=(0,he.Z)(Nt,Bt)||{},Ut=Zt.children;return!!(Ut||[]).length},Re.isLeaf=function(){var Bt=Re.props,Nt=Bt.isLeaf,Zt=Bt.loaded,Ut=Re.props.context.loadData,lt=Re.hasChildren();return Nt===!1?!1:Nt||!Ut&&!lt||Ut&&Zt&&!lt},Re.isDisabled=function(){var Bt=Re.props.disabled,Nt=Re.props.context.disabled;return!!(Nt||Bt)},Re.isCheckable=function(){var Bt=Re.props.checkable,Nt=Re.props.context.checkable;return!Nt||Bt===!1?!1:Nt},Re.syncLoadData=function(Bt){var Nt=Bt.expanded,Zt=Bt.loading,Ut=Bt.loaded,lt=Re.props.context,Ge=lt.loadData,kt=lt.onNodeLoad;Zt||Ge&&Nt&&!Re.isLeaf()&&!Re.hasChildren()&&!Ut&&kt((0,se.F)(Re.props))},Re.isDraggable=function(){var Bt=Re.props,Nt=Bt.data,Zt=Bt.context.draggable;return!!(Zt&&(!Zt.nodeDraggable||Zt.nodeDraggable(Nt)))},Re.renderDragHandler=function(){var Bt=Re.props.context,Nt=Bt.draggable,Zt=Bt.prefixCls;return Nt!=null&&Nt.icon?dt.createElement("span",{className:"".concat(Zt,"-draggable-icon")},Nt.icon):null},Re.renderSwitcherIconDom=function(Bt){var Nt=Re.props.switcherIcon,Zt=Re.props.context.switcherIcon,Ut=Nt||Zt;return typeof Ut=="function"?Ut((0,Ct.Z)((0,Ct.Z)({},Re.props),{},{isLeaf:Bt})):Ut},Re.renderSwitcher=function(){var Bt=Re.props.expanded,Nt=Re.props.context.prefixCls;if(Re.isLeaf()){var Zt=Re.renderSwitcherIconDom(!0);return Zt!==!1?dt.createElement("span",{className:Et()("".concat(Nt,"-switcher"),"".concat(Nt,"-switcher-noop"))},Zt):null}var Ut=Et()("".concat(Nt,"-switcher"),"".concat(Nt,"-switcher_").concat(Bt?me:we)),lt=Re.renderSwitcherIconDom(!1);return lt!==!1?dt.createElement("span",{onClick:Re.onExpand,className:Ut},lt):null},Re.renderCheckbox=function(){var Bt=Re.props,Nt=Bt.checked,Zt=Bt.halfChecked,Ut=Bt.disableCheckbox,lt=Re.props.context.prefixCls,Ge=Re.isDisabled(),kt=Re.isCheckable();if(!kt)return null;var un=typeof kt!="boolean"?kt:null;return dt.createElement("span",{className:Et()("".concat(lt,"-checkbox"),Nt&&"".concat(lt,"-checkbox-checked"),!Nt&&Zt&&"".concat(lt,"-checkbox-indeterminate"),(Ge||Ut)&&"".concat(lt,"-checkbox-disabled")),onClick:Re.onCheck},un)},Re.renderIcon=function(){var Bt=Re.props.loading,Nt=Re.props.context.prefixCls;return dt.createElement("span",{className:Et()("".concat(Nt,"-iconEle"),"".concat(Nt,"-icon__").concat(Re.getNodeState()||"docu"),Bt&&"".concat(Nt,"-icon_loading"))})},Re.renderSelector=function(){var Bt=Re.state.dragNodeHighlight,Nt=Re.props,Zt=Nt.title,Ut=Zt===void 0?Me:Zt,lt=Nt.selected,Ge=Nt.icon,kt=Nt.loading,un=Nt.data,ln=Re.props.context,Ft=ln.prefixCls,$t=ln.showIcon,Qt=ln.icon,Bn=ln.loadData,on=ln.titleRender,Cn=Re.isDisabled(),gt="".concat(Ft,"-node-content-wrapper"),En;if($t){var Vn=Ge||Qt;En=Vn?dt.createElement("span",{className:Et()("".concat(Ft,"-iconEle"),"".concat(Ft,"-icon__customize"))},typeof Vn=="function"?Vn(Re.props):Vn):Re.renderIcon()}else Bn&&kt&&(En=Re.renderIcon());var He;typeof Ut=="function"?He=Ut(un):on?He=on(un):He=Ut;var Ce=dt.createElement("span",{className:"".concat(Ft,"-title")},He);return dt.createElement("span",{ref:Re.setSelectHandle,title:typeof Ut=="string"?Ut:"",className:Et()("".concat(gt),"".concat(gt,"-").concat(Re.getNodeState()||"normal"),!Cn&&(lt||Bt)&&"".concat(Ft,"-node-selected")),onMouseEnter:Re.onMouseEnter,onMouseLeave:Re.onMouseLeave,onContextMenu:Re.onContextMenu,onClick:Re.onSelectorClick,onDoubleClick:Re.onSelectorDoubleClick},En,Ce,Re.renderDropIndicator())},Re.renderDropIndicator=function(){var Bt=Re.props,Nt=Bt.disabled,Zt=Bt.eventKey,Ut=Re.props.context,lt=Ut.draggable,Ge=Ut.dropLevelOffset,kt=Ut.dropPosition,un=Ut.prefixCls,ln=Ut.indent,Ft=Ut.dropIndicatorRender,$t=Ut.dragOverNodeKey,Qt=Ut.direction,Bn=!!lt,on=!Nt&&Bn&&$t===Zt,Cn=ln!=null?ln:Re.cacheIndent;return Re.cacheIndent=ln,on?Ft({dropPosition:kt,dropLevelOffset:Ge,indent:Cn,prefixCls:un,direction:Qt}):null},Re}return(0,Ke.Z)(ft,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Tt=this.props.selectable,et=this.props.context.selectable;return typeof Tt=="boolean"?Tt:et}},{key:"render",value:function(){var Tt,et=this.props,bt=et.eventKey,Bt=et.className,Nt=et.style,Zt=et.dragOver,Ut=et.dragOverGapTop,lt=et.dragOverGapBottom,Ge=et.isLeaf,kt=et.isStart,un=et.isEnd,ln=et.expanded,Ft=et.selected,$t=et.checked,Qt=et.halfChecked,Bn=et.loading,on=et.domRef,Cn=et.active,gt=et.data,En=et.onMouseMove,Vn=et.selectable,He=(0,ze.Z)(et,de),Ce=this.props.context,Pe=Ce.prefixCls,Ne=Ce.filterTreeNode,ke=Ce.keyEntities,Se=Ce.dropContainerKey,nt=Ce.dropTargetKey,Pt=Ce.draggingNodeKey,Xe=this.isDisabled(),Je=(0,ht.Z)(He,{aria:!0,data:!0}),yt=(0,he.Z)(ke,bt)||{},wt=yt.level,ot=un[un.length-1],It=this.isDraggable(),sn=!Xe&&It,Xt=Pt===bt,Ht=Vn!==void 0?{"aria-selected":!!Vn}:void 0;return dt.createElement("div",(0,ce.Z)({ref:on,className:Et()(Bt,"".concat(Pe,"-treenode"),(Tt={},(0,De.Z)(Tt,"".concat(Pe,"-treenode-disabled"),Xe),(0,De.Z)(Tt,"".concat(Pe,"-treenode-switcher-").concat(ln?"open":"close"),!Ge),(0,De.Z)(Tt,"".concat(Pe,"-treenode-checkbox-checked"),$t),(0,De.Z)(Tt,"".concat(Pe,"-treenode-checkbox-indeterminate"),Qt),(0,De.Z)(Tt,"".concat(Pe,"-treenode-selected"),Ft),(0,De.Z)(Tt,"".concat(Pe,"-treenode-loading"),Bn),(0,De.Z)(Tt,"".concat(Pe,"-treenode-active"),Cn),(0,De.Z)(Tt,"".concat(Pe,"-treenode-leaf-last"),ot),(0,De.Z)(Tt,"".concat(Pe,"-treenode-draggable"),It),(0,De.Z)(Tt,"dragging",Xt),(0,De.Z)(Tt,"drop-target",nt===bt),(0,De.Z)(Tt,"drop-container",Se===bt),(0,De.Z)(Tt,"drag-over",!Xe&&Zt),(0,De.Z)(Tt,"drag-over-gap-top",!Xe&&Ut),(0,De.Z)(Tt,"drag-over-gap-bottom",!Xe&&lt),(0,De.Z)(Tt,"filter-node",Ne&&Ne((0,se.F)(this.props))),Tt)),style:Nt,draggable:sn,"aria-grabbed":Xt,onDragStart:sn?this.onDragStart:void 0,onDragEnter:It?this.onDragEnter:void 0,onDragOver:It?this.onDragOver:void 0,onDragLeave:It?this.onDragLeave:void 0,onDrop:It?this.onDrop:void 0,onDragEnd:It?this.onDragEnd:void 0,onMouseMove:En},Ht,Je),dt.createElement(ee,{prefixCls:Pe,level:wt,isStart:kt,isEnd:un}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),ft}(dt.Component),Ie=function($e){return dt.createElement(Ae.k.Consumer,null,function(ft){return dt.createElement(be,(0,ce.Z)({},$e,{context:ft}))})};Ie.displayName="TreeNode",Ie.isTreeNode=1;var je=Ie},39378:function(Sn,an,ve){"use strict";ve.d(an,{k:function(){return De}});var ce=ve(59301),De=ce.createContext(null)},23130:function(Sn,an,ve){"use strict";ve.d(an,{O:function(){return je.Z},Z:function(){return Ce}});var ce=ve(92413),De=ve(400),ze=ve(39559),Ct=ve(33708),_e=ve(26407),Ke=ve(6909),Be=ve(4771),mt=ve(25314),ct=ve(9427),Ze=ve(25440),Et=ve(92310),ht=ve.n(Et),dt=ve(10228),Ae=ve(26112),te=ve(48736),ee=ve(59301),he=ve(39378);function se(Pe){var Ne=Pe.dropPosition,ke=Pe.dropLevelOffset,Se=Pe.indent,nt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ne){case-1:nt.top=0,nt.left=-ke*Se;break;case 1:nt.bottom=0,nt.left=-ke*Se;break;case 0:nt.bottom=0,nt.left=Se;break}return ee.createElement("div",{style:nt})}function de(Pe){if(Pe==null)throw new TypeError("Cannot destructure "+Pe)}var me=ve(33606),we=ve(37061),Me=ve(34280),be=ve(4409),Ie=ve(77900),je=ve(39417);function qe(Pe,Ne){var ke=ee.useState(!1),Se=(0,me.Z)(ke,2),nt=Se[0],Pt=Se[1];ee.useLayoutEffect(function(){if(nt)return Pe(),function(){Ne()}},[nt]),ee.useLayoutEffect(function(){return Pt(!0),function(){Pt(!1)}},[])}var $e=ve(71430),ft=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Re=function(Ne,ke){var Se=Ne.className,nt=Ne.style,Pt=Ne.motion,Xe=Ne.motionNodes,Je=Ne.motionType,yt=Ne.onMotionStart,wt=Ne.onMotionEnd,ot=Ne.active,It=Ne.treeNodeRequiredProps,sn=(0,we.Z)(Ne,ft),Xt=ee.useState(!0),Ht=(0,me.Z)(Xt,2),xn=Ht[0],Dn=Ht[1],cn=ee.useContext(he.k),Un=cn.prefixCls,ti=Xe&&Je!=="hide";(0,Me.Z)(function(){Xe&&ti!==xn&&Dn(ti)},[Xe]);var Wn=function(){Xe&&yt()},Zn=ee.useRef(!1),Jn=function(){Xe&&!Zn.current&&(Zn.current=!0,wt())};qe(Wn,Jn);var vi=function(zi){ti===zi&&Jn()};return Xe?ee.createElement(Ie.default,(0,ce.Z)({ref:ke,visible:xn},Pt,{motionAppear:Je==="show",onVisibleChanged:vi}),function(pi,zi){var $i=pi.className,Yn=pi.style;return ee.createElement("div",{ref:zi,className:ht()("".concat(Un,"-treenode-motion"),$i),style:Yn},Xe.map(function(Gn){var oi=(0,ce.Z)({},(de(Gn.data),Gn.data)),Li=Gn.title,di=Gn.key,gr=Gn.isStart,Ii=Gn.isEnd;delete oi.children;var Le=(0,$e.H8)(di,It);return ee.createElement(je.Z,(0,ce.Z)({},oi,Le,{title:Li,active:ot,data:Gn.data,key:di,isStart:gr,isEnd:Ii}))}))}):ee.createElement(je.Z,(0,ce.Z)({domRef:ke,className:Se,style:nt},sn,{active:ot}))};Re.displayName="MotionTreeNode";var Tt=ee.forwardRef(Re),et=Tt;function bt(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ke=Pe.length,Se=Ne.length;if(Math.abs(ke-Se)!==1)return{add:!1,key:null};function nt(Pt,Xe){var Je=new Map;Pt.forEach(function(wt){Je.set(wt,!0)});var yt=Xe.filter(function(wt){return!Je.has(wt)});return yt.length===1?yt[0]:null}return ke<Se?{add:!0,key:nt(Pe,Ne)}:{add:!1,key:nt(Ne,Pe)}}function Bt(Pe,Ne,ke){var Se=Pe.findIndex(function(Je){return Je.key===ke}),nt=Pe[Se+1],Pt=Ne.findIndex(function(Je){return Je.key===ke});if(nt){var Xe=Ne.findIndex(function(Je){return Je.key===nt.key});return Ne.slice(Pt+1,Xe)}return Ne.slice(Pt+1)}var Nt=["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"],Zt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ut=function(){},lt="RC_TREE_MOTION_".concat(Math.random()),Ge={key:lt},kt={key:lt,level:0,index:0,pos:"0",node:Ge,nodes:[Ge]},un={parent:null,children:[],pos:kt.pos,data:Ge,title:null,key:lt,isStart:[],isEnd:[]};function ln(Pe,Ne,ke,Se){return Ne===!1||!ke?Pe:Pe.slice(0,Math.ceil(ke/Se)+1)}function Ft(Pe){var Ne=Pe.key,ke=Pe.pos;return(0,$e.km)(Ne,ke)}function $t(Pe){for(var Ne=String(Pe.data.key),ke=Pe;ke.parent;)ke=ke.parent,Ne="".concat(ke.data.key," > ").concat(Ne);return Ne}var Qt=ee.forwardRef(function(Pe,Ne){var ke=Pe.prefixCls,Se=Pe.data,nt=Pe.selectable,Pt=Pe.checkable,Xe=Pe.expandedKeys,Je=Pe.selectedKeys,yt=Pe.checkedKeys,wt=Pe.loadedKeys,ot=Pe.loadingKeys,It=Pe.halfCheckedKeys,sn=Pe.keyEntities,Xt=Pe.disabled,Ht=Pe.dragging,xn=Pe.dragOverNodeKey,Dn=Pe.dropPosition,cn=Pe.motion,Un=Pe.height,ti=Pe.itemHeight,Wn=Pe.virtual,Zn=Pe.focusable,Jn=Pe.activeItem,vi=Pe.focused,pi=Pe.tabIndex,zi=Pe.onKeyDown,$i=Pe.onFocus,Yn=Pe.onBlur,Gn=Pe.onActiveChange,oi=Pe.onListChangeStart,Li=Pe.onListChangeEnd,di=(0,we.Z)(Pe,Nt),gr=ee.useRef(null),Ii=ee.useRef(null);ee.useImperativeHandle(Ne,function(){return{scrollTo:function(Jt){gr.current.scrollTo(Jt)},getIndentWidth:function(){return Ii.current.offsetWidth}}});var Le=ee.useState(Xe),si=(0,me.Z)(Le,2),ji=si[0],gn=si[1],qn=ee.useState(Se),mi=(0,me.Z)(qn,2),Fi=mi[0],jn=mi[1],Tn=ee.useState(Se),At=(0,me.Z)(Tn,2),Dt=At[0],Ve=At[1],Yt=ee.useState([]),tn=(0,me.Z)(Yt,2),vt=tn[0],rt=tn[1],Vt=ee.useState(null),rn=(0,me.Z)(Vt,2),Pn=rn[0],kn=rn[1],St=ee.useRef(Se);St.current=Se;function hn(){var Gt=St.current;jn(Gt),Ve(Gt),rt([]),kn(null),Li()}(0,Me.Z)(function(){gn(Xe);var Gt=bt(ji,Xe);if(Gt.key!==null)if(Gt.add){var Jt=Fi.findIndex(function(li){var Ni=li.key;return Ni===Gt.key}),hi=ln(Bt(Fi,Se,Gt.key),Wn,Un,ti),fi=Fi.slice();fi.splice(Jt+1,0,un),Ve(fi),rt(hi),kn("show")}else{var ui=Se.findIndex(function(li){var Ni=li.key;return Ni===Gt.key}),ni=ln(Bt(Se,Fi,Gt.key),Wn,Un,ti),ci=Se.slice();ci.splice(ui+1,0,un),Ve(ci),rt(ni),kn("hide")}else Fi!==Se&&(jn(Se),Ve(Se))},[Xe,Se]),ee.useEffect(function(){Ht||hn()},[Ht]);var In=cn?Dt:Se,ii={expandedKeys:Xe,selectedKeys:Je,loadedKeys:wt,loadingKeys:ot,checkedKeys:yt,halfCheckedKeys:It,dragOverNodeKey:xn,dropPosition:Dn,keyEntities:sn};return ee.createElement(ee.Fragment,null,vi&&Jn&&ee.createElement("span",{style:Zt,"aria-live":"assertive"},$t(Jn)),ee.createElement("div",null,ee.createElement("input",{style:Zt,disabled:Zn===!1||Xt,tabIndex:Zn!==!1?pi:null,onKeyDown:zi,onFocus:$i,onBlur:Yn,value:"",onChange:Ut,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(ke,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(ke,"-indent")},ee.createElement("div",{ref:Ii,className:"".concat(ke,"-indent-unit")}))),ee.createElement(be.Z,(0,ce.Z)({},di,{data:In,itemKey:Ft,height:Un,fullHeight:!1,virtual:Wn,itemHeight:ti,prefixCls:"".concat(ke,"-list"),ref:gr,onVisibleChange:function(Jt,hi){var fi=new Set(Jt),ui=hi.filter(function(ni){return!fi.has(ni)});ui.some(function(ni){return Ft(ni)===lt})&&hn()}}),function(Gt){var Jt=Gt.pos,hi=(0,ce.Z)({},(de(Gt.data),Gt.data)),fi=Gt.title,ui=Gt.key,ni=Gt.isStart,ci=Gt.isEnd,li=(0,$e.km)(ui,Jt);delete hi.key,delete hi.children;var Ni=(0,$e.H8)(li,ii);return ee.createElement(et,(0,ce.Z)({},hi,Ni,{title:fi,active:!!Jn&&ui===Jn.key,pos:Jt,data:Gt.data,isStart:ni,isEnd:ci,motion:cn,motionNodes:ui===lt?vt:null,motionType:Pn,onMotionStart:oi,onMotionEnd:hn,treeNodeRequiredProps:ii,onMouseMove:function(){Gn(null)}}))}))});Qt.displayName="NodeList";var Bn=Qt,on=ve(35654),Cn=ve(90782),gt=ve(67841),En=10,Vn=function(Pe){(0,ct.Z)(ke,Pe);var Ne=(0,Ze.Z)(ke);function ke(){var Se;(0,Ke.Z)(this,ke);for(var nt=arguments.length,Pt=new Array(nt),Xe=0;Xe<nt;Xe++)Pt[Xe]=arguments[Xe];return Se=Ne.call.apply(Ne,[this].concat(Pt)),Se.destroyed=!1,Se.delayedDragEnterLogic=void 0,Se.loadingRetryTimes={},Se.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,$e.w$)()},Se.dragStartMousePosition=null,Se.dragNode=void 0,Se.currentMouseOverDroppableNodeKey=null,Se.listRef=ee.createRef(),Se.onNodeDragStart=function(Je,yt){var wt=Se.state,ot=wt.expandedKeys,It=wt.keyEntities,sn=Se.props.onDragStart,Xt=yt.props.eventKey;Se.dragNode=yt,Se.dragStartMousePosition={x:Je.clientX,y:Je.clientY};var Ht=(0,on._5)(ot,Xt);Se.setState({draggingNodeKey:Xt,dragChildrenKeys:(0,on.wA)(Xt,It),indent:Se.listRef.current.getIndentWidth()}),Se.setExpandedKeys(Ht),window.addEventListener("dragend",Se.onWindowDragEnd),sn==null||sn({event:Je,node:(0,$e.F)(yt.props)})},Se.onNodeDragEnter=function(Je,yt){var wt=Se.state,ot=wt.expandedKeys,It=wt.keyEntities,sn=wt.dragChildrenKeys,Xt=wt.flattenNodes,Ht=wt.indent,xn=Se.props,Dn=xn.onDragEnter,cn=xn.onExpand,Un=xn.allowDrop,ti=xn.direction,Wn=yt.props,Zn=Wn.pos,Jn=Wn.eventKey,vi=(0,mt.Z)(Se),pi=vi.dragNode;if(Se.currentMouseOverDroppableNodeKey!==Jn&&(Se.currentMouseOverDroppableNodeKey=Jn),!pi){Se.resetDragState();return}var zi=(0,on.OM)(Je,pi,yt,Ht,Se.dragStartMousePosition,Un,Xt,It,ot,ti),$i=zi.dropPosition,Yn=zi.dropLevelOffset,Gn=zi.dropTargetKey,oi=zi.dropContainerKey,Li=zi.dropTargetPos,di=zi.dropAllowed,gr=zi.dragOverNodeKey;if(sn.indexOf(Gn)!==-1||!di){Se.resetDragState();return}if(Se.delayedDragEnterLogic||(Se.delayedDragEnterLogic={}),Object.keys(Se.delayedDragEnterLogic).forEach(function(Ii){clearTimeout(Se.delayedDragEnterLogic[Ii])}),pi.props.eventKey!==yt.props.eventKey&&(Je.persist(),Se.delayedDragEnterLogic[Zn]=window.setTimeout(function(){if(Se.state.draggingNodeKey!==null){var Ii=(0,_e.Z)(ot),Le=(0,gt.Z)(It,yt.props.eventKey);Le&&(Le.children||[]).length&&(Ii=(0,on.L0)(ot,yt.props.eventKey)),"expandedKeys"in Se.props||Se.setExpandedKeys(Ii),cn==null||cn(Ii,{node:(0,$e.F)(yt.props),expanded:!0,nativeEvent:Je.nativeEvent})}},800)),pi.props.eventKey===Gn&&Yn===0){Se.resetDragState();return}Se.setState({dragOverNodeKey:gr,dropPosition:$i,dropLevelOffset:Yn,dropTargetKey:Gn,dropContainerKey:oi,dropTargetPos:Li,dropAllowed:di}),Dn==null||Dn({event:Je,node:(0,$e.F)(yt.props),expandedKeys:ot})},Se.onNodeDragOver=function(Je,yt){var wt=Se.state,ot=wt.dragChildrenKeys,It=wt.flattenNodes,sn=wt.keyEntities,Xt=wt.expandedKeys,Ht=wt.indent,xn=Se.props,Dn=xn.onDragOver,cn=xn.allowDrop,Un=xn.direction,ti=(0,mt.Z)(Se),Wn=ti.dragNode;if(Wn){var Zn=(0,on.OM)(Je,Wn,yt,Ht,Se.dragStartMousePosition,cn,It,sn,Xt,Un),Jn=Zn.dropPosition,vi=Zn.dropLevelOffset,pi=Zn.dropTargetKey,zi=Zn.dropContainerKey,$i=Zn.dropAllowed,Yn=Zn.dropTargetPos,Gn=Zn.dragOverNodeKey;ot.indexOf(pi)!==-1||!$i||(Wn.props.eventKey===pi&&vi===0?Se.state.dropPosition===null&&Se.state.dropLevelOffset===null&&Se.state.dropTargetKey===null&&Se.state.dropContainerKey===null&&Se.state.dropTargetPos===null&&Se.state.dropAllowed===!1&&Se.state.dragOverNodeKey===null||Se.resetDragState():Jn===Se.state.dropPosition&&vi===Se.state.dropLevelOffset&&pi===Se.state.dropTargetKey&&zi===Se.state.dropContainerKey&&Yn===Se.state.dropTargetPos&&$i===Se.state.dropAllowed&&Gn===Se.state.dragOverNodeKey||Se.setState({dropPosition:Jn,dropLevelOffset:vi,dropTargetKey:pi,dropContainerKey:zi,dropTargetPos:Yn,dropAllowed:$i,dragOverNodeKey:Gn}),Dn==null||Dn({event:Je,node:(0,$e.F)(yt.props)}))}},Se.onNodeDragLeave=function(Je,yt){Se.currentMouseOverDroppableNodeKey===yt.props.eventKey&&!Je.currentTarget.contains(Je.relatedTarget)&&(Se.resetDragState(),Se.currentMouseOverDroppableNodeKey=null);var wt=Se.props.onDragLeave;wt==null||wt({event:Je,node:(0,$e.F)(yt.props)})},Se.onWindowDragEnd=function(Je){Se.onNodeDragEnd(Je,null,!0),window.removeEventListener("dragend",Se.onWindowDragEnd)},Se.onNodeDragEnd=function(Je,yt){var wt=Se.props.onDragEnd;Se.setState({dragOverNodeKey:null}),Se.cleanDragState(),wt==null||wt({event:Je,node:(0,$e.F)(yt.props)}),Se.dragNode=null,window.removeEventListener("dragend",Se.onWindowDragEnd)},Se.onNodeDrop=function(Je,yt){var wt,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,It=Se.state,sn=It.dragChildrenKeys,Xt=It.dropPosition,Ht=It.dropTargetKey,xn=It.dropTargetPos,Dn=It.dropAllowed;if(Dn){var cn=Se.props.onDrop;if(Se.setState({dragOverNodeKey:null}),Se.cleanDragState(),Ht!==null){var Un=(0,Ct.Z)((0,Ct.Z)({},(0,$e.H8)(Ht,Se.getTreeNodeRequiredProps())),{},{active:((wt=Se.getActiveItem())===null||wt===void 0?void 0:wt.key)===Ht,data:(0,gt.Z)(Se.state.keyEntities,Ht).node}),ti=sn.indexOf(Ht)!==-1;(0,te.ZP)(!ti,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Wn=(0,on.yx)(xn),Zn={event:Je,node:(0,$e.F)(Un),dragNode:Se.dragNode?(0,$e.F)(Se.dragNode.props):null,dragNodesKeys:[Se.dragNode.props.eventKey].concat(sn),dropToGap:Xt!==0,dropPosition:Xt+Number(Wn[Wn.length-1])};ot||cn==null||cn(Zn),Se.dragNode=null}}},Se.cleanDragState=function(){var Je=Se.state.draggingNodeKey;Je!==null&&Se.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Se.dragStartMousePosition=null,Se.currentMouseOverDroppableNodeKey=null},Se.triggerExpandActionExpand=function(Je,yt){var wt=Se.state,ot=wt.expandedKeys,It=wt.flattenNodes,sn=yt.expanded,Xt=yt.key,Ht=yt.isLeaf;if(!(Ht||Je.shiftKey||Je.metaKey||Je.ctrlKey)){var xn=It.filter(function(cn){return cn.key===Xt})[0],Dn=(0,$e.F)((0,Ct.Z)((0,Ct.Z)({},(0,$e.H8)(Xt,Se.getTreeNodeRequiredProps())),{},{data:xn.data}));Se.setExpandedKeys(sn?(0,on._5)(ot,Xt):(0,on.L0)(ot,Xt)),Se.onNodeExpand(Je,Dn)}},Se.onNodeClick=function(Je,yt){var wt=Se.props,ot=wt.onClick,It=wt.expandAction;It==="click"&&Se.triggerExpandActionExpand(Je,yt),ot==null||ot(Je,yt)},Se.onNodeDoubleClick=function(Je,yt){var wt=Se.props,ot=wt.onDoubleClick,It=wt.expandAction;It==="doubleClick"&&Se.triggerExpandActionExpand(Je,yt),ot==null||ot(Je,yt)},Se.onNodeSelect=function(Je,yt){var wt=Se.state.selectedKeys,ot=Se.state,It=ot.keyEntities,sn=ot.fieldNames,Xt=Se.props,Ht=Xt.onSelect,xn=Xt.multiple,Dn=yt.selected,cn=yt[sn.key],Un=!Dn;Un?xn?wt=(0,on.L0)(wt,cn):wt=[cn]:wt=(0,on._5)(wt,cn);var ti=wt.map(function(Wn){var Zn=(0,gt.Z)(It,Wn);return Zn?Zn.node:null}).filter(function(Wn){return Wn});Se.setUncontrolledState({selectedKeys:wt}),Ht==null||Ht(wt,{event:"select",selected:Un,node:yt,selectedNodes:ti,nativeEvent:Je.nativeEvent})},Se.onNodeCheck=function(Je,yt,wt){var ot=Se.state,It=ot.keyEntities,sn=ot.checkedKeys,Xt=ot.halfCheckedKeys,Ht=Se.props,xn=Ht.checkStrictly,Dn=Ht.onCheck,cn=yt.key,Un,ti={event:"check",node:yt,checked:wt,nativeEvent:Je.nativeEvent};if(xn){var Wn=wt?(0,on.L0)(sn,cn):(0,on._5)(sn,cn),Zn=(0,on._5)(Xt,cn);Un={checked:Wn,halfChecked:Zn},ti.checkedNodes=Wn.map(function(Yn){return(0,gt.Z)(It,Yn)}).filter(function(Yn){return Yn}).map(function(Yn){return Yn.node}),Se.setUncontrolledState({checkedKeys:Wn})}else{var Jn=(0,Cn.S)([].concat((0,_e.Z)(sn),[cn]),!0,It),vi=Jn.checkedKeys,pi=Jn.halfCheckedKeys;if(!wt){var zi=new Set(vi);zi.delete(cn);var $i=(0,Cn.S)(Array.from(zi),{checked:!1,halfCheckedKeys:pi},It);vi=$i.checkedKeys,pi=$i.halfCheckedKeys}Un=vi,ti.checkedNodes=[],ti.checkedNodesPositions=[],ti.halfCheckedKeys=pi,vi.forEach(function(Yn){var Gn=(0,gt.Z)(It,Yn);if(Gn){var oi=Gn.node,Li=Gn.pos;ti.checkedNodes.push(oi),ti.checkedNodesPositions.push({node:oi,pos:Li})}}),Se.setUncontrolledState({checkedKeys:vi},!1,{halfCheckedKeys:pi})}Dn==null||Dn(Un,ti)},Se.onNodeLoad=function(Je){var yt=Je.key,wt=new Promise(function(ot,It){Se.setState(function(sn){var Xt=sn.loadedKeys,Ht=Xt===void 0?[]:Xt,xn=sn.loadingKeys,Dn=xn===void 0?[]:xn,cn=Se.props,Un=cn.loadData,ti=cn.onLoad;if(!Un||Ht.indexOf(yt)!==-1||Dn.indexOf(yt)!==-1)return null;var Wn=Un(Je);return Wn.then(function(){var Zn=Se.state.loadedKeys,Jn=(0,on.L0)(Zn,yt);ti==null||ti(Jn,{event:"load",node:Je}),Se.setUncontrolledState({loadedKeys:Jn}),Se.setState(function(vi){return{loadingKeys:(0,on._5)(vi.loadingKeys,yt)}}),ot()}).catch(function(Zn){if(Se.setState(function(vi){return{loadingKeys:(0,on._5)(vi.loadingKeys,yt)}}),Se.loadingRetryTimes[yt]=(Se.loadingRetryTimes[yt]||0)+1,Se.loadingRetryTimes[yt]>=En){var Jn=Se.state.loadedKeys;(0,te.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Se.setUncontrolledState({loadedKeys:(0,on.L0)(Jn,yt)}),ot()}It(Zn)}),{loadingKeys:(0,on.L0)(Dn,yt)}})});return wt.catch(function(){}),wt},Se.onNodeMouseEnter=function(Je,yt){var wt=Se.props.onMouseEnter;wt==null||wt({event:Je,node:yt})},Se.onNodeMouseLeave=function(Je,yt){var wt=Se.props.onMouseLeave;wt==null||wt({event:Je,node:yt})},Se.onNodeContextMenu=function(Je,yt){var wt=Se.props.onRightClick;wt&&(Je.preventDefault(),wt({event:Je,node:yt}))},Se.onFocus=function(){var Je=Se.props.onFocus;Se.setState({focused:!0});for(var yt=arguments.length,wt=new Array(yt),ot=0;ot<yt;ot++)wt[ot]=arguments[ot];Je==null||Je.apply(void 0,wt)},Se.onBlur=function(){var Je=Se.props.onBlur;Se.setState({focused:!1}),Se.onActiveChange(null);for(var yt=arguments.length,wt=new Array(yt),ot=0;ot<yt;ot++)wt[ot]=arguments[ot];Je==null||Je.apply(void 0,wt)},Se.getTreeNodeRequiredProps=function(){var Je=Se.state,yt=Je.expandedKeys,wt=Je.selectedKeys,ot=Je.loadedKeys,It=Je.loadingKeys,sn=Je.checkedKeys,Xt=Je.halfCheckedKeys,Ht=Je.dragOverNodeKey,xn=Je.dropPosition,Dn=Je.keyEntities;return{expandedKeys:yt||[],selectedKeys:wt||[],loadedKeys:ot||[],loadingKeys:It||[],checkedKeys:sn||[],halfCheckedKeys:Xt||[],dragOverNodeKey:Ht,dropPosition:xn,keyEntities:Dn}},Se.setExpandedKeys=function(Je){var yt=Se.state,wt=yt.treeData,ot=yt.fieldNames,It=(0,$e.oH)(wt,Je,ot);Se.setUncontrolledState({expandedKeys:Je,flattenNodes:It},!0)},Se.onNodeExpand=function(Je,yt){var wt=Se.state.expandedKeys,ot=Se.state,It=ot.listChanging,sn=ot.fieldNames,Xt=Se.props,Ht=Xt.onExpand,xn=Xt.loadData,Dn=yt.expanded,cn=yt[sn.key];if(!It){var Un=wt.indexOf(cn),ti=!Dn;if((0,te.ZP)(Dn&&Un!==-1||!Dn&&Un===-1,"Expand state not sync with index check"),ti?wt=(0,on.L0)(wt,cn):wt=(0,on._5)(wt,cn),Se.setExpandedKeys(wt),Ht==null||Ht(wt,{node:yt,expanded:ti,nativeEvent:Je.nativeEvent}),ti&&xn){var Wn=Se.onNodeLoad(yt);Wn&&Wn.then(function(){var Zn=(0,$e.oH)(Se.state.treeData,wt,sn);Se.setUncontrolledState({flattenNodes:Zn})}).catch(function(){var Zn=Se.state.expandedKeys,Jn=(0,on._5)(Zn,cn);Se.setExpandedKeys(Jn)})}}},Se.onListChangeStart=function(){Se.setUncontrolledState({listChanging:!0})},Se.onListChangeEnd=function(){setTimeout(function(){Se.setUncontrolledState({listChanging:!1})})},Se.onActiveChange=function(Je){var yt=Se.state.activeKey,wt=Se.props.onActiveChange;yt!==Je&&(Se.setState({activeKey:Je}),Je!==null&&Se.scrollTo({key:Je}),wt==null||wt(Je))},Se.getActiveItem=function(){var Je=Se.state,yt=Je.activeKey,wt=Je.flattenNodes;return yt===null?null:wt.find(function(ot){var It=ot.key;return It===yt})||null},Se.offsetActiveKey=function(Je){var yt=Se.state,wt=yt.flattenNodes,ot=yt.activeKey,It=wt.findIndex(function(Ht){var xn=Ht.key;return xn===ot});It===-1&&Je<0&&(It=wt.length),It=(It+Je+wt.length)%wt.length;var sn=wt[It];if(sn){var Xt=sn.key;Se.onActiveChange(Xt)}else Se.onActiveChange(null)},Se.onKeyDown=function(Je){var yt=Se.state,wt=yt.activeKey,ot=yt.expandedKeys,It=yt.checkedKeys,sn=yt.fieldNames,Xt=Se.props,Ht=Xt.onKeyDown,xn=Xt.checkable,Dn=Xt.selectable;switch(Je.which){case dt.Z.UP:{Se.offsetActiveKey(-1),Je.preventDefault();break}case dt.Z.DOWN:{Se.offsetActiveKey(1),Je.preventDefault();break}}var cn=Se.getActiveItem();if(cn&&cn.data){var Un=Se.getTreeNodeRequiredProps(),ti=cn.data.isLeaf===!1||!!(cn.data[sn.children]||[]).length,Wn=(0,$e.F)((0,Ct.Z)((0,Ct.Z)({},(0,$e.H8)(wt,Un)),{},{data:cn.data,active:!0}));switch(Je.which){case dt.Z.LEFT:{ti&&ot.includes(wt)?Se.onNodeExpand({},Wn):cn.parent&&Se.onActiveChange(cn.parent.key),Je.preventDefault();break}case dt.Z.RIGHT:{ti&&!ot.includes(wt)?Se.onNodeExpand({},Wn):cn.children&&cn.children.length&&Se.onActiveChange(cn.children[0].key),Je.preventDefault();break}case dt.Z.ENTER:case dt.Z.SPACE:{xn&&!Wn.disabled&&Wn.checkable!==!1&&!Wn.disableCheckbox?Se.onNodeCheck({},Wn,!It.includes(wt)):!xn&&Dn&&!Wn.disabled&&Wn.selectable!==!1&&Se.onNodeSelect({},Wn);break}}}Ht==null||Ht(Je)},Se.setUncontrolledState=function(Je){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Se.destroyed){var ot=!1,It=!0,sn={};Object.keys(Je).forEach(function(Xt){if(Xt in Se.props){It=!1;return}ot=!0,sn[Xt]=Je[Xt]}),ot&&(!yt||It)&&Se.setState((0,Ct.Z)((0,Ct.Z)({},sn),wt))}},Se.scrollTo=function(Je){Se.listRef.current.scrollTo(Je)},Se}return(0,Be.Z)(ke,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var nt=this.props.activeKey;nt!==void 0&&nt!==this.state.activeKey&&(this.setState({activeKey:nt}),nt!==null&&this.scrollTo({key:nt}))}},{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 nt,Pt=this.state,Xe=Pt.focused,Je=Pt.flattenNodes,yt=Pt.keyEntities,wt=Pt.draggingNodeKey,ot=Pt.activeKey,It=Pt.dropLevelOffset,sn=Pt.dropContainerKey,Xt=Pt.dropTargetKey,Ht=Pt.dropPosition,xn=Pt.dragOverNodeKey,Dn=Pt.indent,cn=this.props,Un=cn.prefixCls,ti=cn.className,Wn=cn.style,Zn=cn.showLine,Jn=cn.focusable,vi=cn.tabIndex,pi=vi===void 0?0:vi,zi=cn.selectable,$i=cn.showIcon,Yn=cn.icon,Gn=cn.switcherIcon,oi=cn.draggable,Li=cn.checkable,di=cn.checkStrictly,gr=cn.disabled,Ii=cn.motion,Le=cn.loadData,si=cn.filterTreeNode,ji=cn.height,gn=cn.itemHeight,qn=cn.virtual,mi=cn.titleRender,Fi=cn.dropIndicatorRender,jn=cn.onContextMenu,Tn=cn.onScroll,At=cn.direction,Dt=cn.rootClassName,Ve=cn.rootStyle,Yt=(0,Ae.Z)(this.props,{aria:!0,data:!0}),tn;return oi&&((0,ze.Z)(oi)==="object"?tn=oi:typeof oi=="function"?tn={nodeDraggable:oi}:tn={}),ee.createElement(he.k.Provider,{value:{prefixCls:Un,selectable:zi,showIcon:$i,icon:Yn,switcherIcon:Gn,draggable:tn,draggingNodeKey:wt,checkable:Li,checkStrictly:di,disabled:gr,keyEntities:yt,dropLevelOffset:It,dropContainerKey:sn,dropTargetKey:Xt,dropPosition:Ht,dragOverNodeKey:xn,indent:Dn,direction:At,dropIndicatorRender:Fi,loadData:Le,filterTreeNode:si,titleRender:mi,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}},ee.createElement("div",{role:"tree",className:ht()(Un,ti,Dt,(nt={},(0,De.Z)(nt,"".concat(Un,"-show-line"),Zn),(0,De.Z)(nt,"".concat(Un,"-focused"),Xe),(0,De.Z)(nt,"".concat(Un,"-active-focused"),ot!==null),nt)),style:Ve},ee.createElement(Bn,(0,ce.Z)({ref:this.listRef,prefixCls:Un,style:Wn,data:Je,disabled:gr,selectable:zi,checkable:!!Li,motion:Ii,dragging:wt!==null,height:ji,itemHeight:gn,virtual:qn,focusable:Jn,focused:Xe,tabIndex:pi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:jn,onScroll:Tn},this.getTreeNodeRequiredProps(),Yt))))}}],[{key:"getDerivedStateFromProps",value:function(nt,Pt){var Xe=Pt.prevProps,Je={prevProps:nt};function yt(Jn){return!Xe&&Jn in nt||Xe&&Xe[Jn]!==nt[Jn]}var wt,ot=Pt.fieldNames;if(yt("fieldNames")&&(ot=(0,$e.w$)(nt.fieldNames),Je.fieldNames=ot),yt("treeData")?wt=nt.treeData:yt("children")&&((0,te.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),wt=(0,$e.zn)(nt.children)),wt){Je.treeData=wt;var It=(0,$e.I8)(wt,{fieldNames:ot});Je.keyEntities=(0,Ct.Z)((0,De.Z)({},lt,kt),It.keyEntities)}var sn=Je.keyEntities||Pt.keyEntities;if(yt("expandedKeys")||Xe&&yt("autoExpandParent"))Je.expandedKeys=nt.autoExpandParent||!Xe&&nt.defaultExpandParent?(0,on.r7)(nt.expandedKeys,sn):nt.expandedKeys;else if(!Xe&&nt.defaultExpandAll){var Xt=(0,Ct.Z)({},sn);delete Xt[lt],Je.expandedKeys=Object.keys(Xt).map(function(Jn){return Xt[Jn].key})}else!Xe&&nt.defaultExpandedKeys&&(Je.expandedKeys=nt.autoExpandParent||nt.defaultExpandParent?(0,on.r7)(nt.defaultExpandedKeys,sn):nt.defaultExpandedKeys);if(Je.expandedKeys||delete Je.expandedKeys,wt||Je.expandedKeys){var Ht=(0,$e.oH)(wt||Pt.treeData,Je.expandedKeys||Pt.expandedKeys,ot);Je.flattenNodes=Ht}if(nt.selectable&&(yt("selectedKeys")?Je.selectedKeys=(0,on.BT)(nt.selectedKeys,nt):!Xe&&nt.defaultSelectedKeys&&(Je.selectedKeys=(0,on.BT)(nt.defaultSelectedKeys,nt))),nt.checkable){var xn;if(yt("checkedKeys")?xn=(0,on.E6)(nt.checkedKeys)||{}:!Xe&&nt.defaultCheckedKeys?xn=(0,on.E6)(nt.defaultCheckedKeys)||{}:wt&&(xn=(0,on.E6)(nt.checkedKeys)||{checkedKeys:Pt.checkedKeys,halfCheckedKeys:Pt.halfCheckedKeys}),xn){var Dn=xn,cn=Dn.checkedKeys,Un=cn===void 0?[]:cn,ti=Dn.halfCheckedKeys,Wn=ti===void 0?[]:ti;if(!nt.checkStrictly){var Zn=(0,Cn.S)(Un,!0,sn);Un=Zn.checkedKeys,Wn=Zn.halfCheckedKeys}Je.checkedKeys=Un,Je.halfCheckedKeys=Wn}}return yt("loadedKeys")&&(Je.loadedKeys=nt.loadedKeys),Je}}]),ke}(ee.Component);Vn.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:se,allowDrop:function(){return!0},expandAction:!1},Vn.TreeNode=je.Z;var He=Vn,Ce=He},35654:function(Sn,an,ve){"use strict";ve.d(an,{BT:function(){return ee},E6:function(){return de},L0:function(){return Ze},OM:function(){return te},_5:function(){return ct},r7:function(){return me},wA:function(){return ht},yx:function(){return Et}});var ce=ve(26407),De=ve(39559),ze=ve(48736),Ct=ve(59301),_e=ve(39417),Ke=ve(67841),Be=ve(71430),mt=null;function ct(we,Me){if(!we)return[];var be=we.slice(),Ie=be.indexOf(Me);return Ie>=0&&be.splice(Ie,1),be}function Ze(we,Me){var be=(we||[]).slice();return be.indexOf(Me)===-1&&be.push(Me),be}function Et(we){return we.split("-")}function ht(we,Me){var be=[],Ie=(0,Ke.Z)(Me,we);function je(){var qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];qe.forEach(function($e){var ft=$e.key,Re=$e.children;be.push(ft),je(Re)})}return je(Ie.children),be}function dt(we){if(we.parent){var Me=Et(we.pos);return Number(Me[Me.length-1])===we.parent.children.length-1}return!1}function Ae(we){var Me=Et(we.pos);return Number(Me[Me.length-1])===0}function te(we,Me,be,Ie,je,qe,$e,ft,Re,Tt){var et,bt=we.clientX,Bt=we.clientY,Nt=we.target.getBoundingClientRect(),Zt=Nt.top,Ut=Nt.height,lt=(Tt==="rtl"?-1:1)*(((je==null?void 0:je.x)||0)-bt),Ge=(lt-12)/Ie,kt=(0,Ke.Z)(ft,be.props.eventKey);if(Bt<Zt+Ut/2){var un=$e.findIndex(function(Ce){return Ce.key===kt.key}),ln=un<=0?0:un-1,Ft=$e[ln].key;kt=(0,Ke.Z)(ft,Ft)}var $t=kt.key,Qt=kt,Bn=kt.key,on=0,Cn=0;if(!Re.includes($t))for(var gt=0;gt<Ge&&dt(kt);gt+=1)kt=kt.parent,Cn+=1;var En=Me.props.data,Vn=kt.node,He=!0;return Ae(kt)&&kt.level===0&&Bt<Zt+Ut/2&&qe({dragNode:En,dropNode:Vn,dropPosition:-1})&&kt.key===be.props.eventKey?on=-1:(Qt.children||[]).length&&Re.includes(Bn)?qe({dragNode:En,dropNode:Vn,dropPosition:0})?on=0:He=!1:Cn===0?Ge>-1.5?qe({dragNode:En,dropNode:Vn,dropPosition:1})?on=1:He=!1:qe({dragNode:En,dropNode:Vn,dropPosition:0})?on=0:qe({dragNode:En,dropNode:Vn,dropPosition:1})?on=1:He=!1:qe({dragNode:En,dropNode:Vn,dropPosition:1})?on=1:He=!1,{dropPosition:on,dropLevelOffset:Cn,dropTargetKey:kt.key,dropTargetPos:kt.pos,dragOverNodeKey:Bn,dropContainerKey:on===0?null:((et=kt.parent)===null||et===void 0?void 0:et.key)||null,dropAllowed:He}}function ee(we,Me){if(we){var be=Me.multiple;return be?we.slice():we.length?[we[0]]:we}}var he=function(Me){return Me};function se(we,Me){if(!we)return[];var be=Me||{},Ie=be.processProps,je=Ie===void 0?he:Ie,qe=Array.isArray(we)?we:[we];return qe.map(function($e){var ft=$e.children,Re=_objectWithoutProperties($e,mt),Tt=se(ft,Me);return React.createElement(TreeNode,_extends({key:Re.key},je(Re)),Tt)})}function de(we){if(!we)return null;var Me;if(Array.isArray(we))Me={checkedKeys:we,halfCheckedKeys:void 0};else if((0,De.Z)(we)==="object")Me={checkedKeys:we.checked||void 0,halfCheckedKeys:we.halfChecked||void 0};else return(0,ze.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Me}function me(we,Me){var be=new Set;function Ie(je){if(!be.has(je)){var qe=(0,Ke.Z)(Me,je);if(qe){be.add(je);var $e=qe.parent,ft=qe.node;ft.disabled||$e&&Ie($e.key)}}}return(we||[]).forEach(function(je){Ie(je)}),(0,ce.Z)(be)}},90782:function(Sn,an,ve){"use strict";ve.d(an,{S:function(){return Be}});var ce=ve(48736),De=ve(67841);function ze(mt,ct){var Ze=new Set;return mt.forEach(function(Et){ct.has(Et)||Ze.add(Et)}),Ze}function Ct(mt){var ct=mt||{},Ze=ct.disabled,Et=ct.disableCheckbox,ht=ct.checkable;return!!(Ze||Et)||ht===!1}function _e(mt,ct,Ze,Et){for(var ht=new Set(mt),dt=new Set,Ae=0;Ae<=Ze;Ae+=1){var te=ct.get(Ae)||new Set;te.forEach(function(de){var me=de.key,we=de.node,Me=de.children,be=Me===void 0?[]:Me;ht.has(me)&&!Et(we)&&be.filter(function(Ie){return!Et(Ie.node)}).forEach(function(Ie){ht.add(Ie.key)})})}for(var ee=new Set,he=Ze;he>=0;he-=1){var se=ct.get(he)||new Set;se.forEach(function(de){var me=de.parent,we=de.node;if(!(Et(we)||!de.parent||ee.has(de.parent.key))){if(Et(de.parent.node)){ee.add(me.key);return}var Me=!0,be=!1;(me.children||[]).filter(function(Ie){return!Et(Ie.node)}).forEach(function(Ie){var je=Ie.key,qe=ht.has(je);Me&&!qe&&(Me=!1),!be&&(qe||dt.has(je))&&(be=!0)}),Me&&ht.add(me.key),be&&dt.add(me.key),ee.add(me.key)}})}return{checkedKeys:Array.from(ht),halfCheckedKeys:Array.from(ze(dt,ht))}}function Ke(mt,ct,Ze,Et,ht){for(var dt=new Set(mt),Ae=new Set(ct),te=0;te<=Et;te+=1){var ee=Ze.get(te)||new Set;ee.forEach(function(me){var we=me.key,Me=me.node,be=me.children,Ie=be===void 0?[]:be;!dt.has(we)&&!Ae.has(we)&&!ht(Me)&&Ie.filter(function(je){return!ht(je.node)}).forEach(function(je){dt.delete(je.key)})})}Ae=new Set;for(var he=new Set,se=Et;se>=0;se-=1){var de=Ze.get(se)||new Set;de.forEach(function(me){var we=me.parent,Me=me.node;if(!(ht(Me)||!me.parent||he.has(me.parent.key))){if(ht(me.parent.node)){he.add(we.key);return}var be=!0,Ie=!1;(we.children||[]).filter(function(je){return!ht(je.node)}).forEach(function(je){var qe=je.key,$e=dt.has(qe);be&&!$e&&(be=!1),!Ie&&($e||Ae.has(qe))&&(Ie=!0)}),be||dt.delete(we.key),Ie&&Ae.add(we.key),he.add(we.key)}})}return{checkedKeys:Array.from(dt),halfCheckedKeys:Array.from(ze(Ae,dt))}}function Be(mt,ct,Ze,Et){var ht=[],dt;Et?dt=Et:dt=Ct;var Ae=new Set(mt.filter(function(se){var de=!!(0,De.Z)(Ze,se);return de||ht.push(se),de})),te=new Map,ee=0;Object.keys(Ze).forEach(function(se){var de=Ze[se],me=de.level,we=te.get(me);we||(we=new Set,te.set(me,we)),we.add(de),ee=Math.max(ee,me)}),(0,ce.ZP)(!ht.length,"Tree missing follow keys: ".concat(ht.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var he;return ct===!0?he=_e(Ae,te,ee,dt):he=Ke(Ae,ct.halfCheckedKeys,te,ee,dt),he}},67841:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return ce}});function ce(De,ze){return De[ze]}},71430:function(Sn,an,ve){"use strict";ve.d(an,{F:function(){return me},H8:function(){return de},I8:function(){return se},km:function(){return ht},oH:function(){return ee},w$:function(){return dt},zn:function(){return te}});var ce=ve(39559),De=ve(26407),ze=ve(33708),Ct=ve(37061),_e=ve(11592),Ke=ve(2738),Be=ve(48736),mt=ve(67841),ct=["children"];function Ze(we,Me){return"".concat(we,"-").concat(Me)}function Et(we){return we&&we.type&&we.type.isTreeNode}function ht(we,Me){return we!=null?we:Me}function dt(we){var Me=we||{},be=Me.title,Ie=Me._title,je=Me.key,qe=Me.children,$e=be||"title";return{title:$e,_title:Ie||[$e],key:je||"key",children:qe||"children"}}function Ae(we,Me){var be=new Map;function Ie(je){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(je||[]).forEach(function($e){var ft=$e[Me.key],Re=$e[Me.children];warning(ft!=null,"Tree node must have a certain key: [".concat(qe).concat(ft,"]"));var Tt=String(ft);warning(!be.has(Tt)||ft===null||ft===void 0,"Same 'key' exist in the Tree: ".concat(Tt)),be.set(Tt,!0),Ie(Re,"".concat(qe).concat(Tt," > "))})}Ie(we)}function te(we){function Me(be){var Ie=(0,_e.Z)(be);return Ie.map(function(je){if(!Et(je))return(0,Be.ZP)(!je,"Tree/TreeNode can only accept TreeNode as children."),null;var qe=je.key,$e=je.props,ft=$e.children,Re=(0,Ct.Z)($e,ct),Tt=(0,ze.Z)({key:qe},Re),et=Me(ft);return et.length&&(Tt.children=et),Tt}).filter(function(je){return je})}return Me(we)}function ee(we,Me,be){var Ie=dt(be),je=Ie._title,qe=Ie.key,$e=Ie.children,ft=new Set(Me===!0?[]:Me),Re=[];function Tt(et){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return et.map(function(Bt,Nt){for(var Zt=Ze(bt?bt.pos:"0",Nt),Ut=ht(Bt[qe],Zt),lt,Ge=0;Ge<je.length;Ge+=1){var kt=je[Ge];if(Bt[kt]!==void 0){lt=Bt[kt];break}}var un=(0,ze.Z)((0,ze.Z)({},(0,Ke.Z)(Bt,[].concat((0,De.Z)(je),[qe,$e]))),{},{title:lt,key:Ut,parent:bt,pos:Zt,children:null,data:Bt,isStart:[].concat((0,De.Z)(bt?bt.isStart:[]),[Nt===0]),isEnd:[].concat((0,De.Z)(bt?bt.isEnd:[]),[Nt===et.length-1])});return Re.push(un),Me===!0||ft.has(Ut)?un.children=Tt(Bt[$e]||[],un):un.children=[],un})}return Tt(we),Re}function he(we,Me,be){var Ie={};(0,ce.Z)(be)==="object"?Ie=be:Ie={externalGetKey:be},Ie=Ie||{};var je=Ie,qe=je.childrenPropName,$e=je.externalGetKey,ft=je.fieldNames,Re=dt(ft),Tt=Re.key,et=Re.children,bt=qe||et,Bt;$e?typeof $e=="string"?Bt=function(Ut){return Ut[$e]}:typeof $e=="function"&&(Bt=function(Ut){return $e(Ut)}):Bt=function(Ut,lt){return ht(Ut[Tt],lt)};function Nt(Zt,Ut,lt,Ge){var kt=Zt?Zt[bt]:we,un=Zt?Ze(lt.pos,Ut):"0",ln=Zt?[].concat((0,De.Z)(Ge),[Zt]):[];if(Zt){var Ft=Bt(Zt,un),$t={node:Zt,index:Ut,pos:un,key:Ft,parentPos:lt.node?lt.pos:null,level:lt.level+1,nodes:ln};Me($t)}kt&&kt.forEach(function(Qt,Bn){Nt(Qt,Bn,{node:Zt,pos:un,level:lt?lt.level+1:-1},ln)})}Nt(null)}function se(we){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},be=Me.initWrapper,Ie=Me.processEntity,je=Me.onProcessFinished,qe=Me.externalGetKey,$e=Me.childrenPropName,ft=Me.fieldNames,Re=arguments.length>2?arguments[2]:void 0,Tt=qe||Re,et={},bt={},Bt={posEntities:et,keyEntities:bt};return be&&(Bt=be(Bt)||Bt),he(we,function(Nt){var Zt=Nt.node,Ut=Nt.index,lt=Nt.pos,Ge=Nt.key,kt=Nt.parentPos,un=Nt.level,ln=Nt.nodes,Ft={node:Zt,nodes:ln,index:Ut,key:Ge,pos:lt,level:un},$t=ht(Ge,lt);et[lt]=Ft,bt[$t]=Ft,Ft.parent=et[kt],Ft.parent&&(Ft.parent.children=Ft.parent.children||[],Ft.parent.children.push(Ft)),Ie&&Ie(Ft,Bt)},{externalGetKey:Tt,childrenPropName:$e,fieldNames:ft}),je&&je(Bt),Bt}function de(we,Me){var be=Me.expandedKeys,Ie=Me.selectedKeys,je=Me.loadedKeys,qe=Me.loadingKeys,$e=Me.checkedKeys,ft=Me.halfCheckedKeys,Re=Me.dragOverNodeKey,Tt=Me.dropPosition,et=Me.keyEntities,bt=(0,mt.Z)(et,we),Bt={eventKey:we,expanded:be.indexOf(we)!==-1,selected:Ie.indexOf(we)!==-1,loaded:je.indexOf(we)!==-1,loading:qe.indexOf(we)!==-1,checked:$e.indexOf(we)!==-1,halfChecked:ft.indexOf(we)!==-1,pos:String(bt?bt.pos:""),dragOver:Re===we&&Tt===0,dragOverGapTop:Re===we&&Tt===-1,dragOverGapBottom:Re===we&&Tt===1};return Bt}function me(we){var Me=we.data,be=we.expanded,Ie=we.selected,je=we.checked,qe=we.loaded,$e=we.loading,ft=we.halfChecked,Re=we.dragOver,Tt=we.dragOverGapTop,et=we.dragOverGapBottom,bt=we.pos,Bt=we.active,Nt=we.eventKey,Zt=(0,ze.Z)((0,ze.Z)({},Me),{},{expanded:be,selected:Ie,checked:je,loaded:qe,loading:$e,halfChecked:ft,dragOver:Re,dragOverGapTop:Tt,dragOverGapBottom:et,pos:bt,active:Bt,key:Nt});return"props"in Zt||Object.defineProperty(Zt,"props",{get:function(){return(0,Be.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),we}}),Zt}},8224:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return De}});var ce=ve(4676);function De(ze,Ct,_e,Ke){var Be=ce.unstable_batchedUpdates?function(ct){ce.unstable_batchedUpdates(_e,ct)}:_e;return ze!=null&&ze.addEventListener&&ze.addEventListener(Ct,Be,Ke),{remove:function(){ze!=null&&ze.removeEventListener&&ze.removeEventListener(Ct,Be,Ke)}}}},55468:function(Sn,an,ve){"use strict";ve.d(an,{g1:function(){return Et},os:function(){return dt}});var ce=/margin|padding|width|height|max|min|offset/,De={left:!0,top:!0},ze={cssFloat:1,styleFloat:1,float:1};function Ct(Ae){return Ae.nodeType===1?Ae.ownerDocument.defaultView.getComputedStyle(Ae,null):{}}function _e(Ae,te,ee){if(te=te.toLowerCase(),ee==="auto"){if(te==="height")return Ae.offsetHeight;if(te==="width")return Ae.offsetWidth}return te in De||(De[te]=ce.test(te)),De[te]?parseFloat(ee)||0:ee}function Ke(Ae,te){var ee=arguments.length,he=Ct(Ae);return te=ze[te]?"cssFloat"in Ae.style?"cssFloat":"styleFloat":te,ee===1?he:_e(Ae,te,he[te]||Ae.style[te])}function Be(Ae,te,ee){var he=arguments.length;if(te=ze[te]?"cssFloat"in Ae.style?"cssFloat":"styleFloat":te,he===3)return typeof ee=="number"&&ce.test(te)&&(ee="".concat(ee,"px")),Ae.style[te]=ee,ee;for(var se in te)te.hasOwnProperty(se)&&Be(Ae,se,te[se]);return Ct(Ae)}function mt(Ae){return Ae===document.body?document.documentElement.clientWidth:Ae.offsetWidth}function ct(Ae){return Ae===document.body?window.innerHeight||document.documentElement.clientHeight:Ae.offsetHeight}function Ze(){var Ae=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),te=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ae,height:te}}function Et(){var Ae=document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight;return{width:Ae,height:te}}function ht(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function dt(Ae){var te=Ae.getBoundingClientRect(),ee=document.documentElement;return{left:te.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:te.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24514:function(Sn,an,ve){"use strict";ve.d(an,{G:function(){return Ct}});var ce=ve(47273),De=function(Ke){if((0,ce.Z)()&&window.document.documentElement){var Be=Array.isArray(Ke)?Ke:[Ke],mt=window.document.documentElement;return Be.some(function(ct){return ct in mt.style})}return!1},ze=function(Ke,Be){if(!De(Ke))return!1;var mt=document.createElement("div"),ct=mt.style[Ke];return mt.style[Ke]=Be,mt.style[Ke]!==ct};function Ct(_e,Ke){return!Array.isArray(_e)&&Ke!==void 0?ze(_e,Ke):De(_e)}},4409:function(Sn,an,ve){"use strict";ve.d(an,{Z:function(){return He}});var ce=ve(92413),De=ve(39559),ze=ve(33708),Ct=ve(400),_e=ve(33606),Ke=ve(37061),Be=ve(92310),mt=ve.n(Be),ct=ve(29301),Ze=ve(70425),Et=ve(34280),ht=ve(59301),dt=ve(4676),Ae=ht.forwardRef(function(Ce,Pe){var Ne=Ce.height,ke=Ce.offsetY,Se=Ce.offsetX,nt=Ce.children,Pt=Ce.prefixCls,Xe=Ce.onInnerResize,Je=Ce.innerProps,yt=Ce.rtl,wt=Ce.extra,ot={},It={display:"flex",flexDirection:"column"};return ke!==void 0&&(ot={height:Ne,position:"relative",overflow:"hidden"},It=(0,ze.Z)((0,ze.Z)({},It),{},(0,Ct.Z)((0,Ct.Z)((0,Ct.Z)((0,Ct.Z)((0,Ct.Z)({transform:"translateY(".concat(ke,"px)")},yt?"marginRight":"marginLeft",-Se),"position","absolute"),"left",0),"right",0),"top",0))),ht.createElement("div",{style:ot},ht.createElement(ct.Z,{onResize:function(Xt){var Ht=Xt.offsetHeight;Ht&&Xe&&Xe()}},ht.createElement("div",(0,ce.Z)({style:It,className:mt()((0,Ct.Z)({},"".concat(Pt,"-holder-inner"),Pt)),ref:Pe},Je),nt,wt)))});Ae.displayName="Filler";var te=Ae;function ee(Ce){var Pe=Ce.children,Ne=Ce.setRef,ke=ht.useCallback(function(Se){Ne(Se)},[]);return ht.cloneElement(Pe,{ref:ke})}function he(Ce,Pe,Ne,ke,Se,nt,Pt,Xe){var Je=Xe.getKey;return Ce.slice(Pe,Ne+1).map(function(yt,wt){var ot=Pe+wt,It=Pt(yt,ot,{style:{width:ke},offsetX:Se}),sn=Je(yt);return ht.createElement(ee,{key:sn,setRef:function(Ht){return nt(yt,Ht)}},It)})}function se(Ce,Pe,Ne,ke){var Se=Ne-Ce,nt=Pe-Ne,Pt=Math.min(Se,nt)*2;if(ke<=Pt){var Xe=Math.floor(ke/2);return ke%2?Ne+Xe+1:Ne-Xe}return Se>nt?Ne-(ke-nt):Ne+(ke-Se)}function de(Ce,Pe,Ne){var ke=Ce.length,Se=Pe.length,nt,Pt;if(ke===0&&Se===0)return null;ke<Se?(nt=Ce,Pt=Pe):(nt=Pe,Pt=Ce);var Xe={__EMPTY_ITEM__:!0};function Je(Xt){return Xt!==void 0?Ne(Xt):Xe}for(var yt=null,wt=Math.abs(ke-Se)!==1,ot=0;ot<Pt.length;ot+=1){var It=Je(nt[ot]),sn=Je(Pt[ot]);if(It!==sn){yt=ot,wt=wt||It!==Je(Pt[ot+1]);break}}return yt===null?null:{index:yt,multiple:wt}}function me(Ce,Pe,Ne){var ke=ht.useState(Ce),Se=(0,_e.Z)(ke,2),nt=Se[0],Pt=Se[1],Xe=ht.useState(null),Je=(0,_e.Z)(Xe,2),yt=Je[0],wt=Je[1];return ht.useEffect(function(){var ot=de(nt||[],Ce||[],Pe);(ot==null?void 0:ot.index)!==void 0&&(Ne==null||Ne(ot.index),wt(Ce[ot.index])),Pt(Ce)},[Ce]),[yt]}var we=ve(16089),Me=(typeof navigator=="undefined"?"undefined":(0,De.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),be=Me,Ie=function(Ce,Pe,Ne,ke){var Se=(0,ht.useRef)(!1),nt=(0,ht.useRef)(null);function Pt(){clearTimeout(nt.current),Se.current=!0,nt.current=setTimeout(function(){Se.current=!1},50)}var Xe=(0,ht.useRef)({top:Ce,bottom:Pe,left:Ne,right:ke});return Xe.current.top=Ce,Xe.current.bottom=Pe,Xe.current.left=Ne,Xe.current.right=ke,function(Je,yt){var wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ot=Je?yt<0&&Xe.current.left||yt>0&&Xe.current.right:yt<0&&Xe.current.top||yt>0&&Xe.current.bottom;return wt&&ot?(clearTimeout(nt.current),Se.current=!1):(!ot||Se.current)&&Pt(),!Se.current&&ot}};function je(Ce,Pe,Ne,ke,Se,nt,Pt){var Xe=(0,ht.useRef)(0),Je=(0,ht.useRef)(null),yt=(0,ht.useRef)(null),wt=(0,ht.useRef)(!1),ot=Ie(Pe,Ne,ke,Se);function It(cn,Un){if(we.Z.cancel(Je.current),!ot(!1,Un)){var ti=cn;if(!ti._virtualHandled)ti._virtualHandled=!0;else return;Xe.current+=Un,yt.current=Un,be||ti.preventDefault(),Je.current=(0,we.Z)(function(){var Wn=wt.current?10:1;Pt(Xe.current*Wn,!1),Xe.current=0})}}function sn(cn,Un){Pt(Un,!0),be||cn.preventDefault()}var Xt=(0,ht.useRef)(null),Ht=(0,ht.useRef)(null);function xn(cn){if(Ce){we.Z.cancel(Ht.current),Ht.current=(0,we.Z)(function(){Xt.current=null},2);var Un=cn.deltaX,ti=cn.deltaY,Wn=cn.shiftKey,Zn=Un,Jn=ti;(Xt.current==="sx"||!Xt.current&&Wn&&ti&&!Un)&&(Zn=ti,Jn=0,Xt.current="sx");var vi=Math.abs(Zn),pi=Math.abs(Jn);Xt.current===null&&(Xt.current=nt&&vi>pi?"x":"y"),Xt.current==="y"?It(cn,Jn):sn(cn,Zn)}}function Dn(cn){Ce&&(wt.current=cn.detail===yt.current)}return[xn,Dn]}function qe(Ce,Pe,Ne,ke){var Se=ht.useMemo(function(){return[new Map,[]]},[Ce,Ne.id,ke]),nt=(0,_e.Z)(Se,2),Pt=nt[0],Xe=nt[1],Je=function(wt){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wt,It=Pt.get(wt),sn=Pt.get(ot);if(It===void 0||sn===void 0)for(var Xt=Ce.length,Ht=Xe.length;Ht<Xt;Ht+=1){var xn,Dn=Ce[Ht],cn=Pe(Dn);Pt.set(cn,Ht);var Un=(xn=Ne.get(cn))!==null&&xn!==void 0?xn:ke;if(Xe[Ht]=(Xe[Ht-1]||0)+Un,cn===wt&&(It=Ht),cn===ot&&(sn=Ht),It!==void 0&&sn!==void 0)break}return{top:Xe[It-1]||0,bottom:Xe[sn]}};return Je}var $e=ve(76846),ft=ve(6909),Re=ve(4771),Tt=function(){function Ce(){(0,ft.Z)(this,Ce),(0,Ct.Z)(this,"maps",void 0),(0,Ct.Z)(this,"id",0),(0,Ct.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Re.Z)(Ce,[{key:"set",value:function(Ne,ke){this.maps[Ne]=ke,this.id+=1,this.diffKeys.add(Ne)}},{key:"get",value:function(Ne){return this.maps[Ne]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Ce}(),et=Tt;function bt(Ce){var Pe=parseFloat(Ce);return isNaN(Pe)?0:Pe}function Bt(Ce,Pe,Ne){var ke=ht.useState(0),Se=(0,_e.Z)(ke,2),nt=Se[0],Pt=Se[1],Xe=(0,ht.useRef)(new Map),Je=(0,ht.useRef)(new et),yt=(0,ht.useRef)(0);function wt(){yt.current+=1}function ot(){var sn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;wt();var Xt=function(){var Dn=!1;Xe.current.forEach(function(cn,Un){if(cn&&cn.offsetParent){var ti=(0,$e.ZP)(cn),Wn=ti.offsetHeight,Zn=getComputedStyle(ti),Jn=Zn.marginTop,vi=Zn.marginBottom,pi=bt(Jn),zi=bt(vi),$i=Wn+pi+zi;Je.current.get(Un)!==$i&&(Je.current.set(Un,$i),Dn=!0)}}),Dn&&Pt(function(cn){return cn+1})};if(sn)Xt();else{yt.current+=1;var Ht=yt.current;Promise.resolve().then(function(){Ht===yt.current&&Xt()})}}function It(sn,Xt){var Ht=Ce(sn),xn=Xe.current.get(Ht);Xt?(Xe.current.set(Ht,Xt),ot()):Xe.current.delete(Ht),!xn!=!Xt&&(Xt?Pe==null||Pe(sn):Ne==null||Ne(sn))}return(0,ht.useEffect)(function(){return wt},[]),[It,ot,Je.current,nt]}var Nt=14/15;function Zt(Ce,Pe,Ne){var ke=(0,ht.useRef)(!1),Se=(0,ht.useRef)(0),nt=(0,ht.useRef)(0),Pt=(0,ht.useRef)(null),Xe=(0,ht.useRef)(null),Je,yt=function(sn){if(ke.current){var Xt=Math.ceil(sn.touches[0].pageX),Ht=Math.ceil(sn.touches[0].pageY),xn=Se.current-Xt,Dn=nt.current-Ht,cn=Math.abs(xn)>Math.abs(Dn);cn?Se.current=Xt:nt.current=Ht;var Un=Ne(cn,cn?xn:Dn,!1,sn);Un&&sn.preventDefault(),clearInterval(Xe.current),Un&&(Xe.current=setInterval(function(){cn?xn*=Nt:Dn*=Nt;var ti=Math.floor(cn?xn:Dn);(!Ne(cn,ti,!0)||Math.abs(ti)<=.1)&&clearInterval(Xe.current)},16))}},wt=function(){ke.current=!1,Je()},ot=function(sn){Je(),sn.touches.length===1&&!ke.current&&(ke.current=!0,Se.current=Math.ceil(sn.touches[0].pageX),nt.current=Math.ceil(sn.touches[0].pageY),Pt.current=sn.target,Pt.current.addEventListener("touchmove",yt,{passive:!1}),Pt.current.addEventListener("touchend",wt,{passive:!0}))};Je=function(){Pt.current&&(Pt.current.removeEventListener("touchmove",yt),Pt.current.removeEventListener("touchend",wt))},(0,Et.Z)(function(){return Ce&&Pe.current.addEventListener("touchstart",ot,{passive:!0}),function(){var It;(It=Pe.current)===null||It===void 0||It.removeEventListener("touchstart",ot),Je(),clearInterval(Xe.current)}},[Ce])}function Ut(Ce){return Math.floor(Math.pow(Ce,.5))}function lt(Ce,Pe){var Ne="touches"in Ce?Ce.touches[0]:Ce;return Ne[Pe?"pageX":"pageY"]-window[Pe?"scrollX":"scrollY"]}function Ge(Ce,Pe,Ne){ht.useEffect(function(){var ke=Pe.current;if(Ce&&ke){var Se=!1,nt,Pt,Xe=function(){we.Z.cancel(nt)},Je=function It(){Xe(),nt=(0,we.Z)(function(){Ne(Pt),It()})},yt=function(sn){if(!sn.target.draggable){var Xt=sn;Xt._virtualHandled||(Xt._virtualHandled=!0,Se=!0)}},wt=function(){Se=!1,Xe()},ot=function(sn){if(Se){var Xt=lt(sn,!1),Ht=ke.getBoundingClientRect(),xn=Ht.top,Dn=Ht.bottom;if(Xt<=xn){var cn=xn-Xt;Pt=-Ut(cn),Je()}else if(Xt>=Dn){var Un=Xt-Dn;Pt=Ut(Un),Je()}else Xe()}};return ke.addEventListener("mousedown",yt),ke.ownerDocument.addEventListener("mouseup",wt),ke.ownerDocument.addEventListener("mousemove",ot),function(){ke.removeEventListener("mousedown",yt),ke.ownerDocument.removeEventListener("mouseup",wt),ke.ownerDocument.removeEventListener("mousemove",ot),Xe()}}},[Ce])}var kt=10;function un(Ce,Pe,Ne,ke,Se,nt,Pt,Xe){var Je=ht.useRef(),yt=ht.useState(null),wt=(0,_e.Z)(yt,2),ot=wt[0],It=wt[1];return(0,Et.Z)(function(){if(ot&&ot.times<kt){if(!Ce.current){It(function(Le){return(0,ze.Z)({},Le)});return}nt();var sn=ot.targetAlign,Xt=ot.originAlign,Ht=ot.index,xn=ot.offset,Dn=Ce.current.clientHeight,cn=!1,Un=sn,ti=null;if(Dn){for(var Wn=sn||Xt,Zn=0,Jn=0,vi=0,pi=Math.min(Pe.length-1,Ht),zi=0;zi<=pi;zi+=1){var $i=Se(Pe[zi]);Jn=Zn;var Yn=Ne.get($i);vi=Jn+(Yn===void 0?ke:Yn),Zn=vi}for(var Gn=Wn==="top"?xn:Dn-xn,oi=pi;oi>=0;oi-=1){var Li=Se(Pe[oi]),di=Ne.get(Li);if(di===void 0){cn=!0;break}if(Gn-=di,Gn<=0)break}switch(Wn){case"top":ti=Jn-xn;break;case"bottom":ti=vi-Dn+xn;break;default:{var gr=Ce.current.scrollTop,Ii=gr+Dn;Jn<gr?Un="top":vi>Ii&&(Un="bottom")}}ti!==null&&Pt(ti),ti!==ot.lastTop&&(cn=!0)}cn&&It((0,ze.Z)((0,ze.Z)({},ot),{},{times:ot.times+1,targetAlign:Un,lastTop:ti}))}},[ot,Ce.current]),function(sn){if(sn==null){Xe();return}if(we.Z.cancel(Je.current),typeof sn=="number")Pt(sn);else if(sn&&(0,De.Z)(sn)==="object"){var Xt,Ht=sn.align;"index"in sn?Xt=sn.index:Xt=Pe.findIndex(function(cn){return Se(cn)===sn.key});var xn=sn.offset,Dn=xn===void 0?0:xn;It({times:0,index:Xt,offset:Dn,originAlign:Ht})}}}var ln=ht.forwardRef(function(Ce,Pe){var Ne=Ce.prefixCls,ke=Ce.rtl,Se=Ce.scrollOffset,nt=Ce.scrollRange,Pt=Ce.onStartMove,Xe=Ce.onStopMove,Je=Ce.onScroll,yt=Ce.horizontal,wt=Ce.spinSize,ot=Ce.containerSize,It=Ce.style,sn=Ce.thumbStyle,Xt=Ce.showScrollBar,Ht=ht.useState(!1),xn=(0,_e.Z)(Ht,2),Dn=xn[0],cn=xn[1],Un=ht.useState(null),ti=(0,_e.Z)(Un,2),Wn=ti[0],Zn=ti[1],Jn=ht.useState(null),vi=(0,_e.Z)(Jn,2),pi=vi[0],zi=vi[1],$i=!ke,Yn=ht.useRef(),Gn=ht.useRef(),oi=ht.useState(Xt),Li=(0,_e.Z)(oi,2),di=Li[0],gr=Li[1],Ii=ht.useRef(),Le=function(){Xt===!0||Xt===!1||(clearTimeout(Ii.current),gr(!0),Ii.current=setTimeout(function(){gr(!1)},3e3))},si=nt-ot||0,ji=ot-wt||0,gn=ht.useMemo(function(){if(Se===0||si===0)return 0;var Yt=Se/si;return Yt*ji},[Se,si,ji]),qn=function(tn){tn.stopPropagation(),tn.preventDefault()},mi=ht.useRef({top:gn,dragging:Dn,pageY:Wn,startTop:pi});mi.current={top:gn,dragging:Dn,pageY:Wn,startTop:pi};var Fi=function(tn){cn(!0),Zn(lt(tn,yt)),zi(mi.current.top),Pt(),tn.stopPropagation(),tn.preventDefault()};ht.useEffect(function(){var Yt=function(Vt){Vt.preventDefault()},tn=Yn.current,vt=Gn.current;return tn.addEventListener("touchstart",Yt,{passive:!1}),vt.addEventListener("touchstart",Fi,{passive:!1}),function(){tn.removeEventListener("touchstart",Yt),vt.removeEventListener("touchstart",Fi)}},[]);var jn=ht.useRef();jn.current=si;var Tn=ht.useRef();Tn.current=ji,ht.useEffect(function(){if(Dn){var Yt,tn=function(Vt){var rn=mi.current,Pn=rn.dragging,kn=rn.pageY,St=rn.startTop;we.Z.cancel(Yt);var hn=Yn.current.getBoundingClientRect(),In=ot/(yt?hn.width:hn.height);if(Pn){var ii=(lt(Vt,yt)-kn)*In,Gt=St;!$i&&yt?Gt-=ii:Gt+=ii;var Jt=jn.current,hi=Tn.current,fi=hi?Gt/hi:0,ui=Math.ceil(fi*Jt);ui=Math.max(ui,0),ui=Math.min(ui,Jt),Yt=(0,we.Z)(function(){Je(ui,yt)})}},vt=function(){cn(!1),Xe()};return window.addEventListener("mousemove",tn,{passive:!0}),window.addEventListener("touchmove",tn,{passive:!0}),window.addEventListener("mouseup",vt,{passive:!0}),window.addEventListener("touchend",vt,{passive:!0}),function(){window.removeEventListener("mousemove",tn),window.removeEventListener("touchmove",tn),window.removeEventListener("mouseup",vt),window.removeEventListener("touchend",vt),we.Z.cancel(Yt)}}},[Dn]),ht.useEffect(function(){return Le(),function(){clearTimeout(Ii.current)}},[Se]),ht.useImperativeHandle(Pe,function(){return{delayHidden:Le}});var At="".concat(Ne,"-scrollbar"),Dt={position:"absolute",visibility:di?null:"hidden"},Ve={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return yt?(Dt.height=8,Dt.left=0,Dt.right=0,Dt.bottom=0,Ve.height="100%",Ve.width=wt,$i?Ve.left=gn:Ve.right=gn):(Dt.width=8,Dt.top=0,Dt.bottom=0,$i?Dt.right=0:Dt.left=0,Ve.width="100%",Ve.height=wt,Ve.top=gn),ht.createElement("div",{ref:Yn,className:mt()(At,(0,Ct.Z)((0,Ct.Z)((0,Ct.Z)({},"".concat(At,"-horizontal"),yt),"".concat(At,"-vertical"),!yt),"".concat(At,"-visible"),di)),style:(0,ze.Z)((0,ze.Z)({},Dt),It),onMouseDown:qn,onMouseMove:Le},ht.createElement("div",{ref:Gn,className:mt()("".concat(At,"-thumb"),(0,Ct.Z)({},"".concat(At,"-thumb-moving"),Dn)),style:(0,ze.Z)((0,ze.Z)({},Ve),sn),onMouseDown:Fi}))}),Ft=ln,$t=20;function Qt(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ne=Ce/Pe*Ce;return isNaN(Ne)&&(Ne=0),Ne=Math.max(Ne,$t),Math.floor(Ne)}var Bn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],on=[],Cn={overflowY:"auto",overflowAnchor:"none"};function gt(Ce,Pe){var Ne=Ce.prefixCls,ke=Ne===void 0?"rc-virtual-list":Ne,Se=Ce.className,nt=Ce.height,Pt=Ce.itemHeight,Xe=Ce.fullHeight,Je=Xe===void 0?!0:Xe,yt=Ce.style,wt=Ce.data,ot=Ce.children,It=Ce.itemKey,sn=Ce.virtual,Xt=Ce.direction,Ht=Ce.scrollWidth,xn=Ce.component,Dn=xn===void 0?"div":xn,cn=Ce.onScroll,Un=Ce.onVirtualScroll,ti=Ce.onVisibleChange,Wn=Ce.innerProps,Zn=Ce.extraRender,Jn=Ce.styles,vi=Ce.showScrollBar,pi=vi===void 0?"optional":vi,zi=(0,Ke.Z)(Ce,Bn),$i=ht.useCallback(function(Gr){return typeof It=="function"?It(Gr):Gr==null?void 0:Gr[It]},[It]),Yn=Bt($i,null,null),Gn=(0,_e.Z)(Yn,4),oi=Gn[0],Li=Gn[1],di=Gn[2],gr=Gn[3],Ii=!!(sn!==!1&&nt&&Pt),Le=ht.useMemo(function(){return Object.values(di.maps).reduce(function(Gr,Br){return Gr+Br},0)},[di.id,di.maps]),si=Ii&&wt&&(Math.max(Pt*wt.length,Le)>nt||!!Ht),ji=Xt==="rtl",gn=mt()(ke,(0,Ct.Z)({},"".concat(ke,"-rtl"),ji),Se),qn=wt||on,mi=(0,ht.useRef)(),Fi=(0,ht.useRef)(),jn=(0,ht.useRef)(),Tn=(0,ht.useState)(0),At=(0,_e.Z)(Tn,2),Dt=At[0],Ve=At[1],Yt=(0,ht.useState)(0),tn=(0,_e.Z)(Yt,2),vt=tn[0],rt=tn[1],Vt=(0,ht.useState)(!1),rn=(0,_e.Z)(Vt,2),Pn=rn[0],kn=rn[1],St=function(){kn(!0)},hn=function(){kn(!1)},In={getKey:$i};function ii(Gr){Ve(function(Br){var yr;typeof Gr=="function"?yr=Gr(Br):yr=Gr;var xo=cr(yr);return mi.current.scrollTop=xo,xo})}var Gt=(0,ht.useRef)({start:0,end:qn.length}),Jt=(0,ht.useRef)(),hi=me(qn,$i),fi=(0,_e.Z)(hi,1),ui=fi[0];Jt.current=ui;var ni=ht.useMemo(function(){if(!Ii)return{scrollHeight:void 0,start:0,end:qn.length-1,offset:void 0};if(!si){var Gr;return{scrollHeight:((Gr=Fi.current)===null||Gr===void 0?void 0:Gr.offsetHeight)||0,start:0,end:qn.length-1,offset:void 0}}for(var Br=0,yr,xo,ua,Tr=qn.length,ir=0;ir<Tr;ir+=1){var Xn=qn[ir],wr=$i(Xn),bo=di.get(wr),ta=Br+(bo===void 0?Pt:bo);ta>=Dt&&yr===void 0&&(yr=ir,xo=Br),ta>Dt+nt&&ua===void 0&&(ua=ir),Br=ta}return yr===void 0&&(yr=0,xo=0,ua=Math.ceil(nt/Pt)),ua===void 0&&(ua=qn.length-1),ua=Math.min(ua+1,qn.length-1),{scrollHeight:Br,start:yr,end:ua,offset:xo}},[si,Ii,Dt,qn,gr,nt]),ci=ni.scrollHeight,li=ni.start,Ni=ni.end,Qi=ni.offset;Gt.current.start=li,Gt.current.end=Ni,ht.useLayoutEffect(function(){var Gr=di.getRecord();if(Gr.size===1){var Br=Array.from(Gr)[0],yr=$i(qn[li]);if(yr===Br){var xo=di.get(Br),ua=xo-Pt;ii(function(Tr){return Tr+ua})}}di.resetRecord()},[ci]);var lr=ht.useState({width:0,height:nt}),wn=(0,_e.Z)(lr,2),Pr=wn[0],Or=wn[1],ar=function(Br){Or({width:Br.offsetWidth,height:Br.offsetHeight})},fn=(0,ht.useRef)(),Rn=(0,ht.useRef)(),Ci=ht.useMemo(function(){return Qt(Pr.width,Ht)},[Pr.width,Ht]),_i=ht.useMemo(function(){return Qt(Pr.height,ci)},[Pr.height,ci]),ki=ci-nt,Wi=(0,ht.useRef)(ki);Wi.current=ki;function cr(Gr){var Br=Gr;return Number.isNaN(Wi.current)||(Br=Math.min(Br,Wi.current)),Br=Math.max(Br,0),Br}var qi=Dt<=0,nr=Dt>=ki,dr=vt<=0,Mn=vt>=Ht,to=Ie(qi,nr,dr,Mn),Ln=function(){return{x:ji?-vt:vt,y:Dt}},Hr=(0,ht.useRef)(Ln()),so=(0,Ze.useEvent)(function(Gr){if(Un){var Br=(0,ze.Z)((0,ze.Z)({},Ln()),Gr);(Hr.current.x!==Br.x||Hr.current.y!==Br.y)&&(Un(Br),Hr.current=Br)}});function Bi(Gr,Br){var yr=Gr;Br?((0,dt.flushSync)(function(){rt(yr)}),so()):ii(yr)}function Mo(Gr){var Br=Gr.currentTarget.scrollTop;Br!==Dt&&ii(Br),cn==null||cn(Gr),so()}var oo=function(Br){var yr=Br,xo=Ht?Ht-Pr.width:0;return yr=Math.max(yr,0),yr=Math.min(yr,xo),yr},Ui=(0,Ze.useEvent)(function(Gr,Br){Br?((0,dt.flushSync)(function(){rt(function(yr){var xo=yr+(ji?-Gr:Gr);return oo(xo)})}),so()):ii(function(yr){var xo=yr+Gr;return xo})}),er=je(Ii,qi,nr,dr,Mn,!!Ht,Ui),Wr=(0,_e.Z)(er,2),no=Wr[0],xi=Wr[1];Zt(Ii,mi,function(Gr,Br,yr,xo){var ua=xo;return to(Gr,Br,yr)?!1:!ua||!ua._virtualHandled?(ua&&(ua._virtualHandled=!0),no({preventDefault:function(){},deltaX:Gr?Br:0,deltaY:Gr?0:Br}),!0):!1}),Ge(si,mi,function(Gr){ii(function(Br){return Br+Gr})}),(0,Et.Z)(function(){function Gr(yr){var xo=qi&&yr.detail<0,ua=nr&&yr.detail>0;Ii&&!xo&&!ua&&yr.preventDefault()}var Br=mi.current;return Br.addEventListener("wheel",no,{passive:!1}),Br.addEventListener("DOMMouseScroll",xi,{passive:!0}),Br.addEventListener("MozMousePixelScroll",Gr,{passive:!1}),function(){Br.removeEventListener("wheel",no),Br.removeEventListener("DOMMouseScroll",xi),Br.removeEventListener("MozMousePixelScroll",Gr)}},[Ii,qi,nr]),(0,Et.Z)(function(){if(Ht){var Gr=oo(vt);rt(Gr),so({x:Gr})}},[Pr.width,Ht]);var tt=function(){var Br,yr;(Br=fn.current)===null||Br===void 0||Br.delayHidden(),(yr=Rn.current)===null||yr===void 0||yr.delayHidden()},lo=un(mi,qn,di,Pt,$i,function(){return Li(!0)},ii,tt);ht.useImperativeHandle(Pe,function(){return{nativeElement:jn.current,getScrollInfo:Ln,scrollTo:function(Br){function yr(xo){return xo&&(0,De.Z)(xo)==="object"&&("left"in xo||"top"in xo)}yr(Br)?(Br.left!==void 0&&rt(oo(Br.left)),lo(Br.top)):lo(Br)}}}),(0,Et.Z)(function(){if(ti){var Gr=qn.slice(li,Ni+1);ti(Gr,qn)}},[li,Ni,qn]);var _o=qe(qn,$i,di,Pt),ga=Zn==null?void 0:Zn({start:li,end:Ni,virtual:si,offsetX:vt,offsetY:Qi,rtl:ji,getSize:_o}),Oa=he(qn,li,Ni,Ht,vt,oi,ot,In),Xo=null;nt&&(Xo=(0,ze.Z)((0,Ct.Z)({},Je?"height":"maxHeight",nt),Cn),Ii&&(Xo.overflowY="hidden",Ht&&(Xo.overflowX="hidden"),Pn&&(Xo.pointerEvents="none")));var Fa={};return ji&&(Fa.dir="rtl"),ht.createElement("div",(0,ce.Z)({ref:jn,style:(0,ze.Z)((0,ze.Z)({},yt),{},{position:"relative"}),className:gn},Fa,zi),ht.createElement(ct.Z,{onResize:ar},ht.createElement(Dn,{className:"".concat(ke,"-holder"),style:Xo,ref:mi,onScroll:Mo,onMouseEnter:tt},ht.createElement(te,{prefixCls:ke,height:ci,offsetX:vt,offsetY:Qi,scrollWidth:Ht,onInnerResize:Li,ref:Fi,innerProps:Wn,rtl:ji,extra:ga},Oa))),si&&ci>nt&&ht.createElement(Ft,{ref:fn,prefixCls:ke,scrollOffset:Dt,scrollRange:ci,rtl:ji,onScroll:Bi,onStartMove:St,onStopMove:hn,spinSize:_i,containerSize:Pr.height,style:Jn==null?void 0:Jn.verticalScrollBar,thumbStyle:Jn==null?void 0:Jn.verticalScrollBarThumb,showScrollBar:pi}),si&&Ht>Pr.width&&ht.createElement(Ft,{ref:Rn,prefixCls:ke,scrollOffset:vt,scrollRange:Ht,rtl:ji,onScroll:Bi,onStartMove:St,onStopMove:hn,spinSize:Ci,containerSize:Pr.width,horizontal:!0,style:Jn==null?void 0:Jn.horizontalScrollBar,thumbStyle:Jn==null?void 0:Jn.horizontalScrollBarThumb,showScrollBar:pi}))}var En=ht.forwardRef(gt);En.displayName="List";var Vn=En,He=Vn},32637:function(Sn,an,ve){"use strict";Sn.exports=ve.p+"static/AssistantCode3.a8740efb.jpeg"},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,an,ve){"use strict";ve.d(an,{Z:function(){return mt}});const ce=ct=>typeof ct=="object"&&ct!=null&&ct.nodeType===1,De=(ct,Ze)=>(!Ze||ct!=="hidden")&&ct!=="visible"&&ct!=="clip",ze=(ct,Ze)=>{if(ct.clientHeight<ct.scrollHeight||ct.clientWidth<ct.scrollWidth){const Et=getComputedStyle(ct,null);return De(Et.overflowY,Ze)||De(Et.overflowX,Ze)||(ht=>{const dt=(Ae=>{if(!Ae.ownerDocument||!Ae.ownerDocument.defaultView)return null;try{return Ae.ownerDocument.defaultView.frameElement}catch(te){return null}})(ht);return!!dt&&(dt.clientHeight<ht.scrollHeight||dt.clientWidth<ht.scrollWidth)})(ct)}return!1},Ct=(ct,Ze,Et,ht,dt,Ae,te,ee)=>Ae<ct&&te>Ze||Ae>ct&&te<Ze?0:Ae<=ct&&ee<=Et||te>=Ze&&ee>=Et?Ae-ct-ht:te>Ze&&ee<Et||Ae<ct&&ee>Et?te-Ze+dt:0,_e=ct=>{const Ze=ct.parentElement;return Ze==null?ct.getRootNode().host||null:Ze},Ke=(ct,Ze)=>{var Et,ht,dt,Ae;if(typeof document=="undefined")return[];const{scrollMode:te,block:ee,inline:he,boundary:se,skipOverflowHiddenElements:de}=Ze,me=typeof se=="function"?se:ln=>ln!==se;if(!ce(ct))throw new TypeError("Invalid target");const we=document.scrollingElement||document.documentElement,Me=[];let be=ct;for(;ce(be)&&me(be);){if(be=_e(be),be===we){Me.push(be);break}be!=null&&be===document.body&&ze(be)&&!ze(document.documentElement)||be!=null&&ze(be,de)&&Me.push(be)}const Ie=(ht=(Et=window.visualViewport)==null?void 0:Et.width)!=null?ht:innerWidth,je=(Ae=(dt=window.visualViewport)==null?void 0:dt.height)!=null?Ae:innerHeight,{scrollX:qe,scrollY:$e}=window,{height:ft,width:Re,top:Tt,right:et,bottom:bt,left:Bt}=ct.getBoundingClientRect(),{top:Nt,right:Zt,bottom:Ut,left:lt}=(ln=>{const Ft=window.getComputedStyle(ln);return{top:parseFloat(Ft.scrollMarginTop)||0,right:parseFloat(Ft.scrollMarginRight)||0,bottom:parseFloat(Ft.scrollMarginBottom)||0,left:parseFloat(Ft.scrollMarginLeft)||0}})(ct);let Ge=ee==="start"||ee==="nearest"?Tt-Nt:ee==="end"?bt+Ut:Tt+ft/2-Nt+Ut,kt=he==="center"?Bt+Re/2-lt+Zt:he==="end"?et+Zt:Bt-lt;const un=[];for(let ln=0;ln<Me.length;ln++){const Ft=Me[ln],{height:$t,width:Qt,top:Bn,right:on,bottom:Cn,left:gt}=Ft.getBoundingClientRect();if(te==="if-needed"&&Tt>=0&&Bt>=0&&bt<=je&&et<=Ie&&(Ft===we&&!ze(Ft)||Tt>=Bn&&bt<=Cn&&Bt>=gt&&et<=on))return un;const En=getComputedStyle(Ft),Vn=parseInt(En.borderLeftWidth,10),He=parseInt(En.borderTopWidth,10),Ce=parseInt(En.borderRightWidth,10),Pe=parseInt(En.borderBottomWidth,10);let Ne=0,ke=0;const Se="offsetWidth"in Ft?Ft.offsetWidth-Ft.clientWidth-Vn-Ce:0,nt="offsetHeight"in Ft?Ft.offsetHeight-Ft.clientHeight-He-Pe:0,Pt="offsetWidth"in Ft?Ft.offsetWidth===0?0:Qt/Ft.offsetWidth:0,Xe="offsetHeight"in Ft?Ft.offsetHeight===0?0:$t/Ft.offsetHeight:0;if(we===Ft)Ne=ee==="start"?Ge:ee==="end"?Ge-je:ee==="nearest"?Ct($e,$e+je,je,He,Pe,$e+Ge,$e+Ge+ft,ft):Ge-je/2,ke=he==="start"?kt:he==="center"?kt-Ie/2:he==="end"?kt-Ie:Ct(qe,qe+Ie,Ie,Vn,Ce,qe+kt,qe+kt+Re,Re),Ne=Math.max(0,Ne+$e),ke=Math.max(0,ke+qe);else{Ne=ee==="start"?Ge-Bn-He:ee==="end"?Ge-Cn+Pe+nt:ee==="nearest"?Ct(Bn,Cn,$t,He,Pe+nt,Ge,Ge+ft,ft):Ge-(Bn+$t/2)+nt/2,ke=he==="start"?kt-gt-Vn:he==="center"?kt-(gt+Qt/2)+Se/2:he==="end"?kt-on+Ce+Se:Ct(gt,on,Qt,Vn,Ce+Se,kt,kt+Re,Re);const{scrollLeft:Je,scrollTop:yt}=Ft;Ne=Xe===0?0:Math.max(0,Math.min(yt+Ne/Xe,Ft.scrollHeight-$t/Xe+nt)),ke=Pt===0?0:Math.max(0,Math.min(Je+ke/Pt,Ft.scrollWidth-Qt/Pt+Se)),Ge+=yt-Ne,kt+=Je-ke}un.push({el:Ft,top:Ne,left:ke})}return un},Be=ct=>ct===!1?{block:"end",inline:"nearest"}:(Ze=>Ze===Object(Ze)&&Object.keys(Ze).length!==0)(ct)?ct:{block:"start",inline:"nearest"};function mt(ct,Ze){if(!ct.isConnected||!(dt=>{let Ae=dt;for(;Ae&&Ae.parentNode;){if(Ae.parentNode===document)return!0;Ae=Ae.parentNode instanceof ShadowRoot?Ae.parentNode.host:Ae.parentNode}return!1})(ct))return;const Et=(dt=>{const Ae=window.getComputedStyle(dt);return{top:parseFloat(Ae.scrollMarginTop)||0,right:parseFloat(Ae.scrollMarginRight)||0,bottom:parseFloat(Ae.scrollMarginBottom)||0,left:parseFloat(Ae.scrollMarginLeft)||0}})(ct);if((dt=>typeof dt=="object"&&typeof dt.behavior=="function")(Ze))return Ze.behavior(Ke(ct,Ze));const ht=typeof Ze=="boolean"||Ze==null?void 0:Ze.behavior;for(const{el:dt,top:Ae,left:te}of Ke(ct,Be(Ze))){const ee=Ae-Et.top+Et.bottom,he=te-Et.left+Et.right;dt.scroll({top:ee,left:he,behavior:ht})}}}}]);